Should the Firestore mirror be end-to-end encrypted?
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- Avg merge
- 1h 21m
- Merged PRs (30d)
- 41
Description
Follow-up from the design in `docs/superpowers/specs/2026-08-31-bench-over-firestore-design.md`. Not scheduled — this is the record of a decision, so it is not lost.
## The problem
Once #46 lands, mirroring puts threads, prompts and reports into Firestore. It is the developer's own project and the rules admit exactly one uid, but Google can read it, and a compromised Google account is now a compromised bench. That is a real departure from a tool whose pitch has been that none of this leaves the machine.
## Why it was left in the clear
Slice 2 writes payloads in the clear. That follows from what remote is for here: any device already signed into the account should just work, with nothing to pair and no key to carry. Encryption with a shared key means a new phone pairs rather than simply logs in.
The developer approved the design without picking between the two, so **plaintext is the specialist's assumption, not their instruction.** That is the reason this issue exists.
## What it would take
#46 puts every payload through a single encode function and every read through its inverse, implemented as identity. Turning this on means:
- Establishing a key at pairing time, held on each device and in `~/.bench`.
- Implementing that encode/decode pair with WebCrypto in the browser and `node:crypto` in the daemon.
- A pairing flow for a new device, and a way to recover when a device loses the key.
Roughly a day. Nothing outside the codec and the pairing flow changes — that is what the seam is for.
## Related
- #46 builds the seam.
- Design: `docs/superpowers/specs/2026-08-31-bench-over-firestore-design.md`
Contributor guide
Research direction
Start with the design at docs/superpowers/specs/2026-08-31-bench-over-firestore-design.md and the codec seam from #46. Compare the WebCrypto browser path with node:crypto in the daemon, then map the pairing and key-recovery flow; done means the encryption decision and its impact on new and recovering devices are documented or implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cloud, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100