Skip to content

typecheck excludes tests/, so merge artifacts in the contract suite are invisible (two live TS1117 specimens) #502

Description

@EtanHey

tsconfig.json:16 is "exclude": ["node_modules", "dist", "tests"], so bun run typecheck never
compiles a single test file. In a repo whose contracts live in its tests, that hides a whole class of
defect — and it just did.

How it surfaced

The #494 merge into #478 left two both-sides-kept conflict artifacts. bun run typecheck exits 0.
Compiling the same files directly:

tests/coordination-paths.test.ts(219,9): error TS1117: An object literal cannot have multiple properties with the same name.
tests/f1-live-state-truth.test.ts(473,9): error TS1117: An object literal cannot have multiple properties with the same name.

Both verified in the worktree:

  • tests/coordination-paths.test.ts:216-219doneEvidence: true twice in one
    resolveClosureState({...}) call. Same value, so the assertion still means what it says.
  • tests/f1-live-state-truth.test.ts:466 and :473task_done_detected_at twice with
    different values (2026-08-18T13:41:00.000Z, then 2026-08-19T10:05:00.000Z), each with its
    own explanatory comment from a different side of the merge. The second silently wins. The test's
    outcome is unchanged because both are non-null, but a merge decision was made by JS
    object-literal ordering instead of by a person.

That second one is the shape that matters. A duplicate key in a fixture is exactly how a merge
quietly discards one side's intent while every check stays green — and the suite cannot catch it,
because the suite is the thing being silently rewritten.

Why this is the #494 family

#494 fixed "green only on the maintainer's Mac". This is the same disease one layer up: green only
because we never looked.
The tests are the contract, and the contract is not typechecked.

Ask

  1. Typecheck the tests. Either drop "tests" from exclude, or add a second project
    (tsconfig.test.json) that includes them, and run both in bun run typecheck and in CI.
  2. Expect a first-run backlog — this has never been enforced, so there are likely existing errors in
    tests/. Landing this means fixing or explicitly baselining them; the PR should say which.
  3. Consider noUnusedLocals while in here: tsconfig.json has no such flag, which is why two dead
    methods (closureStateOf, hasPositiveDoneEvidence, src/agent-engine.ts:1850/:1874) compiled
    cleanly with zero callers in the same review.

Found by cmuxlayerClaude-reviewer-478 while reviewing PR #478, which is where the two live
specimens come from.

— cmuxlayerClaude (lead) · claude-code/claude-opus-5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions