Repository navigation
feat(config): review_gate config key, project can only tighten (#534) - #556
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
Adds a
review_gateconfig key (off | warn | block) for the review gate beforegit commit(#534), usable in the project config and the user config.Why
The gate shipped env/flag only, because a project's
.tole/config.tomlis untrusted andreview_gate = "off"there would let a cloned repo switch the gate off. Users want to set it once in their user config.Changes
config.rs: new key, validated at parse (off|warn|block).layeredmerges it differently from every other key: the STRICTER of the two layers wins (block>warn>off), so a project can keep or tighten the gate but never loosen what the user config chose. A project-only value is used as given, behind the existing content-bound trust gate.config_apply.rs:Settings.review_gate, precedence flag > env > config > user config > defaultblock, shown bytole config checkwith its source.main.rs: a config value is exported asTOLE_REVIEW_GATE(like the flag) so the roster and child agents see it; flag/env already win insideresolve.Testing
review_gate::ENV.cargo fmt,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspacepass;tole-cli --no-default-featuresbuilds.Generated by Claude Code