IDIP drive cannot pass S6a on a headless drive host — no OS keychain, so the ceremony's fail-loud commit blocks founding #900

Closed
opened 2026-08-27 15:36:33 +00:00 by matou-build-agent · 2 comments

Failure

drive-idip red at leg create (sig b052db2832cd, run test-results/drive-idip/20260827T152913Z, commit 61618ff2). Playwright timed out 60s waiting for [data-status="install-machine"] at app/tests/e2e/fixtures/idip.ts:68; the element never existed because the wizard never advanced past the S6a recovery-phrase ceremony.

Evidence

The error-context accessibility snapshot (report/data/0a5cc9693f93e34f080a73a53abd893fc9e1c62f.md) shows the ceremony still on screen at the ceiling — Create · 6 of 7, twelve words rendered, the three confirm boxes correctly filled by the drive (reward / bind / garage) — with one extra paragraph the happy path does not have:

keri/keychain: the OS keychain is unavailable — refusing to persist an identity secret in plaintext

That is verbatim app/src/lib/keri/keychainStore.ts:68, thrown from requireKeychain() (app/src/lib/keri/keychainStore.ts:65-71) when safe.isEncryptionAvailable() is false. The chain, all working as designed:

  • app/src-electron/electron-main.ts:375-381 wires the real Electron safeStorage into safeStorageKeriStore.
  • idss:keychain-set catches and returns {ok:false,error} (app/src-electron/electron-main.ts:392-401); the preload rethrows it (app/src-electron/electron-preload.ts:70).
  • RecoveryPhraseCeremony.commit() (app/src/lib/foundingCeremony.ts:150-157) calls store.setItem(StoreKeys.passcode, …), so it rejects.
  • FoundingRecoveryPhrase.vue:125-135 — onCreate awaits ceremony.commit() and emits confirmed only on success, by design ("the wizard's create-community can never fire on an unsaved phrase", lines 64-66). The rejection surfaces in the useAsyncGuard error paragraph and founding never starts.

Founding indeed never started: logs/founding-state.log and state/founding-state.json are both still "founded": false, "step": "review"; there is no state/clan-config; artifacts/journey.json is {"rows":null,"fault":null}; logs/droplet-units.txt shows the box with nothing but sshd listening.

Suspected layer — the drive host, not the app

The app's refusal is correct (ADR 0195 §"only the derived passcode is persisted in the OS keychain"; ADR 0100 fail-loud). The defect is that the rehearsal drive host has no OS keychain and nothing in the repo gives Electron one:

  • Drive-host environment (logs/claude-env.txt, checked live on matou-workstation): no DBUS_SESSION_BUS_ADDRESS, no DISPLAY, no XDG_CURRENT_DESKTOP; gnome-keyring-daemon and secret-tool are not on PATH (only dbus-run-session is). Electron 33 (app/package.json:36) therefore reports safeStorage.isEncryptionAvailable() === false.
  • app/tests/e2e/fixtures/launch.ts:93-108 launches Electron with only --user-data-dir; no --password-store, no keyring bring-up. grep across scripts/ and docs/GOTCHAS.md finds no keyring/dbus handling anywhere.
  • This is the FIRST drive to reach keychainStore — every other journey (journey.device, journey.droplet, journey.rented, journey.selfhosted) takes the kanidm S3a path and never touches it. So this is not a regression; the IDIP drive has never been runnable on this host.

This red will re-fire on every IDIP drive until it is plugged, and each one spends a droplet: DO droplet 595638739 (clan-lab-rehearsal-a5f8bd3c, syd1, s-2vcpu-4gb) was created at 15:29:47Z and burned standing still at the S6a gate (logs/droplet-do-forensics.txt).

What plugging it needs

A human ruling between two routes, because they differ in what the drive proves about ADR 0195 and in what they touch:

  1. Give the drive host a real keychain — install gnome-keyring on matou-workstation and wrap the drive in dbus-run-session + an unlocked login keyring, so safeStorage exercises the real libsecret backend. Highest fidelity; touches host infra outside this checkout (root package install) and the harness's executor.
  2. Sanction a non-keychain backend for drives only — pass --password-store=basic in app/tests/e2e/fixtures/launch.ts:93-95 (or call safeStorage.setUsePlainTextEncryption(true) in electron-main.ts behind a drive-only env gate). One or two lines, but it means the passcode is at rest under Chromium's hardcoded key, i.e. the drive stops proving the ADR 0195 guarantee it exists to prove — and route 2b puts an escape hatch in production main-process code.

