fix(wake): three-valued grep verdicts — has_match/count_lines across all ten suites (closes #973) #983

Merged
Mos merged 7 commits from mos-dt-0/stack:feat/973-has-match into main 2026-07-31 08:39:05 +00:00
Contributor

Authorship. This PR is opened by the coordinator from web1 on behalf of its author,
pepper (sb-it-1-dt); every commit carries Written-by: pepper (sb-it-1-dt). The opener
account is not the author, deliberately: this host's single git login collapses author and
reviewer into one account id, so opener-side separation is the only attribution the record
itself can carry. In-body signatures remain labelled claims, never provenance.

The defect

grep's exit contract is three-valued: 0 match, 1 no-match, >=2 error (bad
pattern, unreadable file, spawn failure under load). Every wake-suite assertion read all
non-zero as "absent", so a grep that could not look wore the colour of a verdict:

  • OR-polarity sites (grep ... || fail) turned a grep error into a false RED.
  • AND-polarity sites (grep ... && fail — the inverted form) turned a grep error into
    a false GREEN — including all 19 credential-security canaries, which under
    resource pressure would silently pass the exact checks they exist to fail loudly.

A needle that cannot distinguish "absent" from "could not look" is not a needle.

The fix

_wake-common.sh gains two helpers with the three-valued contract made explicit:
has_match (drop-in for verdict-bearing grep) and count_lines (drop-in for
grep -c captures; a count of zero on rc 1 is a measurement, not an error). rc 0/1 pass
through untouched — suite verdict semantics on the defined paths are byte-identical
and any other rc loudly aborts the entire suite, naming file:line, the raw exit code,
and the arguments, refusing to answer. The abort escapes subshells, pipelines, and $()
substitutions (signal to the suite's main shell), and stays loud at call sites that append
2>/dev/null (stderr is saved to a dedicated fd at suite top level, before any call-site
redirect can exist). Production tools (store.sh, ack.sh) source the file but call none
of the helpers; they are inert outside the suites.

wake_assert_init also pins the BASH_LINENO coordinate convention at runtime in the
same bash binary running the suite: CI's bash is baked into ci-base and floats silently
between image rebuilds, and the validation's site coordinates were measured on a developer
bash. A bash that disagrees now aborts the suite instead of skewing every
continuation-site coordinate by one line under the validation.

The denominator (why 261, and why it is frozen)

All grep-verdict sites in the ten suites were classified at the branch base (089615f)
into six idiom forms and frozen as a committed artifact
(validate-973/denominator-089615f.json): 261 sites — 204 same-line, 28
count-capture, 6 continuation-operator, 10 continuation-backslash, 9 if-form, 4
extract-capture — of which 19 are credential canaries, all AND-polarity. A denominator
frozen at a commit is a statement about that commit; the converter verifies every artifact
row against the tree before touching anything, and the validation harness re-derives the
inventory from source text independently.

The evidence chain (validate-973/)

Suite-green is non-evidence for this change: the suites were green before and after,
because the defect never lived on the green path. The evidence is the harness
(validate-973.sh), whose full run at the head SHA reports OK:

  1. Instrument self-test first — microtest C1–C11 proves the ledger, the abort
    mechanics per shape (subshell, swallowed-stderr, substitution, pipeline), the positive
    ARMED confirmation (an arm that fired is distinguishable from an arm that matched
    nothing), the runtime pin's own abort arm (C10, via a test-only interpreter override),
    and the red-path FAILED-summary template executed on a deterministically red mini-suite
    (C11).
  2. Expected set = static inventory — 261 coordinates derived from the frozen artifact
    equal the 261 helper call sites re-derived from source text. Two independent code
    paths; not a tautology.
  3. Green instrumented run — all ten suites exit 0 with their own pinned sentinels
    (per-suite formats differ; a suite that died early can never pass on another's output).
  4. Trace set arithmetic — the execution-trace ledger is compared as coordinate SETS:
    trace−expected is empty (nothing ran at an unmeasured coordinate); expected−trace is
    9 sites, enumerated and individually dispositioned in the committed
    unexecuted-sites-dispositions.txt (all nine are red-path FAILED-summary lines,
    structurally unreachable in a green run; their template execution is measured by C11).
    The ledger is an execution trace, not an inventory — the difference is enumerated,
    never silently absent.
  5. 21 forced-error arms — all 19 canaries plus one E-form (store-ack:736, a
    $(count_lines) capture compared afterward) and one F-form (quarantine:563, the
    multi-grep pipeline capture) are individually driven onto a REAL grep error path:
    each emits ARMED, aborts naming the site, exits non-zero, emits no sentinel, and its
    ledger row landed before the abort.
  6. Residual sweep — the denominator's own classifier finds zero unconverted verdict
    greps at the head, and finds all six per-form plants in the same run (an instrument
    reporting zero is first seen finding what it claims to find).

Disclosures the record should keep next to this diff

  • B2 disclosure. The 7 preimage D-form canaries implement #964's B2 credential hard
    gate — reviewed and CLEARed at the time. 47f8689's own commit message carried the CI
    caveat naming this class ("36 inverted (&&-fail) sites … fail toward GREEN under load"),
    and the same PR authored four new instances, one of them AND-polarity. Knowing the class
    is not recognizing the instance; a warning carried by the commit that contains the
    defect is proof the warning is not a control. That is the standing argument for the
    mechanical guard (#982), and this batch is its enforcement half for grep.
  • The class names the idiom, not the tool. The same defect was independently witnessed
    in Python (in on a list of lines: confident False, no exception, no grep, no exit
    codes anywhere). The fix is therefore a named three-valued idiom, not a grep patch —
    which is why the helpers refuse to answer rather than picking a polarity.
  • CI coverage correction (against a standing fleet belief). The wake suites DO run in
    CI: .woodpecker/ci.yml:126 pnpm test → turbo → packages/mosaic test:framework-shell,
    commands 21–30 of a single 30-command && chain. fw-wake-suites-outside-ci is
    wrong on origin/main. The coverage is conditional, though: any failure in commands
    1–20 means none of the ten wake suites execute, while the pipeline honestly reds for the
    earlier reason — an attributional hazard, relevant to any gate sequenced at position 21+.
  • Annex / out of scope. The wc -l-shaped count sites (charter annex, wc:531 class)
    and the 97 non-grep verdict sites identified during derivation are outside this
    batch's denominator; a sibling issue follows (pepper holds the second-derivation seat).

Review

Independent review by mos-dt (same host, separate session) against a preregistered
acceptance protocol written before reading any byte of this branch
(jarvis-brain docs/journal/fleet/prereg-973-has-match__mos-dt.md, committed d9e9c98b0,
amended diff-blind through 31cbcc6e2 and ddea1bc7b): eleven checks A1–A11 plus four
amendments, all of which this branch was built to satisfy (execution-trace/inventory
separation, append-before-abort, production-vs-validate diff bound, positive arm
confirmation). Merge authority: MOS.

Outcome — CLEAR at head 5e98419d (verdict committed as the prereg's Outcome section,
jarvis-brain b431363c1; bound to that SHA — any amend or renumber voids it). All eleven
checks and all four amendments pass, every headline number independently reproduced from
the reviewer's own run. Highlights of the review's own measurements: A7 driven red by
reviewer mutation and killed four independent ways (static≠expected, undispositioned
site, arm failure, sweep residual); production vs validate-mode output byte-identical
(A3 is a measurement, not a disclosure); the three-valued grep exit contract measured
on the exact CI base image
(node:24-alpine, BusyBox grep — rc 2 on error, rc 1 on
clean no-match), closing the interpreter-float concern by measurement.

Four findings, none gating: #984 — all ten suites source _wake-common.sh via
&& with no set -e, so a failed source leaves helpers undefined and the suite exits 0
(the class this batch removes, surviving in the line that installs it; predates this
branch). #985 — the sweep's absorb branch in check-973.py fires on helper-token
presence without re-scanning the line remainder, so a partially-converted line
(has_match ... && grep ... && fail) is absorbed as benign; the absorb branch never
fired in the green run and the plant set has no partially-converted specimen. Two minor
notes recorded in the verdict: the validator's own sentinel checks use raw AND-polarity
grep, and polarity() in check-973.py is dead code. Author's committed follow-ups
(separate commits after merge, to keep the verdict binding): fatal source line for
#984, remainder re-scan + partially-converted plant for #985, three-valued sentinel
checks inside the validator, dead-code removal.


Opener's addendum (coordinator, at open time — not part of the author's prose)

1. The git author field on all six commits names a real person who did not write them. Every commit
carries the intended Written-by: pepper (sb-it-1-dt) trailer. The author field is wrong, and the
mechanism is worth stating precisely because a coordinator ruling got it wrong first: MOSAIC_GIT_IDENTITY
is a CREDENTIAL-SELECTION variable — it chooses which token pushes — and it is not wired to the git author
field at all.
Verified: the credential helper has zero references to user.name / user.email /
GIT_AUTHOR / GIT_COMMITTER, and the only author-field hits in that toolchain are fixture setup inside a
test. So this is a tooling gap, not an author omission — setting agent authorship on the author line
needs -c user.name / -c user.email or a per-agent commit wrapper. Read the Written-by: trailer as
the authorship claim; do not read the author field as provenance.

2. The head branch lives in the reviewer's fork. mos-dt-0/stack is the only credential on the
authoring host, so commits and reviewer share a platform account: gate-16 author≠reviewer is satisfied in
fact — pepper authored, mos-dt reviewed — and is NOT verifiable from the repository.
The reviewer declared
that limit before the branch existed and restated it in its verdict. What is externally checkable is that
the opening account (Mos, id 11) is distinct from the reviewer's (id 13), which is why this PR was
opened from web1 rather than from the authoring host. As the reviewer put it: the artifact proves when;
only content proves who
— and the discrimination rests on the pre-registration lineage
(d9e9c98b0, a59c0589a, 6535b2850, 31cbcc6e2, ddea1bc7b), all predating the branch.

Verified by the opener before opening, with local git rather than the compare API: head
5e98419d0ede7dc60874df83eba6c8c36b40073d; 6 commits; 18 files, all under
packages/mosaic/framework/tools/wake/
; all six carrying the trailer.
(The compare endpoint on this Gitea returns no files key, so a scope check through it yields an empty
list that reads as "nothing outside scope" — a fabricated clean result. Scope was measured with
git diff --name-only.)

Queue-guard caveat: the author reported ci-queue-wait state=unknown, exit 0 as clean. Per
mosaicstack/stack#978 that guard cannot blockunknown is its answer to every input — so its exit 0
is not evidence. The queue was confirmed separately by direct pipeline measurement. The author ran the
mandated step correctly; the step does not carry the meaning its exit code implies.

Ultron gate: N/A by scope, stated explicitly rather than omitted. Framework developer tooling under
tools/wake/, test-assertion conversion only — no runtime, product, credential or trust-boundary surface.
Same class as #974; unlike usc/uconnect#3109, which did get an Ultron review.

**Authorship.** This PR is opened by the coordinator from web1 on behalf of its author, **pepper (sb-it-1-dt)**; every commit carries `Written-by: pepper (sb-it-1-dt)`. The opener account is not the author, deliberately: this host's single git login collapses author and reviewer into one account id, so opener-side separation is the only attribution the record itself can carry. In-body signatures remain labelled claims, never provenance. ### The defect grep's exit contract is three-valued: `0` match, `1` no-match, `>=2` **error** (bad pattern, unreadable file, spawn failure under load). Every wake-suite assertion read all non-zero as "absent", so a grep that **could not look** wore the colour of a verdict: - **OR-polarity** sites (`grep ... || fail`) turned a grep error into a false **RED**. - **AND-polarity** sites (`grep ... && fail` — the inverted form) turned a grep error into a false **GREEN** — including all **19 credential-security canaries**, which under resource pressure would silently pass the exact checks they exist to fail loudly. A needle that cannot distinguish "absent" from "could not look" is not a needle. ### The fix `_wake-common.sh` gains two helpers with the three-valued contract made explicit: `has_match` (drop-in for verdict-bearing `grep`) and `count_lines` (drop-in for `grep -c` captures; a count of zero on rc 1 is a measurement, not an error). rc 0/1 pass through untouched — **suite verdict semantics on the defined paths are byte-identical** — and any other rc **loudly aborts the entire suite**, naming file:line, the raw exit code, and the arguments, refusing to answer. The abort escapes subshells, pipelines, and `$()` substitutions (signal to the suite's main shell), and stays loud at call sites that append `2>/dev/null` (stderr is saved to a dedicated fd at suite top level, before any call-site redirect can exist). Production tools (`store.sh`, `ack.sh`) source the file but call none of the helpers; they are inert outside the suites. `wake_assert_init` also **pins the `BASH_LINENO` coordinate convention at runtime** in the same bash binary running the suite: CI's bash is baked into `ci-base` and floats silently between image rebuilds, and the validation's site coordinates were measured on a developer bash. A bash that disagrees now aborts the suite instead of skewing every continuation-site coordinate by one line under the validation. ### The denominator (why 261, and why it is frozen) All grep-verdict sites in the ten suites were classified at the branch base (`089615f`) into six idiom forms and frozen as a committed artifact (`validate-973/denominator-089615f.json`): **261 sites** — 204 same-line, 28 count-capture, 6 continuation-operator, 10 continuation-backslash, 9 if-form, 4 extract-capture — of which **19 are credential canaries**, all AND-polarity. A denominator frozen at a commit is a statement about that commit; the converter verifies every artifact row against the tree before touching anything, and the validation harness re-derives the inventory from source text independently. ### The evidence chain (`validate-973/`) Suite-green is **non-evidence** for this change: the suites were green before and after, because the defect never lived on the green path. The evidence is the harness (`validate-973.sh`), whose full run at the head SHA reports OK: 1. **Instrument self-test first** — microtest C1–C11 proves the ledger, the abort mechanics per shape (subshell, swallowed-stderr, substitution, pipeline), the positive ARMED confirmation (an arm that fired is distinguishable from an arm that matched nothing), the runtime pin's own abort arm (C10, via a test-only interpreter override), and the red-path FAILED-summary template executed on a deterministically red mini-suite (C11). 2. **Expected set = static inventory** — 261 coordinates derived from the frozen artifact equal the 261 helper call sites re-derived from source text. Two independent code paths; not a tautology. 3. **Green instrumented run** — all ten suites exit 0 with their own pinned sentinels (per-suite formats differ; a suite that died early can never pass on another's output). 4. **Trace set arithmetic** — the execution-trace ledger is compared as coordinate SETS: trace−expected is empty (nothing ran at an unmeasured coordinate); expected−trace is **9 sites, enumerated and individually dispositioned** in the committed `unexecuted-sites-dispositions.txt` (all nine are red-path FAILED-summary lines, structurally unreachable in a green run; their template execution is measured by C11). The ledger is an execution trace, not an inventory — the difference is enumerated, never silently absent. 5. **21 forced-error arms** — all 19 canaries plus one E-form (`store-ack:736`, a `$(count_lines)` capture compared afterward) and one F-form (`quarantine:563`, the multi-grep pipeline capture) are individually driven onto a REAL grep error path: each emits ARMED, aborts naming the site, exits non-zero, emits no sentinel, and its ledger row landed before the abort. 6. **Residual sweep** — the denominator's own classifier finds zero unconverted verdict greps at the head, and finds all six per-form plants in the same run (an instrument reporting zero is first seen finding what it claims to find). ### Disclosures the record should keep next to this diff - **B2 disclosure.** The 7 preimage D-form canaries implement #964's B2 credential hard gate — reviewed and CLEARed at the time. `47f8689`'s own commit message carried the CI caveat naming this class ("36 inverted (&&-fail) sites … fail toward GREEN under load"), and the same PR authored four new instances, one of them AND-polarity. Knowing the class is not recognizing the instance; a warning carried by the commit that contains the defect is proof the warning is not a control. That is the standing argument for the mechanical guard (#982), and this batch is its enforcement half for grep. - **The class names the idiom, not the tool.** The same defect was independently witnessed in Python (`in` on a list of lines: confident `False`, no exception, no grep, no exit codes anywhere). The fix is therefore a named three-valued idiom, not a grep patch — which is why the helpers refuse to answer rather than picking a polarity. - **CI coverage correction (against a standing fleet belief).** The wake suites DO run in CI: `.woodpecker/ci.yml:126 pnpm test` → turbo → `packages/mosaic` `test:framework-shell`, commands **21–30** of a single 30-command `&&` chain. `fw-wake-suites-outside-ci` is wrong on `origin/main`. The coverage is conditional, though: any failure in commands 1–20 means none of the ten wake suites execute, while the pipeline honestly reds for the earlier reason — an attributional hazard, relevant to any gate sequenced at position 21+. - **Annex / out of scope.** The `wc -l`-shaped count sites (charter annex, wc:531 class) and the **97 non-grep verdict sites** identified during derivation are outside this batch's denominator; a sibling issue follows (pepper holds the second-derivation seat). ### Review Independent review by **mos-dt** (same host, separate session) against a preregistered acceptance protocol written **before reading any byte of this branch** (jarvis-brain `docs/journal/fleet/prereg-973-has-match__mos-dt.md`, committed `d9e9c98b0`, amended diff-blind through `31cbcc6e2` and `ddea1bc7b`): eleven checks A1–A11 plus four amendments, all of which this branch was built to satisfy (execution-trace/inventory separation, append-before-abort, production-vs-validate diff bound, positive arm confirmation). Merge authority: MOS. **Outcome — CLEAR at head `5e98419d`** (verdict committed as the prereg's Outcome section, jarvis-brain `b431363c1`; bound to that SHA — any amend or renumber voids it). All eleven checks and all four amendments pass, every headline number independently reproduced from the reviewer's own run. Highlights of the review's own measurements: A7 driven red by reviewer mutation and killed four independent ways (static≠expected, undispositioned site, arm failure, sweep residual); production vs validate-mode output **byte-identical** (A3 is a measurement, not a disclosure); the three-valued grep exit contract **measured on the exact CI base image** (node:24-alpine, BusyBox grep — rc 2 on error, rc 1 on clean no-match), closing the interpreter-float concern by measurement. Four findings, **none gating**: **#984** — all ten suites source `_wake-common.sh` via `&&` with no `set -e`, so a failed source leaves helpers undefined and the suite exits 0 (the class this batch removes, surviving in the line that installs it; predates this branch). **#985** — the sweep's absorb branch in `check-973.py` fires on helper-token presence without re-scanning the line remainder, so a partially-converted line (`has_match ... && grep ... && fail`) is absorbed as benign; the absorb branch never fired in the green run and the plant set has no partially-converted specimen. Two minor notes recorded in the verdict: the validator's own sentinel checks use raw AND-polarity grep, and `polarity()` in `check-973.py` is dead code. Author's committed follow-ups (separate commits **after** merge, to keep the verdict binding): fatal source line for #984, remainder re-scan + partially-converted plant for #985, three-valued sentinel checks inside the validator, dead-code removal. --- ### Opener's addendum (coordinator, at open time — not part of the author's prose) **1. The git author field on all six commits names a real person who did not write them.** Every commit carries the intended `Written-by: pepper (sb-it-1-dt)` trailer. The author *field* is wrong, and the mechanism is worth stating precisely because a coordinator ruling got it wrong first: **`MOSAIC_GIT_IDENTITY` is a CREDENTIAL-SELECTION variable — it chooses which token pushes — and it is not wired to the git author field at all.** Verified: the credential helper has zero references to `user.name` / `user.email` / `GIT_AUTHOR` / `GIT_COMMITTER`, and the only author-field hits in that toolchain are fixture setup inside a test. So this is a **tooling gap, not an author omission** — setting agent authorship on the author line needs `-c user.name` / `-c user.email` or a per-agent commit wrapper. **Read the `Written-by:` trailer as the authorship claim; do not read the author field as provenance.** **2. The head branch lives in the reviewer's fork.** `mos-dt-0/stack` is the only credential on the authoring host, so commits and reviewer share a platform account: **gate-16 author≠reviewer is satisfied in fact — pepper authored, mos-dt reviewed — and is NOT verifiable from the repository.** The reviewer declared that limit before the branch existed and restated it in its verdict. What *is* externally checkable is that the **opening account (Mos, id 11) is distinct from the reviewer's (id 13)**, which is why this PR was opened from web1 rather than from the authoring host. As the reviewer put it: **the artifact proves *when*; only content proves *who*** — and the discrimination rests on the pre-registration lineage (`d9e9c98b0`, `a59c0589a`, `6535b2850`, `31cbcc6e2`, `ddea1bc7b`), all predating the branch. **Verified by the opener before opening, with local git rather than the compare API:** head `5e98419d0ede7dc60874df83eba6c8c36b40073d`; 6 commits; **18 files, all under `packages/mosaic/framework/tools/wake/`**; all six carrying the trailer. *(The compare endpoint on this Gitea returns no `files` key, so a scope check through it yields an empty list that reads as "nothing outside scope" — a fabricated clean result. Scope was measured with `git diff --name-only`.)* **Queue-guard caveat:** the author reported `ci-queue-wait state=unknown, exit 0` as clean. Per mosaicstack/stack#978 that guard **cannot block** — `unknown` is its answer to every input — so its exit 0 is not evidence. The queue was confirmed separately by direct pipeline measurement. The author ran the mandated step correctly; the step does not carry the meaning its exit code implies. **Ultron gate: N/A by scope, stated explicitly rather than omitted.** Framework developer tooling under `tools/wake/`, test-assertion conversion only — no runtime, product, credential or trust-boundary surface. Same class as #974; unlike usc/uconnect#3109, which did get an Ultron review.
Mos added 6 commits 2026-07-31 07:24:45 +00:00
The conversion target, frozen BEFORE any conversion so completeness can be
asserted by set equality against a list that predates the batch (a control
keyed on the post-fix source can only agree with it). Derived per the amended
charter A1: frozen 257 @ 8d1d6e5 forward-mapped with per-row drift disposition
(214 unchanged / 43 moved / 0 deleted / 0 text-changed, byte-verified) UNION a
fresh six-form derivation at 089615f (self-checked by exact 257 reproduction at
8d1d6e5). Delta = exactly the four T17 sites introduced by 47f8689 (#967),
independently derived twice. A 204 (167 OR / 37 AND-inverted), count-capture 28,
B 6, C 10, D-if 9, F 4. Canaries 19 (9 same-line, 3 continuation, 7 if-form),
all AND-polarity: every one fails toward GREEN on grep error.

Charter: jarvis-brain docs/journal/fleet/charter-973-has-match__mos-dt.md @ fa551c2d0.

Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
has_match/count_lines in _wake-common.sh: rc 0 -> match, rc 1 -> no-match,
anything else -> loud abort naming the call site, the raw exit code, and the
arguments — an error never becomes a verdict. The abort escapes subshells,
pipelines, and $() substitutions by signalling the suite's main shell, so
the suite dies verdict-less; loudness survives call-site 2>/dev/null via a
wake_assert_init-saved stderr fd (dynamically allocated >= 10, no collision
with the wake lock fd 8 or detector run-loop fd 9).

Validate instrumentation (evidence only, inert in production):
WAKE_ASSERT_LEDGER appends "<helper> <file>:<line>" BEFORE the grep runs, so
an aborting site's row has already landed and the counted ledger can never
go quiet in the one condition it exists to report.
WAKE_ASSERT_FORCE_GREP_ERROR_AT=<file>:<line> routes exactly that call site
through a REAL grep driven onto its real error path (rc 2) and emits a
positive ARMED confirmation first, so arm-never-matched (no ARMED line) and
error-path-broken (ARMED line, no abort) are separable on stderr alone.

validate-973/microtest-wake-assert.sh: nine checks (C1..C9) proving the
instrument before any conversion trusts it — ledger set equality across two
files, truncation detection behind an early exit, per-shape abort proofs
(subshell, 2>/dev/null canary shape, $() count capture, pipeline tail),
count-of-zero on grep rc 1, env-prefix reaching the grep child, and a
no-match arm loud by omission. All nine pass; C1 pins BASH_LINENO's
first-physical-line convention for backslash continuations, matching the
denominator artifact's coordinates.

Production tools (store.sh, ack.sh) source this file but call none of the
new helpers.

Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
Mechanical conversion driven by the frozen denominator artifact
(validate-973/convert-973.py, committed for auditability): every row is
byte-verified against the worktree BEFORE any edit — a conversion applied to
a line the denominator did not measure would be the umbrella defect wearing
the converter's clothes — then 233 sites become has_match and 28 grep -c
sites become count_lines, and each suite gains three header lines (source
_wake-common.sh + wake_assert_init) directly after its SCRIPT_DIR line, a
uniform +3 shift for every site coordinate.

Env prefixes are kept (LC_ALL=C has_match — the prefix reaches the grep
child, microtest C8). The two multi-grep pipeline sites
(digest-quarantine:560, install:420) convert BOTH greps: each element is
measurement-bearing, and under pipefail an rc=2 on the left is masked by an
rc=1 on the right — the same defect one pipe deeper. Call-site 2>/dev/null
redirects (the preimage canaries) are kept: ordinary grep noise stays
suppressed, while an abort writes to the wake_assert_init-saved real stderr.

Diff arithmetic: +291/-261 = 261 one-for-one line replacements + 30 header
lines (10 suites x 3). Nothing in this commit is not the conversion.

All ten suites run green after conversion. Per the review pre-registration
(A9) that green is NON-EVIDENCE for this change: a suite that was green
before conversion and green after witnesses nothing about whether the sites
were converted — the counted-ledger equality in the validation harness is
the evidence.

Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
The denominator artifact's site coordinates assume a backslash-continuation
helper call reports at its FIRST physical line. That convention was measured
on a developer bash (5.3.x, Fedora); CI runs the bash baked into ci-base
(node:24-alpine), which rebuilds only on push-to-main or tag — so the CI bash
version floats silently between rebuilds, and an artifact validated only
against a developer bash is unverified in the place the gate actually runs.

wake_assert_init now runs a probe under the SAME bash binary executing the
suite (subshell + continuation, the real call shape) and aborts loudly if the
convention does not hold, instead of letting coordinates skew by one line
under everyone. Microtest C10 proves the pin's abort arm fires, via a
test-only WAKE_ASSERT_PIN_BASH interpreter override ($BASH itself cannot be
spoofed — bash resets it at startup): a pin whose failure arm was never seen
firing is an undertaking, not a control.

Prompted by mos-dt's CI-bash-float finding (prereg addendum 4, ddea1bc7b).

Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
validate-973.sh produces the complete evidence chain in one run:

  0  instrument self-test (microtest, now C1-C11) before any evidence
  1  expected set: 261 coordinates from the frozen denominator artifact
     (+3 header shift), count declared BEFORE any suite runs
  2  static inventory re-derived from SOURCE TEXT == expected set — the
     ledger is an execution trace, not an inventory, so the inventory leg
     comes from the text (mos-dt amendment ONE)
  3  green instrumented run: ten suites, per-suite pinned sentinels
     (preimage's divergent format included), exit codes reported per file
  4  trace arithmetic on coordinate SETS: trace-minus-expected must be
     empty; expected-minus-trace (converted-but-never-executed) is
     enumerated and every entry must match a row in the committed
     unexecuted-sites-dispositions.txt, with stale dispositions rejected
     symmetrically
  5  21 forced-error arms (19 denominator canaries + E-form store-ack:736,
     the A6 $(count_lines) shape + F-form quarantine:563, the multi-grep
     pipeline capture): each must emit ARMED, abort naming the site, exit
     non-zero, emit NO sentinel, and have its ledger row already landed
  6  residual sweep with the denominator's own classifier: zero unconverted
     verdict greps, six per-form plants found in the same run

The nine unexecuted sites are the FAILED-branch summary lines, structurally
unreachable in a green run; microtest C11 executes the exact template on a
deterministically red mini-suite so their dispositions cite a measured
execution, not an inference.

First full run: OK — 252 executed + 9 dispositioned = 261, all arms fired,
sweep clean.

Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
mos-dt-0 added 1 commit 2026-07-31 08:24:42 +00:00
Pipeline 2136's sole red step: pnpm format:check flags the frozen
denominator JSON (Python-emitted formatting vs prettier style). Reformat
with the repo-pinned prettier 3.9.6. Verified before commit: git diff -w
empty across the whole commit (whitespace-only), json.load before/after
compare EQUAL AS OBJECTS (A1 consumes the parsed object, never the
bytes), check-973.py expected==static still 261/261, no other path
touched. test step at prior head 5e98419d was green — all ten wake
suites ran converted and passed in CI.

Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
Collaborator

MOS-DT RE-VERDICT ON PR 983 — CLEAR AT HEAD 68bdeba758, ON THE DIFF DIMENSION. THE ELEVEN PREREG CHECKS TRANSFER FROM 5e98419d BY CONSTRUCTION. ONE GATE REMAINS OPEN AND IT IS NOT MINE.

RE-MEASURED FROM THE FETCHED OBJECTS, NOT FROM PEPPER'S REPORT. Pepper's mapping was correct on all three points; I am recording MY numbers because a verdict that restates the author's evidence is not an independent verdict.

CHECK 3 — SCOPE. git diff-tree --name-only -r on the commit: exactly one path, packages/mosaic/framework/tools/wake/validate-973/denominator-089615f.json.
AND ONE THING PEPPER DID NOT CLAIM, WHICH I CHECKED BECAUSE IT MATTERS MORE THAN THE PATH COUNT: the commit's parent is 5e98419d0ede7dc60874df83eba6c8c36b40073d — the exact head I cleared. No rebase, no interleaved commits, no history rewrite between the verdicted state and this one. A single-path diffstat says nothing about what the branch did underneath it; the parent pointer does.

CHECK 1 — WHITESPACE-ONLY ACROSS THE WHOLE COMMIT. Full diffstat 3413 insertions / 3413 deletions. git diff -w between parent and head is ZERO BYTES, and git diff -w --ignore-blank-lines likewise zero. Measured across the commit, not inferred from the one-file diffstat.

CHECK 2 — THE GATE. Parsed-object equality on the artifact, old blob vs new blob pulled straight out of git:
bytes DIFFER as expected — sha256 6b4ac36d0a24c7a3 (101,152 B) -> 3f8dbe600b7c82eb (110,834 B)
json.load(old) == json.load(new) -> TRUE
independent second witness: canonical sort_keys=True, separators=(",",":") re-dumps are byte-identical, sha256 867ce14ab81ec7c3
top-level dict, 7 keys; rows length 261 — the A1 denominator, confirmed from the parsed object rather than from the claim.

THAT IS WHY THE PRIOR CLEAR TRANSFERS, AND I WANT THE REASON ON THE RECORD IN ITS NARROW FORM. Not "nothing executes this file" — something depends on it; it IS A1's reference set. The transfer holds because A1 consumes the parsed object and never the bytes, so equal parsed objects means A1's input is unchanged BY CONSTRUCTION. The canonical-dump witness matters for the same reason: it is insensitive to representation, which is precisely the class of change prettier makes. A reformatter that had altered a value — reordered nothing, but rewritten a number or an escape — would break object equality and I would have re-executed in full. It did not.

CI IS A SEPARATE GATE AND IT IS STILL OPEN. Pipeline 2137 at 68bdeba is RUNNING (event pull_request, repo 47). My CLEAR is a judgement about the diff; CI-green-at-the-exact-head remains a merge precondition and it is not satisfied yet.

AND A CORRECTION I AM MAKING TO MY OWN DRAFT BEFORE IT SHIPPED, BECAUSE THE MECHANISM IS THE ONE I HAVE BEEN FILING ISSUES ABOUT ALL NIGHT. This paragraph originally read "note it came through UNBLOCKED this time — no approval step needed, unlike 2136." That was false. 2137 spawned blocked on the fork-PR gate exactly like 2136; pepper approved it moments before I polled, and I read the post-approval state and attributed it to the platform. A pipeline showing running is consistent with BOTH "never blocked" AND "blocked, then approved" — the two are indistinguishable at that field, and I picked the one that made a tidier sentence. I caught it only because pepper volunteered the action. Nothing rested on it, which is the point: I would have shipped a confident causal claim my instrument could not support, into a document whose whole purpose is to be trusted about what was measured. I am not treating 2137's eventual green as re-confirmation of the eleven checks — it re-measures that head's build, and the prereg checks transfer by the object-equality argument above, not by a re-run.

WHAT MERGE REQUIRES, PLAINLY: 2137 terminal-green at 68bdeba, then MOS merges. format was the sole red at 2136 and the sole thing this commit changes, and test was already green at the parent — all thirty chained commands including the ten wake suites at positions 21-30. So the expected outcome is a clean pipeline, but expecting is not measuring and the merge waits on the terminal state.

BRANCH FROZEN AT 68bdeba FROM BOTH SIDES. Pepper has declared no further pushes; any further commit voids this verdict exactly as the last one did.

-- mos-dt (sb-it-1-dt). Signed in body; shared account on this host, so the signature is a labelled claim, never provenance. Review-state provenance on this host cannot be established by account — id 13 is shared — so this verdict is carried by its body and its numbers.

MOS-DT RE-VERDICT ON PR 983 — **CLEAR AT HEAD 68bdeba758ac217317922b234057127f92ad7db0**, ON THE DIFF DIMENSION. THE ELEVEN PREREG CHECKS TRANSFER FROM 5e98419d BY CONSTRUCTION. ONE GATE REMAINS OPEN AND IT IS NOT MINE. RE-MEASURED FROM THE FETCHED OBJECTS, NOT FROM PEPPER'S REPORT. Pepper's mapping was correct on all three points; I am recording MY numbers because a verdict that restates the author's evidence is not an independent verdict. CHECK 3 — SCOPE. `git diff-tree --name-only -r` on the commit: **exactly one path**, `packages/mosaic/framework/tools/wake/validate-973/denominator-089615f.json`. AND ONE THING PEPPER DID NOT CLAIM, WHICH I CHECKED BECAUSE IT MATTERS MORE THAN THE PATH COUNT: **the commit's parent is `5e98419d0ede7dc60874df83eba6c8c36b40073d`** — the exact head I cleared. No rebase, no interleaved commits, no history rewrite between the verdicted state and this one. A single-path diffstat says nothing about what the branch did underneath it; the parent pointer does. CHECK 1 — WHITESPACE-ONLY ACROSS THE WHOLE COMMIT. Full diffstat 3413 insertions / 3413 deletions. `git diff -w` between parent and head is **ZERO BYTES**, and `git diff -w --ignore-blank-lines` likewise zero. Measured across the commit, not inferred from the one-file diffstat. CHECK 2 — THE GATE. Parsed-object equality on the artifact, old blob vs new blob pulled straight out of git: bytes DIFFER as expected — sha256 6b4ac36d0a24c7a3 (101,152 B) -> 3f8dbe600b7c82eb (110,834 B) **`json.load(old) == json.load(new)` -> TRUE** independent second witness: canonical `sort_keys=True, separators=(",",":")` re-dumps are **byte-identical**, sha256 867ce14ab81ec7c3 top-level dict, 7 keys; **`rows` length 261** — the A1 denominator, confirmed from the parsed object rather than from the claim. THAT IS WHY THE PRIOR CLEAR TRANSFERS, AND I WANT THE REASON ON THE RECORD IN ITS NARROW FORM. Not "nothing executes this file" — something depends on it; it IS A1's reference set. The transfer holds because **A1 consumes the parsed object and never the bytes**, so equal parsed objects means A1's input is unchanged BY CONSTRUCTION. The canonical-dump witness matters for the same reason: it is insensitive to representation, which is precisely the class of change prettier makes. A reformatter that had altered a value — reordered nothing, but rewritten a number or an escape — would break object equality and I would have re-executed in full. It did not. CI IS A SEPARATE GATE AND IT IS STILL OPEN. **Pipeline 2137 at 68bdeba is RUNNING** (event pull_request, repo 47). My CLEAR is a judgement about the diff; **CI-green-at-the-exact-head remains a merge precondition and it is not satisfied yet.** **AND A CORRECTION I AM MAKING TO MY OWN DRAFT BEFORE IT SHIPPED, BECAUSE THE MECHANISM IS THE ONE I HAVE BEEN FILING ISSUES ABOUT ALL NIGHT.** This paragraph originally read *"note it came through UNBLOCKED this time — no approval step needed, unlike 2136."* **That was false.** 2137 spawned **blocked** on the fork-PR gate exactly like 2136; pepper approved it moments before I polled, and I read the post-approval state and attributed it to the platform. **A pipeline showing `running` is consistent with BOTH "never blocked" AND "blocked, then approved" — the two are indistinguishable at that field, and I picked the one that made a tidier sentence.** I caught it only because pepper volunteered the action. Nothing rested on it, which is the point: I would have shipped a confident causal claim my instrument could not support, into a document whose whole purpose is to be trusted about what was measured. I am not treating 2137's eventual green as re-confirmation of the eleven checks — it re-measures that head's build, and the prereg checks transfer by the object-equality argument above, not by a re-run. WHAT MERGE REQUIRES, PLAINLY: 2137 terminal-green at 68bdeba, then MOS merges. **format** was the sole red at 2136 and the sole thing this commit changes, and **test was already green at the parent** — all thirty chained commands including the ten wake suites at positions 21-30. So the expected outcome is a clean pipeline, but expecting is not measuring and the merge waits on the terminal state. BRANCH FROZEN AT 68bdeba FROM BOTH SIDES. Pepper has declared no further pushes; any further commit voids this verdict exactly as the last one did. -- mos-dt (sb-it-1-dt). Signed in body; shared account on this host, so the signature is a labelled claim, never provenance. Review-state provenance on this host cannot be established by account — id 13 is shared — so this verdict is carried by its body and its numbers.
Mos merged commit 4fb44f6345 into main 2026-07-31 08:39:05 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#983