Repository navigation
ci: pin listen deploy tree via expected_sha; run hermetic gauntlets on every backend PR - #23960
Merged
Merged
Conversation
…n every backend PR Two .github guards David approved 2026-10-29: 1. gcp_backend_listen_helm.yml: new optional workflow_dispatch input expected_sha. The admission step that already proves prod ancestry now also fails closed unless the checked-out commit contains the pinned full SHA, before any helm/kubectl mutation (the containment rule gcp_backend.yml applies to release_sha; plain cat-file type check per the git 2.54 peeling note). Blank keeps today's unpinned behavior so existing callers keep working; a notice marks unpinned manual dispatches. 2. backend-hermetic-e2e.yml: the Listen Pusher and Sync Cloud Tasks gauntlets now follow the full hermetic scope instead of per-suite path filters. #23919 rewrote sync processing under backend/utils/sync/** and backend/database/**, matched neither per-suite regex, and both gauntlets reported green "skipped" verdicts while main went red unseen. The merge gate aggregation is unchanged: applies=false still expects skipped. ci-budget.yaml refreshed accordingly: gauntlet expected runs 19/13 -> 62/day each (+718 Linux min/day, forecast 14367.4, Linux cap 13660 -> 14380), and the listen workflow's trigger-change bumps record the new dispatch input.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two CI/deploy guards David approved 2026-10-29:
Listen deploy pre-mutation guard (
gcp_backend_listen_helm.yml): new optionalworkflow_dispatchinputexpected_sha. The existing admission step — which alreadyproves prod checkouts are ancestors of fresh
origin/main— now also fails closed unlessthe checked-out commit contains the pinned full SHA, before any helm/kubectl mutation.
This mirrors the containment rule
gcp_backend.ymlapplies torelease_sha(samemalformed/zero-SHA rejection, same version-proof
cat-fileobject check) and the ancestryadmission
gcp_incluster_guards.ymlapplies tosource_sha. Blank keeps today's unpinnedbehavior so every existing caller keeps working; unpinned manual dispatches emit a notice.
Callers that should pass it:
bin/omi-deploy-prod listen SHA/build-only SHA(workspace deploy driver; it already holds the full reviewed SHA) and any manual prod
dispatch of this workflow. Rollout
train.shdoes not dispatch this workflow (it onlyconflict-checks it) and needs no change. Dev chart-only auto-push runs keep the unpinned
default.
Contract gauntlets follow the full backend scope (
backend-hermetic-e2e.yml): theListen Pusher and Sync Cloud Tasks Stack Gauntlets no longer gate on per-suite path
regexes; both run whenever the hermetic scope admits the PR (any
backend/change,package(.lock).json, or this workflow), under the samefull_citier rule. The mergegate aggregation is unchanged —
applies=falsestill expectsskipped, fork deferralstill stays neutral. fix(backend): hold sync full processing until merges settle #23919 rewrote sync processing under
backend/utils/sync/**andbackend/database/**, matched neither per-suite regex, and both gauntlets skipped greenwhile main went red unseen.
CI cost impact
Measured 2026-10-29: Listen Pusher Stack Gauntlet median 8.3 min (n=11 main pushes),
Sync Cloud Tasks Stack Gauntlet median 7.1 min (n=8 PR runs). A backend PR that
previously matched neither filter now adds ~15.3 runner-minutes (~8-9 min wall-clock,
the two jobs run in parallel).
ci-budget.yaml: gauntlet expected runs 19/13 -> 62/day each(matching hermetic-e2e's sampled backend-PR frequency), +718 Linux minutes/day, forecast
14367.4 — Linux cap 13660 -> 14380 with rationale; listen workflow jobs take the one-minute
trigger-change bump.
Product invariants
Failure-Class declaration
Failure-Class: none
Workflow wiring only, no runtime behavior change; no
fix:commit in this PR.Evidence
actionlintclean on both workflows; both parse,check-deployment-concurrency.py,check-direct-backend-production-admission.py,check_ci_budget.py --base origin/mainall pass.
test_listen_pusher_stack_ci_wiring.py(5),test_sync_cloud_tasks_stack_ci_wiring.py(5),test_workflow_contracts.py(94),test_check_unit_test_discovery.py(14) — all pass.fixture repo passes blank/equal/ancestor/dev-env cases and fails closed on non-contained,
short, non-hex, and all-zero SHAs.
backend/) yieldsapplies=truewith both oldper-suite regexes unmatched (gauntlets skipped — the hole); under the new logic both
gauntlets run.
backend/utils/sync/pipeline.pyandbackend/database/**matched the oldsync regex nowhere; non-backend changes stay out of scope.