You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(scripts): give 13 more self-tests a battery roster and floor (#15003)
* test(scripts): battery roster and floor for four more self-tests
Part of #13799 (batch 2, Tier B — the batch-1 shape).
PR #13487's roster-and-floor shape as batches 1/1b/1c landed it, transplanted
onto four `scripts/**` self-tests that already carry that shape.
⛔ No case is rewritten, none reordered, no assertion changes meaning.
⛔ No TOTAL is pinned — the roster pins registered NAMES.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(scripts): battery roster and floor for five more self-tests
Part of #13799 (batch 2, Tier B — the batch-1 shape).
⛔ No case is rewritten, none reordered, no assertion changes meaning.
⛔ No TOTAL is pinned — the roster pins registered NAMES.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(scripts): battery roster and floor for four more PM self-tests
Part of #13799 (batch 2, Tier B — the batch-1 shape).
⛔ No case is rewritten, none reordered, no assertion changes meaning.
⛔ No TOTAL is pinned — the roster pins registered NAMES.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
* test(scripts): re-read the multi-repo battery floor after the hotcrm merge
`origin/main`'s #14867 change (`hotcrm` added to `GOVERNED_REPOS`) grows the
`multi-repo scope (#9619)` battery from 15 cases to 17: one assertion becomes
two, and the new register row adds one more through the section's own loop.
Re-read from a probe run rather than assumed — the declared set still equals
the opened set (22/22), and the file's self-test output stays byte-identical
to `origin/main`'s version of it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
---------
Co-authored-by: Claude <noreply@anthropic.com>
// ── The self-test's own battery roster and floor (#13489) ──────────────────
95
+
//
96
+
// `failures.length === 0` used to be this self-test's ONLY success condition, so
97
+
// "every case held" and "the cases never ran" printed the same line. Closed the
98
+
// way PR #13487 validated on check-doc-authoring: what is pinned is the
99
+
// registered NAMES, not a number. Every section opens with `battery('<name>')`,
100
+
// every assertion is attributed to the battery most recently opened, and the
101
+
// floor requires the OPENED set to equal the DECLARED set with each battery at
102
+
// or above its own count.
103
+
//
104
+
// ⛔ A pinned TOTAL is not the repair: a battery dropping from 9 cases to 3
105
+
// keeps a total "right" the moment a sibling grows.
106
+
//
107
+
// The counts are a FLOOR, not an equality — adding cases is ordinary work and
108
+
// must not red. A battery BELOW its floor means cases stopped running; the
109
+
// remedy is to find what stopped registering.
110
+
constSELF_TEST_BATTERIES=Object.freeze({
111
+
'1. The tree as it stands: both sides name the same four spellings.': 2,
112
+
'2. A fifth spelling on the NORMALIZER side only — the direction #8002 is about, and the one nothing else in the repo refuses.': 3,
113
+
'3. The same fifth spelling on BOTH sides is green again — the gate judges parity, not the size of the set.': 1,
114
+
'4. A fifth spelling on the INGRESS side only.': 2,
115
+
'5. A `$` alias folding INTO a filter spelling is a filter spelling. It reaches `where` through two hops, which is exactly the shape a reader comparing only the slot tables would miss.': 2,
116
+
'6. Rot: an unreadable shape must fail LOUDLY. A reader that matches nothing would otherwise compare two empty sets and report a pass.': 5,
117
+
'7. The wiring this gate depends on to run at all.': 3,
118
+
});
119
+
120
+
// DELETING an entry silences that battery's floor exactly as effectively as
121
+
// zeroing it, so the roster's own size is pinned too.
122
+
constSELF_TEST_BATTERY_FLOOR=7;
123
+
124
+
// The key an assertion is filed under when no battery is open. It is not a
125
+
// declared battery, so it reds by the same set difference rather than silently
126
+
// inflating whichever battery happened to run last.
check('an ingress-only fifth spelling is red',problems.length===1,`saw ${problems.length}`);
@@ -551,6 +604,7 @@ function selfTest() {
551
604
// 5. A `$` alias folding INTO a filter spelling is a filter spelling. It
552
605
// reaches `where` through two hops, which is exactly the shape a reader
553
606
// comparing only the slot tables would miss.
607
+
battery('5. A `$` alias folding INTO a filter spelling is a filter spelling. It reaches `where` through two hops, which is exactly the shape a reader comparing only the slot tables would miss.');
0 commit comments