Skip to content

Enable David-only batch quarantine recovery - #21843

Closed
Git-on-my-level wants to merge 18 commits into
mainfrom
batch-recovery-david
Closed

Git-on-my-level wants to merge 18 commits into
mainfrom
batch-recovery-david

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

Declare BATCH_PIPELINE_RECOVERY_MODE and BATCH_PIPELINE_RECOVERY_UID_ALLOWLIST for every backend Cloud Run service and backend-listen, with recovery default-off and an empty allowlist. Enable the gate only on prod backend-integration, where the serving pump runs, and allowlist David's UID. The backend-listen Helm values declare recovery off/empty to satisfy the runtime-env parity contract; the pusher cohost guard marks both vars listen-only.

Purpose: one-time bounded recovery of David's 101 quarantined units, estimated at about 29.9 minutes. The prod gate remains on for future David-cohort quarantines.

Product invariants affected

  • INV-MEM-4: recovered transcript processing keeps the existing canonical consolidation path as the sole authority for Long-term promotion; this config adds no separate promotion route.

Failure-Class: none

Validation

  • Merged current origin/main at 50737e86a7b266572d9b6d881a66a888c7d8ec38 with merge commit fbf71750f860e730d057c3590bc33743c8a7edd2 (no rebase). Regenerated runtime source overlays, composed runtime_env.yaml, passed compose_runtime_env.py --check, and re-rendered the feature flag registry as of 2026-09-24.
  • backend/test.sh: 227 passed across the five targeted backend unit files, including the reported CI failures and the earlier 41 tests.
  • Compared all 32 dev/prod runtime env maps (Cloud Run services and jobs, GKE services, desktop backend, and LLM gateway) against origin/main at 50737e86: 20 additions, zero removals, and zero changed existing entries. Additions are the recovery pair on four Cloud Run services plus backend-listen in each environment. The pair is off/empty everywhere except prod backend-integration, which is on with David's UID.
  • Compared all 26 dev/prod Helm env lists: four additions, zero removals, and zero changed entries; only the two backend-listen lists add recovery off/empty defaults. TRANSCRIPTION_SHADOW_ENABLED is present with the same values in all 7 runtime env maps and all 3 Helm lists where main defines it.

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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-16T19:19:21.505312Z fbf7175 New commits
ℹ️ 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: d1f5c37bcb

ℹ️ 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 on lines +3840 to +3841
BATCH_PIPELINE_RECOVERY_MODE: {value: 'on', category: rollout}
BATCH_PIPELINE_RECOVERY_UID_ALLOWLIST: {value: vi7SA9ckQCe4ccobWNxlbdcNdC23, 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.

P2 Badge Serialize recovery across serving replicas

When this enables recovery on prod backend-integration, the deployment keeps 3–50 instances with CPU unthrottled (.github/actions/deploy-backend-stack/action.yml:805-807), and every instance runs reconcile(recover_quarantine=True) every 20 seconds. The per-segment CAS prevents duplicate work only for the same segment: a replica that encounters another replica's running segment receives held and continues to the next candidate, so several legacy STT calls for David can run concurrently despite the sweep's one-dispatch-per-owner bound. Gate the sweep with a process-external owner/leader lease, or activate recovery only on a singleton worker.

Useful? React with 👍 / 👎.

Comment on lines +3840 to +3841
BATCH_PIPELINE_RECOVERY_MODE: {value: 'on', category: rollout}
BATCH_PIPELINE_RECOVERY_UID_ALLOWLIST: {value: vi7SA9ckQCe4ccobWNxlbdcNdC23, 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.

P2 Badge Provide an authenticated path for manual recovery

When an operator follows the documented rollout procedure and calls POST /v2/batch-pipeline/reconcile, no configured service can perform this recovery: backend-integration is the only host with recovery enabled, but its BATCH_PIPELINE_WORKER_AUDIENCE and BATCH_PIPELINE_WORKER_SERVICE_ACCOUNT are empty, so verify_configured_cloud_tasks_oidc always returns 403; backend-sync has the required OIDC settings but recovery remains off there. This leaves the advertised bounded/manual reconciliation unavailable and makes the continuously running background sweep the only control path; expose an authenticated recovery endpoint on the enabled host or enable recovery on an appropriately authenticated singleton control host.

Useful? React with 👍 / 👎.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Superseded by #21887 (config train T0), which carries this David-only batch quarantine recovery config verbatim (Grok-reviewed from rendered env: recovery on/David only on prod backend-integration). Merged as acfcd8e.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @Git-on-my-level 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

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