Whichever route wins should also land a docs/GOTCHAS.md entry (headless Electron ⇒ safeStorage unavailable ⇒ S6a blocks founding), since no existing entry names it.

Secondary (diagnosis quality, not the cause)

s6aRecoveryPhraseAndCreate (app/tests/e2e/fixtures/idip.ts:67-68) waits blind on [data-status="install-machine"] and reports element(s) not found after 60s, discarding the ceremony's own error paragraph that names the cause. identityRowsDone in the same file (app/tests/e2e/fixtures/idip.ts:82-91) already has the right shape — race the success locator against the failure locator and throw its detail text. Worth the same treatment so a future S6a refusal reds in seconds with its reason. Verifiable against app/tests/e2e/fixtures/idip.test.ts.

drive 20260827T152913Z red at create: expect(locator).toBeVisible() failed Locator: locator('[data-status="install-machine"]') Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 60
evidence: /home/dev/swarm/Matou/idss/test-results/drive-idip/20260827T152913Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure `drive-idip` red at leg `create` (sig `b052db2832cd`, run `test-results/drive-idip/20260827T152913Z`, commit 61618ff2). Playwright timed out 60s waiting for `[data-status="install-machine"]` at `app/tests/e2e/fixtures/idip.ts:68`; the element never existed because the wizard never advanced past the S6a recovery-phrase ceremony. ## Evidence The error-context accessibility snapshot (`report/data/0a5cc9693f93e34f080a73a53abd893fc9e1c62f.md`) shows the ceremony still on screen at the ceiling — `Create · 6 of 7`, twelve words rendered, the three confirm boxes correctly filled by the drive (`reward` / `bind` / `garage`) — with one extra paragraph the happy path does not have: > `keri/keychain: the OS keychain is unavailable — refusing to persist an identity secret in plaintext` That is verbatim `app/src/lib/keri/keychainStore.ts:68`, thrown from `requireKeychain()` (`app/src/lib/keri/keychainStore.ts:65-71`) when `safe.isEncryptionAvailable()` is false. The chain, all working as designed: - `app/src-electron/electron-main.ts:375-381` wires the real Electron `safeStorage` into `safeStorageKeriStore`. - `idss:keychain-set` catches and returns `{ok:false,error}` (`app/src-electron/electron-main.ts:392-401`); the preload rethrows it (`app/src-electron/electron-preload.ts:70`). - `RecoveryPhraseCeremony.commit()` (`app/src/lib/foundingCeremony.ts:150-157`) calls `store.setItem(StoreKeys.passcode, …)`, so it rejects. - `FoundingRecoveryPhrase.vue:125-135` — `onCreate` awaits `ceremony.commit()` and emits `confirmed` **only** on success, by design ("the wizard's create-community can never fire on an unsaved phrase", lines 64-66). The rejection surfaces in the `useAsyncGuard` error paragraph and founding never starts. Founding indeed never started: `logs/founding-state.log` and `state/founding-state.json` are both still `"founded": false`, `"step": "review"`; there is no `state/clan-config`; `artifacts/journey.json` is `{"rows":null,"fault":null}`; `logs/droplet-units.txt` shows the box with nothing but sshd listening. ## Suspected layer — the drive host, not the app The app's refusal is correct (ADR 0195 §"only the derived passcode is persisted in the OS keychain"; ADR 0100 fail-loud). The defect is that the rehearsal drive host has no OS keychain and nothing in the repo gives Electron one: - Drive-host environment (`logs/claude-env.txt`, checked live on matou-workstation): no `DBUS_SESSION_BUS_ADDRESS`, no `DISPLAY`, no `XDG_CURRENT_DESKTOP`; `gnome-keyring-daemon` and `secret-tool` are not on `PATH` (only `dbus-run-session` is). Electron 33 (`app/package.json:36`) therefore reports `safeStorage.isEncryptionAvailable() === false`. - `app/tests/e2e/fixtures/launch.ts:93-108` launches Electron with only `--user-data-dir`; no `--password-store`, no keyring bring-up. `grep` across `scripts/` and `docs/GOTCHAS.md` finds no keyring/dbus handling anywhere. - This is the FIRST drive to reach `keychainStore` — every other journey (`journey.device`, `journey.droplet`, `journey.rented`, `journey.selfhosted`) takes the kanidm S3a path and never touches it. So this is not a regression; the IDIP drive has never been runnable on this host. This red will re-fire on every IDIP drive until it is plugged, and each one spends a droplet: DO droplet `595638739` (`clan-lab-rehearsal-a5f8bd3c`, syd1, s-2vcpu-4gb) was created at 15:29:47Z and burned standing still at the S6a gate (`logs/droplet-do-forensics.txt`). ## What plugging it needs A human ruling between two routes, because they differ in what the drive proves about ADR 0195 and in what they touch: 1. **Give the drive host a real keychain** — install `gnome-keyring` on matou-workstation and wrap the drive in `dbus-run-session` + an unlocked login keyring, so `safeStorage` exercises the real libsecret backend. Highest fidelity; touches host infra outside this checkout (root package install) and the harness's executor. 2. **Sanction a non-keychain backend for drives only** — pass `--password-store=basic` in `app/tests/e2e/fixtures/launch.ts:93-95` (or call `safeStorage.setUsePlainTextEncryption(true)` in `electron-main.ts` behind a drive-only env gate). One or two lines, but it means the passcode is at rest under Chromium's hardcoded key, i.e. the drive stops proving the ADR 0195 guarantee it exists to prove — and route 2b puts an escape hatch in production main-process code. Whichever route wins should also land a `docs/GOTCHAS.md` entry (headless Electron ⇒ `safeStorage` unavailable ⇒ S6a blocks founding), since no existing entry names it. ### Secondary (diagnosis quality, not the cause) `s6aRecoveryPhraseAndCreate` (`app/tests/e2e/fixtures/idip.ts:67-68`) waits blind on `[data-status="install-machine"]` and reports `element(s) not found` after 60s, discarding the ceremony's own error paragraph that names the cause. `identityRowsDone` in the same file (`app/tests/e2e/fixtures/idip.ts:82-91`) already has the right shape — race the success locator against the failure locator and throw its detail text. Worth the same treatment so a future S6a refusal reds in seconds with its reason. Verifiable against `app/tests/e2e/fixtures/idip.test.ts`. drive `20260827T152913Z` red at `create`: `expect(locator).toBeVisible() failed Locator: locator('[data-status="install-machine"]') Expected: visible Timeout: 60000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 60` evidence: `/home/dev/swarm/Matou/idss/test-results/drive-idip/20260827T152913Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: b052db2832cd -->
Owner

