Skip to content

Add encrypted cloud peer recovery and shared cloud MCP - #80

Open
j1philli wants to merge 3 commits into
mainfrom
t3code/assess-encrypted-server-backups
Open

j1philli wants to merge 3 commits into
mainfrom
t3code/assess-encrypted-server-backups

Conversation

@j1philli

@j1philli j1philli commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Adds a separate multi-household cloud peer for encrypted current-state recovery and cloud-only catch-up. Devices transfer data exclusively over WebRTC; the control plane only handles policy, authorization, assignments, and signaling. Shared Store5 repositories own persistence and merge behavior. Cloud MCP uses the shared 18-tool catalog with separately authorized read/write grants and requires trusted-cloud mode.

Merged origin/main with a merge commit (no rebase), preserving finance-space scoping, HTTPS-only signaling, and hosted entitlement checks. Added additive cloud-metadata migration coverage and fixed duplicate peer announcements under concurrent joins.

Do not merge under the Nov 17 authorization. This introduces consent screens and has incomplete end-to-end coverage. No deployment or production configuration was changed.

New user-facing consent / permission controls

  • Trusted-cloud consent dialog: “Allow Shilling to access your cloud data?” with explicit acknowledgment and “Allow cloud access.” Each device must consent.
  • Recovery-key saved confirmation before enabling encrypted cloud sync.
  • Explicit approval of another device before recovery-key transfer, with revocation controls.
  • Cloud MCP has separate API-based client consent and read/write grants. No OAuth or MCP consent UI is implemented.
  • Compose Settings contains the new recovery controls. Main's native SwiftUI iOS Settings does not yet expose them.

New server endpoints

Control-plane server:

  • GET /api/backup/policy
  • POST /api/backup/toggle
  • GET /api/backup/assignments (worker credential)
  • POST /api/backup/mcp/authorize (worker credential; authorization metadata only)
  • WebSocket /ws/backup and /ws/recovery-keys (signaling only)
  • Existing /api/ice-servers additionally supports authenticated backup workers.

Independent cloud worker:

  • GET /health
  • Optional /mcp Streamable HTTP endpoint, requiring separately provisioned client credentials and explicit household grants. Disabled unless configured.

Validation on the merged branch

  • Full JVM tests: ./kotlin test -m core -m shared -m server -p jvm — 242 passed, 5 environment-gated tests aborted/skipped, zero failures (247 discovered).
  • Disposable PostgreSQL / actual Supabase Storage API: SHILLING_TEST_STORAGE_ONLY=1 scripts/test-supabase-backup.sh — 4 passed.
  • In-process real JVM WebRTC over trusted local TLS — both encryption modes and recovery-key transfer pass; forced-TURN variant remains environment-gated in the regular suite.
  • just guard-architecture — passed.
  • Release workflow Python suite — 71 passed.
  • Node security tests, GLib security regressions, npm audits (root and smoke), product version check — passed.
  • Web SQL migration/persistence/rollback and hosted-space SQL policy checks — passed.
  • Server and backup-worker executable JAR packaging — passed. Web/Wasm compilation — passed.
  • Tracked-change secret-pattern scan and git diff --check — passed.

Failed / incomplete paths (merge blockers)

  • scripts/test-live-backup.sh fails before transfer: the fixture's HTTP loopback URL is rejected by the merged HTTPS-only client policy. The process-level fixture needs trusted TLS. Therefore hard-restart recovery, real restore from the durable cloud log/checkpoint, forced TURN, and three-client process-level MCP acceptance are not validated on this merged revision. Earlier pre-merge successes are not counted.
  • Full browser three-client recovery suite was not rerun on the merged revision. Browser receipt-upload UI and non-Chromium engines remain outside that suite.
  • Native iOS recovery controls need a SwiftUI counterpart; Android/iOS protected-key storage and device recovery were not exercised end-to-end here.
  • Finance-space cloud isolation has repository regression coverage; UI-driven space switching during cloud transfer has not been tested end-to-end.
  • Production Supabase TLS/Supavisor configuration, real hosted auth/paid entitlement integration with cloud policy, and a deployed TLS MCP reverse proxy have not been exercised. No production credentials were used or requested.
  • Historical point-in-time backups, service-key rotation/re-encryption, production capacity testing, and desktop MCP transport integration are not implemented/validated by this PR. This is current-state recovery, not historical backup.

GitHub and TeamCity checks must also be green before any future merge, but green checks alone do not override the consent and coverage blockers above.

CI status at handoff: GitHub Architecture/guard is in progress; no TeamCity commit status has been reported for this head. The branch is current with origin/main. The PR remains open regardless of subsequent green checks because of the substantive blockers above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant