fix: Install the browser duress slot from the adoption snapshot (v2.9.3) Completes the H-04 duress-propagation series (2.9.1/2.9.2). A duress configured on the extension must survive adopting the vault onto Android. The 2.9.0 inline adoption snapshot shipped entries + tombstones but not the duress slot, so phone-pairing adoption silently dropped a configured decoy. The Codex-restore path already carried it (v2.9.2); this wires the same passthrough into the adoption snapshot receiver. Coordinated with peach-browser v4.6.0 (7410c0da42c1). Wire contract (additive, backward-compatible; both ends now shipped): - ADOPT_SNAPSHOT gains optional duress_slot?: string = JSON.stringify of the browser-shaped slot B, identical to the Codex vault_b field. - Final chunk only, and only when the source has duress configured; absent otherwise (never ships noise). Old sources omit it and adopt cleanly. Changes: - sync/VaultAdopt.kt: duress_slot on Snapshot; ReceivedSnapshot result type; sendVaultSnapshot/receiveVaultSnapshot thread it; applySnapshot gains a defaulted duressSlot param. AdoptJson encodeDefaults=false omits a null slot. - vault/VaultRepository.kt: installAdoptedDuressSlot(json) — BrowserSlot.parse, re-encode hex->base64 nonce||ct||tag (the browserDuressPassthrough logic) with NO decrypt, epoch-fenced writeDecoySlot, M-05 zeroing, false on any failure. - sync/RelayAdoptionReceiver.kt: thread snapshot.duressSlot into applySnapshot. - ui/pairing/AdoptVaultViewModel.kt: install after entries+tombstones in an isolated try/catch — a failure is logged and adoption continues (non-fatal). Android-as-source does not yet send its own duress slot (sendVaultSnapshot duressSlot defaults null) — queued follow-up. Verification (orchestrator-independent): testDebugUnitTest + lintDebug + assembleRelease --rerun-tasks BUILD SUCCESSFUL; 117 suites, 833 tests, 0 failures/errors/skips (baseline 825/116, +8 tests +1 suite). AdoptDuressSlotTest proves install -> tryUnlockDuress(duressPassphrase) opens the adopted decoy.
$ koh steal kepr.uk/peach-android@ff6562aacdb4
·
parent: 257fa9d3d1c4
discussion
log in to leave a comment.