@deslop/coding-standards 0.1.1077 → 0.1.1081

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,14 +9,14 @@ Challenge the work independently. Trace the contract, try its strongest reachabl
9
9
 
10
10
  ## Code review
11
11
 
12
- Review the normalized diff: the author must run Oxfmt and deterministic lint autofix first. Do not spend review reasoning on formatting or already-fixable diagnostics. If normalization is unavailable, name that gap and have the author prepare it; never mutate a read-only target.
12
+ Review the diff that the author normalized per engineering. Spend no reasoning on formatting or diagnostics that lint reports outside legacy lists; if normalization is missing, name that gap and never mutate a read-only target.
13
13
 
14
14
  - **Depth.** Read every hand-written changed line. For generated output, review the generator change and a sample, such as one package per source format. Trace each contract through its real consumers, failure paths, concurrency and resource ownership against the merge base. Try the inputs, orderings and failures that the tests miss. When the change refactors a whole file, list each behavior the file had at the merge base and prove that each one still holds, apart from the planned change.
15
15
  - **Findings.** Report broken behavior or contracts that a real caller's input reaches. Report violations of engineering, design or `CODING_STANDARDS.md` in changed lines, and in every line of a file that the task adds or rewrites. A recurring shape that departs from its canonical example without a request is a finding. For a pattern change, run the Patterns search for the old form and report each remaining consumer. Skip what lint enforces outside legacy lists, and restyling that the change does not need.
16
16
  - **Beyond the diff.** A contradiction with an unchanged file, a stale reference that the change leaves, and a false assumption that the change rests on are findings.
17
17
  - **Not findings.** Taste without a rule, wording, hypothetical inputs, and defects that the branch neither made nor relies on.
18
- - **Later rounds.** Retain the covered commit, contracts and scope. Review only uncovered hunks, the fixes since that commit, and their affected consumers. Reuse prior source reads while those sources are unchanged. A confirmed local fix needs no new independent round unless it introduces an uncovered contract, mechanism or failure path. A new notice or a changed PR body is not a code-review trigger.
19
- - **Probes.** Settle a suspicion with disposable inline code against the public interface, real data or installed artifact. Use the repository's runtime command, such as `vp node -e '<script>'` or `vp env exec bun -e '<script>'`; verify that it loads the source and dependencies. Do not create a test file, worktree or test-only seam to answer one question. Never start a service or test suite during read-only review.
18
+ - **Later rounds.** Read the published pull request diff, such as `gh pr diff <number>`, and judge the whole layer as one change in every round: structure, duplication and cleanup across its files. Spend the Depth on the commits since the covered commit and their consumers, and reuse prior reads of unchanged sources. A stack overview reads every layer together and reports what crosses layers: duplication, a contract one layer breaks for another, and code in the wrong layer. A confirmed local fix needs no new independent round unless it introduces an uncovered contract, mechanism or failure path. A new notice or a changed PR body is not a code-review trigger.
19
+ - **Probes.** Settle a suspicion with a probe per testing's Throwaway. Never start a service or test suite during read-only review.
20
20
  - **Browser evidence.** Inspect the existing preview, captures, console and relevant requests without changing page state. Give the owner the smallest missing browser action and observable result to check; the owner drives the browser and records it. A screenshot proves a visible state, not unobserved timing, persistence or release behavior.
21
21
  - **Test value.** Use testing to decide whether a permanent test protects a distinct plausible regression. Do not demand a new test for every finding when an inline probe or existing browser proof settles it.
22
22
  - **Variants.** After reproducing a defect, look for the same root cause in its other real callers. Broaden one dimension at a time and stop when unrelated hypotheses replace concrete evidence.
@@ -11,8 +11,8 @@ description: 'Select and run black-box behavior proof for Effect apps and tools.
11
11
  - **Public interface.** Test exported Layers, services and functions through observable behavior, so a rewrite that keeps the contract keeps the tests green. The browser proves web UI components; the simulator proves native ones.
12
12
  - **Redundant.** Delete touched cases that only repeat dependency guarantees, constants, wording, removed behavior or a covered input. Keep boundary tests of the application's own validation, encoding or integration.
13
13
  - **Independent.** Take expected values from the contract or a worked example, never from the implementation. Use the smallest reachable fixture that tells the cases apart.
14
- - **Bugs.** Reproduce a bug before you fix it. Keep a regression case when future changes can plausibly break its contractual behavior, in the existing test of the fixed code or a new case when none fits. An independently reproduced defect does not require a new test file.
15
- - **Throwaway.** Start with question-sized inline code, an existing test or a focused real-browser check. Delete the spike after it answers the question. Promote it only when its distinct regression protection meets Worth it; never add a private export or configurable production seam just for proof.
14
+ - **Bugs.** Reproduce a bug before you fix it. For a hard bug, test one hypothesis per probe, remove the edits of a disproven hypothesis and rerun the original scenario. Keep a regression case when future changes can plausibly break its contractual behavior, in the existing test of the fixed code or a new case when none fits. An independently reproduced defect does not require a new test file.
15
+ - **Throwaway.** Start with question-sized inline code, an existing test or a focused real-browser check. Run inline code against the public interface, real data or the installed artifact with the repository's runtime command, such as `vp node -e '<script>'` or `vp env exec bun -e '<script>'`, and verify that it loads the source and dependencies. Never create a test file, worktree or seam to answer one question. Delete the spike after it answers the question. Promote it only when its distinct regression protection meets Worth it; never add a private export or configurable production seam just for proof.
16
16
  - **Honest.** No wrong expectations or rule workarounds. Change assertions only for recorded behavior changes, and keep every still-relevant value.
17
17
 
18
18
  **Assertions.** Use one representative input per behavior, in its existing case. Share a helper only between cases that use it. Use @effect/vitest assertions for outputs and structured error identity. Replace dependencies through Layers or public parameters, never global or module mocks. Keep mutable state in its owning fixture.
@@ -42,7 +42,7 @@ assert.strictEqual(Array.flatMap(attioProvider.groups, group => group.actions).l
42
42
  - **Branches.** Exercise the reachable distinctions: empty, duplicate, concurrent and dependency failure. Write no Cartesian product, and no random or repeated happy paths without a hypothesis.
43
43
  - **Failure.** Use `Effect.flip` for an expected failure and `Effect.exit` for both outcomes. Assert domain identity and preserved state and resources: no partial write, lost value, extra retry or leak. Wording or rejection alone is not enough, and incidental order is no assertion.
44
44
  - **Control.** Run the regression test against the unfixed implementation, and confirm that the intended assertion fails, not setup, imports or compilation. Before a refactor, cover the old behavior.
45
- - **Audit.** Remove duplicate and tautological cases in the touched scope, but retain independent protocol, package, validation, authorization and persistence contracts. Mock call counts do not prove an external boundary. Do not replace a useful test with a disposable script just to reduce the count.
45
+ - **Audit.** Delete a case that no plausible wrong implementation fails, such as an assertion on a constant placeholder. Remove duplicate and tautological cases in the touched scope, but retain independent protocol, package, validation, authorization and persistence contracts. Mock call counts do not prove an external boundary. Do not replace a useful test with a disposable script just to reduce the count.
46
46
 
47
47
  ## Effect and fixtures
48
48