fix: Move duress off the entries frame (v4.6.4 frame-ceiling root cause) src/shared/vault-adopt.ts:sendVaultSnapshot now sends duress on its own ADOPT_SNAPSHOT frame (chunk_index = entriesChunkCount) after the entries chunks, instead of appending duress_slot to the entries final chunk. Tombstones migrate to the last wire frame: duress frame when duress follows, otherwise the entries final chunk. If the duress frame would push chunk_count past MAX_SNAPSHOT_CHUNKS the duress frame is dropped and sync fills duress later (graceful, never blocks adoption). Receiver unchanged. receiveVaultSnapshot reads duress_slot off any chunk and merges entries/tombstones per chunk, so both shapes decode: - new sender -> old receiver: duress-only frame on iteration N - old sender -> new receiver: duress on the entries final chunk - new sender -> new receiver: duress on its own frame src/shared/vault-adopt.test.ts: T-A33 (regression from d1f501a07784) now passes. Added T-A34 (structural: observed intermediate frames each stay under the 768 KiB SNAPSHOT_FRAME_WIRE_CEILING; combined raw exceeds it) and T-A35 (manually constructed legacy-shape frame with duress on the entries final chunk decodes cleanly). docs/vault-adoption-design.md: three new subsections under Protocol: "Inline vault snapshot (ADOPT_SNAPSHOT)" wire shape + 768 KiB ceiling + 200-chunk cap; "Duress on its own frame (browser v4.6.4+ / Android v2.9.9+)" with the dual-path compat matrix; "Acknowledgement timing" ADOPT_SNAPSHOT_APPLIED waits for all chunks and the optional device manifest before the source reports inline-snapshot success. Gate: tsc --noEmit RC=0; vitest run 138 passed / 1 skipped (139 files) / 3668 tests passed / 40 todo / 0 failed (baseline 3665 + T-A33 + T-A34 + T-A35 = 3668, all green). pnpm run build RC=0 across Chrome Firefox and Mobile; dist manifests report 4.6.4. Coordinated wire change: peach-android v2.9.9 receiver work follows separately; the browser sender is backward-compat in both directions. No version bump (already 4.6.4 from the prior save; this completes the frame-ceiling item in the deferred brief).
$ koh steal kepr.uk/peach-browser@8411b9a63ec4
·
parent: 912fd56a60be
discussion
log in to leave a comment.