fix(wake): #942 follow-up — whole-string knob validation (grep line anchors admit multi-line values) #943

Merged
Mos merged 2 commits from mos-dt-0/stack:wake-942-knob-newline-guard into main 2026-07-30 11:56:19 +00:00
2 Commits
Author SHA1 Message Date
Jason WoltjeandClaude Fable 5 052b8f15f9 wake: bump manifest version 0.6.12 -> 0.6.13 (#943 review §2)
ci/woodpecker/pr/ci Pipeline was successful
#942 and #943 both changed detector.sh after the 0.6.12 stamp, leaving
three materially different detectors under one version string. version=
is the component's sole self-identity claim (no per-file hashes), so a
reseed reading 0.6.12 -> 0.6.12 looks 'already current' while the file
changed underneath. Deploy itself is safe (wake-install decides by
cmp -s byte content) — this restores the identity claim, per mos-dt's
review suggestion adopted by MOS as a merge condition.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
2026-07-30 06:44:16 -05:00
Jason WoltjeandClaude Fable 5 2621335e77 fix(wake): #942 follow-up — whole-string knob validation; grep line anchors admit multi-line values
ci/woodpecker/pr/ci Pipeline was successful
mos-dt's post-verdict residual (non-blocking, comments 19484/19487): grep is
LINE-oriented, so ^[0-9]{1,9}$ binds per line and a knob with an embedded
newline ($'300\n8', $'300\nabc') passes the regex whole yet is FATAL inside
$((...)) under set -u — the same poll-killing class #942 fixed, reachable only
via the env-config operand (snap_ts is immune: jq's number type-check cannot
emit an embedded newline).

Fix (mos-dt-verified pattern): replace grep with a whole-string case pattern —
'' and *[!0-9]* reject, length <= 9 — identical accept/reject to the regex on
every single-line value, rejects both multi-line cases. 10# radix force
unchanged. Two new D13 sub-cases (SHA-CC2/SHA-CC3) cover exactly the repros;
det_seq assertion 6 -> 8. Manifest states the string-extent rule: the validator
and the consumer must agree on STRING EXTENT, not just shape and radix.

Suite: 13 groups, D13 green 4/4 local runs; sole intermittent failure is the
known pre-existing D4 fd-9 flake (carried separately by mos-dt).

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NsKce8iZuSuRnu3gVMCBKB
2026-07-30 06:28:19 -05:00