Make the pre-PR gate answerable; open-pr now pushes - #192
Merged
Conversation
just pr ended in a bare read, so only a human at a terminal could answer it -- a script or agent blocked on a stdin that would never answer, or died without saying why, and that reads as the gate refusing the change. It now accepts PR_CONFIRM, an interactive stdin, or piped input under a timeout, and names PR_CONFIRM when it cannot be answered. Not a bypass: every path still requires an explicit y. just open-pr did not push, so on a never-pushed branch it printed "Gate passed" and then failed because gh pr create had no remote branch to open from. It now pushes only when there is no upstream -- pushing unconditionally would silently publish existing commits on a branch that already has one. pre-push still runs just check, so the push is inside the gate rather than around it. Both are rusticprofile's 0.0.21 and 0.2.12, which retch never received. Assisted-By: Claude Opus 5
Assisted-By: Claude Opus 5
14 tasks
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
Two gates that could not be satisfied from the situation they failed in. Both were hit by hand
while landing #191, and both are fixes
rusticprofilealready had and retch never received.just prended in a barereadSo only a human at a terminal could answer it. A script, CI job or agent either blocked on a stdin
that would never answer or died without saying why — and that failure reads as the gate refusing
the change, not as a question nobody could hear.
It now takes its answer from
PR_CONFIRM, from an interactive stdin, or from piped input under aten-second bound, and the failure message names
PR_CONFIRM.It is not a bypass. All four paths still require an explicit
y, so this widens who cananswer, not what counts as an answer — and the checklist still has to be answered after each
item is actually checked, not before.
just open-prdid not pushOn a never-pushed branch
gh pr createhas no remote branch to open from, so the recipe printed"Gate passed" and then exited non-zero — which reads as the gate rejecting work it had just
approved.
It now pushes only when there is no upstream. Pushing unconditionally would make the recipe
silently publish existing commits on a branch that already has one, which is a different and more
surprising act than "put this branch where
ghcan see it".pre-pushstill runsjust check, sothis cannot publish a branch the gate would refuse — the push is inside the gate, not around it.
Why these existed
They are rusticprofile's
0.0.21and0.2.12. Same cross-repo staleness that left the nushellcompletion path wrong here for months, and that #191's
standard-checknow guards for the installfamily. The
pr/open-prtriad is deliberately not covered by that standard —templates/justfile-common.justrecords it as out of scope, because these recipes legitimatelydiffer per repo (
--workspacehere,--all-targetsin etr, bare in rusticprofile).Type of change
How Has This Been Tested?
All four confirm paths, in both directions:
PR_CONFIRM=yAll manual items confirmed? [y/N] y (answered by PR_CONFIRM)→ gate passedPR_CONFIRMin the messageecho y | just precho n | just propen-pr's push was verified on this PR itself, which is the only honest test for it: thebranch had no upstream when
open-prran, and that condition cannot be reproduced after the fact.rusticprofile's
0.2.12said in as many words that it wanted "a test from a genuinely unpushedbranch".
just prgreen: fmt, clippy--workspaceand--features graphics, 69 + 114 + 15 tests,man page regenerated at
retch 0.6.21, audit advisory-only.Backup safety
n/a — tooling only, no repository writes.
Checklist
just manre-run after the bump and committed0.6.20→0.6.21(patch)the variable rather than defaulting to yes, and
open-prpushes only when there is noupstream rather than publishing commits unasked