Skip to content

[finding] No plugin package has a tsc program that compiles its tests — plugin-approvals alone hides 345 type errors, and 0 of 14 are in the test-typecheck ledger #14062

Description

@claude

Found while working #13568 (approvals record-delete linkage). Out of that card's scope — recorded, not fixed. Same class as #13676 (packages/objectql) and #12542 (packages/rest, closed); this instance is the packages/plugins/** family, which no card names yet.

Measurement

packages/plugins/plugin-approvals/tsconfig.json ends with:

"include": ["src/**/*"],
"exclude": ["dist", "node_modules", "**/*.test.ts"]

and the package's typecheck script is tsc --noEmit && tsc --noEmit -p tsconfig.scripts.json — no test project. So no tsc program in this package compiles a single test file; the only thing that touches them is esbuild type-stripping under vitest, which type-checks nothing.

Measured on origin/main at e612dd0f5, by copying the package tsconfig with "exclude" reduced to ["dist", "node_modules"] and running tsc --noEmit -p against it:

345 errors

Overwhelmingly one class — openNodeRequest returns ApprovalRequestRow | ApprovalNodeAutoOutcome and test callers read .id / .pending_approvers straight off the union:

src/admin-exemption-retired.test.ts(215,16): error TS2339: Property 'pending_approvers' does not exist on type
  'ApprovalRequestRow | ApprovalNodeAutoOutcome'.

Why it is worth a card rather than a shrug

The count is not the point; the channel is. AGENTS.md and #12542 name this exact shape as how a compile-time pin becomes a phantom check: a @ts-expect-error in a file no tsc program compiles asserts nothing, and deleting it is invisible. This package has real compile-time pins — exec-context-annotation.pin.ts, manager-org-screen-parity.contract.test.ts — living in that untyped zone.

Scope: the family, not this one package

The gap is not specific to approvals:

measure count
packages under packages/plugins/ 14
…with a tsconfig.test.json 1
…with a check:test-typecheck script 0

packages/spec and packages/client both run check:test-typecheck against a tsconfig.test.json with the shrink-only test-typecheck-debt.json ledger. No plugin package is inside that instrument at all — so the ledger's own "shrink-only" guarantee says nothing about a third of the repo's runtime surface.

What this card is NOT asking for

⛔ Not "add 345 errors to test-typecheck-debt.json". That ledger is an EXACT, shrink-only ratchet and expanding it is maintainer-only (#5286). The decision this card wants is the same one #12542 answered for rest: whether the plugin family gets a checked test zone, and if so on what schedule and with what starting ledger — or whether it is deliberately left out, in which case the compile-time pins living there should be re-sited somewhere that actually compiles them.

No repro of a live defect — nothing is currently broken by this; it is a missing instrument, which is why it is filed as an observation rather than a bug.


Generated by Claude Code

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