Fixed on main at cc82fc3d (the #788 bring-up session, 2026-08-27): the e2e launcher (app/tests/e2e/fixtures/launch.ts) now starts Electron with --password-store=basic, giving safeStorage a backend on the headless drive host. The product's refusal stays as it is — it is honest (keychainStore.ts). If a session-runner is mid-way on this, stand down; the next #788 tick re-drives on the fix.

Fixed on `main` at `cc82fc3d` (the #788 bring-up session, 2026-08-27): the e2e launcher (`app/tests/e2e/fixtures/launch.ts`) now starts Electron with `--password-store=basic`, giving safeStorage a backend on the headless drive host. The product's refusal stays as it is — it is honest (keychainStore.ts). If a session-runner is mid-way on this, stand down; the next #788 tick re-drives on the fix.
ben closed this issue 2026-08-27 15:40:40 +00:00
Author
Member

Session-runner tick (matou-workstation): honoured the stand-down — this ticket is already CLOSED and the primary fix landed at cc82fc3d. No re-drive, no reopen.

The two deliverables this ticket named but the fix commit did not land — the docs/GOTCHAS.md entry (headless Electron ⇒ safeStorage unavailable ⇒ S6a blocks founding) and the fail-fast S6a diagnosis in app/tests/e2e/fixtures/idip.ts (race success against a failure locator, like identityRowsDone) — are preserved as follow-up #901 (ready-for-agent), so the residue is not lost.

Ruled by agent under ADR 0174 — veto anytime.

Session-runner tick (matou-workstation): honoured the stand-down — this ticket is already CLOSED and the primary fix landed at cc82fc3d. No re-drive, no reopen. The two deliverables this ticket named but the fix commit did not land — the docs/GOTCHAS.md entry (headless Electron ⇒ safeStorage unavailable ⇒ S6a blocks founding) and the fail-fast S6a diagnosis in app/tests/e2e/fixtures/idip.ts (race success against a failure locator, like identityRowsDone) — are preserved as follow-up #901 (ready-for-agent), so the residue is not lost. Ruled by agent under ADR 0174 — veto anytime.
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#900
No description provided.