Repository navigation
Commit b253fad
docs(devx): re-anchor the dead tracker citation in check-test-typecheck and regenerate the 19 test-typecheck ledgers (#21010)
Fixes #20715
Clause-②: no
## What changed
The shared test-typecheck gate wrote a tracker number that answers 404
(`#13470`) into the generated `_comment` of every package's
`test-typecheck-debt.json`. This PR re-anchors it at the producer,
`scripts/check-test-typecheck.mts`, and regenerates every copy with its
own package's `gen:test-typecheck-debt`.
- **The `_comment` literal (`LEDGER_COMMENT`)** now says the lesson in
words (ruling C+D's form D, no number): entries are per-signature "never
to a bare total, because a total can hold while the errors underneath it
are replaced wholesale". The fragment the gate pins by arrival, `never
to a bare total`, is unchanged.
- **The other 23 lines of the producer that cite the same number** are
re-anchored too, because the card's re-check names the whole file and
answers 0 only when they are gone. Comment prose (6 sites) now cites
commit `57827b617` (form C). Strings the author sees or the self-test
prints (17 sites: 6 battery names and `battery()` calls, 10 assertion
labels, the success line) say the lesson without a number (form D).
Nothing else on those lines moved.
- **19 ledgers regenerated**, one `gen:test-typecheck-debt` per package,
never by hand. In each, one line moved: `_comment`.
- **`packages/rest/test-typecheck-debt.json` also has its authored
`_note` re-anchored by hand** (`#13470` became `commit 57827b6`). The
generator never writes `_note` and preserves it verbatim, so no
regeneration could reach it, and the card's re-check covers it.
20 files, 45 insertions and 44 deletions against base `05be35259`: the
producer, plus one line in each of 19 ledgers (two in rest).
## Measured before building
- **The premise holds, and the card's count was short.** `GET
/repos//issues/13470` answers 404
(2026-10-01); #5286, #12624 and the other numbers in the same `_comment`
answer 200. At base `05be35259` the card's re-check answers **44
lines**: 20 in the 19 ledgers (rest carries one in `_comment` and one in
`_note`) and **24 in the producer**, not one.
- **H1, what regeneration costs and moves.** Regeneration re-measures
each package's test errors, so it needed the dependency closure built:
59 turbo build tasks, 6m46s under the shared lock. After it, `--update`
rewrote **only `_comment`** in all 19, and **no debt moved**: `entries`,
key order and `_note` are byte-equal to base in every ledger (165 files,
1233 errors, 362 distinct signatures across the 19; every package's own
count unchanged). No ledger was left unregenerated.
- **H2, whether the gate reads `_comment`.** It does not.
`check:test-typecheck` judges `loadLedger().entries` alone, and nothing
else reads a ledger's `_comment`. Mutation proof on `packages/rest`:
with `_comment` set to a marker string, `pnpm --filter @objectstack/rest
check:test-typecheck` still exits 0 (OK line printed); restored from
`HEAD`, `git diff HEAD` empty. So a producer edit without regeneration
would not red anything; the regeneration is what makes the 19 copies
true.
- **H3, the anchor.** `57827b617` ("pin test-typecheck debt by error
IDENTITY, not per-file count") is the commit that decided per-signature
entries; its message records the packages/rest ablation the number stood
for. The repository history is deep enough: the commit is present, and
`git log` on the producer lists it among 7 commits.
## Proof
- **Each regenerated copy changes only its `_comment` line.** A script
compared every ledger at `HEAD~1` with the working copy: same keys and
key order, `entries` byte-equal, `_note` equal, exactly one changed
line, and the new `_comment` is the old one with exactly one clause
replaced. Result: `ALL 19 carriers: only the _comment line moved`.
Against base `05be35259` the same script reports one difference, rest,
which changes two lines (`_comment` and the authored `_note`), as stated
above.
- **Re-check.** `git grep -n "#13470" -- '*/test-typecheck-debt.json'
scripts/check-test-typecheck.mts` answers 0 (exit 1). Positive control,
same pathspec at the base commit: `git grep -c "#13470" 05be352 --
...` lists 20 files (19 ledgers plus the producer).
- **Self-test.** `tsx scripts/check-test-typecheck.mts --self-test`
exits 0 at the final head; the renamed batteries still register against
the roster floor, so no battery went unattributed.
- **Spot checks of the check mode** against the regenerated ledgers at
the final head: rest, spec (52 files, 248 errors, 136 signatures) and
runtime (27 files, 190 errors, 68 signatures) each print
`check:test-typecheck: OK`.
## Gates (head `f9b496b88`)
`dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` over
the actual diff derives 74 commands. All 74 ran, each exit recorded
before any pipe, and `--ran` reconciles: `74 derived, 74 run, 0
NOT-MEASURED, 0 UNRUN`. All 74 exited 0, including `pnpm
check:type-check-coverage`, `pnpm check:type-check-debt` (re-measure: 4
ledger entries, 53 raw errors, none above its recorded number, surplus
none), `node scripts/check-issue-citations.mjs`, `pnpm
check:issue-citations`, `pnpm check:doc-authoring`, `pnpm
check:ratchet-remedy-authority`, `pnpm check:nul-bytes`, `pnpm
check:published-files`. Two gates first answered exit 3
(`check:dual-build-cjs-loads`, `check:i18n`: prerequisite not met,
workspace not fully built, nothing measured); they were re-run after the
build and exit 0. The first `check:type-check-debt` run was cut by my
own 300s timeout (124); it re-ran under the lock after building
`@objectstack/driver-mongodb`'s closure and exits 0. The whole lint
workflow farm is CI's.
## Changeset
None, and `skip-changeset` applies: the producer is a root `scripts/`
file and the ledgers ship in no tarball. Measured: the 19 packages'
`files[]` list `dist`, `README.md`, `CHANGELOG.md` (and spec's schema
and docs paths), and a grep of those shipped paths for the ledger text
and for `13470` finds 0 files, while the control `check-test-typecheck`
finds 3 (cli, lint, runtime CHANGELOGs).
## Acceptance notes
Not changed here, because they sit outside this card's `#13470` scope.
Each is the same family (a tracker number answering 404), found in the
files this PR touches:
- `scripts/check-test-typecheck.mts`: `#13466` (lines 289, 625), `#8538`
(939), `#6083` (1134).
- Authored `_note` fields: `packages/rest` `#13377`, `#13378`, `#13454`;
`packages/core` `#14613`; `packages/client` `#6083`.
- `packages/client/test-typecheck-debt.json` was not one of the 19 and
was not regenerated: its `_comment` predates the per-signature mechanism
and is stale against the producer. A regeneration would move that line
for a different reason than this card.
## Deviations from the dispatch order
1. The producer had 24 lines to re-anchor, not one (the card's own
re-check requires all 24 to go).
2. `packages/rest` changes two lines, not one: its authored `_note`
carried the same dead number.
Landing site is as expected (`scripts/check-test-typecheck.mts` and the
generated ledgers). Clause-② stays `no`: nothing here widens an accept
set or a public surface.
---
_Generated by [Claude
Code](https://claude.ai/code/session_017VaLJnYwhPsanVCe9dMCJU)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2f2fa11 commit b253fad
20 files changed
Lines changed: 45 additions & 44 deletions
File tree
- packages
- cli
- connectors
- connector-mcp
- connector-openapi
- connector-rest
- core
- formula
- lint
- mcp
- objectql
- platform-objects
- plugins
- knowledge-ragflow
- plugin-approvals
- plugin-auth
- plugin-sharing
- qa/http-conformance
- rest
- runtime
- services/service-sms
- spec
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments