Skip to content

chore(hooks): auto mode allows batten's own verbs without classification - #908

Draft
wenzowski wants to merge 1 commit into
mainfrom
claude/automode-allows-batten
Draft

chore(hooks): auto mode allows batten's own verbs without classification#908
wenzowski wants to merge 1 commit into
mainfrom
claude/automode-allows-batten

Conversation

@wenzowski

Copy link
Copy Markdown
Contributor

Why

Bash(batten:*) has been in permissions.allow for a long time, so default,
plan and acceptEdits 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.

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 override is this repository's declared route
for an admitted write to a protected path, and it is the audited one:

  • the admission is issued only after its preconditions are answered on the record
  • it is anchored to a specific HEAD (Admits-anchor) and chained to the previous
    one (Admits-prev)
  • batten commit check then refuses any commit carrying the admitted write
    without the Admits-* trailers
    — measured on CLOUD-1398, which failed
    pending admits batten.toml until the trailers were attached

So 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.

What it costs when absent, measured in the same session

  • CLOUD-1398's [[startup]] row — which that row's own Ready block names as its
    authority — 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.
  • CLOUD-1650's branch adds one test file, which takes the tracked stem count past
    [prune.warm]'s tolerance. The gate's own remedy is to re-measure the basis in
    batten.toml, so that branch could not reach a green verify at all.

Scope

$defaults is kept, so every other classifier rule still applies — this adds a
statement about one program rather than widening the mode. No change to
permissions, hooks, or anything else in the file.


Generated by Claude Code

`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.
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 95804962-eb81-4458-8feb-5447de39c630

📥 Commits

Reviewing files that changed from the base of the PR and between 7fe35ef and 28c46ca.

📒 Files selected for processing (1)
  • .claude/settings.json

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant