fix(wake): #984 fatal source guard + #985 absorb re-scan — #973 follow-up batch #1001

Merged
Mos merged 2 commits from fix/973-followup-984-985 into main 2026-07-31 10:16:23 +00:00
13 changed files with 152 additions and 66 deletions
@@ -33,7 +33,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
BEACON="$SCRIPT_DIR/beacon.sh" BEACON="$SCRIPT_DIR/beacon.sh"
command -v jq >/dev/null 2>&1 || { command -v jq >/dev/null 2>&1 || {
@@ -31,7 +31,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
DET="$SCRIPT_DIR/detector.sh" DET="$SCRIPT_DIR/detector.sh"
STORE="$SCRIPT_DIR/store.sh" STORE="$SCRIPT_DIR/store.sh"
@@ -37,7 +37,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
STORE="$SCRIPT_DIR/store.sh" STORE="$SCRIPT_DIR/store.sh"
DIGEST="$SCRIPT_DIR/digest.sh" DIGEST="$SCRIPT_DIR/digest.sh"
SIGN="$SCRIPT_DIR/sign.sh" SIGN="$SCRIPT_DIR/sign.sh"
@@ -119,7 +119,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
DIGEST="$SCRIPT_DIR/digest.sh" DIGEST="$SCRIPT_DIR/digest.sh"
command -v jq >/dev/null 2>&1 || { command -v jq >/dev/null 2>&1 || {
@@ -27,7 +27,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
ORACLE="$SCRIPT_DIR/fn-oracle.sh" ORACLE="$SCRIPT_DIR/fn-oracle.sh"
DET="$SCRIPT_DIR/detector.sh" DET="$SCRIPT_DIR/detector.sh"
@@ -36,7 +36,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
WI="$SCRIPT_DIR/wake-install.sh" WI="$SCRIPT_DIR/wake-install.sh"
BEACON="$SCRIPT_DIR/beacon.sh" BEACON="$SCRIPT_DIR/beacon.sh"
FRAMEWORK_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" FRAMEWORK_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
@@ -48,7 +48,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
PRE="$SCRIPT_DIR/preimage.sh" PRE="$SCRIPT_DIR/preimage.sh"
STORE="$SCRIPT_DIR/store.sh" STORE="$SCRIPT_DIR/store.sh"
DET="$SCRIPT_DIR/detector.sh" DET="$SCRIPT_DIR/detector.sh"
@@ -31,7 +31,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
RECON="$SCRIPT_DIR/reconcile.sh" RECON="$SCRIPT_DIR/reconcile.sh"
STORE="$SCRIPT_DIR/store.sh" STORE="$SCRIPT_DIR/store.sh"
DET="$SCRIPT_DIR/detector.sh" DET="$SCRIPT_DIR/detector.sh"
@@ -44,7 +44,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
STORE="$SCRIPT_DIR/store.sh" STORE="$SCRIPT_DIR/store.sh"
ACK="$SCRIPT_DIR/ack.sh" ACK="$SCRIPT_DIR/ack.sh"
@@ -34,7 +34,11 @@ set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness. # #973: three-valued grep assertion helpers (has_match/count_lines); init saves real stderr for abort loudness.
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "$SCRIPT_DIR/_wake-common.sh" && wake_assert_init if ! . "$SCRIPT_DIR/_wake-common.sh"; then
echo "WAKE-ASSERT INIT ABORT: cannot source _wake-common.sh — suite ran ZERO wake assertions (#984)" >&2
exit 97
fi
wake_assert_init
STORE="$SCRIPT_DIR/store.sh" STORE="$SCRIPT_DIR/store.sh"
command -v jq >/dev/null 2>&1 || { command -v jq >/dev/null 2>&1 || {
@@ -10,8 +10,9 @@ comparison come from independent code paths.
Subcommands (all print sorted, stable output; non-zero exit on any failure): Subcommands (all print sorted, stable output; non-zero exit on any failure):
expected The expected coordinate set from the ARTIFACT: one expected The expected coordinate set from the ARTIFACT: one
"<helper> <file>:<line+3>" row per denominator row (+3 = the "<helper> <file>:<line+7>" row per denominator row (+7 = 3
uniform header shift the converter applied; converter-verified). converter header lines + 4 lines from the #984 source guard,
uniform across all ten suites).
Multi-grep lines stay ONE coordinate. Multi-grep lines stay ONE coordinate.
static The converted-site inventory from the SOURCE TEXT at the current static The converted-site inventory from the SOURCE TEXT at the current
@@ -23,9 +24,9 @@ Subcommands (all print sorted, stable output; non-zero exit on any failure):
from the text.) from the text.)
arms The forced-error arm list: the 19 denominator canaries plus one arms The forced-error arm list: the 19 denominator canaries plus one
E-form arm (store-ack:733→736, a $(count_lines) capture compared E-form arm (store-ack:733→740, a $(count_lines) capture compared
afterward — the A6 shape) plus one F-form arm (quarantine:560→563, afterward — the A6 shape) plus one F-form arm (quarantine:560→567,
the multi-grep pipeline capture), as "<helper> <file>:<line+3> the multi-grep pipeline capture), as "<helper> <file>:<line+7>
<form>". Both extras are asserted to exist in the artifact with <form>". Both extras are asserted to exist in the artifact with
the expected form — a renumber that moved them fails here, not the expected form — a renumber that moved them fails here, not
silently downstream. silently downstream.
@@ -33,7 +34,8 @@ Subcommands (all print sorted, stable output; non-zero exit on any failure):
sweep Residual sweep: the denominator's own classifier (ported from the sweep Residual sweep: the denominator's own classifier (ported from the
frozen derivation) over the ten suites at the current tree must frozen derivation) over the ten suites at the current tree must
find ZERO unconverted verdict-form grep sites; and, IN THE SAME find ZERO unconverted verdict-form grep sites; and, IN THE SAME
RUN, six per-form specimens planted into a temp copy of a real RUN, eight specimens (six per-form + two absorb-branch probes, #985)
planted into a temp copy of a real
suite must ALL be found with their correct forms — an instrument suite must ALL be found with their correct forms — an instrument
that reports zero must first be seen finding what it claims to that reports zero must first be seen finding what it claims to
find (A5). find (A5).
@@ -50,7 +52,9 @@ HERE = Path(__file__).resolve().parent
WAKE = HERE.parent WAKE = HERE.parent
ART = HERE / "denominator-089615f.json" ART = HERE / "denominator-089615f.json"
HEADER_SHIFT = 3 # converter inserted 3 header lines after SCRIPT_DIR in every suite HEADER_SHIFT = 7 # 3 converter header lines after SCRIPT_DIR + 4 lines from the
# #984 source guard (1-line `. _wake-common.sh && wake_assert_init` became a 5-line
# guarded block) — both uniform across all ten suites, both above every site.
# The two hand-picked extra arms (base coordinates; forms asserted at load). # The two hand-picked extra arms (base coordinates; forms asserted at load).
EXTRA_ARMS = [ EXTRA_ARMS = [
@@ -68,10 +72,14 @@ RX_ASSIGN_SUB = re.compile(r'=\s*"?\$\(.*grep')
RX_IF = re.compile(r"^\s*(el)?if\s+.*grep") RX_IF = re.compile(r"^\s*(el)?if\s+.*grep")
RX_GREP = re.compile(r"(^|[^A-Za-z0-9_.-])grep([^A-Za-z0-9_.-]|$)") RX_GREP = re.compile(r"(^|[^A-Za-z0-9_.-])grep([^A-Za-z0-9_.-]|$)")
# grep in COMMAND position: at line start or after a command separator / subshell
def polarity(line): # opener / shell keyword / `!`. Quote-unaware by design — a quoted "grep" after a
m = RX_FAIL_SAME.search(line) # separator reads as a command and lands the line in residual, which fails LOUD;
return "OR" if m.group(1) == "||" else "AND" # the absorb direction (note) is the one that must never fire on a real verdict.
RX_GREP_CMD = re.compile(
r"(?:^|[;|&(`]|\$\(|\bif\b|\belif\b|\bthen\b|\belse\b|\bdo\b|\bwhile\b|\buntil\b|!)"
r"\s*grep(?:\s|$)"
)
def classify(lines): def classify(lines):
@@ -137,6 +145,28 @@ def classify(lines):
return sites, dispo return sites, dispo
def residual_sites(lines):
"""classify() plus the absorb decision — the ONE path both sweep legs share.
A classified site is absorbed as a note only when its line carries a wake
helper token AND the line shows no grep in command position: a converted
line whose PATTERN argument merely contains the word grep. A helper line
that also runs a real grep verdict (has_match ... && grep -q SECRET ... &&
fail) stays residual (#985). Multi-line forms anchor the site at the line
containing grep, so a command-position grep on a continuation line never
shares its line with the helper token and stays residual by construction.
"""
sites, dispo = classify(lines)
residual, notes = [], []
for ln, form, text in sites:
line = lines[ln - 1]
if RX_HELPER.search(line) and not RX_GREP_CMD.search(line):
notes.append((ln, form, text))
else:
residual.append((ln, form, text))
return residual, notes, dispo
def load_art(): def load_art():
art = json.loads(ART.read_text()) art = json.loads(ART.read_text())
assert art["total"] == 261 == len(art["rows"]), "artifact self-consistency" assert art["total"] == 261 == len(art["rows"]), "artifact self-consistency"
@@ -199,13 +229,20 @@ def cmd_arms():
return 0 return 0
# (expected classify form, expected disposition through residual_sites, snippet)
PLANTS = [ PLANTS = [
("A-same-line", ['grep -q needle haystack || fail "plant-A"']), ("A-same-line", "residual", ['grep -q needle haystack || fail "plant-A"']),
("B-cont-operator", ["grep -q needle haystack ||", ' fail "plant-B"']), ("B-cont-operator", "residual", ["grep -q needle haystack ||", ' fail "plant-B"']),
("C-cont-backslash", ["grep -q needle \\", ' haystack || fail "plant-C"']), ("C-cont-backslash", "residual", ["grep -q needle \\", ' haystack || fail "plant-C"']),
("D-if-form", ["if ! grep -q needle haystack; then", ' fail "plant-D"', "fi"]), ("D-if-form", "residual", ["if ! grep -q needle haystack; then", ' fail "plant-D"', "fi"]),
("E-count-capture", ['[ "$(grep -c needle haystack)" = "1" ] || fail "plant-E"']), ("E-count-capture", "residual", ['[ "$(grep -c needle haystack)" = "1" ] || fail "plant-E"']),
("F-extract-capture", ['val="$(grep needle haystack)"']), ("F-extract-capture", "residual", ['val="$(grep needle haystack)"']),
# G: a converted line that ALSO runs a raw grep verdict — the helper token
# must not absorb it (#985)
("A-same-line", "residual", ['has_match -q needle "$F" && grep -q SECRET "$F" && fail "plant-G"']),
# H: negative control — helper whose PATTERN argument is the word grep;
# must be absorbed as a note, never residual
("A-same-line", "note", ['has_match -q "grep" haystack || fail "plant-H"']),
] ]
@@ -215,22 +252,20 @@ def cmd_sweep():
# leg 1: real suites at the current tree must be residual-free # leg 1: real suites at the current tree must be residual-free
for f in suite_files(art): for f in suite_files(art):
lines = (WAKE / f).read_text().split("\n") residual, notes, _dispo = residual_sites((WAKE / f).read_text().split("\n"))
sites, _dispo = classify(lines) for ln, form, text in notes:
residual = [] # converted line whose PATTERN argument contains the word grep:
for ln, form, text in sites: # not an unconverted site, but never silently absorbed either
if RX_HELPER.search(lines[ln - 1]): print(f"SWEEP-NOTE {f}:{ln} converted line matches grep-token ({form}): {text[:80]}")
# converted line whose PATTERN argument contains the word grep:
# not an unconverted site, but never silently absorbed either
print(f"SWEEP-NOTE {f}:{ln} converted line matches grep-token ({form}): {text[:80]}")
continue
residual.append((ln, form, text))
for ln, form, text in residual: for ln, form, text in residual:
print(f"SWEEP-RESIDUAL {f}:{ln} {form}: {text[:100]}") print(f"SWEEP-RESIDUAL {f}:{ln} {form}: {text[:100]}")
bad += 1 bad += 1
print(f"SWEEP {f}: {len(residual)} residual verdict site(s)") print(f"SWEEP {f}: {len(residual)} residual verdict site(s)")
# leg 2, SAME RUN: the instrument must find six per-form plants # leg 2, SAME RUN, SAME PATH as leg 1: the instrument must find every plant
# with the right form AND the right absorb disposition — plants G/H exercise
# the absorb branch itself, so this leg must go through residual_sites(),
# not raw classify()
donor = suite_files(art)[0] donor = suite_files(art)[0]
with tempfile.TemporaryDirectory() as td: with tempfile.TemporaryDirectory() as td:
planted = Path(td) / donor planted = Path(td) / donor
@@ -238,25 +273,28 @@ def cmd_sweep():
base_lines = planted.read_text().split("\n") base_lines = planted.read_text().split("\n")
offset = len(base_lines) offset = len(base_lines)
expect = {} expect = {}
for form, snippet in PLANTS: for form, dispo, snippet in PLANTS:
expect[offset + 1] = form # first physical line of each plant expect[offset + 1] = (form, dispo) # first physical line of each plant
base_lines.extend(snippet) base_lines.extend(snippet)
offset = len(base_lines) offset = len(base_lines)
planted.write_text("\n".join(base_lines)) planted.write_text("\n".join(base_lines))
sites, _ = classify(planted.read_text().split("\n")) residual, notes, _ = residual_sites(planted.read_text().split("\n"))
found = {ln: form for ln, form, _t in sites if ln in expect} found = {ln: (form, "residual") for ln, form, _t in residual}
unexpected = [(ln, form) for ln, form, _t in sites if ln not in expect] found.update({ln: (form, "note") for ln, form, _t in notes})
hits = sum(1 for ln, form in expect.items() if found.get(ln) == form) unexpected = [(ln, form) for ln, form, _t in residual if ln not in expect]
print(f"SWEEP-PLANTS found={hits}/6 in planted copy of {donor}") hits = sum(1 for ln, want in expect.items() if found.get(ln) == want)
if hits != 6: n_plants = len(PLANTS)
for ln, form in sorted(expect.items()): print(f"SWEEP-PLANTS found={hits}/{n_plants} in planted copy of {donor}")
got = found.get(ln, "<missed>") if hits != n_plants:
if got != form: for ln, want in sorted(expect.items()):
print(f"SWEEP-PLANT-MISS line {ln}: expected {form}, got {got}") got = found.get(ln, ("<missed>", "<missed>"))
if got != want:
print(f"SWEEP-PLANT-MISS line {ln}: expected {want}, got {got}")
bad += 1 bad += 1
if unexpected: if unexpected:
# the donor is a converted suite: any non-plant site the sweep finds # the donor is a converted suite: any non-plant RESIDUAL site in the
# in the copy contradicts the zero it just reported on the original # copy contradicts the zero leg 1 just reported on the original
# (non-plant notes mirror leg 1's treatment: printed there, not bad)
for ln, form in unexpected: for ln, form in unexpected:
print(f"SWEEP-PLANT-UNEXPECTED {donor}(copy):{ln} {form}") print(f"SWEEP-PLANT-UNEXPECTED {donor}(copy):{ln} {form}")
bad += 1 bad += 1
@@ -26,12 +26,12 @@
# #
# Verified guard per site (line numbers at branch tip, +3 header shift): # Verified guard per site (line numbers at branch tip, +3 header shift):
count_lines test-wake-beacon.sh:350 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 349; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-beacon.sh:354 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 353; template execution measured by microtest C11; text verified by static inventory
count_lines test-wake-detector.sh:702 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 701; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-detector.sh:706 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 705; template execution measured by microtest C11; text verified by static inventory
count_lines test-wake-digest-hmac.sh:434 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 433; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-digest-hmac.sh:438 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 437; template execution measured by microtest C11; text verified by static inventory
count_lines test-wake-digest-quarantine.sh:584 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 583; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-digest-quarantine.sh:588 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 587; template execution measured by microtest C11; text verified by static inventory
count_lines test-wake-fn-oracle.sh:132 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 131; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-fn-oracle.sh:136 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 135; template execution measured by microtest C11; text verified by static inventory
count_lines test-wake-install.sh:434 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 433; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-install.sh:438 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 437; template execution measured by microtest C11; text verified by static inventory
count_lines test-wake-reconcile.sh:389 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 388; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-reconcile.sh:393 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 392; template execution measured by microtest C11; text verified by static inventory
count_lines test-wake-store-ack.sh:741 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 740; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-store-ack.sh:745 — red-path summary; guard `[ -s "$FAILFILE" ]` at line 744; template execution measured by microtest C11; text verified by static inventory
count_lines test-wake-store-enqueue-race.sh:208 — red-path summary (with "#927 TOCTOU reproduced (RED)" tail); guard `[ -s "$FAILFILE" ]` at line 207; template execution measured by microtest C11; text verified by static inventory count_lines test-wake-store-enqueue-race.sh:212 — red-path summary (with "#927 TOCTOU reproduced (RED)" tail); guard `[ -s "$FAILFILE" ]` at line 211; template execution measured by microtest C11; text verified by static inventory
@@ -4,8 +4,8 @@
# #
# 0. instrument self-test (microtest) — no validate evidence is trusted # 0. instrument self-test (microtest) — no validate evidence is trusted
# before the instrument itself has been proven, including its abort arms. # before the instrument itself has been proven, including its abort arms.
# 1. expected set: 261 coordinates from the FROZEN artifact (+3 header # 1. expected set: 261 coordinates from the FROZEN artifact (+7 header
# shift), count asserted against the number declared below BEFORE any # shift: 3 converter lines + 4 #984 guard lines), count asserted against the number declared below BEFORE any
# suite runs. # suite runs.
# 2. static inventory: converted call sites re-derived from SOURCE TEXT, # 2. static inventory: converted call sites re-derived from SOURCE TEXT,
# must equal the expected set exactly (amendment ONE, leg 1 — the # must equal the expected set exactly (amendment ONE, leg 1 — the
@@ -33,7 +33,8 @@
# site's ledger row must already be present (the append lands before the # site's ledger row must already be present (the append lands before the
# grep). # grep).
# 6. residual sweep: the denominator's own classifier finds zero unconverted # 6. residual sweep: the denominator's own classifier finds zero unconverted
# verdict greps in the suites — and six per-form plants in the same run. # verdict greps in the suites — and eight plants (six per-form + two
# absorb-branch probes, #985) in the same run.
# #
# Output discipline (A10): every line that reports on a suite names the file # Output discipline (A10): every line that reports on a suite names the file
# under test; exit codes are reported before failure counts. # under test; exit codes are reported before failure counts.
@@ -180,8 +181,15 @@ while read -r helper site form; do
bad="$bad no-ARMED-line" bad="$bad no-ARMED-line"
printf '%s\n' "$out" | grep -q "WAKE-ASSERT ABORT: ${helper} at ${site}: grep exit" || printf '%s\n' "$out" | grep -q "WAKE-ASSERT ABORT: ${helper} at ${site}: grep exit" ||
bad="$bad no-ABORT-line" bad="$bad no-ABORT-line"
printf '%s\n' "$out" | grep -Eq "$(sentinel_for "$f")" && # AND-polarity check (a match is the defect): a grep error (rc>=2) must be
bad="$bad sentinel-emitted" # its own loud arm — it cannot fall through as "no sentinel = pass".
rc_sent=0
printf '%s\n' "$out" | grep -Eq "$(sentinel_for "$f")" || rc_sent=$?
case "$rc_sent" in
0) bad="$bad sentinel-emitted" ;;
1) : ;;
*) bad="$bad sentinel-grep-error-rc=$rc_sent" ;;
esac
grep -q "^${helper} ${site}\$" "$aled" || grep -q "^${helper} ${site}\$" "$aled" ||
bad="$bad no-ledger-row" bad="$bad no-ledger-row"
if [ -z "$bad" ]; then if [ -z "$bad" ]; then