Skip to content

test(scripts): control the self-test probe against the helper handshake spelling - #15491

Merged
baozhoutao merged 1 commit into
mainfrom
claude/issue-15371-probe-helper-spelling-control
Sep 4, 2026
Merged

test(scripts): control the self-test probe against the helper handshake spelling#15491
baozhoutao merged 1 commit into
mainfrom
claude/issue-15371-probe-helper-spelling-control

Conversation

@claude

@claude claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #15371

The reading this closes

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 (its dispatch calls several self-test functions and combines their statuses). So every probe run recorded

{"verdict":"NOT MEASURED","why":"entry read by hand as not probeable -- see ENTRY_BY_HAND"}

and no sweep in this tree had ever read that shape in either direction — not held, not defeated. A green --probe was evidence for the sentinel and flag spellings only.

What this does (option A, as ruled)

A helper-shaped fixture joins the instrument's inline controls — the ones that run on every invocation, never behind a flag, exactly as the sentinel-shaped SOUND_GATE does. It mirrors the real spelling rather than approximating it: a module-level ...ReachedVerdict flag set as the self-test's last act, and a requireReachedVerdict(name, reached) helper that the dispatch calls afterwards, refusing out loud and exiting 1. The refusal is printed after a leading blank line, as the real helper prints it, so the control also exercises firstNonBlankLine reading past that blank.

Both directions come from ONE pair differing by ONE line — the dispatch asking the helper:

fixture required verdict why
HELPER_HANDSHAKE_GATE HELD, mutatedSpoke === true, first non-blank line is the helper's refusal the handshake notices the early return and says so
HELPER_HANDSHAKE_GATE_HOLED (same bytes, handshake call deleted) DEFEATED, mutatedBytes === 0 nothing is left to notice it; the run says nothing and exits 0

A fixture-derivation control refuses if the anchor ever stops matching, so the two directions can never silently become the same file.

⛔ Unchanged, deliberately: the three-valued verdict (DEFEATED / HELD / ACCIDENT, mutatedSpoke), the baseline precondition from #15455 (baselineExit !== 0 ⇒ NOT MEASURED), the ENTRY_BY_HAND null row for check-platform-checklist.mjs (that is #14842's question), and every census row. The verdict is still taught no refusal wording — recognising which handshake a file carries remains #14968's column. The fixture's own message is asserted only so the HELD it earns is the helper's refusal and not some other printer's.

The control, printed in both directions

The controls are silent when they pass, so each direction is shown by ablating the expectation on the committed implementation and quoting what the instrument then prints. Every ablation was proved on disk before the run (old text x0 / injected text x1) and the file restored to its HEAD blob afterwards (git hash-object equal to HEAD blob 34896fd57, git diff HEAD empty) — verified after each one.

ABLATION A — `hh.verdict === 'HELD'` flipped to `=== 'DEFEATED'`   (instrument exit 1)
  - NEGATIVE CONTROL FAILED: the probe read a helper-handshake gate (`requireReachedVerdict`) as HELD ()

ABLATION B — `hhHoled.verdict === 'DEFEATED'` flipped to `=== 'HELD'`   (instrument exit 1)
  - POSITIVE CONTROL FAILED: the SAME fixture with only the `requireReachedVerdict` call deleted was read as DEFEATED (); the handshake call is the whole difference

ABLATION C — the refusal-wording assertion pointed at absent text   (instrument exit 1)
  - CONTROL FIXTURE INVALID: the helper-handshake gate's refusal is no longer the helper's (first non-blank line: "fixture self-test: selfTest() returned without reaching its verdict,")

ABLATION D — the holed fixture made identical to the sound one (handshake call NOT removed)   (instrument exit 1)
  - 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
  - POSITIVE CONTROL FAILED: the SAME fixture with only the `requireReachedVerdict` call deleted was read as HELD (); the handshake call is the whole difference
  - 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

A reads the sound direction (HELD), B the holed one (DEFEATED), C publishes the refusal the probe actually read past the leading blank line, and D shows the pair is load-bearing: without the deletion the "holed" direction reads HELD and prints bytes. With the expectations as committed, all four are silent and the instrument exits 0.

Verification

All runs on commit 8f5df3f96 (the tip of this branch, and the tree every number below was read from). Exit codes captured before any pipe (cmd > file 2>&1; EXIT=$?); each line quoted is the one the tool printed. Heavy runs went through scripts/pm/os-verify-lock.sh as other devs do.

The instrument itselfnode scripts/measure-self-test-floor.mjs (normal mode, controls run and refuse before any number is printed): exit 0

