Skip to content

Commit e62c44e

Browse files
committed
fix(cli): close the #18491 NOT_A_GATE parity-gap entry the per-package pass was recorded in
`test/validate-build-gate-parity.test.ts` holds a CLOSED roster: every bare identifier either command calls must land in exactly one of its three ledgers. Wiring `runPerPackageAuthoringRules` into both doors left it unclassified, so the roster reddened — correctly, and on the one shard that runs `packages/cli` (`Test Core (4/6)`, step "Run this shard's tests"). ⛔ Not a refusal: nothing in the suite was newly rejected by `os validate`, so the `Clause-②: no` declaration is untouched by this red. The two failures were "every call site in compile.ts and validate.ts is classified" (1 unclassified name) and "no ledger entry is stale" (3 names no command uses any more). What the ledgers now say: * `runPerPackageAuthoringRules` joins SHARED_NON_REGISTRY_GATES. It cannot become a registry rule: a registry rule is handed ONE stack, and this pass is the thing that DECIDES which stack — the artifact sliced per package (ADR-0130 D4/D5). Its row buys a real assertion for free, because `it.each(SHARED_NON_REGISTRY_GATES)` asserts both commands run it. * The #18491 entry "Input to the compile-only per-package rule walk — a real parity gap, reported not closed" is DELETED, not reworded. That entry was right and is now spent; a ledger row that outlives its finding is how a closed gap reads as an open one. * `artifactPackages` survives on its own reason — both commands read it to COUNT the packages for the step line. `packageBodyAsStack` left the command files with the loop, as did `findingKey` and the `new Set(…)` de-duplication. packages/cli unit tier: 213 files / 3041 tests, all passing. Claude-Session: https://claude.ai/code/session_01DvvamiacK328idtBYJBxV3 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4c837a5 commit e62c44e

1 file changed

Lines changed: 25 additions & 11 deletions

File tree

‎packages/cli/test/validate-build-gate-parity.test.ts‎

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,21 @@ const SHARED_NON_REGISTRY_GATES: readonly string[] = [
9999
// widening the pattern to cover `find*` would have moved the blind spot
100100
// rather than closed it.
101101
'checkProtocolVersionGap',
102+
// [#18677] The author-time rule table, run once per `packages[]` entry with
103+
// `packageBodyAsStack` as resolution context and de-duplicated against the
104+
// union run. Not a registry rule and it cannot become one: a registry rule is
105+
// handed ONE stack, and this pass is the thing that DECIDES which stack — the
106+
// artifact sliced per package (ADR-0130 D4/D5), which is the answer the
107+
// runtime will live with.
108+
//
109+
// ⭐ This row is the #18491 NOT_A_GATE entry CLOSED. That entry read "a real
110+
// parity gap, reported not closed", and it was right: `os build` ran this
111+
// pass and `os validate` did not, so `os build` judged something
112+
// `os validate` structurally could not, in the false-clean direction. The
113+
// entry is deleted rather than reworded — the gap it recorded is gone, and a
114+
// ledger row that outlives its finding is how a closed gap reads as an open
115+
// one.
116+
'runPerPackageAuthoringRules',
102117
];
103118

104119
/**
@@ -152,15 +167,16 @@ const NOT_A_GATE: Readonly<Record<string, readonly string[]>> = {
152167
'loadConfig',
153168
'ObjectStackDefinitionSchema',
154169
],
155-
// ⚠️ [#18491] These two are compile-only, and so is the SECOND
156-
// `runAuthoringRules` run they feed. That run is not covered by the roster
157-
// above and is not covered by the union fold either: `compile.ts`'s own
158-
// comment says what survives its de-duplication is "exactly the set the union
159-
// could not see". So `os build` judges something `os validate` does not, in
160-
// the false-clean direction. Recorded here rather than silently wired up —
161-
// wiring a real gate into the other door is a decision, not a test fix.
162-
'Input to the compile-only per-package rule walk — a real parity gap, reported not closed (see the note above this entry)':
163-
['artifactPackages', 'packageBodyAsStack'],
170+
// [#18677] Was "Input to the compile-only per-package rule walk — a real
171+
// parity gap, reported not closed", carrying `artifactPackages` and
172+
// `packageBodyAsStack`. That gap is CLOSED: the walk is
173+
// `runPerPackageAuthoringRules` in SHARED_NON_REGISTRY_GATES above, run by
174+
// both doors. `packageBodyAsStack` left this file with the loop — it is read
175+
// inside the shared pass now, by neither command directly — and
176+
// `artifactPackages` stays, on its own reason, because it is no longer input
177+
// to a gap: both commands read it to COUNT the packages for the step line.
178+
'Reads the artifact\'s `packages[]` for a count both commands print; the pass that judges them is a gate above':
179+
['artifactPackages'],
164180
'Presentation — renders, formats or serialises a verdict something else reached; judges nothing':
165181
[
166182
'printHeader',
@@ -190,12 +206,10 @@ const NOT_A_GATE: Readonly<Record<string, readonly string[]>> = {
190206
'isExitSignal',
191207
'isReportedError',
192208
'cleanupOldRuntimeBundles',
193-
'findingKey',
194209
'warningsSoFar',
195210
],
196211
'Not ours — a Node builtin, a global, an oclif base or a third-party namespace': [
197212
'dirname',
198-
'Set',
199213
'String',
200214
'path',
201215
'fs',

0 commit comments

Comments
 (0)