Skip to content

ci: pin listen deploy tree via expected_sha; run hermetic gauntlets on every backend PR - #23960

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/ghguards
Oct 29, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/ghguards

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

Two CI/deploy guards David approved 2026-10-29:

  1. Listen deploy pre-mutation guard (gcp_backend_listen_helm.yml): new optional
    workflow_dispatch input expected_sha. The existing admission step — which already
    proves prod checkouts are ancestors of fresh origin/main — now also fails closed unless
    the checked-out commit contains the pinned full SHA, before any helm/kubectl mutation.
    This mirrors the containment rule gcp_backend.yml applies to release_sha (same
    malformed/zero-SHA rejection, same version-proof cat-file object check) and the ancestry
    admission gcp_incluster_guards.yml applies to source_sha. Blank keeps today's unpinned
    behavior 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.sh does not dispatch this workflow (it only
    conflict-checks it) and needs no change. Dev chart-only auto-push runs keep the unpinned
    default.

  2. Contract gauntlets follow the full backend scope (backend-hermetic-e2e.yml): the
    Listen 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 same full_ci tier rule. The merge
    gate aggregation is unchanged — applies=false still expects skipped, fork deferral
    still stays neutral. fix(backend): hold sync full processing until merges settle #23919 rewrote sync processing under backend/utils/sync/** and
    backend/database/**, matched neither per-suite regex, and both gauntlets skipped green
    while 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

  • INV-DATA-1

Failure-Class declaration

Failure-Class: none

Workflow wiring only, no runtime behavior change; no fix: commit in this PR.

Evidence

  • actionlint clean on both workflows; both parse, check-deployment-concurrency.py,
    check-direct-backend-production-admission.py, check_ci_budget.py --base origin/main
    all pass.
  • Backend unit shard (test.sh, BACKEND_UNIT_TEST_FILE_LIST):
    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.
  • Guard dry-run: the shipped admit script extracted from the workflow and executed in a
    fixture repo passes blank/equal/ancestor/dev-env cases and fails closed on non-contained,
    short, non-hex, and all-zero SHAs.
  • fix(backend): hold sync full processing until merges settle #23919 replay: its 36-file list (34 under backend/) yields applies=true with both old
    per-suite regexes unmatched (gauntlets skipped — the hole); under the new logic both
    gauntlets run. backend/utils/sync/pipeline.py and backend/database/** matched the old
    sync regex nowhere; non-backend changes stay out of scope.

View guided diff Turn on auto-fix

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

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 🔄 Running since 2026-10-29T07:44:30.919551Z a8595b8 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.

@Git-on-my-level
Git-on-my-level merged commit 64fd648 into main Oct 29, 2026
61 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/ghguards branch October 29, 2026 07:57
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