CI: run checks on stacked flux-pumping PRs and base retargets#166
CI: run checks on stacked flux-pumping PRs and base retargets#166krystophny wants to merge 2 commits into
Conversation
|
Dispatched unit-test runs on the current stacked heads (their copies of
Golden-record cannot be dispatched on those heads yet: |
run-golden-record is the sole required status check on main (ruleset 7026456, strict, zero required reviews). A job skipped by its 'if' reports Success, and the newest same-named check run on the head SHA is what the merge gate evaluates, so the previous commit's edited/labeled types plus job-level skip let a PR title edit or any unrelated label overwrite (or cancel-and-overwrite, via the PR-keyed cancel-in-progress group) a failing golden record with skipped=Success, unblocking merges into main. Restore test-on-pr.yml pull_request types and branches exactly to the main state so every run-golden-record check run is real; keep workflow_dispatch. Drop 'edited' from unit-tests.yml types and revert its job condition so title edits stop shadowing real unit-test results; keep the stacked base patterns, which always produce real runs. Move label additions, base retargets, and pushes to labeled stacked PRs into stacked-pr-dispatch.yml, whose differently named job re-triggers the real workflows via workflow_dispatch and can never create a skipped run-golden-record. This also removes the skipped-check noise on unlabeled stacked PRs. actionlint: same 21 pre-existing findings before and after, zero in the new file.
|
Review found a blocking defect in d07b711 and ca354de fixes it. Defect: Fix (ca354de):
Known limitation (inherent to Verification: actionlint 1.7.12 reports the identical 21 pre-existing findings before/after and zero in the new file; |
Problem
Both PR workflows filter
pull_requestevents to basesmain/master, soevery PR in the stacked flux-pumping chain (bases like
fix/flux-pumping/*,diag/flux-pumping/*,integration/flux-pumping/*— currently #154, #157–#159, #161–#165) runs zero checks: empty
statusCheckRollup, and a CLEAN merge state that is vacuous. In addition:test-on-pr.ymlhas noworkflow_dispatch, so the golden-record suitecannot be run on a stacked head at all (only
unit-tests.ymlisdispatchable today).
editedevent, which is absentfrom
typesin both workflows, so a PR retargeted ontomainstillgets no CI until its next push.
Change
Design constraint (this is why the event handling lives in a separate
workflow):
run-golden-recordis the sole required status check onmain(ruleset 7026456, strict, zero required reviews). A job skippedby its
ifreports Success, and the newest same-named check run on thehead SHA is what the merge gate evaluates — so the required workflow
must never see an event it would respond to with a skipped job.
test-on-pr.yml:pull_requesttypesandbranchesstay byte-identical tomain;every check run named
run-golden-recordcomes from a real run.workflow_dispatchwith acompare_against_maininput(default true) so the golden-record suite can be run on any head,
including stacked ones; the four main-comparison steps run for
pull_requestor dispatch-with-comparison. Dispatch concurrency iskeyed by
run_id, matchingunit-tests.yml(cf. ci: key workflow_dispatch concurrency by run, not workflow name #110).unit-tests.yml:fix/flux-pumping/**,diag/flux-pumping/**,feat/flux-pumping/**,integration/flux-pumping/**to thepull_requestfilter. Unit tests are cheap enough to run on everystacked push, and these are always real runs — no skip condition
beyond the pre-existing draft guard.
stacked-pr-dispatch.yml(new):labeled(filtered to the
run-golden-recordlabel),editedwith a basechange (retargets), and pushes to stacked PRs that carry the label.
dispatch-stacked-checks, so its skipped runs cannever shadow
run-golden-recordorunit-tests.gh workflow run(theGITHUB_TOKENexception forworkflow_dispatchapplies; the job hasactions: write). Retargets dispatch unit tests always and goldenrecord when the new base is
main/masteror the PR carries thelabel; label events and pushes to labeled stacked PRs dispatch golden
record. Fork heads are excluded (dispatch only targets in-repo refs).
builds NEO-2 three times and runs lorentz/ql/par/performance —
roughly an hour of runner time per push, which would multiply across
a 10-PR chain rebased in bulk if run unconditionally.
Known limitation:
workflow_dispatchuses the workflow definition onthe target ref, so dispatching
test-on-pr.ymlon a stacked head worksonly once that head contains this change (rebase the stack onto an
updated
mainfirst).unit-tests.ymlhas been dispatchable since #110and works on current heads today.
No job content, tolerances, or build steps change; only triggers,
concurrency, and run conditions.
Verification
gh api repos/itpplasma/NEO-2/rules/branches/mainconfirmsrun-golden-recordis the only required status check (strict policy,required_approving_review_count: 0).actionlint 1.7.12on all three files: identical finding set (21)before and after — all pre-existing SC2086 notes in untouched run
scripts plus the pre-existing
github.head_refnote; zero findings inthe new workflow.
yaml.safe_loadparses all three files;pull_request.typesof thetwo check workflows verified identical to
main(
[opened, synchronize, reopened, ready_for_review])..github/workflows/.unit-tests.ymlon theheads of Align pitch crossings to the nearest grid point #164 and Preserve geometry at pitch crossings #165.