Skip to content

config(sync): disable expiry retirement in prod (undelivered-recording incident) - #22061

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/expiry-retirement-off
Oct 17, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/expiry-retirement-off

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Disable SYNC_BACKFILL_RETIRE_EXPIRED_AT_CLAIM for production backend-sync and backend-sync-backfill so 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 true on 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.

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T19:11:10.918593Z 84fd022 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread config/feature-flags.yaml
- {"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."}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit 1bfacc8 into main Oct 17, 2026
62 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/expiry-retirement-off branch October 17, 2026 19:33
Git-on-my-level added a commit that referenced this pull request Oct 18, 2026
…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.
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