#788 IDIP drive: the founder's first KERIA /boot still goes out tokenless — the boot invite is minted 24s too late and the app swallows the miss #981

Closed
opened 2026-08-29 10:16:38 +00:00 by matou-build-agent · 1 comment

Failure

Drive 20260829T095444Z (commit e1a8cdcb) reds at leg 13 of 13, identity-rows; every carrier leg is green.

identity row your-identity failed: the KERIA boot door refused this agent (403): {"code":"boot_denied","message":"the invite token is not a live, unspent invite"}

artifacts/legs.json (last record), artifacts/verdict.json (firstRedLeg: identity-rows).

Same leg and same signature (facdb1c80cf1) as drive 20260829T065250Z. #968 (08e9bbcc) landed between the two and did change the presentation — the door's real 403 now reaches the row instead of the agent does not exist for controller … mask — but the founder's first /boot is still not authorized.

The invite was minted, and it was never presented

  1. Exactly one invite was minted in the whole run, at seeding. logs/droplet-journal.txt:1962 — 10:03:51.540 … msg="idip invite minted" id=boot-1 operator="founder (bootstrap)". Grepping the full 244 KB journal for invite returns that one line, so there was no earlier mint.
  2. That invite was never spent. The end-of-run listing at logs/droplet-journal.txt:2028 shows -rw------- 1 root root 295 Aug 29 10:03 /var/lib/idss/keria/boot-invites.json. 295 bytes is exactly the unspent one-invite document; the spent form is 326 (the extra "spent": true, line plus a real spent_at). Measured, not estimated: BootInvite always emits spent_at (a zero time.Time cannot be omitempty-ed) — internal/keria/invite.go:56-70 — and jsonstore.File.Save writes json.MarshalIndent(v, "", " ") — internal/jsonstore/jsonstore.go:104. A throwaway probe against NewFileBootInvites minting one founder (bootstrap) invite with nanosecond stamps gives 295 unspent / 326 spent.
  3. The gate spends what it accepts. CheckBootToken sets Spent and saves before returning nil (internal/keria/invite.go:155-178). An unspent boot-1 therefore proves the denied /boot did not carry boot-1's token: the loop matched nothing and fell through to ErrBootDenied (internal/keria/invite.go:39), which bootGateVerify words as the observed Problem (internal/controlapi/authgate.go:188-196).

The boot went out tokenless. The attach side is sound and can be ruled out: the request reached keria-boot.rehearsal-b.idss.nz (the gate answered it), and withBootToken attaches on exactly that origin (app/src/lib/keri/bootToken.ts:30-44 against keriDoorEndpoints, app/src/lib/identityLegs.ts:403-409). What is left is KERIClient.bootToken === null, i.e. the app held no token — app/src/lib/keri/client.ts:178-181 boots bare in that case.

Why the app held no token

FoundingStandup.vue starts the identity legs the moment carrierDoorsLive flips, and that computed is true as soon as st.deploy?.outcome === 'live' (app/src/components/founding/FoundingStandup.vue:800-804, watcher at :840-850). The deploy completed at 10:03:27.037 (logs/founding-state.log, standup.events: "gateway deploy complete — the control plane is live"). The invite was minted at 10:03:51.540 — 24.5 s later, as the last stage of seeding (internal/founding/seed.go:315-321; standup.seed.log[4], stage founder-boot).

startIdentityLegs awaits founderBootToken() first (:855-862), and that helper catches everything and returns undefined (:866-872) — so a token that is merely not ready yet is indistinguishable from "no gated door here" (kanidm / off-shell), and the legs boot bare into a door that is gated.

Reconstruction, consistent with every timestamp: the legs start at 10:03:27; the op reaches fleetwire.FounderBoot.MintBootInvite, whose settle loop is 10 attempts × 2 s against the guest control-plane API forward (internal/fleetwire/founderboot.go:97-121) — that forward is the seed's, and seeding had not started; the loop exhausts ≈10:03:47 and errors; the catch discards it; the tokenless /boot 403s; seeding then mints boot-1 at 10:03:51.540, which nothing ever presents. The exact reason the fetch failed is not recorded anywhere in this run — the catch throws it away — which is itself the first thing to fix.

Note internal/founding/seed.go:310-314 already anticipates this: it treats a seed-time mint failure as non-fatal because "the app's pre-boot fetch re-mints … just before the legs boot". That contract only holds if the app's fetch happens after seeding and is allowed to fail loudly; today it happens ~24 s before, and fails silently.

Suspected layer

Renderer sequencing in the operator app (app/src/components/founding/FoundingStandup.vue), not the gate. internal/keria, internal/controlapi and the Caddy /boot route all behaved exactly as specified.

What plugging it needs

A ruling on which of these is the shape (they are not exclusive):

  • (a) Sequencing. Gate the identity legs on the founding having reached seeded/hand-off rather than on deploy.outcome === 'live', so the invite exists before the first /boot. ADR 0212's amendment says the invite is minted at seeding and "held for the identity legs' first /boot", which reads as prescribing exactly this order — but it moves when the four S7x rows appear relative to the carrier rows, which is a DDR 0144 / wireframe-contract question, hence the ruling.
  • (b) Honesty. Stop swallowing at FoundingStandup.vue:866-872. On the IDIP path a failed token fetch must red your-identity with the fetch's own reason (ADR 0088 — a fault is never silently continued past), instead of degrading to a tokenless boot whose 403 names the door rather than the missing invite. Keep the tokenless fallback for the kanidm / off-shell path only, where the face is genuinely unwired (founding.ErrFounderBootUnavailable is distinguishable).
  • Either way, the app-side fetch must be the retry closest to use, per the contract internal/founding/seed.go:310-314 already assumes.

Verification is a re-drive: this cannot be proven on the workstation (the boot door only exists on a stood-up droplet). A vitest can pin the watcher condition and the no-swallow behaviour at the seam, but not the live ordering.

A second, distinct defect in this same run's evidence

