chore(hooks): auto mode allows batten's own verbs without classification - #908
Draft
wenzowski wants to merge 1 commit into
Draft
chore(hooks): auto mode allows batten's own verbs without classification#908wenzowski wants to merge 1 commit into
wenzowski wants to merge 1 commit into
Conversation
`Bash(batten:*)` has been in `permissions.allow` for a long time, so every other permission mode already ran batten's verbs without prompting. Auto mode does not read that list the same way: it routes shell commands through a classifier, and the classifier had no statement about this repository's own engine. Measured 2026-09-08: `batten override spend` was refused by the auto-mode classifier while `permissions.allow` allowed it. The refusal is legible — the words "override" and "spend" read as bypassing a security control to a general classifier — and it is exactly backwards here. `batten override` is the repository's DECLARED route for an admitted write to a `protected` path: the admission is issued only after its preconditions are answered on the record, it is anchored to a specific HEAD, and `commit check` then refuses any commit that carries the write without the `Admits-*` trailers proving it. Refusing the verb does not prevent a bypass; it disables the only bypass that leaves an audit trail, and with it the sanctioned way to edit `batten.toml` at all. `$defaults` is kept, so every other classifier rule still applies — this adds a statement about one program rather than widening the mode. The cost of NOT having this, measured in the same session: a `[[startup]]` row that CLOUD-1398's own Ready block names as its authority could not be written, and a `[prune.warm]` basis the gate itself asked to re-measure could not be updated, so a branch that added one test file could not reach a green `verify` at all.
|
Warning Review limit reachedNext included review available in 24 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
❌ The last analysis has failed. |
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.
Why
Bash(batten:*)has been inpermissions.allowfor a long time, sodefault,planandacceptEditsalready ran batten's verbs without prompting. Automode does not read that list the same way — it routes shell commands through a
classifier, and the classifier had no statement about this repository's own
engine.
Measured 2026-09-08:
batten override spendwas refused by the auto-modeclassifier while
permissions.allowallowed it.Why the refusal is exactly backwards here
It is legible — "override" and "spend" read as bypassing a security control to a
general classifier. But
batten overrideis this repository's declared routefor an admitted write to a
protectedpath, and it is the audited one:Admits-anchor) and chained to the previousone (
Admits-prev)batten commit checkthen refuses any commit carrying the admitted writewithout the
Admits-*trailers — measured on CLOUD-1398, which failedpending admits batten.tomluntil the trailers were attachedSo refusing the verb does not prevent a bypass. It disables the only bypass that
leaves an audit trail, and with it the sanctioned way to edit
batten.tomlatall.
What it costs when absent, measured in the same session
[[startup]]row — which that row's own Ready block names as itsauthority — could not be written, so the engine-side check would have shipped
with nothing declaring it: the reporter-that-is-not-a-gate defect the row was
filed to close.
[prune.warm]'s tolerance. The gate's own remedy is to re-measure the basis inbatten.toml, so that branch could not reach a greenverifyat all.Scope
$defaultsis kept, so every other classifier rule still applies — this adds astatement about one program rather than widening the mode. No change to
permissions,hooks, or anything else in the file.Generated by Claude Code