Context
The sync relay is zero-knowledge: every payload it stores and forwards is an opaque client-side AES-GCM ciphertext (migrations/002_sync.sql, ciphertext BLOB NOT NULL -- AES-GCM(EK, op)). The relay never parses account shapes — it only routes events and snapshots between a user's devices (src/routes/sync.ts, src/store/sync.ts).
Problem
The desktop/extension feature adding linkedDomains to AccountEntry (see Keyfount/desktop and Keyfount/extension) changes the plaintext shape that clients encrypt. Because the relay is content-blind, no server code change is required — but that invariant is currently asserted only implicitly. A regression that made the relay inspect or reject larger/array-bearing payloads would silently break the feature, and nothing guards against it.
Proposed approach
- Add a non-regression test to
test/sync.test.ts that pushes and pulls an opaque blob whose decrypted form would carry a linkedDomains array, asserting the relay stores and returns it byte-for-byte.
- Assert the relay remains agnostic to payload size/content: a larger ciphertext (simulating extra linked domains) round-trips through push → snapshot → pull unchanged.
- Confirm tombstone routing is unaffected (identity is still client-defined and opaque to the relay).
- No schema change, no route change — this issue is tests only, codifying the zero-knowledge contract so the cross-repo feature can rely on it.
Acceptance criteria
Related issues
Context
The sync relay is zero-knowledge: every payload it stores and forwards is an opaque client-side AES-GCM ciphertext (
migrations/002_sync.sql,ciphertext BLOB NOT NULL -- AES-GCM(EK, op)). The relay never parses account shapes — it only routes events and snapshots between a user's devices (src/routes/sync.ts,src/store/sync.ts).Problem
The desktop/extension feature adding
linkedDomainstoAccountEntry(see Keyfount/desktop and Keyfount/extension) changes the plaintext shape that clients encrypt. Because the relay is content-blind, no server code change is required — but that invariant is currently asserted only implicitly. A regression that made the relay inspect or reject larger/array-bearing payloads would silently break the feature, and nothing guards against it.Proposed approach
test/sync.test.tsthat pushes and pulls an opaque blob whose decrypted form would carry alinkedDomainsarray, asserting the relay stores and returns it byte-for-byte.Acceptance criteria
test/sync.test.tscovers an opaque payload round-trip representing alinkedDomains-bearing account (push → pull, byte-identical).npm run lint,npm run typecheckandnpm testpass.Related issues
linkedDomainspayload (browser extension)linkedDomainspayload (desktop/mobile + iOS AutoFill)