Repository navigation
fix(charts): give the pusher the memory fence its finalization path requires - #12443
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_conversationdirectly and never touched the durable-job architecture. Today is the first time the pusher has ever executedfinalize_persisted_conversation— cold activation of a dormant subsystem, not a contract drift. Verified:backend/routers/pusher.py,backend/utils/listen_pusher_session.pyand_claim_finalization_job_txnare byte-identical across6f7c57ac15..6134ebd6cf.Root cause
The pusher chart ships 68 env vars where backend-listen ships 115, and
MEMORY_ENABLEDis among the 50 it lacks. Confirmed against the live cluster:rollout_mode_env_value()fail-closes tooffwhen the flag is unset (backend/config/memory_rollout.py).MemoryService.ensure_canonical_mutation_ready()— called unconditionally and unwrapped by_extract_memories_innerfor every non-discarded conversation — then raisesHTTPException(503, "Memory writes are globally paused").finalizer.pyconverts that toConversationFinalizationError('processing_failed'), and the listen session retries roughly 4x per conversation.Measured distribution in a clean window (23:00–23:10Z, all entries):
HTTPException(this bug)LegalHoldAuthorityUnavailableThis PR fixes the 89.5%. The remainder is a separate, older regression — see below.
Why nothing paged
finalizer.pylogs onlytype(error).__name__. Production emitted ~16k/hour of bareerror=HTTPExceptioncarrying 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, everyBackend-listencritical rule inactive, and no client-side Sentry spike. Audio was captured and transcribed; it simply never became a conversation.The fix
Set
MEMORY_ENABLED=onfor 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 ofprocess_conversation.Failure-Class: FC-rollout-flag-absent-from-a-cohost-of-its-code-path
Deliberately not in this PR
GEMINI_API_KEY,USE_VERTEX_AI,LISTEN_FINALIZATION_ORPHAN_STALE_SECONDSand theFAIR_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()atbackend/database/legal_holds.py:403, reached fromcanonical_memory_adapter.py:2029, requires an activedestructive_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/embeddings404s at the LLM gateway.prod-omi-llm-gatewayruns imagec61d815(2026-08-20), which predates SCA-365: route remaining HTTP LLM surfaces through the gateway #12337's gateway embeddings route;gcp_llm_gateway.ymlis dispatch-only and was never run after that merge. Swallowed atvector_db.py, so not user-visible as an error — butsave_structured_vectorhas 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.