Skip to content

fix(kb): term:tier told every AI session a typo grants shell - #678

Merged
cuttlefisch merged 2 commits into
mainfrom
fix/tier-terminology-misinformation
Aug 7, 2026
Merged

fix(kb): term:tier told every AI session a typo grants shell#678
cuttlefisch merged 2 commits into
mainfrom
fix/tier-terminology-misinformation

Conversation

@cuttlefisch

Copy link
Copy Markdown
Owner

term:tier is shipped guidance about a security control, delivered to AI
sessions as authoritative. It said:

(lowercase values only — an unrecognised value currently falls back to shell)

Both halves are false, and the first is false in the least safe direction.

The dangerous half

config.rs:754 errors with unknown AI permission tier on an unrecognised
value — MAE refuses to start rather than resolving it to anything. There is
even a test at config.rs:1822 asserting an unknown tier "must be rejected,
never resolved"
.

So the node was describing the former bug as current behaviour. An agent
reading it would believe a typo in auto_approve_tier silently grants shell
— exactly backwards from a control that fails closed.

The other half

PermissionTier::parse (crates/ai/src/types.rs:66) does
s.trim().to_ascii_lowercase(), so values are case-insensitive. Harmless next to
the first, but the same drift, and it would have someone "fixing" a config that
already worked.

Bound to tests so it cannot drift back

Three tests, asserting the dangerous claim rather than the current wording —
the node can be rephrased freely, and only reintroducing the falsehood fails:

  1. the body must not say an unknown value falls back to a tier;
  2. it must positively state the refusal — a node that simply omitted the
    question would satisfy (1) while still leaving a reader to assume some silent
    default;
  3. it must not claim lowercase-only.

All three were verified failing against the old text before the fix, not
merely passing after it:

tier_node_does_not_claim_an_unknown_value_falls_back_to_a_tier ... FAILED
tier_node_states_that_an_unknown_value_is_refused ... FAILED
tier_node_does_not_claim_lowercase_only ... FAILED

Why this is worth a PR of its own

This is the hazard CLAUDE.md principle #17 and SECURITY.md's own note describe: a
false claim in shipped guidance primes every future session, and is worse than no
claim. The same file already carries an honest NOTE about ai_tier being
badge-only — that part was accurate and is untouched.

No overlap with any PR currently open.

🤖 Generated with Claude Code

`term:tier` is shipped guidance about a SECURITY control, delivered to AI
sessions as authoritative. It stated:

    (lowercase values only — an unrecognised value currently falls back to shell)

Both halves are false, and the first is false in the least safe direction.

`config.rs:754` errors with "unknown AI permission tier" on an unrecognised
value — MAE refuses to start rather than resolving it to anything. There is
even a test at `config.rs:1822` asserting an unknown tier "must be rejected,
never resolved". The node was describing the former BUG as current behaviour,
so an agent reading it would believe a typo in `auto_approve_tier` silently
grants shell.

The second half is wrong too: `PermissionTier::parse` (`crates/ai/src/types.rs:66`)
does `s.trim().to_ascii_lowercase()`, so values are case-insensitive. Harmless
next to the first, but the same drift — it would have someone "fixing" a config
that already worked.

Corrected, and bound to three tests so it cannot silently drift back. They
assert the dangerous CLAIM rather than the current wording, so the node can be
rephrased freely and only reintroducing the falsehood fails:

  * the body must not say an unknown value falls back to a tier;
  * it must positively state the refusal — a node that simply omitted the
    question would satisfy the first assertion while still leaving a reader to
    assume some silent default;
  * it must not claim lowercase-only.

All three verified failing against the old text before the fix, not merely
passing after it.

This is the hazard CLAUDE.md principle #17 and the SECURITY.md note describe:
a false claim in shipped guidance primes every future session, and is worse
than no claim at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cuttlefisch cuttlefisch added the release:none Skip version bump on merge label Aug 6, 2026
@cuttlefisch
cuttlefisch merged commit b8d77cf into main Aug 7, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:none Skip version bump on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant