feat(devx): a row selector for measure-self-test-floor --probe (#15759) - #15833
Merged
baozhoutao merged 3 commits intoSep 5, 2026
Merged
Conversation
…5759) `--probe` swept every census row twice and had no way to name ONE, so every single-row reading on record was taken by re-driving `main()`'s loop in a private throwaway -- a COPY of the decision (which row, which entry, which budget) the shipped sweep makes. `--only <path>` (repeatable, `--only=<path>` too, repo-relative or absolute) selects census rows for the probe. Both paths run the same `population()` -> `probePlan()` -> `probeEarlyReturn()` chain through `probeRows()`, which is the sweep's own loop body LIFTED rather than copied -- the `sitesInSource` treatment from #13874, so a single-row reading and the shipped sweep cannot drift. - A selector naming no census row exits 2 and lists the nearest rows by path substring; a part every row carries is not scored. Never a silent empty sweep, whose `0 DEFEATED, 0 HELD, 0 ACCIDENT` is the flattering reading this instrument exists to expose. - `--only` narrows the PROBE, not the census: the row count, the floor column and the handshake column stay whole, and hole 2 announces over how many of how many rows it was measured. Excluded rows publish `NOT PROBED` in `--json`. - With no `--only` the sweep is handed the population object itself and every byte of the output is unchanged (measured: 17,516 bytes, `cmp` clean). - Controls for all three cases, plus one that drives `probeRows` over a real fixture and compares its verdict against a direct `probeEarlyReturn` call -- the anti-drift reading a private loop copy would break. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
…ts (#15759) A per-part score ranked the right row first and then padded the list with every row that merely ends in `.mjs` -- measured on this census, a single miss "matched" 181 of 182 rows, and a diagnostic that names everything names nothing. `nearestRows` now reads two tiers: rows whose path CONTAINS the whole selector (a bare basename, a directory, a truncated prefix), and otherwise only the rows sharing the LONGEST basename prefix with it -- the maximum, never a threshold. `--only scripts/invoked-a.mjs` now lists exactly `scripts/invoked-as.mjs`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
…-selector Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
This was referenced Sep 5, 2026
baozhoutao
marked this pull request as ready for review
September 5, 2026 10:29
baozhoutao
enabled auto-merge
September 5, 2026 10:29
Contributor
Author
|
Flipped ready + auto-merge enabled (10:29Z, Generated by Claude Code |
baozhoutao
deleted the
claude/issue-15759-self-test-floor-probe-row-selector
branch
September 5, 2026 10:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15759
--probeswept every census row twice and had no way to name ONE.scripts/pm/dispatch-gates.mjsalone was measured at 434.3 s and the full sweep is 183 rows spawned twice, so it does not fit a foreground turn — which is why every single-row reading this instrument has on record was taken by re-drivingmain()'s loop in a private throwaway. A throwaway is a COPY of the decision the shipped sweep makes (which row, which entry, which budget), and the repair's evidence then comes from the copy while the original ships. That is the class of mistake this instrument's own controls refuse elsewhere:sitesInSourcewas LIFTED rather than copied on #13874, precisely so a reading and the shipped code could not drift.What landed
--only PATH(repeatable,--only=PATHaccepted, repo-relative or absolute) selects census rows for the probe.probeRows()IS the sweep's loop body —probePlan()thenprobeEarlyReturn()— andmain()calls it on both paths. There is no second copy of the decision to drift. Itsplan/probeparameters exist only so a control can COUNT the probe's calls;main()passes neither.nearestRowsreads two tiers — rows whose path CONTAINS the whole selector (a bare basename, a directory, a truncated prefix), otherwise only the rows sharing the LONGEST basename prefix, the maximum and never a threshold. A first cut scored summed path parts; measured on this census, one miss then "matched" 181 of 182 rows, and a diagnostic that names everything names nothing.1 file(s) under scripts/ dispatch on --self-test, which is false. Excluded rows publishNOT PROBEDin--json, because a missingprobekey is what a run without--probepublishes.--onlywith no value,--only --probe(the flag taken as the value),--only=, and--onlywithout--probe. Read permissively,--only --probemeans "sweep everything" — the outcome that takes hours and looks like success, reached by a typo.--helpflag (its controls run inline on every invocation and it has no--self-testmode either). Its usage block in the header IS its help text; it is extended, and aUSAGEconstant now prints on every refusal. The header doc carries a new--onlysection.classifyHandshake/definitionSpanare untouched.Measurement
All exit codes captured before any pipe. Wall times are SHARED-BOX seconds under
scripts/pm/os-verify-lock.sh, which excludes other locked runs and nothing else.Inert with no
--only— the base file and this one, same tree, same installed worktree, at HEAD98a0b76:One row, through the shipped path. The card's own assumption is honoured: no real sweep over
scripts/pm/dispatch-gates.mjs. The row measured isscripts/invoked-as.mjs, whose own--self-testruns in 0.41 s.real 0m58.259sfor the whole invocation, of which ~57 s is this tool's unconditional controls plus the static census (a barenode scripts/measure-self-test-floor.mjsin the same worktree:real 0m57.633s) — the selected row itself is the ~1 s remainder, against 183 rows spawned twice for the full sweep. This run and the refusal runs below were taken atd741da9, beforeorigin/mainwas merged in, when the census held 182 rows; the census is 183 rows at98a0b76.--jsonfor the same run, which is the "twice" made readable — a baseline run and a mutated run, both reported:{ "file": "scripts/invoked-as.mjs", "probe": { "verdict": "HELD", "entry": "selfTest", "baselineExit": 0, "mutatedExit": 1, "mutatedBytes": 196, "mutatedSpoke": true } } { "file": "scripts/js-comment-mask.mjs", "probe": { "verdict": "NOT PROBED", "why": "excluded by --only" } }Refusals, exit code quoted from the run itself:
Ablation, three legs, trap-guarded, absolute paths, each mutation proven on disk before the run (the removed text goes 1 → 0, the injected marker 0 → 1, the blob differs from the HEAD blob) and each restore proven byte-identical (
git hash-objectequal to the HEAD blob ANDgit diff HEADempty). The unmodified run exits 0; each ablated run exits 1 naming the controls it broke:One control in the temp-fixture half of
runControls()drivesprobeRowsover a two-row fixture population with one row selected and compares its verdict against a DIRECTprobeEarlyReturncall on the same fixture. That is the anti-drift reading: if a private copy of the loop ever grows here, those two verdicts separate.Gates.
node scripts/pm/dispatch-gates.mjs --changed --commands --repo objectstack-ai/objectstackderived 28 commands on the merged tree (98a0b76, no STALE TREE warning); all 28 ran and all 28 exited 0. Six of them first readPREREQUISITE NOT MET(exit 3) orERR_MODULE_NOT_FOUNDin the fresh worktree —check-reference-carrier-shape(x2),check-ci-filter-parity,check-closing-keyword-parity(x2),check-comment-mask-corpus,check:driver-memory-census— and were re-run to a real reading afterpnpm install --offline; none is reported green on the failed attempt.pnpm check:nul-bytes→check-nul-bytes: OK (scanned 7640 text file(s) -- 7640 tracked, 0 untracked-not-ignored; skipped 7 binary; no raw ASCII control bytes), and a directgrep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'over the file found nothing.node scripts/pm/check-governed-merges.mjs --test scripts/measure-self-test-floor.mjson the final one-file list → exit 0,✅ NOT governed — ordinary queue landing applies to a PR with exactly this file list.git merge-tree --write-tree origin/main HEADafter a fresh fetch → exit 0, no conflict. All 30 open PRs were enumerated throughGET /repos/objectstack-ai/objectstack/pulls/N/files; none touchesscripts/measure-self-test-floor.mjs, so there are no collisions.scripts/pm/dispatch-gates.mjs(held by #15830 / #15806) was RUN but not touched.Scripts-only diff, nothing published changes →
skip-changeset.🤖 Generated with Claude Code
https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Generated by Claude Code