The device target never arms cert persistence, so every re-found drive burns a Let's Encrypt order — rehearsal-d's quota is now spent #986

Closed
opened 2026-08-29 12:27:50 +00:00 by matou-build-agent · 2 comments

Failure

Drive 20260829T114921Z (target device) redded at standing/activation: the gateway's Caddy could not obtain a certificate for the apex because Let's Encrypt's duplicate-certificate cap for rehearsal-d.idss.nz is exhausted. logs/gateway-caddy.txt carries, on all five obtain retries, HTTP 429 urn:ietf:params:acme:error:rateLimited - too many certificates (5) already issued for this exact set of identifiers in the last 168h0m0s, retry after 2026-08-30 01:35:49 UTC. Every other deploy step is done; only public-entry failed (founding-state.log, standup.deploy.steps).

The companion commit makes this fault report itself honestly (rate_limited kind, retry-after instant, no futile recovery buttons). It does not stop the drive burning orders. Until ~2026-08-30 01:35 UTC an immediate re-drive against this slug reds identically — see "Unblocking now" below.

Evidence

  • scripts/smoke-private-path.sh:602 — if [[ "$uses_droplet_machinery" == "1" && "$target" == "rented" ]]; then oc_rented_certs_arm "$run_dir"; fi. The device target is excluded, so neither the seed nor the harvest half of #724 ever runs on it.
  • scripts/smoke-private-path.sh:574-577 — the device re-found path's own comment concedes the shape: "A re-found RENTS a fresh gateway from the broker mid-drive against the FIXED REHEARSAL_SLUG (runRentedPrefix, exactly as --target rented)". It already borrows the rented pre-rent sweep (oc_rented_release_stale_slug, oc_rented_offboard_stale_slug) — the cert worker is the one rented-path guard it did not borrow.
  • test-results/cert-store/ holds exactly one slug dir, rehearsal-c (last written 2026-08-24). There is no rehearsal-d store at all, despite four rehearsal-d device drives today (20260829T085335Z, 105554Z, 113721Z, 114921Z).
  • This run directory has no logs/cert-rented.txt (oc_rented_certs_reap's verdict file, scripts/lib/rehearsal-droplet.sh:1130) and no logs/caddy-rented.txt — the worker was never armed. The only cert-rented.txt files under test-results/ belong to drive-rented/ runs from 2026-08-25.
  • docs/GOTCHAS.md #32 records the hazard and its #532/#559/#724 fixes; the #724 amendment says in terms that the rented path "is the target the standing queue drives". The queue has since moved to device, and the persistence wiring did not follow.

Suspected layer

The drive harness, not the product. internal/certpersist, cmd/rehearsal-certstore, oc_rented_certs_arm/_worker/_reap (scripts/lib/rehearsal-droplet.sh:938-1145) are all present and seam-tested — they are simply not reached from the device branch.

What plugging it needs

  1. Arm oc_rented_certs_arm for the device target on its re-found path (the OC_STANDING_REFOUND=1 branch at scripts/smoke-private-path.sh:570-594), not unconditionally — a device drive against an already-standing community rents nothing and should stay untouched.
  2. Resolve a run-dir divergence before wiring it. oc_rented_certs_worker reads the box IP from $run_dir/artifacts/droplet-ip.txt and prefers the SSH identity at $run_dir/state/rent-operator/id_ed25519 (scripts/lib/rehearsal-droplet.sh:1002-1004). The device drive satisfies the first (artifacts/droplet-ip.txt exists, 134.199.155.189) but not the second: this run's founding-state.log enrollment blob puts the rent-operator key under test-results/standing-rented/state/rent-operator/id_ed25519 — the standing community's state dir, not the per-drive run dir. Either pass the identity path in or fall back to the standing state dir, otherwise the worker silently fails to authenticate and degrades to a note while still burning orders.
  3. Extend scripts/tests/rehearsal-rented-certs-test.sh (offline, fake ssh) to cover the device arm, so this stays offline-provable.
  4. Amend docs/GOTCHAS.md #32 once landed — its #724 amendment currently names rented as the standing queue's target.

Unblocking now

The rehearsal-d identifier set is walled until 2026-08-30 01:35:49 UTC. Per GOTCHAS #32 the sanctioned mitigation is rotating REHEARSAL_SLUG (live value in .sandcastle/.env on the executor; fallback default in scripts/lib/swarm-identity.sh:42) to an unwalled slug — note each rotation still spends idss.nz's 50-new-orders/week registered-domain budget at ~2 orders per drive. Otherwise the drive must wait out the retry-after instant. Landing this issue is what stops the next slug being burned the same way.

drive 20260829T114921Z red at standing: the gateway deploy failed — The gateway deploy failed. [There is no old operating system to roll back to — this server was rented fresh for the community, so nothing of yours was overwritten.]
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260829T114921Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure Drive `20260829T114921Z` (target `device`) redded at `standing`/`activation`: the gateway's Caddy could not obtain a certificate for the apex because Let's Encrypt's duplicate-certificate cap for `rehearsal-d.idss.nz` is exhausted. `logs/gateway-caddy.txt` carries, on all five obtain retries, `HTTP 429 urn:ietf:params:acme:error:rateLimited - too many certificates (5) already issued for this exact set of identifiers in the last 168h0m0s, retry after 2026-08-30 01:35:49 UTC`. Every other deploy step is `done`; only `public-entry` failed (`founding-state.log`, `standup.deploy.steps`). The companion commit makes this fault *report* itself honestly (rate_limited kind, retry-after instant, no futile recovery buttons). It does not stop the drive burning orders. **Until ~2026-08-30 01:35 UTC an immediate re-drive against this slug reds identically** — see "Unblocking now" below. ## Evidence - `scripts/smoke-private-path.sh:602` — `if [[ "$uses_droplet_machinery" == "1" && "$target" == "rented" ]]; then oc_rented_certs_arm "$run_dir"; fi`. The `device` target is excluded, so neither the seed nor the harvest half of #724 ever runs on it. - `scripts/smoke-private-path.sh:574-577` — the device re-found path's own comment concedes the shape: "A re-found RENTS a fresh gateway from the broker mid-drive against the FIXED REHEARSAL_SLUG (runRentedPrefix, exactly as --target rented)". It already borrows the rented pre-rent sweep (`oc_rented_release_stale_slug`, `oc_rented_offboard_stale_slug`) — the cert worker is the one rented-path guard it did not borrow. - `test-results/cert-store/` holds exactly one slug dir, `rehearsal-c` (last written 2026-08-24). There is **no `rehearsal-d` store at all**, despite four `rehearsal-d` device drives today (`20260829T085335Z`, `105554Z`, `113721Z`, `114921Z`). - This run directory has **no `logs/cert-rented.txt`** (`oc_rented_certs_reap`'s verdict file, `scripts/lib/rehearsal-droplet.sh:1130`) and no `logs/caddy-rented.txt` — the worker was never armed. The only `cert-rented.txt` files under `test-results/` belong to `drive-rented/` runs from 2026-08-25. - `docs/GOTCHAS.md` #32 records the hazard and its #532/#559/#724 fixes; the #724 amendment says in terms that the rented path "is the target the standing queue drives". The queue has since moved to `device`, and the persistence wiring did not follow. ## Suspected layer The drive harness, not the product. `internal/certpersist`, `cmd/rehearsal-certstore`, `oc_rented_certs_arm`/`_worker`/`_reap` (`scripts/lib/rehearsal-droplet.sh:938-1145`) are all present and seam-tested — they are simply not reached from the `device` branch. ## What plugging it needs 1. Arm `oc_rented_certs_arm` for the `device` target on its re-found path (the `OC_STANDING_REFOUND=1` branch at `scripts/smoke-private-path.sh:570-594`), not unconditionally — a device drive against an already-standing community rents nothing and should stay untouched. 2. **Resolve a run-dir divergence before wiring it.** `oc_rented_certs_worker` reads the box IP from `$run_dir/artifacts/droplet-ip.txt` and prefers the SSH identity at `$run_dir/state/rent-operator/id_ed25519` (`scripts/lib/rehearsal-droplet.sh:1002-1004`). The device drive satisfies the first (`artifacts/droplet-ip.txt` exists, `134.199.155.189`) but not the second: this run's `founding-state.log` enrollment blob puts the rent-operator key under `test-results/standing-rented/state/rent-operator/id_ed25519` — the standing community's state dir, not the per-drive run dir. Either pass the identity path in or fall back to the standing state dir, otherwise the worker silently fails to authenticate and degrades to a note while still burning orders. 3. Extend `scripts/tests/rehearsal-rented-certs-test.sh` (offline, fake `ssh`) to cover the device arm, so this stays offline-provable. 4. Amend `docs/GOTCHAS.md` #32 once landed — its #724 amendment currently names `rented` as the standing queue's target. ## Unblocking now The `rehearsal-d` identifier set is walled until 2026-08-30 01:35:49 UTC. Per GOTCHAS #32 the sanctioned mitigation is rotating `REHEARSAL_SLUG` (live value in `.sandcastle/.env` on the executor; fallback default in `scripts/lib/swarm-identity.sh:42`) to an unwalled slug — note each rotation still spends idss.nz's 50-new-orders/week registered-domain budget at ~2 orders per drive. Otherwise the drive must wait out the retry-after instant. Landing this issue is what stops the next slug being burned the same way. drive `20260829T114921Z` red at `standing`: `the gateway deploy failed — The gateway deploy failed. [There is no old operating system to roll back to — this server was rented fresh for the community, so nothing of yours was overwritten.]` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260829T114921Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 25304f657c24 -->
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=13828
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=13828 (automated multi-host claim — lowest live claim id works this ticket)
matou-build-agent 2026-08-29 12:35:58 +00:00
Author
Member

close-report for #986 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 986,
  "status": "success",
  "commits": [],
  "changed_files": [],
  "tests": [
    {
      "command": "bash scripts/tests/rehearsal-rented-certs-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/rehearsal-device-target-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Arm oc_rented_certs_arm for the device target on its re-found path (OC_STANDING_REFOUND=1), not unconditionally": "scripts/smoke-private-path.sh:621 (commit baa3fe7, #987) — `[[ ... target == device && OC_STANDING_REFOUND:-0 == 1 ]]` arms oc_rented_certs_arm; an adopt drive stays untouched. Proven by rehearsal-device-target-test.sh case 14 (exit 0).",
    "Resolve the run-dir divergence: pass the identity path in / fall back to the standing state dir": "scripts/lib/rehearsal-droplet.sh — oc_rented_certs_arm/_worker take an 8th identity_state arg defaulting to $run_dir/state (rented unchanged); the device arm passes $OC_STANDING_DIR/state (commit baa3fe7). Proven by rehearsal-rented-certs-test.sh case 20 (worker dials with the key from its identity home, exit 0).",
    "Extend scripts/tests/rehearsal-rented-certs-test.sh (offline, fake ssh) to cover the device arm": "rehearsal-rented-certs-test.sh case 20 + rehearsal-device-target-test.sh case 14 (commit baa3fe7); both pass offline (exit 0).",
    "Amend docs/GOTCHAS.md #32 (its #724 amendment named rented as the standing queue's target)": "docs/GOTCHAS.md #32 amended in commit baa3fe7 to record the device re-found gap and its fix."
  },
  "summary": "#986 is a duplicate of #987 (commit baa3fe7), which landed on origin/main during this iteration and fully resolves the device re-found cert-persistence gap for the same drive fault 20260829T114921Z.",
  "reason": "The identical fix — arm on the device+re-found path, thread the standing home as the worker's identity source, offline test coverage, and the GOTCHAS #32 amendment — landed under #987 (baa3fe7) while this ticket was being worked. Re-implementing it would only duplicate landed code and conflict its test cases. Verified #987 covers all four of #986's 'what plugging it needs' items and both offline tests pass green.",
  "blockers": [],
  "no_code_change": "The fix required by #986 was already landed on origin/main by its duplicate #987 (commit baa3fe7) during this iteration. All four required changes are present and both offline tests (rehearsal-rented-certs-test.sh, rehearsal-device-target-test.sh) pass at exit 0. No further code change is warranted."
}
**close-report** for #986 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 986, "status": "success", "commits": [], "changed_files": [], "tests": [ { "command": "bash scripts/tests/rehearsal-rented-certs-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/rehearsal-device-target-test.sh", "exit_code": 0 } ], "criteria": { "Arm oc_rented_certs_arm for the device target on its re-found path (OC_STANDING_REFOUND=1), not unconditionally": "scripts/smoke-private-path.sh:621 (commit baa3fe7, #987) — `[[ ... target == device && OC_STANDING_REFOUND:-0 == 1 ]]` arms oc_rented_certs_arm; an adopt drive stays untouched. Proven by rehearsal-device-target-test.sh case 14 (exit 0).", "Resolve the run-dir divergence: pass the identity path in / fall back to the standing state dir": "scripts/lib/rehearsal-droplet.sh — oc_rented_certs_arm/_worker take an 8th identity_state arg defaulting to $run_dir/state (rented unchanged); the device arm passes $OC_STANDING_DIR/state (commit baa3fe7). Proven by rehearsal-rented-certs-test.sh case 20 (worker dials with the key from its identity home, exit 0).", "Extend scripts/tests/rehearsal-rented-certs-test.sh (offline, fake ssh) to cover the device arm": "rehearsal-rented-certs-test.sh case 20 + rehearsal-device-target-test.sh case 14 (commit baa3fe7); both pass offline (exit 0).", "Amend docs/GOTCHAS.md #32 (its #724 amendment named rented as the standing queue's target)": "docs/GOTCHAS.md #32 amended in commit baa3fe7 to record the device re-found gap and its fix." }, "summary": "#986 is a duplicate of #987 (commit baa3fe7), which landed on origin/main during this iteration and fully resolves the device re-found cert-persistence gap for the same drive fault 20260829T114921Z.", "reason": "The identical fix — arm on the device+re-found path, thread the standing home as the worker's identity source, offline test coverage, and the GOTCHAS #32 amendment — landed under #987 (baa3fe7) while this ticket was being worked. Re-implementing it would only duplicate landed code and conflict its test cases. Verified #987 covers all four of #986's 'what plugging it needs' items and both offline tests pass green.", "blockers": [], "no_code_change": "The fix required by #986 was already landed on origin/main by its duplicate #987 (commit baa3fe7) during this iteration. All four required changes are present and both offline tests (rehearsal-rented-certs-test.sh, rehearsal-device-target-test.sh) pass at exit 0. No further code change is warranted." } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#986
No description provided.