fix(ci): run exact-head gates on stacked pull requests - #299
Draft
seonghobae wants to merge 6 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Closes #298.
Boundary
This Draft starts from protected
main@e8109ec2a17de8bd6594487aa12c8c8a93cb2c03and owns only.github/workflows/ci.ymlplussrc/workflowExactHead.test.ts. It is next-release CI evidence work and must remain Draft/unmerged while #118 owns the exactv0.6.0source candidate.Root cause
Two evidence gaps existed in the canonical CI contract:
pull_requestto base branchmain. Inkspan intentionally carries stacked Draft PRs whose bases are feature branches, so those PR heads did not receive the canonical repository CI matrix merely by opening or updating the PR.actions/checkoutwith the immutable contributor head and disabled credential persistence, but did not independently compare the runtime checkout SHA with the expected event head before dependency setup or repository-code consumption.Test-first lineage
Stacked-PR trigger
RED —
e75a0035d753d8d58a9c04a8c254bf8914135e24Production
.github/workflows/ci.ymlwas unchanged. The new contract requiredpushto remain main-only whilepull_requestaccepted any base branch. Hosted CI31655281195, build-and-test94308284582, checked out that exact contributor head; frozen install and typecheck passed, the existing suite passed, and exactly the new workflow assertion failed.GREEN —
3ea55387d8d7d88a80933b398abda78e42a4496bThe production change removed only
branches: [main]beneathpull_request, preserving main-only push CI and the existing read-only, pinned exact-head matrix. Hosted CI31655462144succeeded on that exact head, including repository 100% owned-production coverage, library/package/demo, cross-engine browser evidence, and Office Python 3.11–3.14.Runtime checkout attestation
RED —
85572a50d79a11c27c9171cc9180d7a53128bea0The test-only change required all three canonical jobs to execute a runtime
git rev-parse HEADequality check against${{ github.event.pull_request.head.sha || github.sha }}immediately after checkout. Hosted CI31817640992, build-and-test94823048656, checked out that exact SHA and passed frozen install/typecheck; 142/143 test files and 829/830 tests passed, with exactly the new runtime-attestation assertion failing.GREEN — current exact head
58ef72706299eec1b5edfff22680785acc7b0cf6Each canonical job now performs
Verify exact checkoutimmediately after the immutable checkout and before setup/install or repository-code consumption. The step exports only the expected event SHA, derives the actual local head withgit rev-parse HEAD, and fails unless the two are equal. No permission, network, credential, model, branch-protection, ruleset, release-identity, or persistence authority was added.Hosted CI
31817916622completed successfully on exact head58ef72706299eec1b5edfff22680785acc7b0cf6. The build/test job94823935459passed the runtime checkout equality check, frozen install, typecheck, 143/143 test files and 830/830 tests, 100% statements/branches/functions/lines, library build, exact packed-package consumer verification, and demo build. The cross-engine Playwright job and Office Python 3.11–3.14 jobs also completed successfully and each passed the same runtime checkout equality step.At this evidence generation, exact-head Security Scan and SAST Semgrep are still queued and therefore non-passing. Fresh formal reviews are 0 and unresolved inline review threads are 0. Any source-head movement invalidates the evidence above and requires a complete exact-head refetch.
Integration boundary
GitHub currently reports this PR mergeable, but it intentionally remains Draft. Live organization policy requires one qualifying independent approval, approval of the last push by someone other than the pusher, review-thread resolution, and all applicable central required workflows. Do not move protected
mainwhile #118 still owns exactv0.6.0tag/publication/provenance/digest operational acceptance. After that release boundary closes, refetch the then-live protected tip, exact head, ancestry, rules, reviews/threads, and every applicable gate before any Ready/merge transition.