Repository navigation
feat(cli): run the repo's gate before the handovers that vouch for the code - #38
Merged
Merged
Conversation
…e code
The config file gains "gate", the user's command that checks the repo's
code. The engineer's handover, QA's approval and the lead's final report
run it with /bin/sh -c in the feature's worktree, show its output, and
refuse the handover while it fails; the journal logs the gate with the
handover. baton start and baton feature start refuse a repo without a
gate ("true" checks nothing), and the config file refuses a blank gate
and one that starts with "-". The guard denies a role's create and edit
in baton's config folder. The engineer's, QA's and the lead's prompts
describe the gate.
Docs: decision 56, risk 13, the design's handover, safety, state and
config parts, decisions 34 and 52, and the README's config section.
|
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.



Step
gates(plan row 61): the repo's gate, the user's command that checks the repo's code, runs before each handover that vouches for the code, and a red gate refuses the handover.What changes
gatesetting, layered like the others, with no default of baton's own. The config file refuses a gate of only spaces, and one that starts with-, whichsh -cwould read as its own options (bash, dash and zsh all do)./bin/sh -cin the feature's worktree, wherever in the repo the role runs baton. Stdin is empty, and stdout and stderr go to baton's output in order, after aRunning the gate in <worktree>: <gate>line.baton start, when it makes the orchestrator's session, andbaton feature startrefuse a repo without a gate, naming the config file."true"checks nothing.createandeditin baton's config folder, whose file holds the gate.//nolint:gosec(G204) atgate.Run: the user's call through nudge (2026-11-04, answer A). The gate is a command line by design, the user's own, from the config file.Checks
mise run check: green. Coverage 99.4%;internal/gate100%.Gated, the config check and layering, the guard's config rule, the start and open checks, and the journal field. 33 were caught. The survivor, which ignoresos.UserConfigDir's error in the guard, is equivalent on macOS: the cache folder, read first, fails on the same missing$HOME.copilot, on an isolated tmux server (-f /dev/null, its ownTMUX_TMPDIR,HOMEandTMPDIR). No model and no remote.-x.