The broker rail cannot deploy a fix to ITSELF — the droplet's idss-broker-install is a hand-placed copy that nothing re-places or checks #872
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#872
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 broker's auto-deploy rail installs a binary from CI, but its own
installer —
/usr/local/sbin/idss-broker-installon the mail droplet — is ahand-placed copy of
scripts/broker/idss-broker-install.sh, put there onceby a human under broker/README.md's "one-time setup". Nothing re-places it.
So the rail cannot deploy a fix to itself. Found the hard way in #745.
Why this is filed now
GOTCHAS #91: the installer's marker check was
strings "$tmp" | grep -qF "$marker"under
set -o pipefail, which reports SIGPIPE (141) whengrep -qexits early —so a genuine broker binary was refused as "not a broker artifact". The repo fix is
one line. Landing it changes nothing on the droplet, because the droplet is
running a snapshot taken 2026-08-25 20:46 and there is no mechanism that notices.
That is the same shape as the two walls #745 already walked into (GOTCHAS #90's
wrong-mesh runner, then #91's SIGPIPE): a deploy path with an undeployable
component in it, silent by construction.
The concrete gap
broker-deploy.ymlssh'sdeploy@100.98.48.68 sudo /usr/local/sbin/idss-broker-install <sha>.deploy's sudoers line permits only that path, and itsauthorized_keysforces that one command — correctly, this is a locked-down deploy account.
repo copy and the live copy can drift arbitrarily far apart with no signal.
Shape of a fix (not ruled — this is the filing)
artifact and swaps it atomically with rollback; it could do the same for
itself — fetch the repo's copy for the sha it was handed, and re-exec if it
differs. Keeps the locked-down sudoers line intact (one path, one command).
Needs care: a broken installer would then be able to break its own successor,
so the re-exec wants the same "prove it works, else restore" discipline the
binary swap has.
publish-brokeralreadyuploads
ourcloud-broker-x86_64, its.sha256andRELEASEper sha; addingidss-broker-install.shmakes the script versioned with the binary itinstalls. Then (1) has something to fetch.
against the repo's and goes red on mismatch — does not fix the drift, but
makes it impossible for the next installer defect to be invisible for weeks.
The same shape as
check-harness-drift.sh(#867).Acceptance, whichever lands: a change to
scripts/broker/idss-broker-install.shmerged to
maineither reaches the droplet or turns something red.Verify the drift exists today
Filed from #745's session rather than fixed there: #745 is the loop-closer for
#741's expiry tag, and this is a rail-design decision, not that verification.
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 #874workflow_runevent here, and all 4 broker-deploy runs in history were manual #874waiting, oldest 23h; ci, healer, triage, resume-asks and broker-deploy are all starved #878workflow_runevent here, and all 4 broker-deploy runs in history were manual #874workflow_runevent here, and all 4 broker-deploy runs in history were manual #874Ruled by agent under ADR 0174 — veto anytime.
Landed the repo half of the fix and relabelled
ready-for-humanfor the one bootstrap step this standing session cannot reach. Commit3056c3b9onmain.The ruling (which shape)
Of the three shapes filed, I landed option 2 (publish the installer alongside the binary) + option 3 (a drift alarm), and deliberately did not land option 1 (a self-re-execing installer). Option 1 is the one the filing itself flags — "a broken installer would then be able to break its own successor" — i.e. brick-risk baked into the mail droplet's locked-down deploy path. That is a design bet worthy of a human ruling, not an unattended two-way-door action. The drift alarm satisfies the acceptance ("an installer change either reaches the droplet or turns something red") while being purely additive, fully revertible, and riding the rail's existing anonymous registry read — no new credential, no new door.
What landed (two-way, provable)
publish-broker(.forgejo/workflows/ci.yml) now uploadsscripts/broker/idss-broker-install.shasidss-broker-install.shunder each sha — versioning the installer with the binary it installs.assert_installer_not_drifted(scripts/broker/idss-broker-install.sh): the installer's first act fetches the copy CI published for the sha it was handed and, if the on-disk/usr/local/sbin/idss-broker-installdiffers, dies loud (deploy-brokerreds, the live broker is untouched). Skips gracefully when there is nothing to compare — an ad-hoc run from a checkout, or a sha whose publish predates this (an old rollback target), so rollbacks still work.scripts/tests/broker-install-test.shgains cases 10–12 (match → installs / drift → refused, binary untouched / absent → installs). Red before green confirmed directly: with the guard stripped, the stale-installer scenario swaps the binary (exit 0); with the guard, it refuses (exit 1) withinstaller DRIFT (#872), binary untouched. Existing broker tests still green (publish-broker-guard-test8,broker-deploy-trigger-test9). CI runs these viaseam-smoke.sh'sscripts/tests/*.shloop.Verify-the-drift note
The filing's verify commands could not be run from this session:
ssh dev@100.98.48.68times out frommatou-workstation— the mail droplet is on the admin mesh (100.98.0.0/16) and this host is on the product mesh (100.83.0.0/16), exactly GOTCHAS #90 / the reasondeploy-brokerruns onelitebook-03. The repo copy's sha256 is510de3d2…9ab140b(pre-commit); the live copy is unobservable from here.Why human
Ben's hands, over the admin mesh (a door this product-mesh standing session does not hold). The alarm only becomes live once an installer carrying the alarm is on the droplet — and nothing re-places the installer today (that is the very bug). So one bootstrap hand-placement is needed, exactly the existing one-time-setup line, run as
devover the admin mesh:After that single placement, the mechanism is self-guarding: every subsequent change to
scripts/broker/idss-broker-install.shis either re-placed the same way or redsdeploy-brokerwith theinstaller DRIFT (#872)message — never silent again. (broker/README.md's "Re-placing the installer" note now documents this discipline.)CLOSED — bootstrap done, and the rail's REAL wall found and fixed; broker
b186b7ebLIVEBootstrap (the human step): the alarm-carrying installer is on the droplet —
/usr/local/sbin/idss-broker-installsha57aeebb8965914d858370804a578bb6297a3858ecab34609edb0a3e7867a5c71, matchingmain. (The earlier 20:12Z placement had already put the #91 SIGPIPE fix live; it was one step behind again after3056c3b9.)But the very next dispatch (run 24058 on
b186b7eb, 03:07Z) was still red — and the drift alarm had nothing to do with it. From the droplet's sshd journal:Connection closed by authenticating user deploy 100.98.240.186 [preauth]; from elitebook-03 with the secret's key:deploy@100.98.48.68: Permission denied (publickey). The repo secretBROKER_DEPLOY_SSH_KEY(set 2026-08-25 20:57Z, fpSHA256:BimaV8NQ…) anddeploy'sauthorized_keys(placed 20:46Z, fpSHA256:jEIPxXqD…) were two different keypairs with the same comment. Every one of the sixbroker-deployfailures since 2026-08-23 died there — before the installer ran — which is why neither the #90 mesh fix nor the #91 SIGPIPE fix ever turned it green. GOTCHAS #100.Fix: Ben rewrote the key material in
authorized_keysto the secret's public half (forced-command prefix kept). Pre-flight from elitebook then reached the forced command (idss-broker-install: not a full git sha: 'true').Proof:
broker-deployrun 24074 success (03:15:57 → 03:17:23Z). Droplet:ourcloud-broker.servicerestarted 03:17:18Z,/usr/local/bin/ourcloud-brokersha2561c89dd0e8fab…= the registry'sourcloud-broker-x86_64.sha256forb186b7eb. Boot log shows the #813 front-door probe and the rental ledger — the post-86d5ef7broker. First successful deploy in the rail's life.Cosmetic residue: the unit's
Description=still reads "build86d5ef7" (static text in the unit file, not the binary). #745 is now unblocked — the live broker carries #741's expiry tag.idss-rental-expires-tag on a LIVE rental once the broker actually deploys (#741's broker half is merged but not installed) #745