Verify the idss-rental-expires- tag on a LIVE rental once the broker actually deploys (#741's broker half is merged but not installed) #745

Closed
opened 2026-08-24 07:49:13 +00:00 by matou-build-agent · 6 comments

The rented-gateway expiry tag from #741 is merged and unit-proven, but it is not live, and cannot be until the broker's auto-deploy rail actually runs.

Evidence (2026-08-24, from #741's session):

  • broker-deploy's deploy job has run exactly once in the last 11,639 Forgejo action tasks. publish-broker succeeds on every broker-touching push (29 runs), so the binary is published and nothing installs it.
  • The live broker is measurably older than #708 (451d2c52, landed 2026-08-23 16:49Z): the account carried six per-rental SSH keys named idss-gateway-idss-gateway-rehearsal-rentfail-<ts>-<rand>, minted at 17:07, 19:34, 21:35, 23:44, 00:35 and 01:33 — all after the fix that stopped the doubled prefix. Only pre-fix code writes that name. (Those six keys are now swept.)
  • Root cause is already filed and already ready-for-human: #690 — the droplet one-time setup (deploy user + sudoers + install script + the BROKER_DEPLOY_SSH_KEY repo secret). The workflow's own header says a run before that lands fails at the ssh step.

So this ticket is the loop-closer for #741's broker half, once #690's hands step lands:

  1. Confirm the live version: journalctl -u ourcloud-broker | grep 'broker booted' (GOTCHAS #59) — it must be at or past 2af75c50.
  2. Drive or rent once, and assert the droplet actually wears idss-rental-expires-<epoch>:
    doctl compute droplet list --tag-name idss-rental -o json | jq '.[].tags'.
  3. Assert a renew MOVES it (the heartbeat renews every healthy pass, so one is never far away), and that the old tag object is left behind for scripts/rental-reap.sh to sweep, not stripped from a live droplet.
  4. Until then the sweep's drive wall is doing all the work: it needs no tag and no broker, and it is what catches a leaked box that is still healthy (GOTCHAS #76). Nothing here is urgent for billing safety — it is the precision half.

Not urgent, not blocking a drive. Filed from #741 rather than done there because it needs a live broker deploy that does not exist yet.

The rented-gateway expiry tag from #741 is merged and unit-proven, but it is **not live**, and cannot be until the broker's auto-deploy rail actually runs. **Evidence (2026-08-24, from #741's session):** - `broker-deploy`'s `deploy` job has run **exactly once** in the last 11,639 Forgejo action tasks. `publish-broker` succeeds on every broker-touching push (29 runs), so the binary is published and nothing installs it. - The live broker is measurably **older than #708** (`451d2c52`, landed 2026-08-23 16:49Z): the account carried six per-rental SSH keys named `idss-gateway-idss-gateway-rehearsal-rentfail-<ts>-<rand>`, minted at 17:07, 19:34, 21:35, 23:44, 00:35 and 01:33 — all *after* the fix that stopped the doubled prefix. Only pre-fix code writes that name. (Those six keys are now swept.) - Root cause is already filed and already `ready-for-human`: **#690** — the droplet one-time setup (deploy user + sudoers + install script + the `BROKER_DEPLOY_SSH_KEY` repo secret). The workflow's own header says a run before that lands fails at the ssh step. **So this ticket is the loop-closer for #741's broker half**, once #690's hands step lands: 1. Confirm the live version: `journalctl -u ourcloud-broker | grep 'broker booted'` (GOTCHAS #59) — it must be at or past `2af75c50`. 2. Drive or rent once, and assert the droplet actually wears `idss-rental-expires-<epoch>`: `doctl compute droplet list --tag-name idss-rental -o json | jq '.[].tags'`. 3. Assert a renew MOVES it (the heartbeat renews every healthy pass, so one is never far away), and that the old tag object is left behind for `scripts/rental-reap.sh` to sweep, not stripped from a live droplet. 4. Until then the sweep's **drive wall** is doing all the work: it needs no tag and no broker, and it is what catches a leaked box that is still healthy (GOTCHAS #76). Nothing here is urgent for billing safety — it is the precision half. Not urgent, not blocking a drive. Filed from #741 rather than done there because it needs a live broker deploy that does not exist yet.
Author
Member

Drive-side datapoint (from #743, ruled by agent under ADR 0174 — veto anytime).

A live observation while watching #743's drive 2, offered as evidence for this ticket rather than a fix:

  • idss-gateway-rehearsal-c-0f29 (s-2vcpu-4gb), rented by the broker at 2026-08-24T13:41:38Z for rented drive 20260824T134042Z, carried tags ["idss-gateway", "idss-rental"] and nothing else — no idss-rental-expires-<epoch>.
  • Account-wide, the DO tag list holds idss-gateway (1), idss-rental (1), idss-gateway-build (0), idss-707-probe (0). The idss-rental-expires-* tag family does not exist at all yet.

So this ticket's premise is confirmed live: #741's broker half is merged but the broker that actually rents the drive's gateway has not been redeployed, and every rental minted between now and that deploy is invisible to the sweep #741 built. (The box above was released cleanly by the drive's own release leg at ~14:41Z, so nothing leaked this time — but that was the drive tearing down its own box, not the sweep.)

Read-only DO API list; nothing was tagged, retagged or destroyed.

**Drive-side datapoint (from #743, ruled by agent under ADR 0174 — veto anytime).** A live observation while watching #743's drive 2, offered as evidence for this ticket rather than a fix: - `idss-gateway-rehearsal-c-0f29` (`s-2vcpu-4gb`), rented by the broker at **2026-08-24T13:41:38Z** for rented drive `20260824T134042Z`, carried tags **`["idss-gateway", "idss-rental"]`** and nothing else — no `idss-rental-expires-<epoch>`. - Account-wide, the DO tag list holds `idss-gateway` (1), `idss-rental` (1), `idss-gateway-build` (0), `idss-707-probe` (0). **The `idss-rental-expires-*` tag family does not exist at all yet.** So this ticket's premise is confirmed live: #741's broker half is merged but the broker that actually rents the drive's gateway has not been redeployed, and every rental minted between now and that deploy is invisible to the sweep #741 built. (The box above was released cleanly by the drive's own `release` leg at ~14:41Z, so nothing leaked this time — but that was the drive tearing down its own box, not the sweep.) Read-only DO API list; nothing was tagged, retagged or destroyed.
Author
Member

Session report (ADR 0174 session, unattended). Ruled by agent under ADR 0174 — veto anytime.

Half of this ticket is DONE and live-proven; the other half is blocked on a door that does not exist. Routing to ready-for-human with the residue named below.


What landed — the tag is live-proven against real DigitalOcean (64110f29)

The ticket's steps 2 and 3 are settled on live infra, just not through the production broker. New live-gated probe broker/internal/broker/rentals_expiry_live_test.go (IDSS_RENTAL_EXPIRY_LIVE=1, the #713 harness shape — skips by default) builds a broker.Rentals over the real DigitalOcean provider, rents one s-2vcpu-4gb in syd1, and asserts the three things FakeProvider structurally cannot:

=== RUN   TestRentalExpiryTag_Live
    rented idss-745-probe.idss.nz: server=595184128 ip=170.64.133.185 expires=2026-08-27T01:21:53Z
    tags after rent:  [idss-gateway idss-rental idss-rental-expires-1787793713]
    tags after renew: [idss-gateway idss-rental idss-rental-expires-1787793754]
--- PASS: TestRentalExpiryTag_Live (58.82s)
  1. The droplet WEARS the deadline — idss-rental-expires-1787793713 is exactly the ledger's Expires (2026-08-27T01:21:53Z), alongside the idss-gateway/idss-rental fleet tags the drive's own fallback reap selects on (GOTCHAS #48).
  2. A renew MOVES it — new epoch on the droplet, old epoch off it. DO has no replace verb, so this exercises DigitalOcean.Retag's real create→apply→remove dance, not a fake's bookkeeping.
  3. The old TAG OBJECT is left behind, not stripped — it survives account-wide at zero droplets, which is what the sweep walks.

And the loop actually closes, live:

$ scripts/rental-reap.sh --dry-run
rental-reap: DRY-RUN would: doctl compute tag delete idss-rental-expires-1787793582 --force
rental-reap: DRY-RUN would: doctl compute tag delete idss-rental-expires-1787793632 --force
rental-reap: swept 2 orphaned idss-rental-expires-* tag object(s)
$ scripts/rental-reap.sh
rental-reap: swept 2 orphaned idss-rental-expires-* tag object(s)

The idss-rental-expires-* tag family now exists on the account for the first time (the 2026-08-24 comment on this ticket found it absent entirely) — created by a rent, moved by a renew, swept by rental-reap.sh.

Nothing leaked. Afterwards: zero idss-rental droplets, zero idss-* SSH keys (so #708's key reap held live too), and the only idss-rental* tag left is the fleet tag itself. Two droplets were rented in total (a first run caught a probe bug, below); both destroyed. Cost ≈ $0.01.

One hazard fell out. DO's droplet GET lags its own accepted DELETE: an Exists fired immediately after a successful Release answered 200 (still live) while the very next DELETE on that same id answered 404 (already gone). That is GOTCHAS #2/#60's lesson read backwards — the provider's record is a delayed story about the droplet in both directions — so the probe now polls gone-ness over a bounded window instead of sampling once. GOTCHAS #60 extended.


What did NOT land — the rail cannot deploy, for two independent reasons

Step 1 of this ticket ("confirm the live version is at or past 2af75c50") is unreachable. #690's droplet-side setup landed correctly on 2026-08-25; the rail still does not work. I dispatched broker-deploy on the newest published sha to find out why, and there are two holes:

(a) There is no ssh door. broker-deploy dials deploy@100.98.48.68 from the matou-workstation runner. That runner is DO droplet matou-workstation (hostname matou-dev-server-01), and its Netbird mesh is netbird.dev.matou.nz's 100.83.0.0/16 — 100.98.48.68 is not a peer on it. The dispatched run (task 23021):

⭐ Run Main Resolve sha
  ✅  Success - Main Resolve sha
ssh: connect to host 100.98.48.68 port 22: Connection timed out
⚙️ [runner]: RUN exit status 255
🏁  Job failed

Same from a shell on that box. The mail droplet's public IP 143.198.134.168 answers on 443 (the broker serves /v1/gateways/offer fine) but times out on 22, so there is no fallback door either. The installer's rollback discipline held: nothing on the live broker was touched.

(b) There is no published sha to deploy anyway. publish-broker needs: seam, and a seam cancelled by a newer push takes it down; the next successful ci then diffs only its own github.event.before, which is already past the cancelled push's commits, so the broker change is never published and never backfilled. Probing the registry for every one of the last 120 commits on main: the newest published binary is b9a3adfd (2026-08-24 22:49Z), although 1aabd431 (#813, the front-door probe) and bfd7b76b (rehearsal-5) both landed after it. Filed as #864 (bug, ready-for-session — .forgejo/ is a protected path, #445), and added as a blocker of this ticket.


Why human

A one-way-door ruling (ADR 0174 §3). Giving broker-deploy a route to the mail droplet means one of:

  • enrolling matou-workstation into the mesh that reaches 100.98.48.68 — needs a Netbird/Tailscale setup key, i.e. a credential only Ben holds; or
  • opening the mail droplet's port 22 to 134.199.154.244 (the runner's public IP) — a deliberate security-posture widening on a production mail server, explicitly on the one-way-door list; or
  • hands on the mail droplet to configure either of the above.

Any of the three is Ben's. Everything downstream of it is two-way and ready: the sha only needs #864 fixed, the installer is offline-proven with rollback, and the probe above is the acceptance test waiting to be re-run against the production broker.

Proposed default ruling (so a future session can adopt it if Ben rules the shape rather than doing it): put the mail droplet on netbird.dev.matou.nz and change broker-deploy.yml's ssh target to its address on that mesh — it keeps the door mesh-only (no public 22), matches how every other runner-reachable box works here, and is revertible by removing the peer.

Not urgent, still. As this ticket already said: the sweep's drive wall needs no tag and no broker, and it is what catches a leaked box that is still healthy (GOTCHAS #76). Billing safety is unaffected — this remains the precision half. What the rail's breakage does block is every other broker fix reaching production: #756, #754, #813 and the rehearsal-5 broker work are all merged-and-not-live today.


Ledger

  • Commit: 64110f29 — live probe + GOTCHAS #59/#60 amendments + STATUS.md.
  • Filed: #864 (publish-broker orphans a broker sha when seam is cancelled).
  • Proof: TestRentalExpiryTag_Live PASS (58.8s); broker go test ./... green; gofmt/go vet clean; rental-reap.sh dry-run + real run; doctl confirms zero leaked droplets/keys/tags.
  • Two-way doors only: one revertible commit, a test that skips unless asked, ~$0.01 of lab droplet swept back to zero. The dispatched broker-deploy run failed at TCP connect and never reached the droplet.
  • Left ready-for-human with the residue above; not closed, because its own acceptance (the tag observed through the production broker) is genuinely unmet.
**Session report (ADR 0174 session, unattended). Ruled by agent under ADR 0174 — veto anytime.** Half of this ticket is DONE and live-proven; the other half is blocked on a door that does not exist. Routing to `ready-for-human` with the residue named below. --- ## What landed — the tag is live-proven against real DigitalOcean (`64110f29`) The ticket's steps 2 and 3 are settled on live infra, just not through the production broker. New live-gated probe `broker/internal/broker/rentals_expiry_live_test.go` (`IDSS_RENTAL_EXPIRY_LIVE=1`, the #713 harness shape — skips by default) builds a `broker.Rentals` over the **real** `DigitalOcean` provider, rents one `s-2vcpu-4gb` in `syd1`, and asserts the three things `FakeProvider` structurally cannot: ``` === RUN TestRentalExpiryTag_Live rented idss-745-probe.idss.nz: server=595184128 ip=170.64.133.185 expires=2026-08-27T01:21:53Z tags after rent: [idss-gateway idss-rental idss-rental-expires-1787793713] tags after renew: [idss-gateway idss-rental idss-rental-expires-1787793754] --- PASS: TestRentalExpiryTag_Live (58.82s) ``` 1. **The droplet WEARS the deadline** — `idss-rental-expires-1787793713` is exactly the ledger's `Expires` (2026-08-27T01:21:53Z), alongside the `idss-gateway`/`idss-rental` fleet tags the drive's own fallback reap selects on (GOTCHAS #48). 2. **A renew MOVES it** — new epoch on the droplet, old epoch off it. DO has no replace verb, so this exercises `DigitalOcean.Retag`'s real create→apply→remove dance, not a fake's bookkeeping. 3. **The old TAG OBJECT is left behind, not stripped** — it survives account-wide at zero droplets, which is what the sweep walks. And the loop actually closes, live: ``` $ scripts/rental-reap.sh --dry-run rental-reap: DRY-RUN would: doctl compute tag delete idss-rental-expires-1787793582 --force rental-reap: DRY-RUN would: doctl compute tag delete idss-rental-expires-1787793632 --force rental-reap: swept 2 orphaned idss-rental-expires-* tag object(s) $ scripts/rental-reap.sh rental-reap: swept 2 orphaned idss-rental-expires-* tag object(s) ``` The `idss-rental-expires-*` tag family now exists on the account for the first time (the 2026-08-24 comment on this ticket found it absent entirely) — created by a rent, moved by a renew, swept by `rental-reap.sh`. **Nothing leaked.** Afterwards: zero `idss-rental` droplets, zero `idss-*` SSH keys (so #708's key reap held live too), and the only `idss-rental*` tag left is the fleet tag itself. Two droplets were rented in total (a first run caught a probe bug, below); both destroyed. Cost ≈ $0.01. **One hazard fell out.** DO's droplet GET **lags its own accepted DELETE**: an `Exists` fired immediately after a successful `Release` answered 200 (still live) while the very next DELETE on that same id answered 404 (already gone). That is GOTCHAS #2/#60's lesson read backwards — the provider's record is a delayed story about the droplet in *both* directions — so the probe now polls gone-ness over a bounded window instead of sampling once. GOTCHAS #60 extended. --- ## What did NOT land — the rail cannot deploy, for two independent reasons Step 1 of this ticket ("confirm the live version is at or past `2af75c50`") is unreachable. #690's droplet-side setup landed correctly on 2026-08-25; the rail still does not work. I dispatched `broker-deploy` on the newest published sha to find out why, and there are **two** holes: **(a) There is no ssh door.** `broker-deploy` dials `deploy@100.98.48.68` from the `matou-workstation` runner. That runner is DO droplet `matou-workstation` (hostname `matou-dev-server-01`), and its Netbird mesh is `netbird.dev.matou.nz`'s **`100.83.0.0/16`** — `100.98.48.68` is not a peer on it. The dispatched run (task 23021): ``` ⭐ Run Main Resolve sha ✅ Success - Main Resolve sha ssh: connect to host 100.98.48.68 port 22: Connection timed out ⚙️ [runner]: RUN exit status 255 🏁 Job failed ``` Same from a shell on that box. The mail droplet's public IP `143.198.134.168` answers on 443 (the broker serves `/v1/gateways/offer` fine) but **times out on 22**, so there is no fallback door either. The installer's rollback discipline held: nothing on the live broker was touched. **(b) There is no published sha to deploy anyway.** `publish-broker` `needs: seam`, and a `seam` cancelled by a newer push takes it down; the next successful ci then diffs only its own `github.event.before`, which is already past the cancelled push's commits, so the broker change is never published and **never backfilled**. Probing the registry for every one of the last 120 commits on `main`: the newest published binary is **`b9a3adfd` (2026-08-24 22:49Z)**, although `1aabd431` (#813, the front-door probe) and `bfd7b76b` (rehearsal-5) both landed after it. Filed as **#864** (`bug`, `ready-for-session` — `.forgejo/` is a protected path, #445), and added as a blocker of this ticket. --- ## Why human **A one-way-door ruling (ADR 0174 §3).** Giving `broker-deploy` a route to the mail droplet means one of: - **enrolling `matou-workstation` into the mesh that reaches `100.98.48.68`** — needs a Netbird/Tailscale setup key, i.e. a credential only Ben holds; or - **opening the mail droplet's port 22 to `134.199.154.244`** (the runner's public IP) — a deliberate security-posture *widening* on a production mail server, explicitly on the one-way-door list; or - **hands on the mail droplet** to configure either of the above. Any of the three is Ben's. Everything downstream of it is two-way and ready: the sha only needs #864 fixed, the installer is offline-proven with rollback, and the probe above is the acceptance test waiting to be re-run against the production broker. **Proposed default ruling** (so a future session can adopt it if Ben rules the shape rather than doing it): put the mail droplet on `netbird.dev.matou.nz` and change `broker-deploy.yml`'s ssh target to its address on that mesh — it keeps the door mesh-only (no public 22), matches how every other runner-reachable box works here, and is revertible by removing the peer. **Not urgent, still.** As this ticket already said: the sweep's **drive wall** needs no tag and no broker, and it is what catches a leaked box that is still healthy (GOTCHAS #76). Billing safety is unaffected — this remains the precision half. What the rail's breakage *does* block is every other broker fix reaching production: #756, #754, #813 and the rehearsal-5 broker work are all merged-and-not-live today. --- ## Ledger - **Commit:** `64110f29` — live probe + GOTCHAS #59/#60 amendments + STATUS.md. - **Filed:** #864 (publish-broker orphans a broker sha when `seam` is cancelled). - **Proof:** `TestRentalExpiryTag_Live` PASS (58.8s); broker `go test ./...` green; `gofmt`/`go vet` clean; `rental-reap.sh` dry-run + real run; `doctl` confirms zero leaked droplets/keys/tags. - **Two-way doors only:** one revertible commit, a test that skips unless asked, ~$0.01 of lab droplet swept back to zero. The dispatched `broker-deploy` run failed at TCP connect and never reached the droplet. - **Left `ready-for-human`** with the residue above; **not closed**, because its own acceptance (the tag observed through the production broker) is genuinely unmet.
Owner

The one-way door was not one — the rail was pointed at a runner on the WRONG NETBIRD MESH

Ben ruled this "fix the runner and deploy" today. Reporting what the diagnosis actually found, because it is not any of the three options the previous session laid out.

None of the three proposed human acts was needed

The previous comment framed the residue as: enrol matou-workstation on the mesh reaching 100.98.48.68, or open the mail droplet's :22 to the runner's public IP, or hands on the droplet. None of those is required. Verified read-only from Ben's laptop, which is already a peer on the relevant mesh:

  • deploy user exists — uid=995(deploy) gid=985(deploy)
  • /etc/sudoers.d/idss-broker-deploy present
  • /usr/local/sbin/idss-broker-install present (Aug 25 20:46)
  • deploy's authorized_keys carries idss-broker-deploy — ED25519 SHA256:jEIPxXqDLGBhSQ01rew+gysbMGJ3+1hjglgagD9nW6k
  • repo secret BROKER_DEPLOY_SSH_KEY exists

So #690's droplet side landed correctly and completely. The rail's own credential and target are fine.

The actual cause: two meshes that look identical from the runner registry

Matou runs two separate Netbird meshes, and they do not peer:

mesh management range who lives there
admin netbird.matou.nz (netbird.selfhosted) 100.98.0.0/16 the mail droplet (workspace, 100.98.48.68), Ben's laptop, the macs, clan-a/b/c, elitebook-distributed-server-01/02/03
product fleet netbird.dev.matou.nz 100.83.0.0/16 matou-workstation (matou-dev-server-01), per docs/architecture/03-fleet-topology.md

broker-deploy.yml said runs-on: matou-workstation — product mesh — while its ssh target is on the admin mesh. The droplet's public :22 is shut, so there is no fallback door and the failure is always a timeout, never a refusal. That is why this looked like a missing credential for weeks.

elitebook-03 is an admin-mesh peer (100.98.240.186) and an active org runner. Both runners carry the same swarm label and both read as "the swarm" from the registry, which is exactly why the split stayed invisible.

What landed — 4c00fe0c

  • broker-deploy.yml: runs-on: matou-workstation → elitebook-03, with the mesh constraint recorded in the job header so it does not regress.
  • GOTCHAS #90 — the two-mesh hazard stated as a rule for CI and harness code (#681's journal harvest resolves only on an admin-mesh executor and must degrade with a note: line rather than red the drive). It also corrects GOTCHAS #28, which is stale: the unit is ourcloud-broker.service and the binary /usr/local/bin/ourcloud-broker — the rebrand never reached this host.

#864 is real but is NOT currently blocking

The previous comment added #864 as a blocker on the grounds that the newest published broker binary was b9a3adfd (Aug 24 22:49Z). That is no longer true — 64110f29 published successfully at 2026-08-26 01:35Z (this ticket's own live-probe commit, minutes after that comment was written). Registry contents: 0763e143, 2af75c50, e6cfb526, b9a3adfd, 64110f29.

And 64110f29 is the tip of all broker work — git log 64110f29..origin/main -- broker/ is empty. Because the published artifact is a whole binary rather than an increment, one deploy of 64110f29 lands all ten commits the live broker is missing: #708, #741, #749, #751, #752, #754, #756, #813 and rehearsal-5's lease/carrier work. #864 stays open as a genuine latent bug; it is not in the way today.

Residue — the dispatch itself

The production deploy has not run yet. The first workflow_dispatch returned HTTP 204 but created no task (Forgejo accepted it and registered nothing — the same shape as the known "dispatch silently no-ops until the workflow file is re-registered" behaviour), and the retry was refused by this session's own permission guard, which I am not routing around.

To finish it, dispatch broker-deploy on 64110f296a5089bf327a132c71c854060f8bd045 — from the Forgejo UI, or:

curl -X POST -H "Authorization: token $FORGEJO_TOKEN" -H "Content-Type: application/json" \
  -d '{"ref":"main","inputs":{"sha":"64110f296a5089bf327a132c71c854060f8bd045"}}' \
  https://git.matou.nz/api/v1/repos/Matou/idss/actions/workflows/broker-deploy.yml/dispatches

Then confirm live: ssh dev@100.98.48.68 'sudo journalctl -u ourcloud-broker | grep "broker booted" | tail -1' (GOTCHAS #59) — currently pinned at Aug 23 04:17.

This ticket's own acceptance (steps 2 and 3 — the tag observed and moved) is already live-proven against real DigitalOcean by TestRentalExpiryTag_Live; what remains is step 1, observing it through the production broker, which needs the deploy above plus one rental.

## The one-way door was not one — the rail was pointed at a runner on the WRONG NETBIRD MESH Ben ruled this "fix the runner and deploy" today. Reporting what the diagnosis actually found, because it is not any of the three options the previous session laid out. ### None of the three proposed human acts was needed The previous comment framed the residue as: enrol `matou-workstation` on the mesh reaching `100.98.48.68`, or open the mail droplet's `:22` to the runner's public IP, or hands on the droplet. **None of those is required.** Verified read-only from Ben's laptop, which is already a peer on the relevant mesh: - `deploy` user exists — `uid=995(deploy) gid=985(deploy)` - `/etc/sudoers.d/idss-broker-deploy` present - `/usr/local/sbin/idss-broker-install` present (Aug 25 20:46) - `deploy`'s `authorized_keys` carries `idss-broker-deploy` — ED25519 `SHA256:jEIPxXqDLGBhSQ01rew+gysbMGJ3+1hjglgagD9nW6k` - repo secret `BROKER_DEPLOY_SSH_KEY` exists So **#690's droplet side landed correctly and completely.** The rail's own credential and target are fine. ### The actual cause: two meshes that look identical from the runner registry Matou runs **two separate Netbird meshes**, and they do not peer: | mesh | management | range | who lives there | |---|---|---|---| | admin | `netbird.matou.nz` (`netbird.selfhosted`) | `100.98.0.0/16` | the **mail droplet** (`workspace`, `100.98.48.68`), Ben's laptop, the macs, `clan-a/b/c`, `elitebook-distributed-server-01/02/03` | | product fleet | `netbird.dev.matou.nz` | `100.83.0.0/16` | **`matou-workstation`** (`matou-dev-server-01`), per `docs/architecture/03-fleet-topology.md` | `broker-deploy.yml` said `runs-on: matou-workstation` — product mesh — while its ssh target is on the admin mesh. The droplet's public `:22` is shut, so there is no fallback door and the failure is *always* a timeout, never a refusal. That is why this looked like a missing credential for weeks. **`elitebook-03` is an admin-mesh peer (`100.98.240.186`) and an active org runner.** Both runners carry the same `swarm` label and both read as "the swarm" from the registry, which is exactly why the split stayed invisible. ### What landed — `4c00fe0c` - `broker-deploy.yml`: `runs-on: matou-workstation` → **`elitebook-03`**, with the mesh constraint recorded in the job header so it does not regress. - **GOTCHAS #90** — the two-mesh hazard stated as a rule for CI *and* harness code (#681's journal harvest resolves only on an admin-mesh executor and must degrade with a `note:` line rather than red the drive). It also corrects **GOTCHAS #28**, which is stale: the unit is `ourcloud-broker.service` and the binary `/usr/local/bin/ourcloud-broker` — the rebrand never reached this host. ### #864 is real but is NOT currently blocking The previous comment added #864 as a blocker on the grounds that the newest published broker binary was `b9a3adfd` (Aug 24 22:49Z). That is no longer true — **`64110f29` published successfully at 2026-08-26 01:35Z** (this ticket's own live-probe commit, minutes after that comment was written). Registry contents: `0763e143`, `2af75c50`, `e6cfb526`, `b9a3adfd`, `64110f29`. And `64110f29` is the **tip of all broker work** — `git log 64110f29..origin/main -- broker/` is empty. Because the published artifact is a whole binary rather than an increment, **one deploy of `64110f29` lands all ten commits** the live broker is missing: #708, #741, #749, #751, #752, #754, #756, #813 and rehearsal-5's lease/carrier work. #864 stays open as a genuine latent bug; it is not in the way today. ### Residue — the dispatch itself The production deploy has **not** run yet. The first `workflow_dispatch` returned HTTP 204 but created no task (Forgejo accepted it and registered nothing — the same shape as the known "dispatch silently no-ops until the workflow file is re-registered" behaviour), and the retry was refused by this session's own permission guard, which I am not routing around. **To finish it**, dispatch `broker-deploy` on `64110f296a5089bf327a132c71c854060f8bd045` — from the Forgejo UI, or: ``` curl -X POST -H "Authorization: token $FORGEJO_TOKEN" -H "Content-Type: application/json" \ -d '{"ref":"main","inputs":{"sha":"64110f296a5089bf327a132c71c854060f8bd045"}}' \ https://git.matou.nz/api/v1/repos/Matou/idss/actions/workflows/broker-deploy.yml/dispatches ``` Then confirm live: `ssh dev@100.98.48.68 'sudo journalctl -u ourcloud-broker | grep "broker booted" | tail -1'` (GOTCHAS #59) — currently pinned at **Aug 23 04:17**. This ticket's own acceptance (steps 2 and 3 — the tag observed and moved) is already live-proven against real DigitalOcean by `TestRentalExpiryTag_Live`; what remains is step 1, observing it **through the production broker**, which needs the deploy above plus one rental.
Owner

A second wall stood behind the mesh fix. Found, fixed in-repo, red/green proven — but the deploy still needs one hands step.

Moving broker-deploy to elitebook-03 (GOTCHAS #90) was a real fix and it changed no observable outcome: the deploy job stayed red on all three dispatches after it (runs 10866, 10982, 11014).

Ruling out the obvious first

  • Runner label is right — elitebook-03 registered and active, labels ['elitebook-03','swarm'].
  • The publish guard passes — 64110f29's binary returns 200 anonymously, so the skip-leg sets go=1.
  • The mesh is fine now, including inside containers. Probed from elitebook-03: the host reaches 100.98.48.68:22, and so does a Docker container on it. The runner is forgejo-runner-swarm.service ("rootless docker"), so this mattered.
  • The deploy key is genuine — ~/.ssh/idss_broker_deploy fingerprints SHA256:jEIPxXqDLGBhSQ01rew+gysbMGJ3+1hjglgagD9nW6k, exactly what the droplet's deploy user authorizes.

This Forgejo build exposes no job-log API (every actions/runs/.../logs variant 404s; the web endpoint needs a session cookie, not a token), so the rail could not be asked why it died. Running the install by hand answered instead:

idss-broker-install: downloading idss-broker@64110f296a50 from https://git.matou.nz/api/packages/...
idss-broker-install: downloaded binary does not carry the 'alpha-rentals' version marker
  — refusing to install a non-broker artifact

The accusation is false in every particular

  • The download is byte-identical to what CI published: 8,985,462 bytes, same Go BuildID, on both the laptop and the droplet.
  • file says ELF 64-bit, statically linked — a real broker.
  • The marker is there. On the droplet: strings /tmp/bp.bin | grep -c alpha-rentals → 1.

The defect is the SHAPE of the check

set -euo pipefail                                    # line 42
strings "$tmp" | grep -qF "$marker" || die "...not a broker artifact"

grep -q exits at the first match. strings is then still writing the rest of ~9MB into a pipe with no reader, takes SIGPIPE, and dies 141. pipefail surfaces that as the pipeline's status. Measured on the droplet:

$ strings /tmp/bp.bin | grep -qF alpha-rentals; echo ${PIPESTATUS[@]}
141 0            # producer killed, grep HAPPY

It is a race decided by payload size — which is exactly why it hid. On a real 9MB broker it loses nearly always (the install step succeeded once in 11,639 tasks). On the offline test's ~40-byte fake binary it wins always, so scripts/tests/broker-install-test.sh was green throughout. The fake was smaller than production and so could not model it.

What landed

  • scripts/broker/idss-broker-install.sh — the reader now drains (grep -F … >/dev/null); -q bought nothing, the redirect already silences it.
  • scripts/tests/broker-install-test.sh — case 9: a production-shaped payload whose fake strings keeps writing after the reader stops (FAKE_STRINGS_TAIL). Red against the pre-fix installer, green after. Cases 1–8 cannot reproduce this and never could.
  • GOTCHAS #91 — the rule (never end a pipefail pipeline with grep -q on a large producer) and its sharper half (a fake smaller than production does not model production).

Residue — one hands step, then this ticket can close

The droplet's /usr/local/sbin/idss-broker-install is a hand-placed copy (broker/README.md, "one-time setup"), so the repo fix is not live. On 100.98.48.68 as root:

install -o root -g root -m0755 \
  /path/to/idss/scripts/broker/idss-broker-install.sh \
  /usr/local/sbin/idss-broker-install

Then the deploy of 64110f29 runs (that sha is main's broker — no broker-affecting commit has landed since), and this ticket's steps 1–3 can be checked. Live broker is still pinned at 2026-08-23 04:17.

That copy is the deeper finding and is now #872: a rail whose own installer can only be updated by hand cannot ship a fix to itself, and every future installer defect wears this shape.

Ruled by agent under ADR 0174 — veto anytime.

**A second wall stood behind the mesh fix. Found, fixed in-repo, red/green proven — but the deploy still needs one hands step.** Moving `broker-deploy` to `elitebook-03` (GOTCHAS #90) was a real fix and it changed no observable outcome: the `deploy` job stayed red on all three dispatches after it (runs `10866`, `10982`, `11014`). ## Ruling out the obvious first - Runner label is right — `elitebook-03` registered and active, labels `['elitebook-03','swarm']`. - The publish guard passes — `64110f29`'s binary returns `200` anonymously, so the skip-leg sets `go=1`. - **The mesh is fine now, including inside containers.** Probed from `elitebook-03`: the host reaches `100.98.48.68:22`, and so does a Docker container on it. The runner is `forgejo-runner-swarm.service` ("rootless docker"), so this mattered. - The deploy key is genuine — `~/.ssh/idss_broker_deploy` fingerprints `SHA256:jEIPxXqDLGBhSQ01rew+gysbMGJ3+1hjglgagD9nW6k`, exactly what the droplet's `deploy` user authorizes. This Forgejo build exposes **no job-log API** (every `actions/runs/.../logs` variant 404s; the web endpoint needs a session cookie, not a token), so the rail could not be asked why it died. Running the install by hand answered instead: ``` idss-broker-install: downloading idss-broker@64110f296a50 from https://git.matou.nz/api/packages/... idss-broker-install: downloaded binary does not carry the 'alpha-rentals' version marker — refusing to install a non-broker artifact ``` ## The accusation is false in every particular - The download is byte-identical to what CI published: 8,985,462 bytes, same Go BuildID, on both the laptop and the droplet. - `file` says ELF 64-bit, statically linked — a real broker. - The marker is there. On the droplet: `strings /tmp/bp.bin | grep -c alpha-rentals` → `1`. ## The defect is the SHAPE of the check ```bash set -euo pipefail # line 42 strings "$tmp" | grep -qF "$marker" || die "...not a broker artifact" ``` `grep -q` exits at the first match. `strings` is then still writing the rest of ~9MB into a pipe with no reader, takes SIGPIPE, and dies 141. `pipefail` surfaces that as the pipeline's status. Measured on the droplet: ``` $ strings /tmp/bp.bin | grep -qF alpha-rentals; echo ${PIPESTATUS[@]} 141 0 # producer killed, grep HAPPY ``` It is a race decided by payload size — which is exactly why it hid. On a real 9MB broker it loses nearly always (the install step succeeded **once in 11,639 tasks**). On the offline test's ~40-byte fake binary it wins always, so `scripts/tests/broker-install-test.sh` was green throughout. **The fake was smaller than production and so could not model it.** ## What landed - `scripts/broker/idss-broker-install.sh` — the reader now drains (`grep -F … >/dev/null`); `-q` bought nothing, the redirect already silences it. - `scripts/tests/broker-install-test.sh` — **case 9**: a production-shaped payload whose fake `strings` keeps writing after the reader stops (`FAKE_STRINGS_TAIL`). Red against the pre-fix installer, green after. Cases 1–8 cannot reproduce this and never could. - **GOTCHAS #91** — the rule (never end a `pipefail` pipeline with `grep -q` on a large producer) and its sharper half (a fake smaller than production does not model production). ## Residue — one hands step, then this ticket can close The droplet's `/usr/local/sbin/idss-broker-install` is a hand-placed **copy** (broker/README.md, "one-time setup"), so the repo fix is not live. On `100.98.48.68` as root: ```bash install -o root -g root -m0755 \ /path/to/idss/scripts/broker/idss-broker-install.sh \ /usr/local/sbin/idss-broker-install ``` Then the deploy of `64110f29` runs (that sha is main's broker — no broker-affecting commit has landed since), and this ticket's steps 1–3 can be checked. Live broker is still pinned at 2026-08-23 04:17. That copy is the deeper finding and is now **#872**: a rail whose own installer can only be updated by hand cannot ship a fix to itself, and every future installer defect wears this shape. Ruled by agent under ADR 0174 — veto anytime.
Owner

Unblocked: the broker rail deployed for the first time — run 24074, b186b7eb live on the droplet 2026-08-27 03:17Z (sha-verified; see #872's close-out and GOTCHAS #100 for why every earlier deploy died at ssh auth). The live broker now carries #741's idss-rental-expires- tag; the next rented-gateway drive can verify it against the DO account.

Unblocked: the broker rail deployed for the first time — run 24074, `b186b7eb` live on the droplet 2026-08-27 03:17Z (sha-verified; see #872's close-out and GOTCHAS #100 for why every earlier deploy died at ssh auth). The live broker now carries #741's `idss-rental-expires-` tag; the next rented-gateway drive can verify it against the DO account.
Owner

Verified live 2026-08-29/30 — all three steps green, closing

Verified against the DO account (broker's token) with the standing rental up, no new drive needed:

  1. Live broker version: ourcloud-broker.service unit description reads build b186b7ebc9, journal shows broker booted … version=0.2.0-alpha-rentals (last boot 2026-08-27 22:34Z) — at/past 2af75c50, carrying #741's tag half.
  2. The droplet wears the tag: idss-gateway-rehearsal-e-1244 (created 2026-08-29 23:29Z) tags = idss-gateway, idss-rental, idss-rental-expires-1788135002.
  3. A renew MOVES it — watched live: two minutes later the same droplet wore idss-rental-expires-1788135164 (+162 s). The heartbeat is renewing every healthy pass (~120 s cadence, 17 successive epochs in the tag list). And the old tag objects are left behind, not stripped from a live droplet: 17 orphan idss-rental-expires-* tag objects at droplets=0 awaiting scripts/rental-reap.sh, exactly the contract.

The precision half of #741's expiry story is live and behaving. Loop closed.

## Verified live 2026-08-29/30 — all three steps green, closing Verified against the DO account (broker's token) with the standing rental up, no new drive needed: 1. **Live broker version**: `ourcloud-broker.service` unit description reads *build b186b7ebc9a9*, journal shows `broker booted … version=0.2.0-alpha-rentals` (last boot 2026-08-27 22:34Z) — at/past `2af75c50`, carrying #741's tag half. 2. **The droplet wears the tag**: `idss-gateway-rehearsal-e-1244` (created 2026-08-29 23:29Z) tags = `idss-gateway, idss-rental, idss-rental-expires-1788135002`. 3. **A renew MOVES it — watched live**: two minutes later the same droplet wore `idss-rental-expires-1788135164` (+162 s). The heartbeat is renewing every healthy pass (~120 s cadence, 17 successive epochs in the tag list). And the old tag objects are **left behind, not stripped from a live droplet**: 17 orphan `idss-rental-expires-*` tag objects at `droplets=0` awaiting `scripts/rental-reap.sh`, exactly the contract. The precision half of #741's expiry story is live and behaving. Loop closed.
ben closed this issue 2026-08-30 00:13:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#745
No description provided.