broker auto-deploy: base-widening walk horizon (OC_BROKER_PUBLISH_WALK=200) too short — an orphaned broker fix >200 commits back never self-heals #1183
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#1183
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?
What
The broker auto-deploy rail's base-widening self-heal (#864) is bounded by
OC_BROKER_PUBLISH_WALK(default 200 ancestors) inscripts/lib/broker-publish-lib.sh. When the newest published broker binary sits farther back than the walk,oc_broker_publish_basefinds nothing,publish-brokerfalls back togithub.event.before, and a non-broker push no-ops — so an orphaned broker fix stays undeployable on every non-broker push, republishable only by a directbroker/**push.How it bit us (#1178)
0fc29770's droplet-create SSH-key confirm-gate stranded twice (its ownseamred, then3daafbdc'sseamflaked on the #1182 vitest cliff). By the time seam was green, the newest published broker binary (b214e0eb,64110f29,b186b7eb, …) sat 350–500 commits back — well past the 200 walk. So even a green-seam non-broker push (e.g. #1182's2ffcc2d9) could not backfill it; the fix only reachedbroker.idss.nzvia a hand-authoredbroker/**doc-note push (eb488739). Documented inbroker/README.md(Deploy — the auto-deploy rail, step 1).Proposed fix (two-way)
Raise
OC_BROKER_PUBLISH_WALKso the walk reaches a realistic last-publish gap (broker changes are rare; hundreds of non-broker commits accrue between them). Options:#864's own design intends the next push to backfill; the 200 cap is the only reason it doesn't. Extend the offline testscripts/tests/publish-broker-guard-test.shto pin that a publish 300+ ancestors back is still reached (red-first against the current 200 default).Why not done in #1178
Scope: #1178 is the DO read-after-write fix + its deploy. The walk horizon is #864 machinery affecting every push (larger blast radius), so it's filed separately rather than bundled. The direct
broker/**push already carried #1178's fix live without it.Found and filed by session under ADR 0174 (#1178 deploy work).
Verified against the codebase: the claim holds.
oc_broker_publish_baseinscripts/lib/broker-publish-lib.shdefaults its walk to${OC_BROKER_PUBLISH_WALK:-200}; the #864 base-widening machinery and the offline guard testscripts/tests/publish-broker-guard-test.shboth exist as described. A newest-published broker binary farther back than the walk yields an empty base, so the wrapper falls back togithub.event.beforeand a non-broker push no-ops — matching the #1178 stranding narrative.Ruled by agent under ADR 0174 — veto anytime
Ruling:
ready-for-agent, and adopt the filer's bump-the-default option (raise theOC_BROKER_PUBLISH_WALKdefault to 1000) over the unbounded-merge-base variant.Why this is a two-way door: the change is a single default value in a shell lib plus an extension to an existing offline guard test — revertible by one commit, and provable without touching live infrastructure (the guard test builds synthetic git history and never deploys). Choosing 1000 vs unbounded is itself revertible and test-provable, so it does not need a human. Not on the one-way-door list: no credentials, no security-posture widening (the walk horizon governs how far back the deploy rail searches for an already-published binary — it opens no surface and loosens no auth), no member-facing trust accept, no data destruction, no spend, no hardware.
What proves it: the extended
publish-broker-guard-test.sh— red-first against the current 200 default, green after the bump — pinning that a publish 300+ ancestors back is still reached.Agent Brief
Category: enhancement
Summary: Raise the broker auto-deploy base-widening walk horizon so an orphaned broker fix farther back than the current 200-ancestor cap still self-heals on the next non-broker push.
Current behavior:
The broker auto-deploy rail's base-widening self-heal (#864) walks history newest-first from the pushed sha looking for the most recent published broker binary, bounded to
OC_BROKER_PUBLISH_WALKancestors (default 200). When the newest published broker binary sits farther back than the walk,oc_broker_publish_basereturns empty,publish-brokerfalls back togithub.event.before, and a non-broker push no-ops. An orphaned broker fix (e.g. one whose own deploy stranded on a red/flaky seam, as in #1178) then stays undeployable on every non-broker push and is republishable only by a directbroker/**push. #864's design intends the next push to backfill; the 200 cap is the only reason it doesn't.Desired behavior:
The walk reaches a realistic last-publish gap so the next green non-broker push backfills an orphaned broker fix automatically. The default walk horizon is raised to 1000 (covers the observed 350–500-commit gap with headroom). The walk still stops at the first published ancestor, so a normal broker push terminates in ~1 probe — the added cost only materialises in the pathological orphan case the self-heal is meant to cover. The
OC_BROKER_PUBLISH_WALKoverride remains honoured for callers/tests that set it.Key interfaces:
oc_broker_publish_base <full-sha> [git-root]in the broker-publish lib — its default walk bound changes from 200 to 1000; behaviour (newest-first walk, stop at first published ancestor, empty-if-none) is otherwise unchanged, and theOC_BROKER_PUBLISH_WALKenv override still wins.Acceptance criteria:
oc_broker_publish_baseis 1000; settingOC_BROKER_PUBLISH_WALKstill overrides it.broker/README.md(Deploy — the auto-deploy rail) reflects the new default so the documented horizon matches the code.Out of scope:
github.event.beforepath itself, or to howbroker/**direct pushes publish.broker/**pusheb488739).swarm-claim host=elitebook-distributed-server-03 run=17005
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1183 — status
success⛔ close-report gates REFUSED this close — the following claims did not verify:
eb3f630cf5is not reachable from origin/main (not landed)envelope
close-report for #1183 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope