Repository navigation
fix(deploy): trains stop reverting the recovery queue and the fresh queue re-points - #22460
Conversation
…ueue re-points The 07:07Z train reset batch-quarantine-recovery from the operator's 16/8 (01:27Z) to the action literal 4/4; recovery backed up and the 5% record-lane re-qualification failed. The same train re-pointed backend-sync-backfill (and backend-sync's SYNC_BACKFILL_TASKS_QUEUE) at the sync-backfill queue retired after the 04:52Z stall, and the manifest still named sync-jobs for backend-sync and backend-integration, retired after the 10-18 18:59Z stall. - deploy-backend-stack: recovery queue 16/8 (attempts and backoff unchanged). - prod overlay: SYNC_TASKS_QUEUE=sync-jobs-fresh on backend-sync and backend-integration; SYNC_BACKFILL_TASKS_QUEUE and the backfill worker's SYNC_TASKS_QUEUE = sync-backfill-fresh. runtime_env.yaml regenerated. - sync-backfill-lifecycle: the manifest's queue wins over the sync-backfill default (dev declares none and keeps sync-backfill). - runtime env validator models the lifecycle the same way. Failure-Class: new Co-Authored-By: Claude Opus 5.5 <[email protected]>
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: 279687bba6
ℹ️ 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".
| SYNC_TASKS_QUEUE: | ||
| value: 'sync-jobs' | ||
| value: 'sync-jobs-fresh' |
There was a problem hiding this comment.
Pause the queues that production actually uses
When the protected sync_ledger_fence_cutover.yml is run after this production re-point, sync_ledger_fence_cutover.py still pauses only sync-jobs and sync-backfill via its QUEUES constant. The new sync-jobs-fresh and sync-backfill-fresh queues therefore continue dispatching while the workflow sequentially promotes standby revisions and retires legacy revisions, defeating the barrier that prevents old and new ledger-fencing protocols from overlapping. Update the cutover queue set and runbook alongside these queue-name changes.
Useful? React with 👍 / 👎.
| ENV_OVERLAY: |- | ||
| ${{ inputs.backfill_env_vars }} | ||
| SYNC_TASKS_QUEUE=sync-backfill | ||
| ${{ inputs.backfill_env_vars }} | ||
| SYNC_TASKS_HANDLER_URL=${{ steps.backfill-service.outputs.url }}/v2/sync-jobs/run |
There was a problem hiding this comment.
Reconcile the manifest-selected backfill queue
Although the worker now receives sync-backfill-fresh from this overlay, the later Reconcile bounded sync backfill queue step still describes, creates, and updates the literal sync-backfill queue, and the platform/dispatch invocation is not passed backfill_env_vars. Consequently each deploy applies the calculated concurrency and retry settings to the retired queue while leaving the active queue unmanaged; if the active queue must be recreated or the worker capacity changes, dispatch can fail or retain an unsafe capacity. Resolve the same manifest-selected queue for the reconciliation step.
Useful? React with 👍 / 👎.
Review findings on this PR (Codex): - P1: sync_ledger_fence_cutover paused only sync-jobs and sync-backfill, so in prod the fresh queues that now carry dispatch would keep running through the cutover barrier. Prod now pauses and records all four; dev keeps two. - P2: the backfill queue reconcile still created/updated the retired sync-backfill queue and left the live one unmanaged. The dispatch/platform invocation now receives the manifest env and reconciles the queue it names (prod: sync-backfill-fresh, same 90/15 and 5-60s backoff as today). Failure-Class: FC-deploy-literal-reverts-operator-value Co-Authored-By: Claude Opus 5.5 <[email protected]>
sync) Conflict in .github/actions/sync-backfill-lifecycle/action.yml: main's #22460 and lane 7's B4 (#22455) both stop trains re-pointing backfill at the retired sync-backfill queue. Resolved to one resolution step (ops-queues): prod reads the ops file (fail-closed, lane 7); other projects take the manifest's SYNC_BACKFILL_TASKS_QUEUE/SYNC_TASKS_QUEUE (main), sync-backfill only as default. The queue reconcile step keeps main's manifest-driven queue name. #22460's test is adapted to the single resolution step.
…ue (#22460) main's #22460 moved prod SYNC_TASKS_QUEUE to sync-jobs-fresh, so deleting only the sync-jobs mapping no longer leaves the prod queue unmapped. Unmap both legacy names. Verified: test_staging_overlay.py + test_staging_fence.py 33 passed; staging-mirrors-prod 0 diffs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Prod-track fix that must land before the next backend train: deploys stop reverting operator queue fixes.
Why
733a74a, run 39211633982) resetbatch-quarantine-recoveryfrom the operator's 16/8 (01:27Z) back to the deploy-action literal 4/4.data/run-2026-10-13-two-lane-nemotron/requal-5pct-0819Z.md.prod-operator.post_train_queue.sh):backend-sync-backfill, plus backend-sync'sSYNC_BACKFILL_TASKS_QUEUE, went back tosync-backfill, which was retired after the 10-19 04:52Z stall. Thesync-backfill-lifecycleliteral overrides the manifest.sync-jobsfor backend-sync and backend-integration (SYNC_TASKS_QUEUE), retired after the 10-18 18:59Z stall.What
.github/actions/deploy-backend-stack/action.yml: recovery queue--max-concurrent-dispatches=16 --max-dispatches-per-second=8. Attempts (5) and backoff (5–60s) are unchanged.backend/deploy/runtime_env/prod.overlay.yaml(and the regeneratedruntime_env.yaml):SYNC_TASKS_QUEUE=sync-jobs-freshon backend-sync and backend-integration;SYNC_BACKFILL_TASKS_QUEUE=sync-backfill-freshon backend-sync and backend-sync-backfill;SYNC_TASKS_QUEUE=sync-backfill-fresh.All five are today's live values, so the next train changes nothing live.
.github/actions/sync-backfill-lifecycle/action.yml: the manifest's queue now wins over thesync-backfilldefault. The default moves first in the env overlay, and the backfill handler output reads the manifest value. Dev declares none and keepssync-backfill.backend/scripts/runtime_env_validation/workflows.py: the static validator models the lifecycle the same way.Review fixes (Codex P1/P2, commit 2a583cf):
sync_ledger_fence_cutover.pynow pauses and recordssync-jobs-freshandsync-backfill-freshtoo in prod (dev keeps the two legacy queues), so the cutover barrier covers the queues that carry dispatch. The runbook is updated.sync-backfill-fresh, same 90/15 and 5–60s) instead of the retiredsync-backfill.Docs updated to 16/8 (
batch_pipeline_runtime.md,listen_pusher_pipeline.mdx).This is the ops half of #22233 plus the backfill re-point. #22233 is not the vehicle: its other half codifies
BATCH_PIPELINE_PERCENT=100, which waits for the gate. Onintegration/legacy-retire, lane 7's ops file (backend/deploy/ops/prod.yaml) and config-train take these values over (#22430, #22455).Failure-Class: new
New class
FC-deploy-literal-reverts-operator-value: a deploy re-asserts an older literal over an incident-driven operator value. The prevention is to declare the value in reviewed config the deploy reads, with any remaining literal pinned to the live value by a contract test. No existing class covers deploy-time reversion of operator state (searched the registry for deploy/reset/literal contracts).Product invariants affected
backend/deploy/runtime_env.yamlregenerated). The only changed keys are the sync queue names above; no memory intake, consolidation or projection setting changes.Verification
test_sync_two_lane.py::test_backfill_queue_comes_from_the_manifest_not_a_literalruns the lifecycle step's real bash: a manifest declaringsync-backfill-freshyieldssync-backfill-fresh, and an empty manifest yieldssync-backfill. It also asserts the overlay order so the manifest wins.test_batch_pipeline_recovery_runtime_contract.pypins 16/8;test_sync_reprocess_coalesce.pypinssync-jobs-freshon integration.pytestresults:test_sync_two_lane test_batch_pipeline_recovery_runtime_contract test_sync_reprocess_coalesce test_backend_runtime_env_validator test_render_backend_runtime_env test_cloud_run_live_caps test_cloud_run_forbidden_env_deploy test_batch_pipeline_cohort_config: 435 passed;test_auto_dev_backend_scope test_fleet_deployment test_scheduler_reconcile test_cloud_run_service_identity test_plan_quota_env_retirement test_workflow_contracts: 166 passed.check-deployment-concurrency.py,check-release-process-guards.py,check-direct-backend-production-admission.py,check_feature_flag_registry.py, actionlint: OK.test_sync_ledger_fence_cutover.pywith a prod four-queue barrier case and the live-caps reconcile tests).batch-quarantine-recoveryreads 16/8, and that the serving revisions of backend-sync, backend-integration and backend-sync-backfill carry the fresh queues.Rollback
Revert this PR. The next train then writes 4/4 and the retired queues again, so re-apply
post_train_queue.shand 16/8 by hand as before.🤖 Generated with Claude Code