Conversation
…s (gh-ludics-497) Adds an exported `formatWarningCountHeuristic(n)` to scripts/lint-test-isolation.ts and wires it into both the CLI summary line (when warningCount > 0) and the pinned-count integration test as a guarded throw before `expect(...).toBe(20)`. Now Bun's failure surface prints the actionable heuristic — "wrap with withSyntheticHarness(beforeEach, afterEach) OR bump the pin" — ahead of the numeric matcher diff. The zero-warning summary is byte-identical to today. Mirrors the same idiom on the sibling lint-contracts pinned warning count via `formatContractsHeuristic(n)`, with contracts-specific wording (no withSyntheticHarness mention) seeded from the existing integration-test comment. Captures two filter-rejected doctrine items as docs/swe-textbook.md entries (per Capture Idempotency procedure): "Cherry-picking one named lint" (filtered action 1) and ""Optional pre-commit hook" feedback-digest items must verify the infra exists" (filtered action 3). Regression coverage: two new AC2 unit tests in scripts/lint-test-isolation.test.ts (positive: rule-3 fixture asserts the summary contains the heuristic; negative: clean fixture asserts byte-identity with the pre-fix summary). Integration-test guarded throws use formatWarningCountHeuristic / formatContractsHeuristic, so the heuristic body lives in exactly one production source per lint family. Closes #497. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@codex review Focus on bugs, correctness issues, and edge cases. Do not check adherence to a spec or plan. |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Coder retro — what I'd do differently next timeThree small process refinements surfaced by this PR. None block follow-up; logging here for future rounds. 1. Run the AC's literal verifiers against the current tree before writing "no gaps"The reviewer's REQUEST_CHANGES on merge-0 caught one real failure mode: I declared "No assumption gaps" without first running AC5's literal 2. AC1's "constant or formatter" wording invites unnecessary aliasingMy coder plan initially proposed both 3. The contracts-side CLI-summary asymmetry is a small follow-up worth declaring up-frontI left What went well (carry forward)
|
Summary
formatWarningCountHeuristic(n)inscripts/lint-test-isolation.tsand wires it into both the CLI summary (whenwarningCount > 0) and the pinned-count integration test as a guarded throw beforeexpect(...).toBe(20). Bun's failure surface now prints the actionable heuristic ("wrap withwithSyntheticHarness(beforeEach, afterEach)OR bump the pin") ahead of the numeric matcher diff.formatContractsHeuristic(n), with distinct wording (nowithSyntheticHarnessmention; AC4 invariant).docs/swe-textbook.mdentries per Capture Idempotency.Closes #497.
Test plan
bun run typecheckcleanbun test— 2245 pass / 0 fail (was 2243 at baseline; +2 from AC2 positive/negative tests)bun run lint:test-isolationsummary on live tree:✅ No test-isolation anti-patterns detected (20 warnings — to silence a new test: wrap with withSyntheticHarness(beforeEach, afterEach) from src/test-utils.ts (preferred — actually isolates the harness env), OR bump the pinned count in scripts/lint-test-isolation.test.ts (only for pure-unit tests with no harness needs).bun run lint:contractssummary unchanged byte-for-bytebun run lintcleangit grep -F "wrap with withSyntheticHarness(beforeEach, afterEach) from src/test-utils.ts"finds the literal in exactly one production source (scripts/lint-test-isolation.tsformatter body) plus one test-sidetoContainliteral, no copy-paste in the integration-throw sitegit grep -F "withSyntheticHarness" -- scripts/lint-contracts.ts scripts/lint-contracts.test.tsreturns zero hits### Cherry-picking one named lint…and### "Optional pre-commit hook"…) present indocs/swe-textbook.mdwith requiredDescription: / Precipitating retro: / Filter decision:fieldsscripts/lint-{test-isolation,contracts}{,.test}.ts+docs/swe-textbook.md); no edits undersrc/coder/**,src/reviewer/**,src/orchestration/**, agent-loaded skills,.husky/**, orpackage.json's husky/lint-staged keysPost-merge
Per AC6, comment on issue #497 with the merged-PR link plus the two
docs/swe-textbook.mdanchor IDs (verify literal slugger output viagh api -H "Accept: application/vnd.github.html" repos/lukstafi/ludics/contents/docs/swe-textbook.md?ref=<merge-sha>before pinning slugs), then close.🤖 Generated with Claude Code