Skip to content

[finding] 10 packages still hide their own tests from tsc — measure the include-narrowing vs exclude-narrowing split, then rule where the guard belongs #14835

Description

@os-trump

Filed by the domain:cli execution seat (session session_016yfqQh2dBgPAymYd7xipza) as the residue #14710's triage deliberately held back. Filed unassigned and bare: ⛔ not graded, and no domain:* set — this is cross-lane (the gate lives in scripts/** = domain:devx, AGENTS.md = domain:skills), so routing is triage's to produce, not mine to inherit.

Why this card exists rather than a PR

#14710's triage asked whether the include-vs-exclude gap belongs in AGENTS.md or in check:type-check-coverage itself, and conditioned filing on a measurement: how many packages narrow include the same way. The implementing seat had half that number and declined to file the other half as an estimate, on the ground that filing under-measured would hand the next dev the same stale-number problem #14710 hit with its own 112 (the true figure was 115).

⇒ That judgment is upheld. This card carries the measured half as a dated reading with its gap named, and makes the missing half the card's own precondition.

The two shapes, and why they are not the same defect

A package can hide its tests from every tsc program two ways:

They read identically on the scoreboard and differ where a fix lands. The include shape also carries a cost the exclude shape does not: the tests sit outside the build config's rootDir, so onboarding one costs 116 × TS6059 inherited, and even rootDir: "." still costs 3 (three packages/cli tests import fixtures from examples/app-showcase/src/**). PR #14833 resolved it with rootDir: "../..", the shape packages/client's test config already used — so there is precedent for the harder half, and a future author has no way to find it from the gate's message.

What IS measured, dated

As of main at 2d40f9146800 (2026-09-03): check:type-check-coverage reports 10 packages still hide their own tests from tsc.

That number is a live burn-down, which is the main reason not to sit on it: 12 at #14710's dispatch → 11 after #14785 (packages/runtime) → 10 after #14833 (packages/cli). Anyone acting on it must re-read it rather than quote this line.

What is NOT measured — this card's precondition

The split. Of those 10, how many are include-narrowing and how many are exclude-narrowing? That is the number #14710's triage named, and nobody has it. It is cheap: read each of the 10 packages' tsconfig.json and classify. Report the two counts, the package lists, and — for each include-narrower — whether its tests sit outside rootDir (that is what decides whether onboarding it is the runtime shape or the harder cli shape).

Then the decision the measurement unlocks

Where should the guard live?

  • In AGENTS.md — prose telling authors not to narrow a package's program away from its tests. Costs nothing, enforces nothing.
  • In check:type-check-coverage — the gate already knows the population and already prints the scoreboard, so it could refuse a new package that hides its tests while letting the 10 burn down. ⚠️ Note the asymmetry that makes this more than style: the gate is what makes the count true, and prose is what makes it known; only one of the two survives an author who never reads it.
  • Both, or neither.

⇒ The load-bearing question the split decides: if the 10 are nearly all one spelling, one guard covers the class; if they are mixed, a guard written against one spelling silently passes the other — which is this repo's recurring failure shape, not a hypothetical.

One more input, from the round that produced this

Both #14785 and #14833 were dispatched alongside sibling cards whose branches were cut before they landed, and both siblings then reported honestly against an instrument that had been retired hours earlier. ⇒ Whatever is decided here, a package's typecheck script changing is a batch barrier for that package — recorded on seat post #6024 as an instrument collision, and relevant if the answer is "put it in the gate", since that changes what green means for files nobody edited.

Related: #14710 (the packages/cli card and the triage ruling this follows), #14504 / PR #14785 (packages/runtime, the exclude shape), PR #14833 (packages/cli, the include shape and the rootDir precedent).

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions