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
{{ message }}
Repository navigation
Commit a104ad2
Browse filesBrowse the repository at this point in the historyBrowse files
test(scripts): control the self-test probe against the helper handshake spelling (#15491)
`measure-self-test-floor --probe` had zero coverage of one of the three landed
handshake spellings. The helper form (`requireReachedVerdict(name, reached)`)
has exactly one carrier under `scripts/` — `check-platform-checklist.mjs` —
whose `ENTRY_BY_HAND` row is a deliberate `null`, so every probe run recorded
`NOT MEASURED` for it and no sweep in this tree had ever read that shape in
either direction: not held, not defeated. A green `--probe` was therefore
evidence for the sentinel and flag spellings only.
Add a helper-shaped fixture to the inline controls, which run on every
invocation and never behind a flag, exactly as the sentinel-shaped `SOUND_GATE`
does. The fixture mirrors the real spelling: a module-level `...ReachedVerdict`
flag set as the self-test's last act, and a `requireReachedVerdict(name,
reached)` helper the dispatch calls afterwards, refusing out loud after a
leading blank line — which also exercises `firstNonBlankLine` reading past that
blank.
Both directions, from ONE pair differing by ONE line — the dispatch asking the
helper. With the line, the probe must read HELD (and must have SPOKEN, with the
helper's own refusal as the first non-blank line); with it deleted, the same
file must read DEFEATED printing zero bytes. A fixture-derivation control
refuses if the anchor stops matching, so the two directions can never silently
become the same file.
No change to the three-valued verdict (`DEFEATED` / `HELD` / `ACCIDENT`,
`mutatedSpoke`), to the baseline precondition, to `ENTRY_BY_HAND`, or to any
census row: the fixtures are spawned from a temp dir and the verdict is still
taught no refusal wording.
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Co-authored-by: Claude <noreply@anthropic.com>
`POSITIVE CONTROL FAILED: the unrunnable fixture no longer produces the measured shape (baseline exit ${u.baselineExit}, ${u.baselineBytes} byte(s)); the NOT MEASURED verdict above would then be passing for the wrong reason`);
572
+
// The HELPER handshake spelling, both directions, differing by ONE line: the
573
+
// dispatch asking `requireReachedVerdict`. Until this fixture the probe had
574
+
// read that shape in NEITHER direction -- its single carrier in the tree is
575
+
// an ENTRY_BY_HAND `null`, so a green sweep was evidence for the sentinel and
'CONTROL FIXTURE INVALID: the helper-handshake dispatch line was not found in the fixture, so the two directions below are the SAME file and one of the verdicts is passing for the wrong reason');
579
+
say(hh.verdict==='HELD',
580
+
`NEGATIVE CONTROL FAILED: the probe read a helper-handshake gate (\`requireReachedVerdict\`) as ${hh.verdict} (${hh.why??''})`);
581
+
say(hh.mutatedSpoke===true&&hh.mutatedBytes>0,
582
+
'NEGATIVE CONTROL FAILED: the helper-handshake gate printed nothing when defeated; HELD is supposed to mean it REFUSED out loud');
583
+
// ... and the refusal has to be the HELPER's, read past the blank line it
584
+
// prints first. A HELD earned by some other printer would test nothing about
585
+
// this spelling.
586
+
say((hh.mutatedHead??'').includes('returned without reaching its verdict'),
587
+
`CONTROL FIXTURE INVALID: the helper-handshake gate's refusal is no longer the helper's (first non-blank line: ${JSON.stringify((hh.mutatedHead??'').slice(0,80))})`);
588
+
say(hhHoled.verdict==='DEFEATED',
589
+
`POSITIVE CONTROL FAILED: the SAME fixture with only the \`requireReachedVerdict\` call deleted was read as ${hhHoled.verdict} (${hhHoled.why??''}); the handshake call is the whole difference`);
590
+
say(hhHoled.mutatedBytes===0,
591
+
'POSITIVE CONTROL FAILED: the helper-handshake gate with its handshake deleted printed something; without the call there is nothing left to notice the early return, so the run says NOTHING and exits 0');
0 commit comments