{"record":{"id":"e70c042ab92c6bce","repo":"Hmbown/CodeWhale","slug":"invalid-auto-review-allow-index-action-kind-a","errorCode":null,"errorMessage":"Invalid auto_review.allow[{index}].action_kind '{action_kind}': this retired narrow kind cannot safely widen to a v0.9.8 decision class; replace it with an exact tool rule or a current action_kind.","messagePattern":"Invalid auto_review\\.allow\\[(.+?)\\]\\.action_kind '(.+?)': this retired narrow kind cannot safely widen to a v0\\.9\\.8 decision class; replace it with an exact tool rule or a current action_kind\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/config.rs","lineNumber":3478,"sourceCode":"        if !rule.has_matcher() {\n            anyhow::bail!(\n                \"Invalid auto_review.{kind}[{index}]: set at least one of tool or action_kind.\"\n            );\n        }\n        if let Some(action_kind) = rule.action_kind.as_deref() {\n            let normalized = action_kind.trim().to_ascii_lowercase().replace('-', \"_\");\n            if parse_auto_review_action_kind(&normalized).is_none() {\n                anyhow::bail!(\n                    \"Invalid auto_review.{kind}[{index}].action_kind '{action_kind}': expected read, write, shell, external, publish, or destructive.\"\n                );\n            }\n            if kind == \"allow\"\n                && !matches!(\n                    normalized.as_str(),\n                    \"read\" | \"write\" | \"shell\" | \"external\" | \"publish\" | \"destructive\"\n                )\n            {\n                anyhow::bail!(\n                    \"Invalid auto_review.allow[{index}].action_kind '{action_kind}': this retired narrow kind cannot safely widen to a v0.9.8 decision class; replace it with an exact tool rule or a current action_kind.\"\n                );\n            }\n        }\n    }\n    Ok(())\n}\n\nfn parse_auto_review_action_kind(raw: &str) -> Option<crate::tui::auto_review::ToolActionKind> {\n    match raw.trim().to_ascii_lowercase().replace('-', \"_\").as_str() {\n        \"read\" | \"mcp_read\" => Some(crate::tui::auto_review::ToolActionKind::Read),\n        \"write\" => Some(crate::tui::auto_review::ToolActionKind::Write),\n        \"shell\" => Some(crate::tui::auto_review::ToolActionKind::Shell),\n        \"external\" | \"network\" | \"git\" | \"mcp_action\" | \"browser\" | \"unknown\" => {\n            Some(crate::tui::auto_review::ToolActionKind::External)\n        }\n        \"publish\" => Some(crate::tui::auto_review::ToolActionKind::Publish),\n        \"destructive\" | \"secret\" => Some(crate::tui::auto_review::ToolActionKind::Destructive),","sourceCodeStart":3460,"sourceCodeEnd":3496,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/config.rs#L3460-L3496","documentation":"For `auto_review.allow` rules specifically, action_kind is further restricted to the current v0.9.8 decision classes (read, write, shell, external, publish, destructive). Retired narrow kinds that fail this whitelist are rejected because allowing on them cannot safely widen to a decision class. This only applies to the `allow` kind; deny rules may accept the retired kinds.","triggerScenarios":"An `auto_review.allow` rule sets action_kind to a value that parses (passes error 813's check) but is not in the read/write/shell/external/publish/destructive whitelist — i.e. a retired narrow kind, at config.rs:3478.","commonSituations":"Migrating a pre-v0.9.8 allowlist that used narrow retired kinds (e.g. per-command kinds); allowing on a kind the new permission model cannot represent safely; copying old deny-rule kinds into allow rules.","solutions":["Replace the retired narrow kind with a current action_kind from the whitelist.","Or express the narrow permission as an exact `tool` rule instead of an action_kind.","Consult the v0.9.8 migration notes mapping retired kinds to decision classes."],"exampleFix":"// before\n[[auto_review.allow]]\naction_kind = \"file_read\"\n// after\n[[auto_review.allow]]\naction_kind = \"read\"","handlingStrategy":"validation","validationCode":"const ALLOW_KINDS: [&str; 6] = [\"read\",\"write\",\"shell\",\"external\",\"publish\",\"destructive\"];\nif rule_kind == \"allow\" && !ALLOW_KINDS.contains(&norm_action_kind.as_str()) {\n    return Err(\"allow rules require a current v0.9.8 action_kind or an exact tool rule\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Audit allow rules against the v0.9.8 kind whitelist after upgrades.","Prefer exact tool rules for narrow permissions."],"tags":["config","auto-review","migration","deprecated"],"backgroundTag":"unsupported-config-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}