Hmbown/CodeWhale · error
Invalid auto_review.
Error message
Invalid auto_review.{kind}[{index}].text_contains: user-intent matching was retired; scope the rule with tool and/or action_kind. What it means
Auto-review rule validation rejects rules that only set `text_contains` with a non-empty value. Matching against raw user text was retired; rules must now be scoped by `tool` and/or `action_kind`. The library throws this at config load so a bare text matcher cannot silently widen a review rule to all inputs.
Solutions
- Delete the text_contains field and scope the rule with `tool` and/or `action_kind` instead.
- If text matching is essential, replace it with an exact tool rule plus an action_kind that covers the intended surface.
- Check release notes for the retirement of user-intent matching and migrate rules to v0.9.8 decision classes.
Example fix
// before [[auto_review.deny]] text_contains = "rm -rf" // after [[auto_review.deny]] tool = "shell" action_kind = "destructive"
Defensive patterns
Strategy: validation
Validate before calling
if rule.text_contains.as_deref().map_or(false, |v| !v.trim().is_empty()) {
return Err("text_contains is retired; scope the rule with tool and/or action_kind");
} Prevention
- Never write text_contains in new auto_review rules.
- Migrate old text rules to tool/action_kind pairs on upgrade.
When it happens
Trigger: A config file defines `auto_review.{kind}[{index}]` with a non-empty (after trim) `text_contains` and no validation-blocking combination — validated in the rule loop at config.rs:3456, for both allow and deny kinds.
Common situations: Upgrading from an older version where text_contains matching was a legitimate rule form; copying an example config with a text-based rule; hand-writing auto_review rules expecting substring matching on message text.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- Invalid auto_review.allow
- Antigravity is a retired, non-runnable legacy provider…
- Antigravity is a retired, non-runnable legacy provider…
- fleet task spec security_policy is a legacy compatibility…
- fleet worker trust_level is a legacy compatibility field…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/24d8d5e6d412c29c.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/config.rs:3456
fn has_matcher(&self) -> bool {
self.tool
.as_deref()
.is_some_and(|value| !value.trim().is_empty())
|| self
.action_kind
.as_deref()
.is_some_and(|value| !value.trim().is_empty())
}
}
fn validate_auto_review_rules(kind: &str, rules: &[AutoReviewRuleConfig]) -> Result<()> {
for (index, rule) in rules.iter().enumerate() {
if rule
.text_contains
.as_deref()
.is_some_and(|value| !value.trim().is_empty())
{
anyhow::bail!(
"Invalid auto_review.{kind}[{index}].text_contains: user-intent matching was retired; scope the rule with tool and/or action_kind."
);
}
if !rule.has_matcher() {
anyhow::bail!(
"Invalid auto_review.{kind}[{index}]: set at least one of tool or action_kind."
);
}
if let Some(action_kind) = rule.action_kind.as_deref() {
let normalized = action_kind.trim().to_ascii_lowercase().replace('-', "_");
if parse_auto_review_action_kind(&normalized).is_none() {
anyhow::bail!(
"Invalid auto_review.{kind}[{index}].action_kind '{action_kind}': expected read, write, shell, external, publish, or destructive."
);
}
if kind == "allow"
&& !matches!(
normalized.as_str(),View on GitHub (pinned to 73e0f67d83)