Phase 39 · planning only
Server persistence & identity architecture
Footprint for future accounts and selective cloud slices — still zero backend, zero auth wiring. Local snapshot remains today’s source of truth.
Narrative summary
Server persistence plan · anonymous local posture
- Nine persistable slices are catalogued — 7 default private, 1 table-shared ledger posture, 1 host-visible coordination.
- Game-adjacent ledgers sync as ordered facts; coaching preference and BYOC remain user-owned unless future consent flows say otherwise.
- Migration spine emphasizes codec parity, slice-by-slice rollout, and explicit merge surfaces — 7 staged steps in the canonical plan.
- Non-goals lock out backend implementation until reviewers approve: Implementing OAuth connectors, hosted relational adapters, REST handlers, or Next.js mutation endpoints in Phase 39. Live socket transports, push fan-out layers, or multiplayer matchmaking.
Persistable slices
Planning-only catalog — no remote writes. Privacy defaults follow Phase 39 doctrine.
| Slice | Privacy default | Conflict policy | Shareable |
|---|---|---|---|
| onboarding Beginner onboarding ladder | private | server_last_write_wins | No |
| session_progress Session continuity markers | private | append_only_merge | No |
| coaching_preference Coaching depth preference | private | server_last_write_wins | No |
| byoc_references BYOC shorthand & anchors | private | explicit_user_merge_required | No |
| guided_practice Guided practice rack focus | private | device_scope_last_write_wins | No |
| solo_practice_ledger Latest solo practice ledger | private | ledger_sequence_authoritative | No |
| solo_table_ledger Solo / local-bot table ledger | table shared | ledger_sequence_authoritative | Yes |
| private_table_setup Private table salon setup | host visible | server_last_write_wins | Yes |
| replay_reflections Replay reflection taps | private | append_only_merge | No |
Migration steps
- Freeze `schemaVersion` increments with explicit migration scripts — never silently rewrite learner blobs.
- Ship read-only export (JSON) before any write path touches hosted storage — proves codec parity.
- Land identity stub (`signed_in_future`) with zero gameplay mutations — feature-flag server reads per slice.
- Migrate onboarding + coaching preference first — smallest blast radius, easiest rollback.
- Gate BYOC references behind encryption + explicit consent strings — default stays unsynced.
- Introduce solo-table ledger replication only after multiplayer architecture review — append-only validator contract.
- Private-table roster sync remains opt-in per host — merge conflicts surface in UI, never silent overwrite.
Privacy principles
- Local snapshot remains the rehearsal source of truth until learners opt into cloud continuity.
- BYOC notes and coaching overlays default private — table transports carry ledger facts, not notebooks.
- Host-visible slices expose coordination metadata only — never substitute for participant consent.
- Ledger sequences beat narrative overlays — conflicts resolve by authoritative event order later.
Phase 39 non-goals
- Implementing OAuth connectors, hosted relational adapters, REST handlers, or Next.js mutation endpoints in Phase 39.
- Live socket transports, push fan-out layers, or multiplayer matchmaking.
- Payments, tournaments, marketplace hooks, stakes, or wagering metadata.
- Digitizing official NMJL card typography into persisted payloads.
Next gate: Phase 40 chooses providers and minimum account fields — still no implementation until reviewers sign off.