Skip to content

🤖 tests: P3-2 seam-check test-audit residuals #7604

Open

Description

@ThomasK33

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.

  1. check-test-only-exports does 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 when a uses x itself. Checking the barrel's re-exports surfaces 32 more findings on main (compatibility re-exports in src/node/services/streamManager.ts, src/common/config/schemas/appConfigOnDisk.ts and 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.
  2. 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 allowlist AgentSessionAIService.runtimeFactory (production caller: AIService.runtimeFactory). Trigger: 🤖 refactor: AgentSession and WorkspaceService require a stream manager #7578 merges. Owner: P3-2.
  3. Minor: seam patterns miss negation that is not next to the verb. not intended to be used in tests and no longer used in tests still 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").
  4. Minor: check-test-only-exports does not drop ambiguous export * names. When a barrel star-exports two modules that both export x, x is 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.
  5. check-test-only-exports counts *.bench.ts and *.hostProof.ts as production referrers. tsconfig.main.json excludes 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.
  6. check-test-routing accepts a Python test named in any Makefile recipe, even one CI never runs. Fix: walk the Make prerequisite graph from the targets that .github/workflows call 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.
  7. Minor: three check-test-only-exports parser gaps (🤖 tests: fail on production exports that only tests (or nothing) reference #7561 round 5). (a) A CommonJS file that reads its own exports.a does 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) JSDoc import("./x").Foo types in shipped .js are not traversed (false finding). None occurs on main. Fix with item 1, or when one recurs. Owner: P3-2.
  8. Minor: three more check-test-only-exports gaps (🤖 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 value Token (false finding). (b) export * as ns from "./a" marks all of a used even when nothing uses ns (missed finding). (c) A local use of foo also credits export { foo as alias } (missed finding). None occurs on main. Fix with item 1. Owner: P3-2.
  9. 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 of AIService pass 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions