drive teardown can't find the claim secret since #1404 — no offboard, nothing remembered, so rehearsal-f stays held and every later founding drive parks/reds #1467

Closed
opened 2026-09-14 14:51:56 +00:00 by ben · 3 comments
Owner

Symptom — after ONE founding drive, the founding name is held forever and every later founding drive parks or reds

#1373's droplet drive at 14:43Z parked in preflight (the #1401 claimability guard, correctly, zero spend):

PREFLIGHT: the droplet target cannot claim 'rehearsal-f.idss.nz' — it answers 168.144.168.195,
which is NOT the *.idss.nz wildcard (143.198.134.168), so a real gateway is pointed at it …

168.144.168.195 is clan-lab-rehearsal-f77d838f, kept from red drive 20260914T134258Z (red at sign-in, #1466 — fixed). That kept box is not the real problem. The name was never offboarded, and that drive's teardown says why:

note: no claim secret in the run state — offboard skipped (the wizard likely never reached S5)

The wizard did claim: the drive founded the community (16/16 legs green) and pointed rehearsal-f at the box.

Cause — #1404 moved the claim server-side; the harness still reads the claim secret from the app's state file

Before (last working harvest, run 20260912T160919Z): the app persisted the draft to state/founding-state.json (+ logs/founding-state.log) with the Address record's "secret": "…". oc_droplet_teardown and oc_slug_secrets_harvest both find it with

grep -rhoP '"(claimSecret|secret)"\s*:\s*"\K[^"]+' "$run_dir/state"      # scripts/lib/rehearsal-droplet.sh

so the name is offboarded and the secret is remembered for the next drive's rented sweep (#757).

After 8b5051c5 (#1404 — nothing triggered until Build it): the Address step "reserve[s] nothing and mint[s] no claim secret (the real claim, and its ADR 0135 secret, are createCommunity's to make)" (app/src/lib/founding.ts:3560). The secret is now minted in Go — internal/founding/access.go:600, d.Address.Secret = claim.Secret — and handed to the gateway as the clan var idss-claim-secret (ownvpspath.go claimSecretAnswers → clan.ClaimSecretGenerator). In run 20260914T134258Z:

  • state/founding-state.json does not exist;
  • logs/founding-state.log exists but carries no claimSecret|secret value (0 matches);
  • the secret exists only sops-encrypted at state/clan-config/vars/per-machine/gateway/idss-claim-secret/secret/secret (recipients: machines/gateway, users/operator).

So the teardown finds nothing → no offboard → nothing remembered. The droplet guard then parks every later droplet drive; the rented pre-claim sweep (oc_rented_offboard_stale_slug) can only spend the four secrets remembered on 2026-09-12 (slug-claims/rehearsal-f.secrets), none of which authorise today's reservation; and TTL reap does not help, because it destroys the box but a redeemed reservation never lapses (#278).

Blast radius: every founding target that claims REHEARSAL_SLUG_FOUNDING (droplet, rented, selfhosted — per rehearsal_effective_slug). Green drives are affected too: a green drive also offboards via the same missing secret, so it leaves the name held just as surely.

Suggested shape (not a ruling)

  • Harvest the claim secret from where the product now keeps it: decrypt idss-claim-secret from the run's state/clan-config with the run's operator key (e.g. clan vars get gateway idss-claim-secret/secret against that config), and fall back to the old founding-state.json grep for older runs. Use it in both oc_droplet_teardown (offboard) and oc_slug_secrets_harvest (remember).
  • A cannot-fail guard, in the house style of this week: the teardown's "no claim secret — the wizard likely never reached S5" is now a lie for a drive whose legs went green past public-entry. Make it assert the other way round: if the run reached S5 (legs or state say so) and no secret is found, that is a red, not a note.
  • Add a regression test that feeds the teardown a post-#1404 run shape (no founding-state.json, secret only in the clan var) and asserts it offboards.

Unblocking what is stuck now

rehearsal-f stays held until its secret is spent. The kept run's encrypted var holds it, so the name can be freed by hand once someone decrypts it and calls POST /v1/subdomains/offboard for rehearsal-f.idss.nz. Until then #1373 (last ticket on Portal map #1336) cannot drive, and the #1447 rented hand drive in flight will red at its claim.

## Symptom — after ONE founding drive, the founding name is held forever and every later founding drive parks or reds `#1373`'s droplet drive at 14:43Z **parked in preflight** (the #1401 claimability guard, correctly, zero spend): ``` PREFLIGHT: the droplet target cannot claim 'rehearsal-f.idss.nz' — it answers 168.144.168.195, which is NOT the *.idss.nz wildcard (143.198.134.168), so a real gateway is pointed at it … ``` `168.144.168.195` is `clan-lab-rehearsal-f77d838f`, kept from red drive `20260914T134258Z` (red at `sign-in`, #1466 — fixed). That kept box is not the real problem. **The name was never offboarded**, and that drive's teardown says why: ``` note: no claim secret in the run state — offboard skipped (the wizard likely never reached S5) ``` The wizard **did** claim: the drive founded the community (16/16 legs green) and pointed `rehearsal-f` at the box. ## Cause — #1404 moved the claim server-side; the harness still reads the claim secret from the app's state file **Before (last working harvest, run `20260912T160919Z`):** the app persisted the draft to `state/founding-state.json` (+ `logs/founding-state.log`) with the Address record's `"secret": "…"`. `oc_droplet_teardown` and `oc_slug_secrets_harvest` both find it with ``` grep -rhoP '"(claimSecret|secret)"\s*:\s*"\K[^"]+' "$run_dir/state" # scripts/lib/rehearsal-droplet.sh ``` so the name is offboarded and the secret is remembered for the next drive's rented sweep (#757). **After `8b5051c5` (#1404 — nothing triggered until Build it):** the Address step *"reserve[s] nothing and mint[s] no claim secret (the real claim, and its ADR 0135 secret, are createCommunity's to make)"* (`app/src/lib/founding.ts:3560`). The secret is now minted in Go — `internal/founding/access.go:600`, `d.Address.Secret = claim.Secret` — and handed to the gateway as the clan var `idss-claim-secret` (`ownvpspath.go` `claimSecretAnswers` → `clan.ClaimSecretGenerator`). In run `20260914T134258Z`: - `state/founding-state.json` **does not exist**; - `logs/founding-state.log` exists but carries **no** `claimSecret|secret` value (0 matches); - the secret exists only **sops-encrypted** at `state/clan-config/vars/per-machine/gateway/idss-claim-secret/secret/secret` (recipients: `machines/gateway`, `users/operator`). So the teardown finds nothing → no offboard → nothing remembered. The droplet guard then parks every later droplet drive; the rented pre-claim sweep (`oc_rented_offboard_stale_slug`) can only spend the four secrets remembered on 2026-09-12 (`slug-claims/rehearsal-f.secrets`), none of which authorise today's reservation; and TTL reap does not help, because it destroys the box but *a redeemed reservation never lapses* (#278). **Blast radius:** every founding target that claims `REHEARSAL_SLUG_FOUNDING` (droplet, rented, selfhosted — per `rehearsal_effective_slug`). Green drives are affected too: a green drive also offboards via the same missing secret, so it leaves the name held just as surely. ## Suggested shape (not a ruling) - Harvest the claim secret from where the product now keeps it: decrypt `idss-claim-secret` from the run's `state/clan-config` with the run's operator key (e.g. `clan vars get gateway idss-claim-secret/secret` against that config), and fall back to the old `founding-state.json` grep for older runs. Use it in both `oc_droplet_teardown` (offboard) and `oc_slug_secrets_harvest` (remember). - A cannot-fail guard, in the house style of this week: the teardown's *"no claim secret — the wizard likely never reached S5"* is now a lie for a drive whose legs went green past `public-entry`. Make it assert the other way round: if the run reached S5 (legs or state say so) and no secret is found, that is a **red**, not a note. - Add a regression test that feeds the teardown a post-#1404 run shape (no `founding-state.json`, secret only in the clan var) and asserts it offboards. ## Unblocking what is stuck now `rehearsal-f` stays held until its secret is spent. The kept run's encrypted var holds it, so the name can be freed by hand once someone decrypts it and calls `POST /v1/subdomains/offboard` for `rehearsal-f.idss.nz`. Until then #1373 (last ticket on Portal map #1336) cannot drive, and the #1447 rented hand drive in flight will red at its claim.

swarm-claim host=bens-mac-04 run=23886
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=23886 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1467 — status success

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

envelope
{
  "issue": 1467,
  "status": "success",
  "commits": [
    "afc61b993cc54cf22b88ca2c18311b6d9f952ae8"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/GOTCHAS.md",
    "scripts/lib/rehearsal-droplet.sh",
    "scripts/tests/rehearsal-claim-secret-harvest-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/rehearsal-claim-secret-harvest-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/rehearsal-rented-target-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/droplet-slug-claimable-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash -n scripts/lib/rehearsal-droplet.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Harvest the claim secret from where the product now keeps it (decrypt idss-claim-secret from state/clan-config with the run's operator age key), falling back to the old founding-state grep for older runs; use it in both oc_droplet_teardown (offboard) and oc_slug_secrets_harvest (remember)": "scripts/lib/rehearsal-droplet.sh: new oc_run_claim_secret (plaintext grep of state/ + logs/founding-state.log, then oc_decrypt_claim_secret via `clan vars get gateway idss-claim-secret/secret --flake git+file://…/state/clan-config` with SOPS_AGE_KEY_FILE=…/state/sops/age/keys.txt). Wired into oc_droplet_teardown, oc_rented_teardown, and oc_slug_secrets_harvest (gated on the run's <slug>.idss.nz apex). Proven by test cases 1, 4 and 5.",
    "A cannot-fail guard: if the run reached S5 and no secret is found, that is a RED, not a note": "scripts/lib/rehearsal-droplet.sh: new oc_run_reached_s5 (the sealed idss-claim-secret var's presence is durable proof S5 ran). oc_droplet_teardown now emits a loud ERROR naming the wedged name and returns rc 1 when reached-S5-but-no-secret; the old 'likely never reached S5' note fires only when S5 was genuinely never reached. Proven by test cases 2 (red, rc 1) and 3 (benign note, rc 0).",
    "Add a regression test that feeds the teardown a post-#1404 run shape (no founding-state.json, secret only in the clan var) and asserts it offboards": "scripts/tests/rehearsal-claim-secret-harvest-test.sh — 6 cases including the post-#1404 sealed-var shape that decrypts and offboards (case 1), plus the reached-S5 red, the never-reached note, the pre-#1404 plaintext path, the harvest bootstrap, and the different-slug guard."
  },
  "summary": "The drive teardown harvests the S5 claim secret from #1404's sops-sealed idss-claim-secret clan var (falling back to pre-#1404 plaintext) and reds a reached-S5-but-unoffboardable name instead of noting it, so a founding drive no longer wedges its slug.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1467 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1467, "status": "success", "commits": [ "afc61b993cc54cf22b88ca2c18311b6d9f952ae8" ], "changed_files": [ "STATUS.md", "docs/GOTCHAS.md", "scripts/lib/rehearsal-droplet.sh", "scripts/tests/rehearsal-claim-secret-harvest-test.sh" ], "tests": [ { "command": "bash scripts/tests/rehearsal-claim-secret-harvest-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/rehearsal-rented-target-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/droplet-slug-claimable-test.sh", "exit_code": 0 }, { "command": "bash -n scripts/lib/rehearsal-droplet.sh", "exit_code": 0 } ], "criteria": { "Harvest the claim secret from where the product now keeps it (decrypt idss-claim-secret from state/clan-config with the run's operator age key), falling back to the old founding-state grep for older runs; use it in both oc_droplet_teardown (offboard) and oc_slug_secrets_harvest (remember)": "scripts/lib/rehearsal-droplet.sh: new oc_run_claim_secret (plaintext grep of state/ + logs/founding-state.log, then oc_decrypt_claim_secret via `clan vars get gateway idss-claim-secret/secret --flake git+file://…/state/clan-config` with SOPS_AGE_KEY_FILE=…/state/sops/age/keys.txt). Wired into oc_droplet_teardown, oc_rented_teardown, and oc_slug_secrets_harvest (gated on the run's <slug>.idss.nz apex). Proven by test cases 1, 4 and 5.", "A cannot-fail guard: if the run reached S5 and no secret is found, that is a RED, not a note": "scripts/lib/rehearsal-droplet.sh: new oc_run_reached_s5 (the sealed idss-claim-secret var's presence is durable proof S5 ran). oc_droplet_teardown now emits a loud ERROR naming the wedged name and returns rc 1 when reached-S5-but-no-secret; the old 'likely never reached S5' note fires only when S5 was genuinely never reached. Proven by test cases 2 (red, rc 1) and 3 (benign note, rc 0).", "Add a regression test that feeds the teardown a post-#1404 run shape (no founding-state.json, secret only in the clan var) and asserts it offboards": "scripts/tests/rehearsal-claim-secret-harvest-test.sh — 6 cases including the post-#1404 sealed-var shape that decrypts and offboards (case 1), plus the reached-S5 red, the never-reached note, the pre-#1404 plaintext path, the harvest bootstrap, and the different-slug guard." }, "summary": "The drive teardown harvests the S5 claim secret from #1404's sops-sealed idss-claim-secret clan var (falling back to pre-#1404 plaintext) and reds a reached-S5-but-unoffboardable name instead of noting it, so a founding drive no longer wedges its slug.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Author
Owner

rehearsal-f.idss.nz FREED by hand, 2026-09-14 ~21:10Z (Ben's session, on Ben's word).

Ran the harness's own teardown (this ticket's fix, afc61b99) against the kept run on elitebook-03:

REHEARSAL_SLUG=rehearsal-f; . scripts/lib/rehearsal-droplet.sh
oc_droplet_teardown test-results/drive-droplet/20260914T134258Z
    offboarded rehearsal-f.idss.nz

oc_run_claim_secret decrypted the sealed idss-claim-secret with the run's own age key via clan vars get (clan-cli is on the .#e2e shell's PATH; sops is not) and posted the offboard. At the authoritative NS (andy.ns.cloudflare.com) the name now answers only the *.idss.nz wildcard (143.198.134.168), no _acme-challenge CNAME, no wildcard CNAME — the same shape as an unclaimed reference name. The secret is spent; it was also remembered in slug-claims/ first (harmless now).

Left as is: the kept box clan-lab-rehearsal-f77d838f (168.144.168.195) — the teardown took its keep-on-red branch, and its clan-lab lease reaps it at TTL. The workstation's REHEARSAL_SLUG_FOUNDING=rehearsal-g rotation stands; elitebook's default rehearsal-f is claimable again.

**`rehearsal-f.idss.nz` FREED by hand, 2026-09-14 ~21:10Z (Ben's session, on Ben's word).** Ran the harness's own teardown (this ticket's fix, `afc61b99`) against the kept run on elitebook-03: ``` REHEARSAL_SLUG=rehearsal-f; . scripts/lib/rehearsal-droplet.sh oc_droplet_teardown test-results/drive-droplet/20260914T134258Z offboarded rehearsal-f.idss.nz ``` `oc_run_claim_secret` decrypted the sealed `idss-claim-secret` with the run's own age key via `clan vars get` (clan-cli is on the `.#e2e` shell's PATH; `sops` is not) and posted the offboard. At the authoritative NS (`andy.ns.cloudflare.com`) the name now answers only the `*.idss.nz` wildcard (`143.198.134.168`), no `_acme-challenge` CNAME, no wildcard CNAME — the same shape as an unclaimed reference name. The secret is spent; it was also remembered in `slug-claims/` first (harmless now). Left as is: the kept box `clan-lab-rehearsal-f77d838f` (168.144.168.195) — the teardown took its keep-on-red branch, and its clan-lab lease reaps it at TTL. The workstation's `REHEARSAL_SLUG_FOUNDING=rehearsal-g` rotation stands; elitebook's default `rehearsal-f` is claimable again.
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#1467
No description provided.