rehearsal reporter: the evidence line redacts the real port/timeout and garbles ANSI into [Nm noise #610
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#610
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The rehearsal reporter's evidence line is unreadable — discovered while diagnosing #609.
.sandcastle/rehearsal-report.shbuilds the human-facing evidence line with:normalize_error_line(.sandcastle/heal-lib.sh) is built for ONE job: folding run-specific noise (ports, timestamps, hex hashes) so the same recurring fault hashes to the samecompute_signature. Applying it to the human/agent-facing evidence text as well:N— the real port number and timeout, exactly what a human/agent needs to diagnose, are gone (port="443"→port="N",Timeout: 600000ms→Timeout: Nms).[Nmnoise (the ESC byte's digit gets folded toNby the same rule, and the invisible ESC byte itself renders away, leaving[Nmas visible junk).The script's own header comment already states the intended design: "The error still drives the diagnosis body" — i.e. the RAW error, not the normalized fold; only the signature should use
normalize_error_line.Fix: add a
display_error_linehelper besidenormalize_error_line— strip ANSI escapes (sed -E 's/\x1b\[[0-9;]*[a-zA-Z]//g'), collapse whitespace to one line, but never redact digits/hashes — and use it inrehearsal-report.sh'sevidence_noteconstruction instead ofnormalize_error_line.Why not fixed directly:
rehearsal-report.shandheal-lib.share vendored byte-identical fromMatou/dev-factory(ADR 0180) — the fix belongs there, thenFACTORY_REFbumps and re-vendors here. While scoping this,Matou/dev-factory'smain(currentlyb7d9002) was found to have drifted from this repo's pinnedFACTORY_REF(e9aa0bd5c249578d90e6537026e7837a29855bda) in a way that would REGRESS the #596 screenshot-attach feature inrehearsal-report.shif re-vendored blind today — ande9aa0bditself is no longer a reachable commit inMatou/dev-factory(git cat-file -efails after a full fetch; likely rewritten history). Landing this fix needs a session that first reconciles that drift (confirm whethere9aa0bd's content should be restored to dev-factorymain, or the #596 feature re-applied as a fresh commit) rather than blindly forking dev-factory's tree further.heal-lib.shitself currently matches dev-factorymainbyte-for-byte (onlyrehearsal-report.shhas drifted), so thedisplay_error_linehalf of this fix has no blocker — only therehearsal-report.shwiring does.Triage:
bug+ready-for-session.Verified the claim.
.sandcastle/heal-lib.sh:25-29confirmsnormalize_error_linefolds every digit toN, every 7-40 char hex run toH, and collapses whitespace — it's built forcompute_signaturestability, not human display..sandcastle/rehearsal-report.sh:313feeds that same output straight intoevidence_note, so the port/timeout numbers a diagnosing agent needs are gone, and ANSI escape sequences degrade to visible[Nmjunk (the ESC byte vanishes, its leading digit folds toN). Nodisplay_error_linehelper exists yet in either file — confirmed by grep. No redundant fix, no matching.out-of-scope/entry, no open duplicate issue.Why
ready-for-session, notready-for-agent: both files live under.sandcastle/, a protected path (#445 / ADR 0180) — a swarm worker's before/after tree-fingerprint check rolls back and fails any.sandcastle//.forgejo/change a worker makes, so this can't go to the swarm queue. The fix also needs to land upstream inMatou/dev-factory(the vendoring contract in.sandcastle/README.md/check-harness-drift.sh: vendored files are canonical there, fixed here only viaFACTORY_REFbump + re-vendor) and requires first reconciling thatFACTORY_REF(e9aa0bd5c…) is no longer a reachable commit upstream — investigating an external repo's history is outside a swarm worker's sandbox. Both conditions match theready-for-sessionbar (ADR 0174 rule 5) exactly: protected.sandcastle/paths and work needing an interactive session's standing, not Ben.Why not
ready-for-human: no one-way door applies — no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, no physical hands. The fix (adddisplay_error_line: strip ANSI viased -E 's/\x1b\[[0-9;]*[a-zA-Z]//g', collapse whitespace, don't touch digits/hashes) is revertible by a later commit either upstream or here, and provable by a new unit test assertingevidence_noteretains digits/no[Nmjunk for a representative Playwright-timeout line, pluscheck-harness-drift.shconfirming re-vendor sync. Ruled by agent under ADR 0174 — veto anytime: routing toready-for-sessionis itself a two-way door (relabel back toready-for-agentorready-for-humanany time), proven by the protected-path rule already established at #445/ADR 0180 rather than a fresh judgment call.Residual scoping note carried over from the issue body: the session picking this up should resolve the
Matou/dev-factorymain(b7d9002) vs pinnedFACTORY_REF(e9aa0bd…, unreachable) drift first — confirm whethere9aa0bd's content should be restored upstream or the #596 screenshot-attach feature re-applied as a fresh commit — before bumpingFACTORY_REFand re-vendoring thedisplay_error_linefix into this repo.Ruling — ADR 0174, two-way door, veto anytime
Fixed at the source per this ticket's own scoping, not forked further:
1. Reconciliation check first. Before touching anything, re-verified the
Matou/dev-factorydrift this ticket named as the blocker. It had alreadyresolved itself upstream since filing:
dev-factorymainnow sits exactlyat the pinned
FACTORY_REF(e9aa0bd5c249578d90e6537026e7837a29855bda) —#596's evidence-attach diff is re-landed as its own commit(
dbb5f39), ande9aa0bdis reachable and ISmain's tip. Confirmed bothvendored files (
heal-lib.sh,rehearsal-report.sh) were byte-identical todev-factory@mainbefore writing a line —check-harness-drift.shagreed(
OK). The "no blocker" half of the ticket's own analysis (heal-lib.sh) andthe "blocked" half (rehearsal-report.sh wiring) were therefore BOTH unblocked
by session start.
2. Landed in
Matou/dev-factory(git.matou.nz/Matou/dev-factory@0e536e4,TDD — red tests first): a
display_error_linehelper besidenormalize_error_line— strips ANSI escapes, collapses to one line, nevertouches digits/hashes — wired into
rehearsal-report.sh'sevidence_noteconstruction in place of
normalize_error_line.compute_signature's ownfold is untouched (dedup behaviour unchanged — the existing noise-dedup case
still passes). 5 new offline cases (4 in
heal-lib-test.sh, 1 driving thereal reporter script end-to-end in
rehearsal-report-test.sh); fulldev-factorysuite (40 files) green standalone.3. Re-vendored here:
FACTORY_REFbumpede9aa0bd→0e536e4,heal-lib.sh/rehearsal-report.shand their two tests copied byte-identical,check-harness-drift.shgreen, both offline suites green in this checkout —114d1fd..3c81a92onMatou/ourcloudmain(3c81a92),dev-factorymainat0e536e4.Why this is a two-way door: every step is a plain commit (both repos'
mains), reverting either lands the old evidence-fold behaviour back;provable by the offline test suites in both repos (all green) plus
check-harness-drift.sh's byte-for-byte check (green). No personalcredentials, no security-posture widening, no trust-surface accept, no data
destroyed, no hardware touched.
Closing — landed, proven, both repos in sync.