Skip to content

Commit ee99340

Browse files
docs(check-driver-conformance): retire the undated ratios from the watch-hint docblock (#19159)
Fixes #15313 Clause-②: no The docblock over `ROOT_DIR_WATCH_HINTS` in `scripts/check-driver-conformance.mjs` argued why the declared hint is the drivers subtree and not the top-level root, and argued it with measured ratios carrying no date. The bare-root worklist row that judges the **same declaration** re-measured both terms together on one tree and recorded the previous reading as `superseded WHOLE, neither term carried forward` — so the two documents disagreed in print, and the undated copy read as current. ## The shape chosen: drop the digits, keep the argument, point at the one dated home The card offered two shapes (re-measure and date, **or** drop the digits and keep the shape of the argument). This takes the second, plus an explicit pointer: the paragraph now defers to the dated authority instead of carrying a copy of it. Why not re-measure and date here: that would create a **third** copy of a pair whose two existing copies are what this card is about, and the terms move fast enough that a written pair is stale by design. Measured under an fs recorder in this worktree at **2026-09-19T01:16Z**, branch tip `5eebc9ed`, tree `7d5f5da3`: | term | docblock (undated) | worklist row (2026-09-04, `2200f8ec`) | measured here (2026-09-19, `5eebc9ed`) | |:--|--:|--:|--:| | tracked files the walk opens under the drivers subtree | 259 | 344 | **398** | | tracked files under that subtree | 291 | 379 | **434** | | tracked files under the top-level root | 4903 | 5979 | **6979** | | ratio at the subtree | 89% | 90.8% | **91.7%** | | ratio at the top-level root | 5.3% | 5.8% | **5.7%** | Every term moved again in the fifteen days since the dated re-measurement — the bare-root denominator by a thousand files. The argument's **conclusion** is unchanged and was never digit-dependent, which is what the paragraph now says in structural terms: the walk starts under `DRIVERS_DIR` and never climbs out, so the subtree hint cannot under-name the population and the top-level root can only dilute it; the declaration errs **wide**, never narrow. The dated pair keeps exactly one home, cited by row key rather than copied. Citing that file from a gate docblock is the existing idiom here (`scripts/check-ratchet-remedy-authority.mjs` does it twice). ## Two further undated sites in the same file, same treatment 1. `## Why CASE_SETS_DIR is deliberately NOT declared` carried `143 tracked files of which this gate reads 7 (4.9%)`. Measured today: **8 of 167 (4.8%)** — the numerator was wrong too, a case set having been added since. This population has **no** worklist row to defer to (it is absent from the hint array rather than a declared hint the sweep passes over), so there is nothing to point at: the digits go and the structural claim stays. 2. Two `--self-test` assertion **labels** re-spelled the same ratios in their failure text (`4903 files to reach 259`, `7 of 143 files`). Label text only; ⛔ no assertion **condition** was touched. ## Not touched - The **value** of `ROOT_DIR_WATCH_HINTS` — `grep -c 'ROOT_DIR_WATCH_HINTS = \|SELF_TEST_BATTERY_FLOOR\|SELF_TEST_BATTERIES'` over the diff reads **0**. This card changes the argument, not the declaration. - The **value** of `CASE_SETS_DIR`. - `SELF_TEST_BATTERIES` (11 entries, same per-battery counts) and `SELF_TEST_BATTERY_FLOOR = 11`, read before and after and identical. - `scripts/pm/bare-root-worklist.mjs` — out of scope by the dispatch, and by the lane table a non-gate `scripts/pm/**` is not this seat's surface. Nothing there needs to change: its row is now the sole dated home, which is the disposition this PR subordinates to. ## Verification Both batteries, which are two different things in this repo, run separately before and after: | battery | before | after | |:--|--:|--:| | `node scripts/check-driver-conformance.mjs --self-test` | exit 0 | exit 0 | | `node scripts/check-driver-conformance.mjs` (bare) | exit 0 | exit 0 | The two verdict texts are byte-identical before and after (`diff` clean apart from the exit line appended to the before captures) — expected, since the change is comment and label text. Residual reading with a firing control, both taken from the probed file after the commit: the removed terms (`4903`, `259`, `291`, `143`, `89%`, `5.3%`, `4.9%`, `17x`) each read **0** in the file and appear in `git diff BASE HEAD` on removal lines only; the controls, chosen after the fact as the highest-frequency identifiers absent from the diff, are `dialect` (in-file 130, in-diff 0) and `ledger` (in-file 94, in-diff 0) — the probe fires. Gates: derived in-worktree with `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` over the real changed set — 29 commands, all green (six first returned exit **3**, `PREREQUISITE NOT MET — nothing was measured`, and were re-run green after `pnpm install`). By the tool's own warning that is not a complete account of CI. `skip-changeset`, verified rather than assumed: the root manifest is `private: true`, and all 81 non-private packages declare a `files[]` with no entry escaping its own package directory, so the repo-root `scripts/` tree ships no published byte. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk --- _Generated by [Claude Code](https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 97466dd commit ee99340

1 file changed

Lines changed: 36 additions & 12 deletions

File tree

‎scripts/check-driver-conformance.mjs‎

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,46 @@ const CASE_SETS_DIR = join(ROOT, 'packages', 'spec', 'src', 'data');
169169
* among them. The literal `'packages'` here is such a component and nothing
170170
* more. Declaring the top-level root would be the fabrication one level up:
171171
*
172-
* packages/** 259 files this gate reads, of 4903 tracked — 5.3%,
172+
* packages/** names this gate for the whole monorepo to reach a
173+
* population that lies entirely inside one subtree,
173174
* pasted into every packages/** prompt in the repo.
174-
* packages/drivers/** 259 of 291 — 89%, over a subtree 17x smaller.
175+
* packages/drivers/** names that subtree, which is where the walk starts.
175176
*
176-
* The remaining 32 files under `packages/drivers/` are the per-package
177-
* manifests, licences and changelogs; adding or removing a driver package moves
178-
* `discoverDrivers` through exactly those, so 89% is a floor rather than an
179-
* estimate.
177+
* ⛔ The ratio is deliberately NOT written here, and this paragraph carries no
178+
* digits. Both of its terms grow with the monorepo and mean nothing unless read
179+
* together on ONE tree, so a pair copied into this docblock is a second home to
180+
* refresh — and the copy that went unrefreshed is exactly what #15313 closed:
181+
* the digits this paragraph used to carry had been superseded WHOLE, both terms
182+
* at once, while still reading here as current. The dated reading has ONE home:
183+
* the DECLARED-NARROWER row keyed
184+
* `scripts/check-driver-conformance.mjs DRIVERS_DIR packages` in
185+
* `scripts/pm/bare-root-worklist.mjs`, which records both terms together with
186+
* the date and base commit they were taken at, the walk they were taken under,
187+
* and the DIRECTION the declaration errs. That row is the authority; this
188+
* paragraph is subordinate to it and states only what does not move.
189+
*
190+
* What does not move: every file the walk opens is under `DRIVERS_DIR` — the
191+
* walk starts there and never climbs out — so the subtree hint cannot under-name
192+
* the population and the top-level root can only dilute it. The declaration errs
193+
* WIDE, never narrow: the residue inside the subtree is the per-package
194+
* manifests, licences, changelogs and the configuration sitting beside them, and
195+
* adding or removing a driver package moves `discoverDrivers` through exactly
196+
* those.
180197
*
181198
* ## Why CASE_SETS_DIR is deliberately NOT declared
182199
*
183200
* The instrument can only express a SUBTREE — `collapseHint` strips globs, so
184201
* `packages/spec/src/data/*-conformance.ts` collapses to a path that names
185-
* nothing, and the only spellable claim is the whole directory. That directory
186-
* holds 143 tracked files of which this gate reads 7 (4.9%): a subtree
187-
* declaration there would name this gate for every Zod schema and unit test
188-
* beside the case sets. A missing lead costs one card one CI round; a
202+
* nothing, and the only spellable claim is the whole directory. What this gate
203+
* reads there is a FILENAME pattern — the `*-conformance.ts` case sets — and a
204+
* minority of a directory that also holds the data domain's Zod schemas and
205+
* their unit tests: a subtree declaration there would name this gate for every
206+
* one of them. ⛔ No ratio is written here either, for the reason above and one
207+
* more: the numerator grows with every case set added and the denominator with
208+
* every schema beside it, so a pair written here goes stale with nothing having
209+
* gone wrong — and unlike the drivers root this population has no worklist row
210+
* to defer to, being absent from the array rather than a declared hint the
211+
* bare-root sweep passes over. A missing lead costs one card one CI round; a
189212
* fabricated one is pasted into every prompt whose surface brushes it. So the
190213
* case-set side stays undeclared, and the refusal is pinned in the self-test
191214
* rather than left in this paragraph.
@@ -2061,10 +2084,11 @@ function selfTest() {
20612084
driversRel.includes('/') && !ROOT_DIR_WATCH_HINTS.includes(driversRel));
20622085
// The REFUSALS, pinned. Neither is an oversight to be tidied up later.
20632086
expect('the bare top-level root is deliberately NOT declared -- `packages` is a path COMPONENT '
2064-
+ 'here, and a subtree hint on it would name this gate for 4903 files to reach 259',
2087+
+ 'here, and a subtree hint on it would name this gate for the whole monorepo to reach a '
2088+
+ 'population that lies entirely inside one subtree',
20652089
!ROOT_DIR_WATCH_HINTS.some((h) => h.replace(/\/\*+$/, '') === 'packages'));
20662090
expect('CASE_SETS_DIR is deliberately NOT declared -- its population is a FILENAME pattern '
2067-
+ '(*-conformance.ts, 7 of 143 files) and a subtree hint cannot express one',
2091+
+ '(*-conformance.ts, a minority of that directory) and a subtree hint cannot express one',
20682092
!ROOT_DIR_WATCH_HINTS.some((h) => CASE_SETS_DIR.slice(ROOT.length + 1).startsWith(h.replace(/\/\*+$/, ''))));
20692093
// Provenance, never a lookup key: assertRootsResolvable stats both roots, so
20702094
// the glob form appearing in either constant is a hard red on a dead root.

0 commit comments

Comments
 (0)