{"record":{"id":"080c616f0ea7003e","repo":"Hmbown/CodeWhale","slug":"invalid-auto-review-kind-index-action-kind","errorCode":null,"errorMessage":"Invalid auto_review.{kind}[{index}].action_kind '{action_kind}': expected read, write, shell, external, publish, or destructive.","messagePattern":"Invalid auto_review\\.(.+?)\\[(.+?)\\]\\.action_kind '(.+?)': expected read, write, shell, external, publish, or destructive\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/config.rs","lineNumber":3468,"sourceCode":"    for (index, rule) in rules.iter().enumerate() {\n        if rule\n            .text_contains\n            .as_deref()\n            .is_some_and(|value| !value.trim().is_empty())\n        {\n            anyhow::bail!(\n                \"Invalid auto_review.{kind}[{index}].text_contains: user-intent matching was retired; scope the rule with tool and/or action_kind.\"\n            );\n        }\n        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","sourceCodeStart":3450,"sourceCodeEnd":3486,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/config.rs#L3450-L3486","documentation":"Auto-review `action_kind` values are normalized (trimmed, lowercased, hyphens to underscores) and parsed against the known set. If the value does not parse, validation fails listing the accepted kinds: read, write, shell, external, publish, or destructive. Thrown at config.rs:3468.","triggerScenarios":"A rule's `action_kind` string, after trim/lowercase/underscore normalization, is not recognized by parse_auto_review_action_kind — e.g. action_kind = \"network\" or \"exec\".","commonSituations":"Typos like action_kind = \"writte\"; inventing kinds like \"network\" or \"git\"; carrying over kinds from a pre-v0.9.8 config that used a different taxonomy.","solutions":["Replace the action_kind with one of: read, write, shell, external, publish, destructive.","Use an exact `tool` rule instead if no action_kind fits.","Normalization accepts case-insensitive and hyphenated input (e.g. \"Read\" or \"read\" are fine), so only the vocabulary itself is wrong."],"exampleFix":"// before\naction_kind = \"network\"\n// after\naction_kind = \"external\"","handlingStrategy":"validation","validationCode":"const KINDS: [&str; 6] = [\"read\",\"write\",\"shell\",\"external\",\"publish\",\"destructive\"];\nif let Some(k) = &rule.action_kind {\n    let norm = k.trim().to_ascii_lowercase().replace('-', \"_\");\n    if !KINDS.contains(&norm.as_str()) {\n        return Err(format!(\"action_kind '{k}' not in {KINDS:?}\"));\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a list of valid action kinds near your config templates.","Validate config with a lint pass before deploying."],"tags":["config","auto-review","enum"],"backgroundTag":"invalid-enum-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"}