Repository navigation
fix(ci): load current upstream validation code for old PRs - #442
Merged
Merged
Conversation
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.
Live verification after #441 merged found that #412 and #413 execute the new validation job but load the old helper from their original base SHA, 97a086a. That revision predates the fail-closed validator, so green validation jobs do not verify the deployed repair.
Check out the current base branch explicitly from the upstream repository instead of the PR event's original base SHA. Keep the checkout read-only and separate from the contributor's submitted head. Log the validation-code SHA alongside the submitted SHA so future verification can confirm both.
Validation: 31 focused tests passed; workflow YAML and trusted checkout fields verified; git diff checks passed. Runtime changes are limited to the workflow checkout and its documentation; a local Git regression test covers the source-selection boundary. Model code, benchmark behavior, Jenkins build-state policy, and account handling are unchanged.
Verification evidence:
Both logs show checkout of 97a086a while checking the correct submitted head. After merge, rerun the label-triggered workflow and confirm that the helper checkout includes #441 and that the validator reports current status contexts with head_matches=true.
Regression proof before merge
Added a test that reads the actual workflow YAML and performs checkouts in isolated local Git repositories. The upstream repository has an old base commit and a current validator commit. A separate fork replaces the helper with code that raises if executed. The PR event retains the old base SHA.
After CI executes the new regression, review the change before merge. For the final live check, first confirm that each PR merge ref contains the new workflow, then trigger one run and require the logs to identify the current trusted helper SHA and the correct submitted head SHA. A skipped validator or an old helper SHA is a failed verification, regardless of the workflow's overall green status.