Repository navigation
🤖 tests: P3-2 seam-check test-audit residuals #7604
Copy link
Copy link
Open
Description
Leftovers from workstream P3-2 (seam checks and lint scope) of the 2026-10-26 test audit, after #7552, #7561, #7586 and #7590. Each item says why it was not fixed there and what triggers the follow-up.
check-test-only-exportsdoes not check named re-exports as exports of the barrel.export { x } from "./a"only forwards uses today, so a name that only tests import through a barrel passes whenausesxitself. Checking the barrel's re-exports surfaces 32 more findings on main (compatibility re-exports insrc/node/services/streamManager.ts,src/common/config/schemas/appConfigOnDisk.tsand others). Each needs a deletion or an allowlist reason, which is larger than 🤖 tests: fail on production exports that only tests (or nothing) reference #7561. Codex finding: 🤖 tests: fail on production exports that only tests (or nothing) reference #7561 (thread "Check named re-exports as export declarations"). Trigger: after 🤖 tests: fail on production exports that only tests (or nothing) reference #7561 merges. Owner: P3-2, as a stacked PR.- Seam patterns for "absent on test doubles" and "test doubles … pass". These patterns are written but not landed, because the comments they target in
src/node/services/agentSession.ts(effectRunner,hostClock) are being deleted by P3-1 in 🤖 refactor: AgentSession and WorkspaceService require a stream manager #7578. Landing them first would force allowlist entries for code that is going away. After 🤖 refactor: AgentSession and WorkspaceService require a stream manager #7578 merges, add the patterns with a test and a negative case each, and allowlistAgentSessionAIService.runtimeFactory(production caller:AIService.runtimeFactory). Trigger: 🤖 refactor: AgentSession and WorkspaceService require a stream manager #7578 merges. Owner: P3-2. - Minor: seam patterns miss negation that is not next to the verb.
not intended to be used in testsandno longer used in testsstill match. The adjacent forms (never called in tests,not used in tests) are handled in 🤖 tests: seam check catches override/in-tests claims and ForTests names #7552. No comment on main hits this. If one does, reword it or add an allowlist entry. Fix only if it recurs. Codex finding: 🤖 tests: seam check catches override/in-tests claims and ForTests names #7552 (thread "Handle intervening words in negated seam claims"). - Minor:
check-test-only-exportsdoes not drop ambiguousexport *names. When a barrel star-exports two modules that both exportx,xis not in the barrel's namespace, but a namespace use still marks both as used. The gate under-reports. No barrel on main has the case. Codex finding: 🤖 tests: fail on production exports that only tests (or nothing) reference #7561 (thread "Filter ambiguous names from star-export namespaces"). Fix with item 1. check-test-only-exportscounts*.bench.tsand*.hostProof.tsas production referrers.tsconfig.main.jsonexcludes both from the build, so an export that only a benchmark or host proof uses escapes the gate. Fix: exclude both suffixes for this check, then delete or allowlist what it surfaces. Codex finding: 🤖 tests: fail on production exports that only tests (or nothing) reference #7561 (thread "Exclude benchmark and host-proof files from referrers"). Fix with item 1. Owner: P3-2.check-test-routingaccepts a Python test named in any Makefile recipe, even one CI never runs. Fix: walk the Make prerequisite graph from the targets that.github/workflowscall and accept only recipes of reachable targets. All 8 Python tests are in CI-run targets today. Codex finding: 🤖 tests: check-test-routing covers Python tests #7590 (thread "Verify that the containing target actually runs in CI"). Owner: P3-2.- Minor: three
check-test-only-exportsparser gaps (🤖 tests: fail on production exports that only tests (or nothing) reference #7561 round 5). (a) A CommonJS file that reads its ownexports.adoes not count as a local use (false finding). (b) A lowercase export named like an intrinsic JSX tag (<button />) counts as used (missed finding). (c) JSDocimport("./x").Footypes in shipped.jsare not traversed (false finding). None occurs on main. Fix with item 1, or when one recurs. Owner: P3-2. - Minor: three more
check-test-only-exportsgaps (🤖 tests: fail on production exports that only tests (or nothing) reference #7561 round 6). (a) Shadowing does not separate the type and value namespaces:function f<Token>() { return Token; }hides a use of an exported valueToken(false finding). (b)export * as ns from "./a"marks all ofaused even when nothing usesns(missed finding). (c) A local use offooalso creditsexport { foo as alias }(missed finding). None occurs on main. Fix with item 1. Owner: P3-2. - Minor: test-double seam pattern gaps (🤖 tests: seam check flags test-double seam claims #7620 round 5). (a) A comment on one symbol that says a different camelCase or backticked name "is absent from test doubles" is flagged (false finding). (b) Adverbs between the subject and
pass("Test doubles always pass it") are missed. (c) A backticked qualifier ("Test doubles ofAIServicepass one too") is missed. None occurs on main. Phrase patterns draw a new wording case each review round, so fix these only when one recurs. Owner: P3-2.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity