From 5757b74a35da67bed6789e45c580ca74b628a0a1 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 21 Aug 2026 09:31:45 +0000 Subject: [PATCH] docs(tooling): rewrite service-automation's DEBT note to its measured composition `DEBT['@objectstack/service-automation']` recorded `errors: 3` while its own note narrated 5 -- opening "code-tier 5.", closing "Re-measured 5 at 5ab08428", and itemising 2 + 3. The two it itemised first were TS2741 in `engine.test.ts`, a file tsc no longer reports anything for. The entry was lowered 5 -> 3 without the note being rewritten alongside it. Re-measured with the gate's own invocation at 53a48c93f4, from the repo root against a built dependency closure: ./node_modules/.bin/tsc --noEmit --pretty false \ -p packages/services/service-automation/tsconfig.json src/nested-region-parity.test.ts(95,25): error TS2341: ... src/nested-region-parity.test.ts(151,20): error TS2341: ... src/nested-region-parity.test.ts(180,20): error TS2341: ... 3, all TS2341, all in one file. `--listFiles` confirms `engine.test.ts` is still in the program, so its silence is a graduation and not an exclusion. Prose only -- `errors: 3` is unchanged and correct, and no count moves. This is the mirror image of the rule the same file already states at :167-173, which cites this very entry as its worked example but speaks only about counts going UP; this entry drifted the other way. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt --- scripts/check-type-check-coverage.mjs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/scripts/check-type-check-coverage.mjs b/scripts/check-type-check-coverage.mjs index e273e322bc..cce8471e6c 100644 --- a/scripts/check-type-check-coverage.mjs +++ b/scripts/check-type-check-coverage.mjs @@ -440,15 +440,17 @@ const DEBT = { }, '@objectstack/service-automation': { errors: 3, - note: 'code-tier 5. Two are the TS2741 this note used to describe as the whole debt: ' - + 'engine.test.ts:2547/2577 build a descriptor literal missing a required field, the #4198 discovery ' - + 'that opened #4311 (the missing field TS names moved from resumeAuthority to handlerContract in ' - + '#5561, which made resumeAuthority optional; both literals omit both, and TS reports one at a ' - + 'time). The other 3 are TS2341 in src/nested-region-parity.test.ts, where the tests dot-read the ' - + 'private `engine.flows` -- not `engine[\'flows\']`, not `as any`. Re-measured 5 at 5ab08428. This is ' - + 'the specimen #5278 cites for composition drift: an entry reading "2, two descriptor literals" ' - + 'looks like a free graduation, while the real residue includes a decision about whether tests may ' - + 'read private state at all.', + note: 'code-tier 3 (TS2341 x3), all in src/nested-region-parity.test.ts at 95/151/180, where the ' + + 'tests dot-read the private `engine.flows` -- not `engine[\'flows\']`, not `as any` (the casts on ' + + 'two of those lines sit on `.config`, not on the engine, so they do not suppress it). Re-measured ' + + '3 at 53a48c93f4, DOWN from 5 at 5ab08428: the two TS2741 in engine.test.ts this note used to ' + + 'itemise alongside them have graduated -- that file now builds its pausing fixtures through a ' + + 'single defineActionDescriptor helper that declares resumeAuthority (#5561), and engine.test.ts ' + + 'still compiles in this project (`--listFiles` lists it) while reporting nothing. The residue is ' + + 'therefore one decision, not an oversight: whether tests may read private state at all. This ' + + 'entry is the specimen #5278 cites for composition drift and has now drifted BOTH ways -- 2 -> 5 ' + + 'by acquiring a second file, then 5 -> 3 by graduating the first -- so re-read what the pile is ' + + 'made of before sizing it, never just the number.', }, '@objectstack/service-cluster': { errors: 1,