IDIP drive reds at S6a — --password-store=basic does not make Electron's safeStorage available, so the ceremony's honest keychain refusal stops every drive (#788) #903

Closed
opened 2026-08-27 15:56:56 +00:00 by matou-build-agent · 1 comment

Failure

Drive 20260827T154850Z (target idip, commit 8fe49aea) reds on leg create after 60.8s: artifacts/legs.json leg 3, artifacts/verdict.json firstRedLeg: "create". Legs wizard-precheck and claim are green.

The timeout is app/tests/e2e/fixtures/idip.ts:68 — expect(page.locator('[data-status="install-machine"]')).toBeVisible({timeout: 60_000}) after the S6a create click at idip.ts:67. The S7b install-method screen never arrives.

Why — the app is behaving correctly; the harness is not

The accessibility snapshot in artifacts/journey.idip-*/error-context.md shows the ceremony still on screen (Create · 6 of 7, twelve words, the three prove-it boxes filled) with an error paragraph:

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

That is verbatim app/src/lib/keri/keychainStore.ts:66-70 — the deliberate fail-loud guard (ADR 0195 / ADR 0100) reached via app/src-electron/electron-main.ts:377 (safeStorage.isEncryptionAvailable()), surfaced through the {ok:false,error} envelope at electron-main.ts:391-400 and the preload throw at app/src-electron/electron-preload.ts:66-70. The product is right: the headless drive host has no OS keyring, so it refuses to persist the derived passcode.

The defect: the previous heal is inert

cc82fc3d ("e2e: launch Electron with --password-store=basic") added the flag at app/tests/e2e/fixtures/launch.ts:99-101, with a comment at launch.ts:93-98 claiming "the basic store gives safeStorage a backend on such a host". That claim is false. Probed on this drive host against the exact nix Electron 33.4.11 the drive stages (scripts/stage-e2e-electron.sh, /nix/store/j435aq85r1rly0ad8a21spsshdqafgrm-electron-33.4.11):

launch getSelectedStorageBackend() isEncryptionAvailable() encryptString
no flag basic_text false throws "Encryption is not available"
--password-store=basic basic_text false throws "Encryption is not available"
--password-store=basic + safeStorage.setUsePlainTextEncryption(true) basic_text true round-trips

The host already selected basic_text on its own; the flag changes nothing. Since Electron ≥25 the plaintext backend counts as unavailable unless the app explicitly opts in via safeStorage.setUsePlainTextEncryption(true) (see app/node_modules/electron/electron.d.ts:10781-10787). So cc82fc3d never addressed the red it was written for, and this drive re-fired straight into it.

Also probed: the opt-in works after app.whenReady(), and even after an earlier isEncryptionAvailable() returned false — so a harness-side app.evaluate(...) in launch.ts (beside the existing shell.openExternal stub at launch.ts:~128) is technically sufficient; no production code change is needed to make it effective.

Suspected layer

E2E harness / drive-host provisioning. Not the app: keychainStore.ts, electron-main.ts and the S6a ceremony all behave to contract. No droplet fault — logs/droplet-do-forensics.txt shows the box created, active and answering (tcp/22: a FRESH connect succeeded); the drive never got as far as installing on it. (logs/broker-journal.txt is an expected off-mesh harvest miss, #681; logs/state-logs.log reports no state/logs dir — also downstream of never founding.)

What plugging it needs — one ruling, then a small change

Everything except this choice is settled. The ruling: may the rehearsal drive skip real keychain persistence for an identity secret?

  • A — harness forces plaintext. In app/tests/e2e/fixtures/launch.ts, replace the inert flag with await app.evaluate(({ safeStorage }) => safeStorage.setUsePlainTextEncryption(true)) right after electron.launch, and correct the now-wrong comment at launch.ts:93-98. One file, ~6 lines. Cost: the drive then persists the founder passcode under Electron's hardcoded in-memory key, and the rehearsal stops proving the real safeStorage path an operator's desktop takes — the S6a refusal at keychainStore.ts:66 becomes unreachable on every drive.
  • B — give the drive host a keyring. Run the e2e tier under dbus-run-session with gnome-keyring-daemon unlocked so gnome_libsecret is genuinely selected. Keeps the drive honest end-to-end; needs a package installed on matou-workstation (gnome-keyring-daemon is absent — only /usr/bin/dbus-run-session is present), i.e. infra state outside this checkout, plus a change to the nix develop .#e2e / xvfb wrapper.

Whichever way it goes, cc82fc3d's flag and its comment should be removed or corrected — as written they assert a behaviour this host disproves, and they will mislead the next reader of this red.

Not self-healed because

A is a security-shaped fidelity decision under ADR 0195 / ADR 0100 (whether the rehearsal may store an identity secret under a hardcoded key), B touches infra outside this checkout — and no targeted check on this machine reaches S6a: s6aRecoveryPhraseAndCreate is used only by app/tests/e2e/journey.idip.spec.ts:264, whose verification is a paid droplet drive. The unit seam app/tests/unit/keri/s6aCeremony.test.ts:152-157 asserts the refusal and is green either way.

drive 20260827T154850Z 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/20260827T154850Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure Drive `20260827T154850Z` (target `idip`, commit `8fe49aea`) reds on leg **create** after 60.8s: `artifacts/legs.json` leg 3, `artifacts/verdict.json` `firstRedLeg: "create"`. Legs `wizard-precheck` and `claim` are green. The timeout is `app/tests/e2e/fixtures/idip.ts:68` — `expect(page.locator('[data-status="install-machine"]')).toBeVisible({timeout: 60_000})` after the S6a create click at `idip.ts:67`. The S7b install-method screen never arrives. ## Why — the app is behaving correctly; the harness is not The accessibility snapshot in `artifacts/journey.idip-*/error-context.md` shows the ceremony still on screen (`Create · 6 of 7`, twelve words, the three prove-it boxes filled) with an error paragraph: > `keri/keychain: the OS keychain is unavailable — refusing to persist an identity secret in plaintext` That is verbatim `app/src/lib/keri/keychainStore.ts:66-70` — the deliberate fail-loud guard (ADR 0195 / ADR 0100) reached via `app/src-electron/electron-main.ts:377` (`safeStorage.isEncryptionAvailable()`), surfaced through the `{ok:false,error}` envelope at `electron-main.ts:391-400` and the preload throw at `app/src-electron/electron-preload.ts:66-70`. The product is right: the headless drive host has no OS keyring, so it refuses to persist the derived passcode. ## The defect: the previous heal is inert `cc82fc3d` ("e2e: launch Electron with `--password-store=basic`") added the flag at `app/tests/e2e/fixtures/launch.ts:99-101`, with a comment at `launch.ts:93-98` claiming "the basic store gives safeStorage a backend on such a host". **That claim is false.** Probed on this drive host against the exact nix Electron 33.4.11 the drive stages (`scripts/stage-e2e-electron.sh`, `/nix/store/j435aq85r1rly0ad8a21spsshdqafgrm-electron-33.4.11`): | launch | `getSelectedStorageBackend()` | `isEncryptionAvailable()` | `encryptString` | |---|---|---|---| | no flag | `basic_text` | **false** | throws "Encryption is not available" | | `--password-store=basic` | `basic_text` | **false** | throws "Encryption is not available" | | `--password-store=basic` + `safeStorage.setUsePlainTextEncryption(true)` | `basic_text` | **true** | round-trips | The host already selected `basic_text` on its own; the flag changes nothing. Since Electron ≥25 the plaintext backend counts as *unavailable* unless the app explicitly opts in via `safeStorage.setUsePlainTextEncryption(true)` (see `app/node_modules/electron/electron.d.ts:10781-10787`). So `cc82fc3d` never addressed the red it was written for, and this drive re-fired straight into it. Also probed: the opt-in **works after `app.whenReady()`**, and even after an earlier `isEncryptionAvailable()` returned false — so a harness-side `app.evaluate(...)` in `launch.ts` (beside the existing `shell.openExternal` stub at `launch.ts:~128`) is technically sufficient; no production code change is needed to make it effective. ## Suspected layer E2E harness / drive-host provisioning. Not the app: `keychainStore.ts`, `electron-main.ts` and the S6a ceremony all behave to contract. No droplet fault — `logs/droplet-do-forensics.txt` shows the box created, active and answering (`tcp/22: a FRESH connect succeeded`); the drive never got as far as installing on it. (`logs/broker-journal.txt` is an expected off-mesh harvest miss, #681; `logs/state-logs.log` reports no `state/logs` dir — also downstream of never founding.) ## What plugging it needs — one ruling, then a small change Everything except this choice is settled. The ruling: **may the rehearsal drive skip real keychain persistence for an identity secret?** - **A — harness forces plaintext.** In `app/tests/e2e/fixtures/launch.ts`, replace the inert flag with `await app.evaluate(({ safeStorage }) => safeStorage.setUsePlainTextEncryption(true))` right after `electron.launch`, and correct the now-wrong comment at `launch.ts:93-98`. One file, ~6 lines. Cost: the drive then persists the founder passcode under Electron's hardcoded in-memory key, and the rehearsal stops proving the real `safeStorage` path an operator's desktop takes — the S6a refusal at `keychainStore.ts:66` becomes unreachable on every drive. - **B — give the drive host a keyring.** Run the e2e tier under `dbus-run-session` with `gnome-keyring-daemon` unlocked so `gnome_libsecret` is genuinely selected. Keeps the drive honest end-to-end; needs a package installed on matou-workstation (`gnome-keyring-daemon` is absent — only `/usr/bin/dbus-run-session` is present), i.e. infra state outside this checkout, plus a change to the `nix develop .#e2e` / xvfb wrapper. Whichever way it goes, `cc82fc3d`'s flag and its comment should be removed or corrected — as written they assert a behaviour this host disproves, and they will mislead the next reader of this red. ### Not self-healed because A is a security-shaped fidelity decision under ADR 0195 / ADR 0100 (whether the rehearsal may store an identity secret under a hardcoded key), B touches infra outside this checkout — and no targeted check on this machine reaches S6a: `s6aRecoveryPhraseAndCreate` is used only by `app/tests/e2e/journey.idip.spec.ts:264`, whose verification is a paid droplet drive. The unit seam `app/tests/unit/keri/s6aCeremony.test.ts:152-157` asserts the refusal and is green either way. drive `20260827T154850Z` 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/20260827T154850Z` 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 41504d60: the e2e launcher sets IDSS_E2E_PLAINTEXT_KEYCHAIN=1 and the main process then calls safeStorage.setUsePlainTextEncryption(true) — the only thing that makes isEncryptionAvailable() true on a keyring-less Linux host (--password-store=basic does not, as this ticket found). The product default stays fail-loud (ADR 0195). Closing; #788 re-drives on the fix.

Fixed on `main` at `41504d60`: the e2e launcher sets `IDSS_E2E_PLAINTEXT_KEYCHAIN=1` and the main process then calls `safeStorage.setUsePlainTextEncryption(true)` — the only thing that makes `isEncryptionAvailable()` true on a keyring-less Linux host (`--password-store=basic` does not, as this ticket found). The product default stays fail-loud (ADR 0195). Closing; #788 re-drives on the fix.
ben closed this issue 2026-08-27 15:57:17 +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#903
No description provided.