Skip to content

M3 review: deploy-lock fixes (config-train break-glass, ledger cutover on prod-train) - #23086

Merged
Git-on-my-level merged 1 commit into
integration/legacy-retirefrom
lr/01-m3-lock-fixes
Oct 21, 2026
Merged

Git-on-my-level merged 1 commit into
integration/legacy-retirefrom
lr/01-m3-lock-fixes

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

M3 review (Luna round 2) deploy-lock fixes on integration/legacy-retire. Lead ruling 5f60b3 approved both as within David's B4/B5 naming.

  • .github/workflows/config_train.yml: break-glass now falls back to deploy-backend-stack-<env>, the same lock a break-glass gcp_backend.yml run takes. Both mutate the same Cloud Run services and queues. Before, config-train-prod let two break-glass runs overlap.
  • .github/workflows/sync_ledger_fence_cutover.yml: its own comment requires sharing the backend mutation domain, but B5 moved prod backend deploys to prod-train. After M3 it would have stopped serializing with trains. Prod now takes prod-train. A new break_glass_lock input falls back to the backend stack lock, matching gcp_backend.yml's shape.
  • .github/scripts/check-deployment-concurrency.py:
    • the cutover script (sync_ledger_fence_cutover.py activate-) is now a recognized writer, with a lock contract, and is an audited prod-train writer;
    • config_train's break-glass lock is updated.
    • Result: deployment concurrency policy OK (30 persistent writers).
  • .github/ci-budget.yaml: the cutover trigger change is recorded, with +1 p50 minute and a rationale. check_ci_budget.py --base origin/integration/legacy-retire passes.
  • backend/tests/unit/test_sync_ledger_fence_cutover.py: asserts the new group.

Luna's other two round-2 majors only bite outside legacy on. The lead routed them to gates, not this PR:

  • final-pass ownership outside on: the final-pass-rehome lane;
  • provider-STT sweep pagination: the provider_stt_live gate.

Failure-Class: none

View guided diff Turn on auto-fix

…the backend stack lock; prod ledger cutover joins prod-train (B5)

- config_train.yml: break-glass falls back to deploy-backend-stack-<env>, the lock a
  break-glass gcp_backend.yml run takes; both mutate the same Cloud Run services and queues.
- sync_ledger_fence_cutover.yml: its comment requires sharing the backend mutation domain,
  but B5 moved prod backend deploys to prod-train. Prod now takes prod-train, with a
  break_glass_lock input that falls back to the backend stack lock (gcp_backend.yml's shape).
- check-deployment-concurrency.py: the cutover script is a recognized writer, has a lock
  contract and is an audited prod-train writer; config_train's break-glass lock updated.
- ci-budget: cutover trigger change recorded (+1 p50 minute, rationale); the cutover
  workflow test asserts the new group.
David named B4/B5; lead ruling 5f60b3 places both inside that naming.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T19:08:52.232970Z 68fe4ab 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: 68fe4abd27

ℹ️ 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".

"gcp_diarizer.yml": "deploy-gke-diarizer-prod",
"gcp_llm_gateway.yml": "deploy-backend-stack-prod",
"gcp_parakeet.yml": "deploy-gke-parakeet-prod",
"sync_ledger_fence_cutover.yml": "deploy-backend-stack-prod",

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 Register the cutover with the prod-train lock reader

When a non-break-glass production cutover is the only prod-train holder, backend/scripts/prod_train_lock.py still omits sync_ledger_fence_cutover.yml from PROD_TRAIN_WORKFLOWS (lines 36–45). That script derives lock state solely by enumerating this set, so it reports the train as free and the ramp controller can advance while the cutover is pausing queues or promoting Cloud Run revisions. Add the cutover workflow path to the reader and its tests together with this new writer registration.

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit 2d4a42d into integration/legacy-retire Oct 21, 2026
25 checks passed
@Git-on-my-level
Git-on-my-level deleted the lr/01-m3-lock-fixes branch October 21, 2026 19:13
Git-on-my-level added a commit that referenced this pull request Oct 21, 2026
## Summary

M3: land the legacy-sync retirement integration branch
(`integration/legacy-retire`, swarm plan
`omi-knowledge-base/projects/backend-target-architecture/swarm-plan.md`,
contracts in `contracts.md`) on main. **Merge with `--merge` (never
squash)**; the lead runs the train from the main merge SHA.

**Prod behaviour after this merge:** prod `legacy_sync` stays `on`.
Every new legacy-retirement path is gated: the ramp document,
default-off flags or kill switches, and the `DRAINING_PRECONDITIONS`
that `ramp_set` enforces before leaving `on`. With the mode `on`,
intake, sync and enrichment keep today's routes.

## M3 gates (lead ruling 6702cc; David authorized the merge, 10-21)

1. **Prep landed:**
- #23068: main b859b78, the ci-budget bump and the dead-code stub
removal;
   - review fixes #23082 and #23086;
- final main merges #23096 (main 34ce402) and #23133 (main 5406315).
2. **Staging tree equality:** `OMI_RELEASE_TREE` on all four `*-staging`
services equals `integration/legacy-retire^{tree}` at this head (see the
evidence section below).
3. **M2 review (GLM, which replaced Grok; ruling 43bd53):**
- CHANGES: 1 P1, fixed in #23082 (provider-STT outbox sweep plus
draining gates).
   - The 2 P2s are recorded below.
