Repository navigation
feat(stage): add the stage approval setting - #136
Merged
Merged
Conversation
The mirror config gains a top-level `approval` field: `reviewed`, `two-person`, or absent for off. `venfork stage approval` prints the level; `venfork stage approval <on|reviewed|two-person|off>` sets it, where `on` means two-person. Turning it off prints a warning. Any other stored value (a level from a newer venfork, or a non-string) is kept on read and by every other config write, and approvalOf refuses it with a ConfigError that suggests `venfork stage approval two-person`, so an older CLI never reads it as off. Only "off" and "" read as off. The setting lives under stage instead of a new top-level command, to keep the command list short. `approval` becomes a reserved stage word like `issue` and `branch`: `venfork stage approval` no longer stages a branch named approval; use `venfork stage branch approval`. The unknown level and branch-flag usage errors name that form. Stage does not enforce the level yet.
cabljac
force-pushed
the
gate/02-approval-setting
branch
from
October 19, 2026 17:26
e2e4fbe to
5adc86a
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.
The approval gate needs one setting per mirror that every clone reads. This adds a top-level
approvalfield to venfork-config (reviewed,two-person, or absent for off) andvenfork stage approval [on|reviewed|two-person|off]to show or set it.onmeanstwo-person, andoffprints a warning. Any other stored value, such as a level from a newer venfork or a non-string, is kept by every config write and refused byapprovalOfwith aConfigError, so an older CLI never reads it as off.The setting is a
stagesubcommand to keep the command list short. The cost is one more reserved word: a branch namedapprovalusesvenfork stage branch approval, and the usage errors name that form. The groupedvenfork helpscreen has no row for it (36-line cap);stage --helpcovers it. Stage does not enforce the level yet.Tests, red first:
tests/unit/config.test.ts,tests/unit/stage-args.test.tsandtests/integration/approval.test.ts.bun run verifyexits 0. Counts: unit 1260 to 1272, integration 474 to 477.Not verified: e2e tiers and live GitHub.