Status: local readiness documentation only. Production rollout remains BLOCKED / NO-GO and production_rollout_approved=false.
This note makes the canonical users/{uid}/memory_control/state contract explicit after the P1-1 parser hardening. It is local/read-only documentation; it does not mutate Firestore, run provider/cloud calls, approve rollout, or enable production traffic.
Path: users/{uid}/memory_control/state.
Required top-level fields for default memory reads:
uid: exact uid matching the path/authenticated uid. Missing or mismatched uid fails closed withuid_mismatch.schema_version: 1: exact canonical rollout/control schema version. Missing or unsupported versions fail closed withunsupported_rollout_schema.grants: canonical nested consumer grants only.
Canonical grant paths:
grants.mcp.default_memorygrants.developer_api.default_memorygrants.omi_chat.default_memory- optional
grants.mcp.archive - optional
grants.developer_api.archive - optional
grants.omi_chat.archive
Default-memory reads require the matching nested default_memory: true for the exact consumer. Archive remains default-unavailable: .archive is only a separate server-owned capability for explicit Archive read paths and does not make Archive default-visible.
Example canonical document:
uid: memory-schema-readiness-user
schema_version: 1
mode: read
mode_epoch: 7
cutover_epoch: 7
account_generation: 3
fallback_projection_ready: true
persistent_memory_writes_started: true
writes_blocked: false
stage_gates:
shadow: passed
write: passed
read: passed
grants:
mcp:
default_memory: true
developer_api:
default_memory: true
omi_chat:
default_memory: true
archive: true
vector_projection_commit_id: projection-commit-1
vector_repair_outbox_enabled: trueCompatibility/readiness checklist before any migration or rollout stage:
- Inventory existing
users/{uid}/memory_control/statedocs for missinguid, missing/unsupportedschema_version, missinggrants, and non-canonical consumer keys. - Convert valid rollout docs to the canonical schema above with
schema_version: 1before relying on them for default reads. - Do not infer or backfill grants from request scopes, MCP advertised tool metadata, app declarations, top-level legacy alias fields, or client-authenticated state.
- Keep Archive unavailable by default; only explicit Archive reads may consult canonical
.archivecapability after default-read authorization passes. - Run the local static/readiness artifact:
python3 backend/scripts/rollout_schema_readiness.py.
The parser intentionally rejects the following compatibility shapes. These names may appear only in rejected-shape examples/tests/docs, not in canonical rollout examples:
- Missing
schema_version→unsupported_rollout_schema. - Missing or mismatched
uid→uid_mismatch. - Top-level
mcp_default_memory_grantwithoutgrants.mcp.default_memory: true→missing_mcp_default_memory_grant. - Top-level
developer_default_memory_grantordeveloper_api_default_memory_grantwithoutgrants.developer_api.default_memory: true→missing_developer_default_memory_grant. - Top-level
chat_default_memory_grantoromi_chat_default_memory_grantwithoutgrants.omi_chat.default_memory: true→missing_chat_default_memory_grant. - Nested alias
grants.chat.default_memorywithoutgrants.omi_chat.default_memory: true→missing_chat_default_memory_grant. - Nested alias
grants.developer.default_memorywithoutgrants.developer_api.default_memory: true→missing_developer_default_memory_grant.
Global and convergence gates are server-owned controls, separate from per-user rollout docs:
memory_control/global_read_gatememory_control/write_convergence_gate
Reads of these gates use the same bounded Firestore .get(timeout=2.0) helper as users/{uid}/memory_control/state when the SDK supports the timeout argument. Timeout, permission, deadline, or transport exceptions fail closed with explicit low-cardinality reasons: global_read_gate_read_failed denies memory product reads and write_convergence_gate_read_failed keeps legacy write convergence not ready. Missing or malformed gate documents remain explicit fail-closed states (missing_global_read_gate, malformed_global_read_gate, missing_write_convergence_gate, malformed_write_convergence_gate) and do not expose Archive by default or make stale Short-term memory default-visible.
backend/scripts/rollout_schema_readiness.py emits a read-only JSON inventory with:
status: NOT_RUNread_only: truemutation_allowed: falsenetwork_or_provider_calls_executed: falsefirestore_reads_executed: falsefirestore_writes_executed: falsecanonical_schema_version: 1- canonical valid examples for
mcp,developer_api, andomi_chat - rejected legacy examples that are asserted to fail closed by
backend/tests/unit/test_rollout_schema_readiness.py
This artifact is not a production inventory, migration execution, Firestore/IAM proof, benchmark, telemetry sink integration, approval, or cloud/provider validation.