Gate merge-pr on CI; bring the triad under standard-check - #194
Merged
Conversation
merge-pr went straight from the branch check to gh pr merge --squash --delete-branch, with no inspection of the status rollup. gh pr merge happily merges a red PR when there is no branch protection, so every merge in this repo has been ungated -- safe only because whoever merged happened to look first. rusticprofile added this in v0.1.5 after a PR went in with a leg red, and extended it in 0.2.1 after an EMPTY rollup passed vacuously. Neither reached here. Three refusals now: a failing check, an empty rollup, and checks still running. The empty state is compared as a string rather than via jq -e length, because an external jq is not on a default Windows PATH and a gate that degrades where its dependency is missing is the thing being fixed. gate_conformance.py (template v3) is vendored and run by standard-check, so the guards cannot vanish again. It is structural, not behavioural, and says so. Verified safely: on a branch with no PR the rollup is empty, so merge-pr refuses before reaching gh pr merge. Assisted-By: Claude Opus 5
Assisted-By: Claude Opus 5
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.
Description
just merge-prhad no CI gate. It went straight from the branch check to:gh pr mergewill happily merge a red PR when the repository has no branch protection, and "waitfor the checks to settle" is not "wait for them to pass". Every merge in this repo has been
ungated — safe only because whoever merged happened to look at CI first.
rusticprofileadded this gate in itsv0.1.5after PR #19 went in withbuild (fedora-x64)red,and extended it in
0.2.1after an empty rollup passed vacuously — printing "CI is green." overa commit CI had never seen, which happened for real when GitHub stopped creating workflow runs for
pushed commits. Neither fix reached here. Same cross-repo staleness as the nushell completion path,
this time on the recipe that performs the irreversible act.
Three refusals
The empty state is compared as a string rather than through
jq -e length:gh --jqis gh'sbuilt-in jq, but an external
jqis not on a default Windows PATH — and a gate that silentlydegrades where its dependency is missing is the thing being fixed, not a way to fix it.
The triad is now checked
scripts/gate_conformance.py(template v3) is vendored and run bystandard-check, whichjust checkdepends on — so these guards cannot quietly disappear again. It asserts nine of themacross
pr,open-prandmerge-pr, with comments stripped first, so a comment explaining aguard cannot satisfy the check for a recipe that lost it.
It is structural, not behavioural, and its docstring says so — it proves a guard is present, not
that it works. The install helpers can be checked behaviourally because they are pure functions
their self-test can call; these recipes run the suite, push branches and merge PRs, so executing
them from
checkwould be slow and occasionally destructive.Type of change
gate_conformance.pyinstandard-check)How Has This Been Tested?
The gate was verified firing, without merging anything. This branch had no PR when it was
tested, so the rollup is empty —
merge-prrefused and exited before reachinggh pr merge:The jq expression was checked by asking gh's own jq to parse it, rather than reasoning
about how many backslash layers survived — a real hazard here, and one that has corrupted
output earlier in this series.
gate_conformance.pynow reports this repo conformant; before the change it reported thesame three missing
merge-prguards thatetrstill reports.just prgreen: fmt, clippy--workspaceand--features graphics, 69 + 114 + 15 tests, manpage at
retch 0.6.23, audit advisory-only.Backup safety
n/a — tooling only.
Checklist
just manre-run after the bump and committed0.6.22→0.6.23(patch)merge-prnowrefuses three distinct bad states instead of merging regardless, and
standard-checkfailsthe build if any guard is removed
Wiki not updated: §4.8's pages cover config/theming, workspace architecture, and
justrecipes /build prerequisites / the PR-merge workflow. This does change
merge-pr's behaviour, butDevelopment-Setup.mddocuments it as "squash-merge, switch to main, pull, delete branch" — stillaccurate; the gate is a refusal added in front, not a change to what a successful merge does.