rehearsal reporter: save the raw diagnosis, harden its parsing, re-check the sig before filing (dup #402 + 3 silent diagnosis flakes) #403
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#403
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 reporter's headless diagnosis + filing path has three related defects, all observed live today (drives
141050Z,154053Z,162053Z):Diagnosis output is discarded on failure.
diagnosis="$(timeout 900 claude -p …)"— when the output doesn't parse, nothing records what claude actually emitted (reporter-claude.errwas 0 bytes on all three flakes; jq's stderr is sent to /dev/null). Save the raw stdout to$run_dir/logs/reporter-claude.outunconditionally so a flake is diagnosable after the fact.Output parsing is fragile. A manual run of the identical prompt returns clean JSON, but the in-pipeline run intermittently yields something jq can't parse (empty title → generic ready-for-human filing, 3 of 5 runs today). Harden: strip markdown code fences before jq, or invoke
claude -p --output-format jsonand unwrap.result; treat a still-unparseable diagnosis as unconfident but SAVE it (per 1).Stale open-issues snapshot files duplicates.
open_issuesis fetched once at script start (rehearsal-report.sh:62), but filing happens after a diagnosis that can take up to 15 minutes — any sig-matched issue filed in between is invisible. Live consequence: #402 filed as a duplicate of #400 (same sigdcf630511b50), blocked the drive with a ready-for-human dup, needed hand cleanup. Re-fetch (or at least re-check the sig) immediately before filing.All three live in
.sandcastle/rehearsal-report.sh. Not wired as a #378 blocker — reds still block the drive today; this makes their tickets trustworthy and duplicate-free.Fixed in
b977854(on origin/main). All three defects in.sandcastle/rehearsal-report.sh:printfed tologs/reporter-claude.outunconditionally (right after capture, before anycontinue), so a parse flake is diagnosable after the fact.parse_diagnosisstrips lone markdown-fence lines (```json) then falls back to carving the first-brace…last-brace span before jq; a still-unparseable diagnosis is filed unconfident (ready-for-human) but SAVED, never dropped (the fallback body now points at reporter-claude.out).open_issuessnapshot is re-fetched (match_sig+append_evidenceextracted for reuse) immediately before the create POST; a sig filed by a concurrent drive during the up-to-15-min diagnosis is appended-to, not re-filed as a duplicate (the #402→#400 bug).Test-first at the offline seam
.sandcastle/tests/rehearsal-report-test.sh(drives the real script with shimmed curl/claude): cases 12–15 added — raw save; fenced JSON parses to a confident filing; unparseable diagnosis saved + filed ready-for-human; stale-snapshot appends instead of re-filing (the curl shim gained a 2nd-fetch fixture to simulate the concurrent filing). All 15 cases pass; verified red→green against the pre-change script. STATUS.md updated.