Skip to content

fix(ci): load current upstream validation code for old PRs - #442

Merged
KartikP merged 2 commits into
mainfrom
KartikP/language-ci-current-base
Nov 8, 2026
Merged

KartikP merged 2 commits into
mainfrom
KartikP/language-ci-current-base

Conversation

@KartikP

@KartikP KartikP commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • With the fix(ci): require explicit success for plugin PR validation #441 workflow: 3 tests fail and 1 passes. The checkout selects obsolete code, and missing-status/new-head safeguards are absent.
  • With the fix(ci): load current upstream validation code for old PRs #442 workflow: all 35 focused tests pass, including the four checkout integration tests.
  • The selected helper accepts complete statuses only for the submitted fork SHA, rejects missing statuses and a changed head, and never executes the fork helper.
  • No network, GitHub, Jenkins, or AWS calls occur in this regression.
  • actionlint 1.7.12 reports 16 existing findings on both workflow versions; this change introduces none. These existing lint findings are not claimed as resolved.

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.

@KartikP
KartikP merged commit cc9f623 into main Nov 8, 2026
16 checks passed
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