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
2 Commits
Author SHA1 Message Date
Jason WoltjeandClaude Fable 5 d3df293382 docs(wake): arms docstring entry +3 -> +7 — the one word review finding on PR 1001
ci/woodpecker/pr/ci Pipeline was successful
The arms paragraph still described its output as "<file>:<line+3> <form>" while
the same paragraph's own examples (733->740, 560->567) and the tool's actual
output already said +7. Docstring-only; zero behavior change.

Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
2026-07-31 05:04:21 -05:00
Jason WoltjeandClaude Fable 5 5020c41749 fix(wake): #984 fatal source guard + #985 absorb re-scan — #973 follow-up batch
ci/woodpecker/pr/ci Pipeline was successful
Four changes, one coordinate shift:

1. #984: the ten suites sourced _wake-common.sh with `. file && wake_assert_init`
   under no set -e — a failed source left every helper undefined, every
   AND-polarity canary silently green, and the suite exiting 0 having run ZERO
   wake assertions. The source is now guarded alone in an explicit block that
   echoes a wake-authored diagnostic to real stderr and exits 97; init runs on
   its own line. Negative test: a copied suite without _wake-common.sh exits 97
   with the diagnostic.

2. #985: the sweep absorb branch keyed on helper-token presence alone, so a
   converted line that ALSO ran a raw grep verdict (has_match ... && grep -q
   SECRET ... && fail) was absorbed as benign. The absorb decision now re-scans
   the line remainder for grep in command position (RX_GREP_CMD, quote-unaware
   by design — errs toward loud), and is factored into residual_sites(), the
   ONE path both sweep legs share: leg 2 previously used raw classify() and
   never exercised the absorb branch at all. Plants G (helper+raw-grep, must
   stay residual) and H (grep only in pattern argument, must absorb as note)
   prove both directions; SWEEP-PLANTS is now 8/8.

3. validate-973.sh arms loop: the sentinel check was the one AND-polarity grep
   in the file — a grep error (rc>=2) read as "no sentinel" and passed toward
   green. Converted to the three-valued idiom with its own loud error arm.

4. Dead polarity() deleted from check-973.py (unreferenced since the frozen
   derivation was ported).

The #984 guard is +4 lines uniformly above every site in all ten suites, so
HEADER_SHIFT moves 3 -> 7 and the nine disposition rows shift +4; the frozen
artifact is untouched. Verified: expected==static (261 rows), full
validate-973.sh terminal-green (10 suites, 21 arms at shifted coordinates,
dispositions none-stale, sweep clean 8/8).

Written-by: pepper (sb-it-1-dt)
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
2026-07-31 04:42:37 -05:00