Repository navigation
ci: add hermetic backend merge gate - #10024
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 446f5a9d63
ℹ️ 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".
| exit 1 | ||
| fi | ||
|
|
||
| changed_files="$(git diff --name-only "$base_sha"...HEAD)" |
There was a problem hiding this comment.
Use the actual PR merge base for scope
For pull_request runs on a PR that has been open while main advanced, github.event.pull_request.base.sha can still be the base SHA recorded for the PR while checkout HEAD is the current PR merge ref. This three-dot diff then includes unrelated files that landed on main after the PR opened; a docs-only PR will set applies=true whenever those intervening changes touched backend/, the lockfiles, or this workflow, so the required gate runs or blocks on heavy backend gauntlets instead of reporting the promised out-of-scope success. Diff against the current PR merge base/merge-commit parents for the scope decision instead.
Useful? React with 👍 / 👎.
|
Reviewed the Codex P2 comment on No code change — the concern does not hold as stated. GitHub's Verified locally with a docs-only PR branch where Check status at review time: |
kodjima33
left a comment
There was a problem hiding this comment.
Backend hermetic merge-gate CI. Approve-only — touches .github CI supply chain (abuse-sensitive); Nik to review.
|
Monitor run summary — no code change required this pass. PR state at review: Verification:
No eligible code work this run; PR remains merge-ready. |
|
@cursor address merge conflict |
|
Resolved the merge conflict with Conflict: Resolution: Combined both sides:
Verification: All 3 wiring contract tests pass. Commit: |
Combine the merge-gate wiring contract from this branch with main's listen-pusher gauntlet assertions (state-dir retention, failure logs, and #10000 REST admission/restart tripwires). Drop main's obsolete package.json path-filter checks superseded by the scope job. Verification: backend/.venv/bin/python -m pytest -q \ tests/unit/test_listen_pusher_stack_ci_wiring.py \ tests/unit/test_sync_cloud_tasks_stack_ci_wiring.py (3 passed) Co-authored-by: David Zhang <[email protected]>


Summary
Backend Hermetic Merge Gate, static wiring contracts, and contributor documentation.Refs #10021
Guard rationale
PR #10000 added the durable-finalization emulator gauntlet, but path-filtered workflows can leave a required check pending or let a later workflow edit silently decouple that coverage from the merge decision. This workflow-local gate is the narrow owner of those three existing jobs: it requires every selected job to succeed and accepts skipped jobs only when the scope job explicitly proves the pull request is out of scope. The static tests are tripwires; the actual hermetic behavior is exercised by the existing E2E harness and emulator gauntlets in CI.
Follow-through after merge
#10021 remains open until this workflow is merged,
Backend Hermetic Merge Gateis configured as a strict required check onmain, admin bypass is disabled, and the live branch-protection API confirms both settings.Verification
cd backend && BACKEND_PYTEST_WORKERS=4 bash test.sh(675 isolated unit test files)cd backend && .venv/bin/python -m pytest -q tests/unit/test_listen_pusher_stack_ci_wiring.py tests/unit/test_sync_cloud_tasks_stack_ci_wiring.py(3 passed)actionlint -shellcheck='' .github/workflows/backend-hermetic-e2e.yml