Skip to content

fix(charts): give the pusher the memory fence its finalization path requires - #12443

Merged
Git-on-my-level merged 1 commit into
mainfrom
fix/pusher-memory-enabled-env
Aug 30, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
fix/pusher-memory-enabled-env

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Aug 30, 2026 •

Copy link
Copy Markdown
Member

What broke

Live-captured conversations stopped finalizing in production at 2026-08-30T15:21:42Z and are still failing.

The pusher had not deployed since 2026-07-01 (2ae7f78841). #12429 fixed the pre-Helm capacity gate that was failing the lane, and the rollout that followed (Helm applied 15:16:28Z, complete 15:28:51Z) carried two months of change onto a Deployment whose environment was never extended to match.

The old pusher never ran this code. Its opcode-104 handler called process_conversation directly and never touched the durable-job architecture. Today is the first time the pusher has ever executed finalize_persisted_conversation — cold activation of a dormant subsystem, not a contract drift. Verified: backend/routers/pusher.py, backend/utils/listen_pusher_session.py and _claim_finalization_job_txn are byte-identical across 6f7c57ac15..6134ebd6cf.

Root cause

The pusher chart ships 68 env vars where backend-listen ships 115, and MEMORY_ENABLED is among the 50 it lacks. Confirmed against the live cluster:

prod-omi-pusher          68 env vars, zero MEMORY_* vars
prod-omi-backend-listen  115 env vars, MEMORY_ENABLED=on

rollout_mode_env_value() fail-closes to off when the flag is unset (backend/config/memory_rollout.py). MemoryService.ensure_canonical_mutation_ready() — called unconditionally and unwrapped by _extract_memories_inner for every non-discarded conversation — then raises HTTPException(503, "Memory writes are globally paused"). finalizer.py converts that to ConversationFinalizationError('processing_failed'), and the listen session retries roughly 4x per conversation.

Measured distribution in a clean window (23:00–23:10Z, all entries):

Exception Count Share
HTTPException (this bug) 366 89.5%
LegalHoldAuthorityUnavailable 43 10.5%

This PR fixes the 89.5%. The remainder is a separate, older regression — see below.

Why nothing paged

finalizer.py logs only type(error).__name__. Production emitted ~16k/hour of bare error=HTTPException carrying no status code, no detail and no traceback, so the signature read as already-known. The listener itself stayed healthy throughout — WS connections in band, 5/5 ready pods, listen-LB 5xx at zero, every Backend-listen critical rule inactive, and no client-side Sentry spike. Audio was captured and transcribed; it simply never became a conversation.

The fix

Set MEMORY_ENABLED=on for dev and prod pusher, matching backend-listen. It is a plain literal, so it requires no key from the pusher's ExternalSecret — deliberately avoiding the failure class from #12298, where a chart consumed a secret key the ExternalSecret did not enumerate.

The test asserts the contract, not the key: the env a chart ships must resolve to a mode that permits memory writes, and the two co-hosts may not disagree. Against the charts as they stood during the incident it fails with assert 'off' == 'write'.

Failure class

This reopens an existing class. Its prevention artifact, test_conversation_notes_v2_beta_rollout.py, pins three named flags across backend-listen and the Cloud Run backend. It does not generalize to other flags, and it does not know the pusher is now a third host of process_conversation.

Failure-Class: FC-rollout-flag-absent-from-a-cohost-of-its-code-path

Deliberately not in this PR

  • The other 49 missing env vars, including GEMINI_API_KEY, USE_VERTEX_AI, LISTEN_FINALIZATION_ORPHAN_STALE_SECONDS and the FAIR_USE_* set. Real exposure, but several are secret refs and widening them under incident pressure risks the chore(charts): sync SONIOX_API_KEY into backend secrets #12298 class. Needs its own change.
  • LegalHoldAuthorityUnavailable (10.5% of failures) — current_destructive_operation_token() at backend/database/legal_holds.py:403, reached from canonical_memory_adapter.py:2029, requires an active destructive_operation_gate(...) context that this call site never enters. Introduced by feat: add JIT knowledge ledger foundation and guarded adoption #12084, first seen in prod 2026-08-28T01:51:36Z and firing continuously for ~2.5 days on /v1/conversations/from-segments. Independent of this bug and of today's deploy.
  • /v1/embeddings 404s at the LLM gateway. prod-omi-llm-gateway runs image c61d815 (2026-08-20), which predates SCA-365: route remaining HTTP LLM surfaces through the gateway #12337's gateway embeddings route; gcp_llm_gateway.yml is dispatch-only and was never run after that merge. Swallowed at vector_db.py, so not user-visible as an error — but save_structured_vector has been failing silently since ~13:44Z, meaning no conversation created since then has a summary vector in Pinecone, and it will not self-heal without a backfill. Fix is to deploy the gateway, not to change code.

Review in cubic

…equires

Every conversation stopped finalizing in prod at 2026-08-30T15:21:42Z. The
pusher had not deployed since 2026-07-01; #12429 fixed the pre-Helm capacity
gate blocking the lane, and the 15:16:28Z rollout brought two months of code
onto a Deployment whose env was never extended to match. The pusher chart
ships 68 env vars where backend-listen ships 115, and MEMORY_ENABLED is among
the 50 it lacks.

rollout_mode_env_value() fail-closes to `off` when the flag is unset, so
MemoryService.ensure_canonical_mutation_ready() -- called unconditionally by
_extract_memories_inner for every non-discarded conversation -- raised
HTTPException(503). finalizer.py catches it and logs only
type(error).__name__, so prod showed ~16k/hour of bare `error=HTTPException`
carrying no status, no detail and no traceback, which is why the signature
looked already-known and nothing paged on it.

Set MEMORY_ENABLED=on for dev and prod pusher, matching backend-listen. It is
a plain literal, so it needs no key from the pusher ExternalSecret.

The test asserts the contract rather than the key: the env the chart ships
must resolve to a mode that permits memory writes. It fails with
`assert 'off' == 'write'` against the charts as they stood during the incident.

This reopens FC-rollout-flag-absent-from-a-cohost-of-its-code-path. Its
prevention artifact, test_conversation_notes_v2_beta_rollout.py, pins three
named flags across backend-listen and Cloud Run backend; it does not
generalize to other flags or to the pusher as a third host of
process_conversation.

The remaining 49-var gap between the two charts is real and not addressed
here; widening it under incident pressure risks the ExternalSecret failure
class from #12298.

Failure-Class: FC-rollout-flag-absent-from-a-cohost-of-its-code-path

Co-Authored-By: Claude Opus 5 <[email protected]>
@Git-on-my-level
Git-on-my-level merged commit 00a5b4b into main Aug 30, 2026
42 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/pusher-memory-enabled-env branch August 30, 2026 23:58
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