The community witness never started, for the entire run, and the drive still reported it live.

  • keri-witness.service died at every attempt with ERR: Need 23 more chars. then status=255/EXCEPTION (logs/droplet-journal.txt:539-541, and again at :1939-1940 on the post-flip start). Port 5642 never listened — logs/droplet-units.txt ss -tlnp has no 5642, and keri-health-wait curls it unsuccessfully from 10:00:45 straight through 10:04:11.
  • Cause: the salt generator mints a random 21-char alphanumeric string (internal/clan/keri.go:495-496, commented "A 21-char qb64 salt is what kli --salt expects" at :490) and feeds it to kli init --salt (internal/clan/keri.go:440). That is not valid CESR qb64 — keripy reads the leading char as the code and then finds the string short. The previous drive 20260829T065250Z shows the same generator failing with the sibling error ERR: Unsupported code =a. (logs/droplet-journal.txt:471), which is the same defect with a different random first character. GOTCHAS #5 makes re-minting a witness identity a ruled decision, so this needs its own call (fix the generator vs. a rotation generator).
  • And the drive is told none of it: identity-service is hardcoded status: 'done' with evidence "KERIA + witness + sign-in door live (door probe passed)" (app/src/lib/identityLegs.ts:216-224), while the door probe it leans on only checks id.<apex> and the portal apex over TLS (internal/founding/deploy.go, #499) and never touches the witness. That row asserted a live witness that was dead the whole run.

This one does not cause the red above — your-identity dies at the door, before any witnessing — but it is the very next wall: createAID needs witness receipts. Worth plugging in the same arc so a re-drive does not spend another droplet to find it.

drive 20260829T095444Z red at identity-rows: identity row your-identity failed: the KERIA boot door refused this agent (403): {"code":"boot_denied","message":"the invite token is not a live, unspent invite"}
evidence: /home/dev/swarm/Matou/idss/test-results/drive-idip/20260829T095444Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure Drive `20260829T095444Z` (commit `e1a8cdcb`) reds at leg 13 of 13, `identity-rows`; every carrier leg is green. > identity row your-identity failed: the KERIA boot door refused this agent (403): `{"code":"boot_denied","message":"the invite token is not a live, unspent invite"}` `artifacts/legs.json` (last record), `artifacts/verdict.json` (`firstRedLeg: identity-rows`). Same leg and same signature (`facdb1c80cf1`) as drive `20260829T065250Z`. #968 (`08e9bbcc`) landed between the two and did change the *presentation* — the door's real 403 now reaches the row instead of the `agent does not exist for controller …` mask — but the founder's first `/boot` is still not authorized. ## The invite was minted, and it was never presented 1. **Exactly one invite was minted in the whole run, at seeding.** `logs/droplet-journal.txt:1962` — `10:03:51.540 … msg="idip invite minted" id=boot-1 operator="founder (bootstrap)"`. Grepping the full 244 KB journal for `invite` returns that one line, so there was no earlier mint. 2. **That invite was never spent.** The end-of-run listing at `logs/droplet-journal.txt:2028` shows `-rw------- 1 root root 295 Aug 29 10:03 /var/lib/idss/keria/boot-invites.json`. 295 bytes is exactly the *unspent* one-invite document; the spent form is 326 (the extra `"spent": true,` line plus a real `spent_at`). Measured, not estimated: `BootInvite` always emits `spent_at` (a zero `time.Time` cannot be `omitempty`-ed) — `internal/keria/invite.go:56-70` — and `jsonstore.File.Save` writes `json.MarshalIndent(v, "", " ")` — `internal/jsonstore/jsonstore.go:104`. A throwaway probe against `NewFileBootInvites` minting one `founder (bootstrap)` invite with nanosecond stamps gives 295 unspent / 326 spent. 3. **The gate spends what it accepts.** `CheckBootToken` sets `Spent` and saves *before* returning nil (`internal/keria/invite.go:155-178`). An unspent `boot-1` therefore proves the denied `/boot` did not carry `boot-1`'s token: the loop matched nothing and fell through to `ErrBootDenied` (`internal/keria/invite.go:39`), which `bootGateVerify` words as the observed Problem (`internal/controlapi/authgate.go:188-196`). The boot went out **tokenless**. The attach side is sound and can be ruled out: the request reached `keria-boot.rehearsal-b.idss.nz` (the gate answered it), and `withBootToken` attaches on exactly that origin (`app/src/lib/keri/bootToken.ts:30-44` against `keriDoorEndpoints`, `app/src/lib/identityLegs.ts:403-409`). What is left is `KERIClient.bootToken === null`, i.e. the app held no token — `app/src/lib/keri/client.ts:178-181` boots bare in that case. ## Why the app held no token `FoundingStandup.vue` starts the identity legs the moment `carrierDoorsLive` flips, and that computed is true as soon as `st.deploy?.outcome === 'live'` (`app/src/components/founding/FoundingStandup.vue:800-804`, watcher at `:840-850`). The deploy completed at **10:03:27.037** (`logs/founding-state.log`, `standup.events`: "gateway deploy complete — the control plane is live"). The invite was minted at **10:03:51.540** — 24.5 s later, as the *last* stage of seeding (`internal/founding/seed.go:315-321`; `standup.seed.log[4]`, stage `founder-boot`). `startIdentityLegs` awaits `founderBootToken()` first (`:855-862`), and that helper catches **everything** and returns `undefined` (`:866-872`) — so a token that is merely *not ready yet* is indistinguishable from "no gated door here" (kanidm / off-shell), and the legs boot bare into a door that is gated. Reconstruction, consistent with every timestamp: the legs start at 10:03:27; the op reaches `fleetwire.FounderBoot.MintBootInvite`, whose settle loop is 10 attempts × 2 s against the guest control-plane API forward (`internal/fleetwire/founderboot.go:97-121`) — that forward is the seed's, and seeding had not started; the loop exhausts ≈10:03:47 and errors; the `catch` discards it; the tokenless `/boot` 403s; seeding then mints `boot-1` at 10:03:51.540, which nothing ever presents. The exact reason the fetch failed is **not recorded anywhere in this run** — the `catch` throws it away — which is itself the first thing to fix. Note `internal/founding/seed.go:310-314` already anticipates this: it treats a seed-time mint failure as non-fatal because "the app's pre-boot fetch re-mints … just before the legs boot". That contract only holds if the app's fetch happens *after* seeding and is allowed to fail loudly; today it happens ~24 s before, and fails silently. ## Suspected layer Renderer sequencing in the operator app (`app/src/components/founding/FoundingStandup.vue`), not the gate. `internal/keria`, `internal/controlapi` and the Caddy `/boot` route all behaved exactly as specified. ## What plugging it needs A ruling on which of these is the shape (they are not exclusive): - **(a) Sequencing.** Gate the identity legs on the founding having reached `seeded`/`hand-off` rather than on `deploy.outcome === 'live'`, so the invite exists before the first `/boot`. ADR 0212's amendment says the invite is minted at seeding and "held for the identity legs' first `/boot`", which reads as prescribing exactly this order — but it moves *when* the four S7x rows appear relative to the carrier rows, which is a DDR 0144 / wireframe-contract question, hence the ruling. - **(b) Honesty.** Stop swallowing at `FoundingStandup.vue:866-872`. On the IDIP path a failed token fetch must red `your-identity` with the fetch's own reason (ADR 0088 — a fault is never silently continued past), instead of degrading to a tokenless boot whose 403 names the door rather than the missing invite. Keep the tokenless fallback for the kanidm / off-shell path only, where the face is genuinely unwired (`founding.ErrFounderBootUnavailable` is distinguishable). - Either way, the app-side fetch must be the retry closest to use, per the contract `internal/founding/seed.go:310-314` already assumes. Verification is a re-drive: this cannot be proven on the workstation (the boot door only exists on a stood-up droplet). A vitest can pin the watcher condition and the no-swallow behaviour at the seam, but not the live ordering. ## A second, distinct defect in this same run's evidence The community witness never started, for the entire run, and the drive still reported it live. - `keri-witness.service` died at every attempt with `ERR: Need 23 more chars.` then `status=255/EXCEPTION` (`logs/droplet-journal.txt:539-541`, and again at `:1939-1940` on the post-flip start). Port 5642 never listened — `logs/droplet-units.txt` `ss -tlnp` has no 5642, and `keri-health-wait` curls it unsuccessfully from 10:00:45 straight through 10:04:11. - Cause: the salt generator mints a random **21-char alphanumeric** string (`internal/clan/keri.go:495-496`, commented "A 21-char qb64 salt is what kli --salt expects" at `:490`) and feeds it to `kli init --salt` (`internal/clan/keri.go:440`). That is not valid CESR qb64 — keripy reads the leading char as the code and then finds the string short. The previous drive `20260829T065250Z` shows the same generator failing with the sibling error `ERR: Unsupported code =a.` (`logs/droplet-journal.txt:471`), which is the same defect with a different random first character. GOTCHAS #5 makes re-minting a witness identity a ruled decision, so this needs its own call (fix the generator vs. a rotation generator). - And the drive is told none of it: `identity-service` is hardcoded `status: 'done'` with evidence "KERIA + witness + sign-in door live (door probe passed)" (`app/src/lib/identityLegs.ts:216-224`), while the door probe it leans on only checks `id.<apex>` and the portal apex over TLS (`internal/founding/deploy.go`, #499) and never touches the witness. That row asserted a live witness that was dead the whole run. This one does not cause the red above — `your-identity` dies at the door, before any witnessing — but it is the very next wall: `createAID` needs witness receipts. Worth plugging in the same arc so a re-drive does not spend another droplet to find it. drive `20260829T095444Z` red at `identity-rows`: `identity row your-identity failed: the KERIA boot door refused this agent (403): {"code":"boot_denied","message":"the invite token is not a live, unspent invite"}` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-idip/20260829T095444Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: facdb1c80cf1 -->
Author
Member

Close report — landed, offline-proven (ADR 0174)

Commit: c2a88de3 (founding+clan: #981 — …), pushed to main.

Root cause (confirmed against every timestamp in the drive)

The founder's first /boot went out tokenless. The identity legs started on deploy.outcome === 'live' (10:03:27) — but the founder's single-use boot invite is minted at seeding (10:03:51, ~24 s later), and the guest-trust control-plane API forward the token fetch rides is seeding's own, so it wasn't up yet either. The app's pre-boot fetch therefore found no invite, and founderBootToken()'s catch swallowed the miss to undefined, so the legs booted the invite-gated door bare and 403'd boot_denied. The gate, internal/keria, internal/controlapi and the Caddy route all behaved exactly as specified — this was renderer sequencing.

Fix (three parts; the ticket's (a) and (b), plus the second, distinct defect)

  • (a) Sequencing — FoundingStandup.vue carrierDoorsLive gates the legs on seeded/hand-off, no longer on deploy.outcome === 'live', so the invite exists and the forward is up before the first /boot. Ruled: seeded is strictly after the doors are live, so the p1-s7x wireframe contract (the four S7x rows appended once the doors are up) holds and the DDR 0144 row-order concern does not bite — a two-way, render-only door.
  • (b) Honesty (ADR 0088) — the founder-boot-token bridge op now distinguishes an unwired face (kanidm / off-shell: ok with no token → the app boots bare, correct where the door is ungated) from a real mint failure (ok:false → the app reds your-identity with the mint's own reason). FoundingClient.founderBootToken() returns string | undefined, the swallow helper is deleted, and KERIClient.bootToken accepts a lazy provider resolved at the boot itself (the retry closest to use, per the contract seed.go:310-314 assumes) — a provider throw fails the boot loud, undefined boots bare.
  • (c) Witness salt (the second defect) — renderKeriWitnessSalt minted a 21-char random alphanumeric that keripy's kli init --salt rejects as a bad CESR derivation code (ERR: Unsupported code / Need 23 more chars, status=255, :5642 never listened — the witness was dead the whole run). Now mints a valid Salt_128 (0A) qb64 exactly as keripy's own encoder does (0A + url-safe-base64 of two zero bytes ‖ 16 random bytes, sliced). Ruled (the ticket's own call: fix-the-generator vs. rotation-generator): fixed in place — the witness never incepted, so there is no published witness AID to protect and GOTCHAS #5's rotation hazard is absent. GOTCHAS #124.

Proof (red-first, entirely offline)

  • Go bridge-dispatch tests: unavailable→ok-no-token, mint-failure→fails-loud, wired→token (internal/founding/founderboot_test.go).
  • App vitest: the lazy provider is resolved at the boot (not construction), a provider throw fails the boot loud before any fetch wrapper, undefined boots bare (tests/unit/keri/founderBoot.test.ts); the client's three outcomes (tests/unit/founding.test.ts).
  • Clan render test runs the generator 30× and qb64-DECODES each salt (assertValidSalt128) — a bare random string fails every clause.
  • go build/vet/gofmt/go test ./internal/clan ./internal/founding + app vue-tsc/eslint/full vitest green. (The sole vitest red is boot.test.ts's CGO go build on this gcc-less host — pre-existing and unrelated; CGO_ENABLED=0 builds the helper clean.)

Live proof (the residue this session cannot reach)

The boot door only exists on a stood-up droplet, so the fix is verified by the next IDIP re-drive of #788 (a two-way-door session does not burn a full founding drive). If it reds again at the same sig facdb1c80cf1, the rehearsal healer re-files.

Split out (filed, not guessed)

#983 — the identity-service row is hardcoded done claiming the witness live while the door probe only checks the apex TLS (#499); it asserted a dead witness the whole run. Making done earned needs a witness probe — its own honesty ruling.

Ruled by agent under ADR 0174 — revertible renderer + generator fixes proven at every offline seam; veto anytime.

## Close report — landed, offline-proven (ADR 0174) **Commit:** `c2a88de3` (`founding+clan: #981 — …`), pushed to `main`. ### Root cause (confirmed against every timestamp in the drive) The founder's first `/boot` went out **tokenless**. The identity legs started on `deploy.outcome === 'live'` (10:03:27) — but the founder's single-use boot invite is minted at **seeding** (10:03:51, ~24 s later), and the guest-trust control-plane API forward the token fetch rides is seeding's own, so it wasn't up yet either. The app's pre-boot fetch therefore found no invite, and `founderBootToken()`'s `catch` **swallowed** the miss to `undefined`, so the legs booted the invite-gated door bare and 403'd `boot_denied`. The gate, `internal/keria`, `internal/controlapi` and the Caddy route all behaved exactly as specified — this was renderer sequencing. ### Fix (three parts; the ticket's (a) and (b), plus the second, distinct defect) - **(a) Sequencing** — `FoundingStandup.vue` `carrierDoorsLive` gates the legs on `seeded`/`hand-off`, no longer on `deploy.outcome === 'live'`, so the invite exists and the forward is up before the first `/boot`. **Ruled:** `seeded` is strictly *after* the doors are live, so the p1-s7x wireframe contract (the four S7x rows appended once the doors are up) holds and the DDR 0144 row-order concern does not bite — a two-way, render-only door. - **(b) Honesty (ADR 0088)** — the `founder-boot-token` bridge op now distinguishes an **unwired face** (kanidm / off-shell: `ok` with no token → the app boots bare, correct where the door is ungated) from a **real mint failure** (`ok:false` → the app reds `your-identity` with the mint's own reason). `FoundingClient.founderBootToken()` returns `string | undefined`, the swallow helper is deleted, and `KERIClient.bootToken` accepts a **lazy provider** resolved *at the boot itself* (the retry closest to use, per the contract `seed.go:310-314` assumes) — a provider throw fails the boot loud, `undefined` boots bare. - **(c) Witness salt** (the second defect) — `renderKeriWitnessSalt` minted a 21-char random alphanumeric that keripy's `kli init --salt` rejects as a bad CESR derivation code (`ERR: Unsupported code` / `Need 23 more chars`, `status=255`, `:5642` never listened — the witness was dead the whole run). Now mints a valid **Salt_128 (`0A`) qb64** exactly as keripy's own encoder does (`0A` + url-safe-base64 of two zero bytes ‖ 16 random bytes, sliced). **Ruled** (the ticket's own call: fix-the-generator vs. rotation-generator): fixed **in place** — the witness never incepted, so there is no published witness AID to protect and GOTCHAS #5's rotation hazard is absent. GOTCHAS #124. ### Proof (red-first, entirely offline) - Go bridge-dispatch tests: unavailable→ok-no-token, mint-failure→fails-loud, wired→token (`internal/founding/founderboot_test.go`). - App vitest: the lazy provider is resolved at the boot (not construction), a provider throw fails the boot loud before any fetch wrapper, `undefined` boots bare (`tests/unit/keri/founderBoot.test.ts`); the client's three outcomes (`tests/unit/founding.test.ts`). - Clan render test runs the generator 30× and **qb64-DECODES** each salt (`assertValidSalt128`) — a bare random string fails every clause. - `go build`/`vet`/`gofmt`/`go test ./internal/clan ./internal/founding` + app `vue-tsc`/`eslint`/full `vitest` green. (The sole vitest red is `boot.test.ts`'s CGO `go build` on this gcc-less host — pre-existing and unrelated; `CGO_ENABLED=0` builds the helper clean.) ### Live proof (the residue this session cannot reach) The boot door only exists on a stood-up droplet, so the fix is verified by the **next IDIP re-drive of #788** (a two-way-door session does not burn a full founding drive). If it reds again at the same sig `facdb1c80cf1`, the rehearsal healer re-files. ### Split out (filed, not guessed) **#983** — the `identity-service` row is hardcoded `done` claiming the witness live while the door probe only checks the apex TLS (#499); it asserted a dead witness the whole run. Making `done` earned needs a witness probe — its own honesty ruling. Ruled by agent under ADR 0174 — revertible renderer + generator fixes proven at every offline seam; veto anytime.
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#981
No description provided.