publish-broker orphans a broker sha whenever ci's seam is cancelled — the newest published broker binary is b9a3adfd (2026-08-24), two broker commits behind main #864
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.
Blocks
Reference
Matou/idss#864
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?
Found while working #745 (the loop-closer for #741's broker half). Filed rather than fixed there — #745's session is scoped to the expiry-tag verification.
What is wrong
ci.yml'spublish-brokerjob publishesidss-broker/<github.sha>/ourcloud-broker-x86_64only whengit diff --name-only $GIT_BASE $GIT_SHAhits^(broker/|go\.mod|go\.sum), whereGIT_BASEisgithub.event.before— the previous head of THAT push. It also declaresneeds: seam.So a push whose
seamjob is cancelled (superseded by a newer push, which happens constantly under the swarm) never runspublish-brokerat all. The next successful ci run then diffs from ITS OWNbefore— which is already past the cancelled push's commits — sees no broker change, and printsno broker-affecting change ... nothing to publish. Nothing ever backfills. The broker sha is orphaned permanently.Measured, 2026-08-26
Probing the generic registry for every one of the last 120 commits on
main:b9a3adfd(broker: #756 — a refused gateway teardown is OWED), 2026-08-24T22:49Z.broker/**, both unpublished:1aabd431— #813,broker front-door probe: a bounded outside-in POST /v1/subdomains/probebfd7b76b—rehearsal-5: standing lease renewal + wall re-rule + device droplet carrierThe mechanism, straight off the action tasks:
and run 10803's own log:
70ed992cis already AFTERbfd7b76b, so the broker change fell into the gap between twobeforepointers.Why it matters
This is half of why the broker's auto-deploy rail (ADR 0185, #688/#689/#690) has never put a fix live. GOTCHAS #59 tells you to
workflow_dispatchbroker-deploywith your sha — butbroker-deploy's own guard 404s on an unpublished sha and no-ops (publish-broker skipped this sha (404) — nothing to deploy), so there is nothing to deploy. (The other half is that the deploy leg has no ssh route to the mail droplet at all — #745.)It also means #813's front-door probe and the rehearsal-5 broker work are undeployable today even if the ssh door existed.
Shape of a fix (not ruled — this is the filing)
Candidates, cheapest first:
github.event.before— e.g. walk back to the newest sha the registry already holds, or diff<last-published>..HEAD. Self-healing: one successful run backfills every orphaned push.needs: seamforpublish-broker(publishing a binary does not need the seam gate to have run on that exact push) so a cancelledseamstops taking it down.HEADifHEADtouchesbroker/**relative to the newest published sha.Whichever lands, the acceptance is the same: after a push whose
seamis cancelled,main's broker sha still ends up in the registry.Proof commands
idss-rental-expires-tag on a LIVE rental once the broker actually deploys (#741's broker half is merged but not installed) #745idss-rental-expires-tag on a LIVE rental once the broker actually deploys (#741's broker half is merged but not installed)idss-rental-expires-tag on a LIVE rental once the broker actually deploys (#741's broker half is merged but not installed) #745workflow_runevent here, and all 4 broker-deploy runs in history were manual #874Close report — landed under ADR 0174 (agent ruling; veto anytime).
Ruling. Two-way door: a revertible workflow-config change plus a new pure library, provable offline and confirmed against a live read-only registry probe. No one-way door touched (no credential, no spend, no posture widening). Fix chosen = candidate 1 (widen the guard's base); candidate 2 (drop
needs: seam) considered and declined — the widened base self-heals across the cancellation regardless, and a published binary auto-deploys so it should have passed the gate.What was wrong (confirmed live 2026-08-26). Unauthenticated probe of the generic registry for main's tip
487a2df6: 404. The newest published broker binary was64110f29— 43 commits / 4 broker commits behind main (b9a3adfd+64110f29published;1aabd431,bfd7b76b,4d2573ac,baf1feb2all landed and unpublished). Root cause exactly as filed:publish-brokerdiffsgithub.event.before..github.shaandneeds: seam, so a push whoseseamis cancelled never publishes, and the next run'sbeforeis already past the orphaned commits.What landed (commit
c3235bee).scripts/lib/broker-publish-lib.sh— the decision core with the registry probe injected.oc_broker_publish_basewalks history newest-first, probes the registry, returns the newest published ancestor;oc_broker_published_pis the probe (read is unauthenticated — the read endpoint is public and the write tokenREGISTRY_FORGEJO_TOKEN401s on read, which would misread every published sha as absent)..forgejo/workflows/ci.ymlpublish-brokerstep now sources the lib: no-ops if the tip is already published; else diffs<newest-published-ancestor>..HEAD, falling back togithub.event.beforeonly when the registry holds nothing within the walk. It probes all ancestors (not just broker-touching ones), so a backfilled tip sha is seen on the next push asHEAD^and the re-publish does not recur every push.scripts/tests/publish-broker-guard-test.sh— 8 checks, red before green, swept by the#873scripts/tests/*.shseam loop so it runs inci. Models the orphan scenario, the widened base catching the orphan, the pre-fix base hiding it, the no-recur-after-backfill property, the empty-fallback, tip-not-its-own-base, the walk bound, and the unauthenticated-read wiring.docs/GOTCHAS.md#98;STATUS.mdheader updated in the same commit.Proof.
bash scripts/tests/publish-broker-guard-test.sh→8 checks passed(fails against the pre-fix tree — lib absent).base=64110f29at main's tip and the diff64110f29..487a2df6is broker-affecting → the fixed guard would publish HEAD, backfilling main's tip. This satisfies the acceptance criterion ("after a push whose seam is cancelled, main's broker sha still ends up in the registry").Acceptance is self-healing, not yet live-observed: no new
cirun has fired since the fix landed (a session cannot wait one out, ADR 0174 rule 7). The next greenpublish-brokeron main will backfill487a2df6(or whatever tip it runs on) anddeploy-brokerwill carry it — one run closes the whole 4-commit gap. The still-open half of the rail (no ssh route to the mail droplet, #745) is unchanged by this and named there, not here.Ruled by agent under ADR 0174 — veto anytime.