Repository navigation
feat(stage): bypass the approval gate with --force - #139
Merged
Merged
Conversation
`venfork stage <branch> --force` runs the gate as usual. When it refuses and the branch has an open mirror PR, a person must confirm the bypass at a terminal; --yes never answers that confirm, and without a terminal stage stops with ApprovalError reason bypass-unconfirmed. Just before the push, stage posts a comment on the mirror PR naming the gh login, the level, the commit staged and the refusal, through netExec with the body on stdin. A comment that fails pushes nothing. With approval off, --force only warns. --force never bypasses branch-moved: a local head that differs from the mirror PR head is refused, also when another refusal comes first. A branch with no open mirror PR cannot be forced, and a bypass that cannot find the mirror to record on throws a precondition error and pushes nothing. A branch moved during the bypass confirm ships the confirmed commit. The mirror PR comment is the only record. Stage writes nothing about the bypass to venfork-config (anyone with write access can push it), and nothing about approval or the bypass reaches the published commits, the public fork or upstream. --force with --dry-run, stage issue or stage approval is a usage error.
cabljac
force-pushed
the
gate/05-force-bypass
branch
from
October 19, 2026 17:26
a2605eb to
dc7c642
Compare
cabljac
marked this pull request as ready for review
October 19, 2026 17:29
cabljac
added this pull request to stack #142
October 19, 2026 17:29
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.
A vendor sometimes has to ship without an approval, for example when the only reviewer is away.
venfork stage <branch> --forceruns the gate as usual. When it refuses and the branch has an open mirror PR, a person must confirm the bypass at a terminal;--yesnever answers it, and without a terminal stage stops with reasonbypass-unconfirmed. Just before the push, stage posts a comment on the mirror PR that names the gh login, the level, the commit and the refusal. A failed comment pushes nothing.--forcenever bypassesbranch-moved, so the comment always names the commit on the mirror PR, and a branch moved during the confirm still ships the confirmed commit. A bypass with no mirror to record on is refused. The comment is the only record: nothing goes to venfork-config, the published commits, the fork or upstream.Tests, red first:
tests/integration/approval-force.test.tsand--forcecases intests/unit/stage-args.test.ts.bun run verifyexits 0. Counts: unit 1283 to 1285, integration 510 to 519.Not verified: e2e tiers and live GitHub. The gh calls are proven only against the stub in
tests/harness/gh-mirror.ts.