Skip to content

deploy: enable the memory belief model on the development backend (beta dogfood) - #12751

Merged
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:chore/belief-model-dev-enable
Sep 4, 2026
Merged

Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:chore/belief-model-dev-enable

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Turn on the memory belief model (#12701) in the development backend only. Omi Beta on macOS is the production-account dogfood channel and serves its data from the dev backend (DesktopBackendEnvironment.swift), so this is the beta-first rollout lane. Prod stays unset, which the flag treats as off.

MEMORY_BELIEF_MODEL_ENABLED='true' is added beside every dev MEMORY_ENABLED site so the gated code path resolves identically on every host that runs it (FC-rollout-flag-absent-from-a-cohost-of-its-code-path):

  • GKE: backend-listen, pusher (manifest + the Helm values files Helm actually reads)
  • Cloud Run: backend, backend-sync, backend-sync-backfill, backend-integration
  • Jobs: memory-maintenance-job, daily-memory-sweep-job

The flag is declared in _base.yaml as 'false' (category rollout) on the same hosts, so prod carries an explicit off rather than an absence, and the prod backend-listen Helm values mirror that "false". Pusher has no base-level site, so prod pusher stays absent (also off). config/deployment-setting-classification.json classifies the name as config for the secret-boundary ratchet. runtime_env.yaml is recomposed. The deploy validator's Cloud Run state fixture gains the flag wherever MEMORY_ENABLED appears, so a dev deploy that drops it on any host fails validation.

What changes for beta users once deployed

  • New memories carry belief_class / half_life_days; the memory API returns currency, currency_band, as_of.
  • Chat answers built on fading facts carry an "as of" suffix; JIT triggers skip beliefs that are no longer current.
  • Consolidation rejects go to the archive tier as meta_residue instead of being hidden; the TTL lifecycle stops hiding expired short-term rows.
  • Dev and prod share the Firestore project, so rows written by the dev backend gain the two new fields. Prod strips them from API responses while its flag is unset. No status, tier, expires_at, or content changes come from the flag alone.

Existing rows do not decay until classified. Backfill per account with backend/scripts/backfill_belief_classes.py --uid <uid> (dry-run by default; --apply requires the flag in the script's environment).

Verification

  • backend/scripts/check_runtime_env_compose.sh — up to date
  • backend/scripts/pre-deploy-check.sh (offline, as backend-checks runs it) — passes
  • tests/unit/test_backend_runtime_env_validator.py — 99 passed
  • scripts/pr-preflight --pr-body-file — 36 checks passed (desktop Swift compile skipped locally per the FluidAudio pin; CI arbitrates)

Product invariants affected

  • INV-MEM-4 — the runtime manifest changes only add a rollout flag; the flag does not admit new intake to Long-term or Archive, and expired Short-term rows still go through canonical apply (the belief model routes them to archive/meta_residue instead of reject_or_hide).

Rollout

Auto Deploy Backend to Development, pusher (dev), and the sweep job (dev) pick this up on merge. Rollback is reverting this PR; the flag is read at each call boundary, so no data migration is needed either way.

🤖 Generated with Claude Code

Omi Beta serves its data from the dev backend, so this is the beta-first
lane for BasedHardware#12701. MEMORY_BELIEF_MODEL_ENABLED='true' is declared beside every
dev MEMORY_ENABLED site (backend-listen, pusher, backend, backend-sync,
backend-sync-backfill, backend-integration, memory-maintenance-job,
daily-memory-sweep-job) and mirrored into the two Helm values files, so the
gated path resolves identically on every host that runs it. Prod stays
unset, which the flag treats as off.

The deploy validator's Cloud Run state fixture carries the flag wherever
MEMORY_ENABLED appears, so a dev deploy that drops it on any host fails
validation instead of shipping.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 8 files

Confidence score: 5/5

  • backend/deploy/runtime_env.yaml leaves the prod GKE pusher without MEMORY_BELIEF_MODEL_ENABLED, creating an environment-specific rollout inconsistency rather than an immediate functional failure; align its value with the intended prod behavior.
  • backend/deploy/runtime_env/_base.yaml categorizes the new flag as rollout instead of the surrounding memory_rollout category, which could exclude it from category-based tooling or workflows; use the established category if those tools depend on it.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="backend/deploy/runtime_env.yaml">

<violation number="1" location="backend/deploy/runtime_env.yaml:169">
P3: The prod GKE pusher keeps MEMORY_ENABLED='on' but never received MEMORY_BELIEF_MODEL_ENABLED, unlike every other prod host with MEMORY_ENABLED (all got 'false') and unlike the dev pusher (got 'true'). It is functionally equivalent today because an unset flag defaults to off, but it diverges from the declared 'wherever MEMORY_ENABLED appears' coverage and leaves the pusher silently different from the other prod hosts if the flag default ever changes. Add MEMORY_BELIEF_MODEL_ENABLED: value: 'false' (category: rollout) beside the prod pusher MEMORY_ENABLED for consistency with the rest of the rollout.</violation>
</file>

<file name="backend/deploy/runtime_env/_base.yaml">

<violation number="1" location="backend/deploy/runtime_env/_base.yaml:174">
P3: The new MEMORY_BELIEF_MODEL_ENABLED flag is tagged category: rollout, but the sibling MEMORY_ENABLED entry directly above it and all other memory flags in this file use category: memory_rollout. Any tooling or workflow that groups/env-filters memory flags by the memory_rollout category would not include this flag. Use category: memory_rollout to stay consistent with the other memory rollout flags.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

MEMORY_ENABLED:
category: memory_rollout
value: 'on'
MEMORY_BELIEF_MODEL_ENABLED:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The prod GKE pusher keeps MEMORY_ENABLED='on' but never received MEMORY_BELIEF_MODEL_ENABLED, unlike every other prod host with MEMORY_ENABLED (all got 'false') and unlike the dev pusher (got 'true'). It is functionally equivalent today because an unset flag defaults to off, but it diverges from the declared 'wherever MEMORY_ENABLED appears' coverage and leaves the pusher silently different from the other prod hosts if the flag default ever changes. Add MEMORY_BELIEF_MODEL_ENABLED: value: 'false' (category: rollout) beside the prod pusher MEMORY_ENABLED for consistency with the rest of the rollout.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/deploy/runtime_env.yaml, line 169:

<comment>The prod GKE pusher keeps MEMORY_ENABLED='on' but never received MEMORY_BELIEF_MODEL_ENABLED, unlike every other prod host with MEMORY_ENABLED (all got 'false') and unlike the dev pusher (got 'true'). It is functionally equivalent today because an unset flag defaults to off, but it diverges from the declared 'wherever MEMORY_ENABLED appears' coverage and leaves the pusher silently different from the other prod hosts if the flag default ever changes. Add MEMORY_BELIEF_MODEL_ENABLED: value: 'false' (category: rollout) beside the prod pusher MEMORY_ENABLED for consistency with the rest of the rollout.</comment>

<file context>
@@ -166,6 +166,9 @@ environments:
           MEMORY_ENABLED:
             category: memory_rollout
             value: 'on'
+          MEMORY_BELIEF_MODEL_ENABLED:
+            value: 'true'
+            category: rollout
</file context>

Comment on lines +174 to +176
MEMORY_BELIEF_MODEL_ENABLED:
value: 'false'
category: rollout

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The new MEMORY_BELIEF_MODEL_ENABLED flag is tagged category: rollout, but the sibling MEMORY_ENABLED entry directly above it and all other memory flags in this file use category: memory_rollout. Any tooling or workflow that groups/env-filters memory flags by the memory_rollout category would not include this flag. Use category: memory_rollout to stay consistent with the other memory rollout flags.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At backend/deploy/runtime_env/_base.yaml, line 174:

<comment>The new MEMORY_BELIEF_MODEL_ENABLED flag is tagged category: rollout, but the sibling MEMORY_ENABLED entry directly above it and all other memory flags in this file use category: memory_rollout. Any tooling or workflow that groups/env-filters memory flags by the memory_rollout category would not include this flag. Use category: memory_rollout to stay consistent with the other memory rollout flags.</comment>

<file context>
@@ -171,6 +171,9 @@ environment_shared:
         MEMORY_ENABLED:
           category: memory_rollout
           value: 'off'
+        MEMORY_BELIEF_MODEL_ENABLED:
+          value: 'false'
+          category: rollout
</file context>
Suggested change
MEMORY_BELIEF_MODEL_ENABLED:
value: 'false'
category: rollout
MEMORY_BELIEF_MODEL_ENABLED:
value: 'false'
category: memory_rollout

@Git-on-my-level
Git-on-my-level merged commit 6113376 into BasedHardware:main Sep 4, 2026
38 of 40 checks passed
Git-on-my-level added a commit that referenced this pull request Sep 4, 2026
…ing contract (#12759)

#12751 declared the belief-model flag on the dev pusher; the contract test
pins the exact dev pusher literal set and was masked on that PR by the
collection abort fixed in #12757.

Co-authored-by: Claude Fable 5.1 <[email protected]>
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