Skip to content

The @objectstack/formula TEST_DEBT note itemises 16 errors against its own recorded count of 17 — the unlisted one is TS2739 #13631

Description

@claude

Found while implementing #13496 (PR #13630). Recording only — no severity asserted, routing is triage's. Not repaired there, because the type-check ledger is a governed shrink-only artifact and editing its note would be a rider on a security fix.

The observation

scripts/check-type-check-coverage.mjs's TEST_DEBT entry for @objectstack/formula records errors: 17, and its note itemises 16:

TS2591 x6 (`process`), TS2345 x3, TS2352 x3, TS1470 x2, TS2339 x2.
Re-measured 17 at 5ab08428, up from 12; the TS2591 half doubled, which is
the missing `types:["node"]` again rather than five new defects.

6 + 3 + 3 + 2 + 2 = 16, against a recorded 17.

Measured

The gate's own --re-measure refuses on an agent container (55 workspace dependencies of the ledgered packages have no built type entry point), so its generated project was reproduced from the gate's own remeasureProject — same extends, same absolutised exclude with the test glob dropped, same reconstructed typeRoots — and run directly on main at 1cdf3c14ef with @objectstack/formula's closure (@objectstack/spec) built:

2 error TS1470
2 error TS2339
3 error TS2345
3 error TS2352
6 error TS2591
1 error TS2739
total 17

The count is right and the note is one line short: the unlisted 17th is TS2739 x1, at packages/formula/src/cel-to-filter.test.ts(173,52)ok('id in current_user.org_user_ids', { current_user: { org_user_ids: [] } }), where the partial context cannot satisfy the exact shape of the module-level VARS that the local ok() helper pins its second argument to.

The replica is calibrated rather than asserted: it independently reproduced the frozen 17 on the unmodified file, and separately detected 4 errors a branch had added, which the same branch then repaired to 17 again.

Why it is worth a line

AGENTS.md states the discipline this sits under: "when a re-measure forces a count up, rewrite the entry's note too — a note naming only the old errors reads as 'nearly graduated' to the next author." An itemisation that does not sum to its own recorded count has the same failure mode in miniature: the next author budgeting a graduation reads 16 known errors and finds 17, and the one that is missing is the only one whose repair is a one-line helper widening.

Smallest possible remedy: add TS2739 x1 to that entry's note. No count moves, no baseline moves.


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

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions