make Codex and PeachScript import actually work on a real browser-generated vault — three separate bugs, all invisible to the small Android-generated fixtures that previously passed. (1) Codex page geometry. The importer blind-cropped Android's own private grid (36pt margin, 54pt header, computed square cell) while the canonical Codex page format is the browser's pdf-layout.ts (28pt margin, 44+16pt header, fixed 80pt codes, 112pt row step). A browser Codex therefore decoded 437 of 1709 attempted cells with 0 of 9 stripes ready — looking like a flaky scan rather than a format mismatch. Ported the shared geometry to CodexPageLayout and pointed BOTH the importer and the generator at it, so an Android Codex and a browser Codex are now the same artifact. Real PDF now reads 1978 of 1978 codes and reconstructs: verify code PX-2YVP-KVL6, 806 entries. (2) Codex vault blob shape. restoreFromCodex pulled slot A out of the wrapper with a regex assuming Android's shape — an inline object under 'a' with nothing after it. The browser writes each slot as a JSON *string* and includes 'b', so the regex matched neither and every browser Codex failed with invalid_codex_blob after decoding perfectly. Parses the wrapper as JSON now (no regex — this is the second bug that regex has caused), accepts a slot as either string or object, and carries a real slot B across instead of overwriting it with noise, which would have destroyed a duress vault. Covered by a new test pinning both wrapper shapes. (3) PeachScript file import. A real export is 262k PUA characters and the file path fed all of it through a Compose BasicTextField, which bogs down badly enough to look broken. File content now bypasses the field entirely and goes straight to the decoder; the field is only for hand-pasted text. Verified the codec itself was never at fault via a host-JVM test against the real 262k backup: decodes to 262188 bytes and reports WrongPassword (not corrupted) for a bad password. Also: the paste field rendered PeachScript as Chinese glyphs — PeachScript lives in the PUA block and without its font Android fell back to Noto CJK, which also maps that block. Field now uses PeachType.Script. Final decrypt still unverified here: it needs June's master password, so she completes that step on her device.

dev · 7 weeks ago · 2026-07-24 · 2.6 MB

session: codex + peach import of a real browser vault · agent: claude-opus-5

$ koh steal kepr.uk/peach-android@c7836f5947ee
·
← 8984cc3fac9d 896672fa08f1 →
⇓ download .face