Repository navigation
config(sync): disable expiry retirement in prod (undelivered-recording incident) - #22061
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84fd022fb7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - {"key":"VAD_CACHE_TTL_SECONDS","aliases":[],"kind":"env","lifecycle":"config_switch","surfaces":["backend"],"summary":"Sync VAD Redis segment-cache TTL in seconds; default 86400, accepts 300..86400, invalid values use the default","fail":"closed","owner":"dazheng","created":"2026-10-17","decision":"keep"} | ||
| - {"key":"CONVERSATION_LLM_INPUT_DEDUPE_ENABLED","aliases":[],"kind":"env","lifecycle":"rollout","surfaces":["backend"],"summary":"Reuse notes and L1 for exact successful effective inputs; code/dev off, Train 1 prod sync hosts on","fail":"closed","owner":"dazheng","created":"2026-10-15","decision":"pending","notes":"Includes language, capture dates, rendered prompt context, feedback and prompt/schema implementation. Off restores feature invocations without deleting successful hashes.","review_by":"2026-11-14"} | ||
| - {"key":"SYNC_BACKFILL_RETIRE_EXPIRED_AT_CLAIM","aliases":[],"kind":"env","lifecycle":"rollout","surfaces":["backend"],"summary":"Retire Redis-absent unbound backfill heads before dispatch; code/dev off, prod sync services on","fail":"closed","owner":"dazheng","created":"2026-10-15","review_by":"2026-11-14","decision":"pending","notes":"Train 1: per-job lock and atomic exact ledger release; bounded at 50 per claim and one pending retirement per sweep UID. False restores original dispatch behavior."} | ||
| - {"key":"SYNC_BACKFILL_RETIRE_EXPIRED_AT_CLAIM","aliases":[],"kind":"env","lifecycle":"rollout","surfaces":["backend"],"summary":"Retire Redis-absent unbound backfill heads before dispatch; default and current dev/prod manifests off pending durable redrive guard","fail":"closed","owner":"dazheng","created":"2026-10-15","review_by":"2026-11-14","decision":"pending","notes":"Train 1: per-job lock and atomic exact ledger release; bounded at 50 per claim and one pending retirement per sweep UID. False restores original dispatch behavior."} |
There was a problem hiding this comment.
Remove runbook instructions to re-enable unsafe retirement
The new flag state says retirement must remain off pending a durable redrive guard, but backend/docs/runbooks/sync-two-lane.md lines 52 and 87 still instruct operators to keep this flag true, while backend/docs/runbooks/sync-backfill-concurrency.md line 7 still describes production as enabled. An operator following those rollout instructions could reverse this incident mitigation and again discard undelivered recordings; update the operational runbooks to document the hold and its safe re-enable prerequisite. The generated registry is explicitly only a catalog, so changing this row does not correct the operator guidance.
AGENTS.md reference: backend/AGENTS.md:L134-L134
Useful? React with 👍 / 👎.
…ed levers (#22071) FIRESTORE_READ_LEVERS: singleton_loops 100 -> 0, backfill_task_reads/ historical_scan_memo/ledger_purge_coalesce/people_scan_dedupe 5 -> 0; the seven graduated levers stay 100 (missing keys default OFF, so the literal must stay complete). Generated with avo/firestore-reads/set_levers.py. - singleton_loops: verify UNSAFE at 2026-10-17T20:00Z (five reconcile loops acquired=0, lease starvation); starvation window coincides with sync-owner revision rolls #22061/#22063 (18:20Z/20:26Z) and leases recovered by 21Z, off stands pending lease rework (decision-2026-10-18T00Z-flagoff-five.md). - The four 5% levers: shared guard service backend-sync-backfill exempt only until 2026-10-18T01:00Z with 5xx at 7-8%/h and rising (630->2737/h 15Z-22Z) through sync-owner sequencer rework; evidence ambiguous -> off per loop judgment rules; re-enable at 5% after recovery exonerates. Reviewed by zcode glm-5.3: r1 exec-erupt-ordinary-quote-scrap-observe-reject (singleton-only, SAFE); r2 exec-print-tortoise-fire-panda-sustain-enforce caught replace-mode literal dropping the seven graduated levers (FIX-REQUIRED, fixed by restoring the complete 12-key literal + rebase onto #22066). Contract tests 79/79 green.
Disable
SYNC_BACKFILL_RETIRE_EXPIRED_AT_CLAIMfor productionbackend-syncandbackend-sync-backfillso a deploy preserves the live mitigation. Expiry retirement discarded tens of thousands of undelivered recordings during the sync/backfill incident.Rollback: set the flag to
trueon both services once a durable redrive guard exists.Validation:
nice -n 19 backend/.venv/bin/pytest -q backend/tests/unit/test_sync_reprocess_coalesce.py::test_expired_backfill_retirement_is_disabled_for_prod_sync_hosts— 1 passed.nice -n 19 python3 backend/deploy/compose_runtime_env.py --check— generated manifest is current.Product invariant:
INV-MEM-4.