rehearsal: deploy-pending state + deploy-verified close — a blocker whose fix is on main but not yet live must stop routing to agents and must close itself when the deploy rail installs it #1187
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#1187
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 defect (phase-7 first drive, 2026-09-03)
#1178's fix (
0fc29770) landed on main 11 min after the healer filed it. The drive then stayed blocked for 10 h 05: 2 h 43 while the broker deploy rail was stranded (#1180/#1182/#1183), then 7 h 04 with the fix LIVE on broker.idss.nz (binary mtime 07:31Z) and #1178 still open until a human ran the ancestry check and closed it at 14:35Z. Meanwhile the session-runner picked the sameready-for-sessionticket up twice for its residue — a deploy wait, not code — and spent 25 min / $8.00 babysitting a CI rail before flaggingagent-blocked.Nothing in the loop can tell that a blocker's remaining work is 'is the binary live?', and nothing closes it when it is.
The ruling this ticket lands (report: Phase 7, Healer First — changes 1 + 2)
deploy-pending— a blocker whose fix commit is on main but lives in a deployed-service tree (broker/**,go.mod,go.sum— the publish-broker path set) and is not yet installed. The session-runner and swarm never see it (they filter onready-for-session/ready-for-agent, which the swap removes). Documented indocs/agents/triage-labels.md.scripts/rehearsal-executor.sh, the blocked branch): for each open blocker of the drive issue, if a commit on origin/main mentions#<n>and touches the broker path set, the blocker is swapped todeploy-pending(ready-* labels dropped) with one comment naming the fix commit. Pure core inscripts/lib/rehearsal-deploy-pending-lib.sh, offline-tested.scripts/deploy-verified-close.sh <deployed-sha>): closes every opendeploy-pendingissue whose fix commit is an ancestor of the deployed sha, with a comment carrying the ancestry proof. Run by ci.yml'sdeploy-brokerjob after a successful install and by broker-deploy.yml's manual/rollback door. The drive re-fires on that close.Acceptance
pending; fix ∈ ancestors(deployed) →deployed; no broker fix →none; a swap posts exactly one comment and drops ready-* labels; a close names the fix sha and the deployed sha.ready-for-session/ready-for-agentanddeploy-pendingare mutually exclusive on a blocker.Origin: the phase-7 first-11-hours report (2026-09-03). Claimed by the reporting session (agent-working).
Ruled by agent under ADR 0174 — veto anytime
Ruling:
ready-for-session(categoryenhancementalready present).Why this state. The change edits
.forgejo/workflows/ci.yml(thedeploy-brokerjob,ci.yml:207) and.forgejo/workflows/broker-deploy.yml— both under.forgejo/, a protected path (.sandcastle/swarm-policy.sh:49). Rule 9 of.sandcastle/prompt-enrichments/rules.mdforbids a swarm worker from editing protected paths and routes them toready-for-session. The ticket's scripts (scripts/rehearsal-executor.sh,scripts/lib/rehearsal-deploy-pending-lib.sh,scripts/deploy-verified-close.sh,docs/agents/triage-labels.md) and the newdeploy-pendinglabel are swarm-safe on their own, but the protected-path CI edits make the whole ticket session work. Notready-for-agent.Why a two-way door. A state label change is revertible; no data destroyed, no posture widened. Provable by the protected-path predicate (
.forgejo/∈PROTECTED_PATHS) and the offline tests the acceptance list specifies (fix-on-main→pending, ∈ancestors→deployed, no-broker-fix→none, exactly-one-comment,deploy-pendingmutually exclusive with ready-* labels). Not on the one-way-door list.Note: already
agent-working(self-claimed by the filing session); this backfills the state role beneath the claim.Close report — landed
04aa72dfon main (Ruled by session under ADR 0174 — veto anytime). Two-way: labels, shell libs and a rail step after a successful install, all revertible by one commit; no spend, no posture change.What landed
deploy-pendingcreated (id 228) and documented indocs/agents/triage-labels.md.scripts/lib/rehearsal-deploy-pending-lib.sh: pure git core —rehearsal_deploy_fix_commits(commits on a ref naming#<n>with a non-digit boundary, touchingbroker/ go.mod go.sum),rehearsal_deploy_pending_state→ none | pending | deployed bymerge-base --is-ancestor; candidates = open deps still onready-for-session/ready-for-agent; the swap addsdeploy-pending, drops only the ready-* labels the issue carries, comments once naming the fix sha; the verified close comments the ancestry proof and PATCHes closed.scripts/rehearsal-executor.shblocked branch: fetches origin/main and runsrehearsal_deploy_pending_sweepevery blocked tick, beside the needs-design page.scripts/deploy-verified-close.sh <installed-sha>: lists opendeploy-pending, verifies against the checkout, closes; tokenless / unknown-sha / shallow are named loud, rc 0 always.ci.ymldeploy-brokerandbroker-deploy.yml: full-depth checkout + the closer step AFTER the install step (step order = only a successful install closes).Acceptance (offline,
scripts/tests/rehearsal-deploy-pending-test.sh, 8 cases): fix-on-main → pending; installed carries fix → deployed;#11780never reads as#1178; scripts-only commit → none; swap = 1 label POST + 1 DELETE (ready-for-session only) + 1 comment, missing label WARNs and touches nothing; sweep swaps #1178 and leaves the no-fix and already-pending blockers alone; verified close closes exactly the carried fixes with the proof, none when the installed sha predates them; the closer SCRIPT end to end against a throwaway repo; wiring greps on the executor and both rails, closer after install.Live proof owed to the next deploy: the next
deploy-brokerrun closes whateverdeploy-pendingissue it carries — the first real instance will be the first broker fix after this lands. Not yet exercised live.