- The M1 blocker closure table is in
`data/run-2026-10-19-legacy-retire/review/M3/m1-blocker-closure.md`
(omi-workspace).
4. **Workflows:** all green on this head.
5. **Luna:**
   - Round 1: CHANGES, 2 majors, fixed in #23082.
- Round 2: 4 majors. Two lock fixes are in #23086 (Luna SHIP); two were
routed to dark-step gates.
   - Final-merge resolution: SHIP.

## Dark-step gates and follow-ups (none block M3; prod stays `on`)

- **`provider_stt_live`** (`DRAINING_PRECONDITIONS`): before leaving
`on`, prod needs:
  - the provider-stt queue;
  - the `PROVIDER_STT_TASKS_*` env;
  - the maintenance job;
- pagination or a due-cursor for the provider-STT outbox sweep (Luna
round 2 #4).
- **`legacy_final_pass_rehomed`** (`DRAINING_PRECONDITIONS`, lead ruling
b209a5): conversations still owned by `legacy_final_pass_v1` with no
live legacy job must be re-homed to batch first, and new final-pass
ownership must stop outside `on` (Luna round 2 #3). The
final-pass-rehome lane owns this.
- **GLM P2s:**
- the router's stranded-row 409 loop without `batch_adopts_stranded` is
lane 10 debt;
- BYOK uploads route to batch even with legacy sync `on` (David, 10-19).
This is a release-note item.

## `.github` changes in this PR and David's naming

Source of the naming: swarm-plan.md, lane 7: "B4 and B5 are named
.github changes (fourth round, #9)" (2026-10-19); the checkout-stall
bound (2026-10-20, main 1b07e5e); #22758 build-only mode; lead ruling
209335 (David named B7 and B8 items, 2026-10-21 ~06:05Z).

| File | Change | Named item |
| --- | --- | --- |
| `.github/workflows/config_train.yml` (new) | Config-train: plan/apply
of `backend/deploy/ops`, manual dispatch, prod-train lock;
workflow-level `GIT_HTTP_LOW_SPEED_*` | B4 (+ checkout-stall bound for
the two env lines) |
| `.github/actions/sync-backfill-lifecycle/action.yml` | Prod backfill
queue names come from the ops file; the train no longer reconciles the
prod queue (#22455, #22480) | B4 |
| `.github/workflows/gcp_backend.yml` | `break_glass_lock` input; prod
concurrency group `prod-train` | B5 |
| `.github/workflows/gcp_backend_listen_helm.yml` | same | B5 |
| `.github/workflows/gcp_backend_pusher.yml` | same | B5 |
| `.github/workflows/gcp_parakeet.yml` | same | B5 |
| `.github/workflows/gcp_llm_gateway.yml` | same (every prod deploy
writer shares the lock) | B5 |
| `.github/workflows/gcp_diarizer.yml` | B5 lock lines **plus** B7: OCI
revision/`omi.release.tree` image labels and a batch-worker
`image_digest` promotion path (verified by `check_release_tree.py`) |
B5; B7 (David, ruling 209335) |
| `.github/scripts/check-deployment-concurrency.py` | Guard that
evaluates the new prod-train group expressions | B5 |
| `.github/ci-budget.yaml` | config-train entry (B4); 1 run/day on the
six deploy workflows with `break_glass_lock` (B5); 1.1/day on three
build-only jobs (sync 11, #22758 base) | B4, B5, #22758 |
| `.github/checks-manifest.yaml` | Registers
`backend/scripts/check_release_tree.py` (the B7 promotion gate) | B7
(David, ruling 209335) |
| `.github/scripts/check_duplicate_routes.py` | Counts routers mounted
through `app_roles.mount_routers` (B8 OMI_ROLE map) as mounted | B8
(David, ruling 209335) |
| `.github/scripts/test_pre_push_ci_verified.py` | Test hygiene:
`clean_env` also pops `PRE_PUSH_BASE_BRANCH` and `OMI_PR_BODY_FILE`, so
lane pushes with a non-main base do not leak into the hermetic hook runs
| lead authority, ruling 66dba9 (edits an existing test script; no
workflow added) |
| `.github/scripts/dead_code/backend.allowlist.json` | The 7 swarm
contract-stub entries are removed (L01-4); every file now has importers
| allowlist hygiene (CI script data) |

| `.github/workflows/sync_ledger_fence_cutover.yml` | Prod takes the
`prod-train` lock, with a `break_glass_lock` input that falls back to
the backend stack lock (M3 Luna review) | B5, completing it on a file
that must share the backend mutation domain (lead ruling 5f60b3) |
| `.github/workflows/config_train.yml` (break-glass fallback) |
Break-glass shares `deploy-backend-stack-<env>` with `gcp_backend.yml`
(M3 Luna review) | B4/B5 (lead ruling 5f60b3) |

## Staging tree evidence

Verified 23:33-23:4xZ 10-21, on tier ro-dev:
- **Services:** all four `*-staging` services (`backend-staging`,
`backend-sync-staging`, `backend-sync-backfill-staging`,
`backend-integration-staging`) serve
`8d062ad3cfacf8b7eb26dea737a2969423548e64` at 100%.
- **Tree:** `OMI_RELEASE_TREE=5c398832bc4487066abbf2d49bcf8c6f9a700818`
== `8d062ad3^{tree}`.
- **Image:**
`us-central1-docker.pkg.dev/based-hardware-dev/staging/backend@sha256:18b8cf414566743aaee20bd2559695ec7b4536a75ec609fbc139f008bbf7ecf9`.
- **Batch worker:** `sha256:0954c71c87f5`, 0 replicas. Staging is plain
(no warm instances or overrides).
- **Deploy log:**
`data/run-2026-10-19-legacy-retire/lane01/m3/deploy-final2.log`
(omi-workspace).

## Product invariants affected

INV-DATA-1: integration carries lane 7's (#22430) edits to
`.github/workflows/gcp_*.yml`. They add the `prod-train`
concurrency/lock lines (B5) and, in `gcp_diarizer.yml`, the
worker-digest promotion. No Firebase or Firestore project, auth
authority or serving endpoint changes. Production-family artifacts stay
on `based-hardware`.

## Line-count exceptions

Line-Count-Exception: backend/routers/sync.py | 3881 -> 3966 | lane 10
legacy-dark fence wiring at the legacy call sites (#22495) plus the M3
review fixes (off-loop mode read, final-pass ACK); the file shrinks with
the C6/C11 deletions
Line-Count-Exception: backend/database/firestore_index_registry.py |
2196 -> 2200 | the legacy-dark zero-lost census index
(sync_content_ledger created_at, lost_recordings.py soak check 5)

## Failure class

Integration carries fix commits, and each declares its own class. For
this merge:

Failure-Class: none
UI-Evidence: none -- backend/CI retirement work plus sync merges; the UI
changes are main PRs that carried their own evidence

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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