reporter: a 503 on POST /issues can follow a STORED issue — re-query by rehearsal-sig before parking the drive (4 duplicates/unwired filings on 2026-09-05) #1245
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1245
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 hazard
Four times on 2026-09-05 Forgejo STORED an issue and then answered the
POST /issueswith a 503 (or a non-JSON body): #1240 (reporter, 20:21Z), #1241 (reporter, 21:10Z), #1243 (reporter, 22:06Z), #1244 (by hand, 22:20Z — the create returned a non-JSON body while the issue existed). The reporter (.sandcastle/rehearsal-report.sh) reads the failed POST as "could not file", so:RED but nothing could be filed or matched (cap/limit) — flipped ready-for-humanon the drive ticket and parks it, while the filed issue exists with NO blocked-by wiring and NO "now blocked by" comment;REHEARSAL_FILING_CAP, so the cap trips one drive earlier than intended.Every one of those issues carries the
<!-- rehearsal-sig: <sig> -->marker in its body, which is exactly the key the match rail (rail 6) already searches.What to build (harness:
.sandcastle/rehearsal-report.sh+forgejo-lib.sh)rehearsal-sig(the same search the match rail runs) — once, after a short back-off (the 503s clear within seconds). If found, treat it as the filed issue: wire blocked-by, post the "now blocked by" comment, apply the labels the create meant to apply (a stored-on-503 issue arrived with the create's labels but nothing else).scripts/tests/(or the reporter's own test file): a fake tracker that stores then 503s proves the re-query path files ONE issue and wires it; a fake that stores nothing proves the park still happens.Acceptance
A stored-then-503 create produces exactly one issue, wired to the drive ticket, with no ready-for-human park; the filing cap counts it once.
swarm-claim host=matou-dev-server-01 run=18588
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=18588
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=matou-dev-server-01 run=18588
(automated multi-host claim — lowest live claim id works this ticket)
swarm-claim host=elitebook-distributed-server-03 run=18588
(automated multi-host claim — lowest live claim id works this ticket)
This ticket cannot be worked by a Sandcastle agent — its entire deliverable is a change to protected
.sandcastle/machinery.The two files the task names —
.sandcastle/rehearsal-report.shand.sandcastle/forgejo-lib.sh— are both inside.sandcastle/, which is a fingerprinted protected directory (protected-paths-lib.sh, #445:PP_PROTECTED_DIRS_DEFAULT=".sandcastle .forgejo"). Any protected-path content a worker introduces, deletes, or changes is attributed, rolled back, and the run failed loud —git-fenceis only a backstop. So a worker physically cannot land the re-query fix here; the reporter test alone (item 4) is meaningless without the implementation it exercises, which is protected.Per the agent rules (Rule 9) and the protected-paths escape message, a
.sandcastle/machinery change needs an interactive session's standing (ADR 0174, #445) —ready-for-session— where a session rules on the machinery change itself and escalates toready-for-humanonly if it finds a genuine one-way door. This ticket already fully describes the machinery change (the stored-then-503 re-query-by-rehearsal-sig fix, plus the blocked-by/comment retry guard and the reporter test), so rather than file a duplicate I am re-routing this issue: removingready-for-agent, addingready-for-session. No code change was attempted; no protected path was touched.Close-report — Ruled by agent under ADR 0174 (two-way door; veto anytime).
The stored-then-503 hazard is closed. Because
rehearsal-report.shis factory-vendored (ADR 0180 /FACTORY_MANIFEST), the fix landed upstream inMatou/dev-factoryand was re-vendored here.What landed
POST /issuesthat returns no parsable issue number (a curl--f503 failure or a 200 with a non-JSON body — the #1240/#1241/#1243/#1244 shape), the reporter re-queries once after a short back-off (REPORTER_CREATE_REQUERY_DELAY, default 5 s) for an OPEN issue whose body carries this run'srehearsal-sig— the exact key the match rail (rail 6) already searches.touched, so the drive-issue loop wires blocked-by + posts the "now blocked by" comment; the create's intended labels are re-applied idempotently (POST /labelsadds, so a label already present is a no-op); it counts againstREHEARSAL_FILING_CAPexactly once.new_filedfor a phantom — the cap now counts a genuinely-failed create as zero, a stored one as one.Proof (
tests/rehearsal-report-test.sh, drives the REAL reporter with a shimmed stateful tracker + claude; 46 → 48 cases):#777is wired onto the drive (/dependenciesnames index 777), its labels are re-applied (777/labels), the "now blocked by" comment lands, and the drive is NOT flippedready-for-human.ready-for-humanand no phantom dependency is wired (the re-query guard didn't swallow a real failure).rehearsal-healer-test(19),rehearsal-heal-lib-test(26),forgejo-lib-test(53).Commits / provenance
529cb1f1(Matou/dev-factory@main): the reporter change + 2 tests + STATUS.ffc95aed: re-vendor —FACTORY_REF 1ff3485f → 529cb1f1,check-harness-drift.shOK, vendoredrehearsal-report-test.shgreen here (48). (The bump pulls 6 intervening upstream commits — check-harness-drift + a few libs — expected on any pin bump, ADR 0180.)Acceptance met: a stored-then-503 create produces exactly one issue, wired to the drive ticket, with no
ready-for-humanpark; the filing cap counts it once. Closing.