measure-self-test-floor: 170 file(s) under scripts/ dispatch on `--self-test`.
Hole 1 -- no assertion floor (success decided by "no failure was recorded"):
  4 of 170. Floored: 165 roster, 1 count-candidate(s) to read.
Hole 2 -- no verdict handshake: NOT MEASURED (pass --probe; it runs every self-test twice).

--probe, on this branch AND on the branch point (e8c7956c4, a second worktree, installed) — both exit 0, and the two reports are byte-identical (diff of the full outputs is empty), which is the claim: a new inline control moves no census row.

Hole 2 -- silently defeated by an early `return` in the self-test (MEASURED):
  0 DEFEATED, 164 HELD, 1 ACCIDENT, 5 NOT MEASURED.
    ACC   scripts/audits/14744-before-update-per-row-value-census.mjs -- exited 1 printing 0 byte(s); no refusal, so NOT a hold
    n/m   scripts/check-platform-checklist.mjs -- entry read by hand as not probeable -- see ENTRY_BY_HAND

That n/m row is the reading this card is about, and it is deliberately still there — the fixture buys the coverage the row cannot.

--self-test on the instrument: not applicable, by design. This file ships no --self-test mode; its controls run inline on every invocation so they cannot become unrun (stated in its header, and it is excluded from its own census as CENSUS_SELF).

Derived gate familynode scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 22 commands from the change set (it reads the change set from git itself; --repo asserted and holds). Every one was run: 22 of 22 exit 0. Highlights:

23 :: EXIT=0 :: pnpm -s check:pm-dispatch-gates
     | ✓ dispatch-gates self-test: 1402 cases pass.
17 :: EXIT=0 :: pnpm check:nul-bytes
     | ✓ check-nul-bytes --self-test: 75 assertions over a temp git repo (real scan() path)
     | check-nul-bytes: OK (scanned 7489 text file(s) -- 7489 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes).
07 :: EXIT=0 :: node scripts/check-self-test-wired.mjs
     | ✓ check-self-test-wired: every one of the 169 script(s) CI runs that ship a `--self-test` has that self-test run by CI.

pnpm lint (eslint . --no-inline-config, whole repo, not narrowed): exit 0, no findings.

NOT MEASURED, recorded as such: pnpm check:published-readme-exports exits 1 in this checkout — it is not in the derived family and was run only because its roster lives under scripts/. Every one of its findings is whose type entry packages/PKG/dist/DIR does not exist. Build first: pnpm build, i.e. an unbuilt tree, not a finding about this diff. It is reported as a prerequisite miss, never as a pass and never as a failure.

Scope

One file, scripts/measure-self-test-floor.mjs, +84 lines. No changeset: nothing is published from a package.


🤖 Generated with Claude Code

https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk


Generated by Claude Code

…ke spelling

`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.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
@github-actions github-actions Bot added the size/s label Sep 4, 2026
@baozhoutao
baozhoutao marked this pull request as ready for review September 4, 2026 18:17
@claude

claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

ACCEPT — PM seat domain:devx @ objectstack (#6023), session session_012zGPuVVX3deAx9LdjK8jCk.

Reviewed against the three-dot diff origin/main...claude/issue-15371-probe-helper-spelling-control (merge base e8c7956c4, head 8f5df3f96): one file, scripts/measure-self-test-floor.mjs, +84/−0, additive only, matching the PR file list. Option A as ruled: a helper-shaped fixture (HELPER_HANDSHAKE_GATE, mirroring check-platform-checklist.mjs's requireReachedVerdict spelling) joins the inline controls that run on every invocation. Both directions come from one pair differing by one line (HELPER_HANDSHAKE_CALL removed for the holed twin) with a fixture-derivation control refusing if the two directions collapse; sound → HELD with mutatedSpoke and the helper's own refusal as the first non-blank line, holed → DEFEATED printing zero bytes. The three-valued verdict, the #15455 baseline precondition and the ENTRY_BY_HAND null row are untouched. --probe reports byte-identical on branch and branch point (0 DEFEATED / 164 HELD / 1 ACCIDENT / 5 NOT MEASURED), four ablations on the committed implementation each red the instrument. Hot-file scan: #15491 is the only open PR on the instrument. skip-changeset is right. Flipping ready and arming auto-merge now; Fixes #15371 closes the card on merge. Next on the instrument file: #15421#14963.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] measure-self-test-floor's --probe has zero coverage of the helper handshake spelling — its only carrier is an ENTRY_BY_HAND null

2 participants