{"record":{"id":"c6ba927dc9f694b7","repo":"openai/codex","slug":"invalid-pattern-element-0","errorCode":null,"errorMessage":"invalid pattern element: {0}","messagePattern":"invalid pattern element: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"codex-rs/execpolicy/src/error.rs","lineNumber":28,"sourceCode":"}\n\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\npub struct TextRange {\n    pub start: TextPosition,\n    pub end: TextPosition,\n}\n\n#[derive(Debug, Clone, PartialEq, Eq)]\npub struct ErrorLocation {\n    pub path: String,\n    pub range: TextRange,\n}\n\n#[derive(Debug, Error)]\npub enum Error {\n    #[error(\"invalid decision: {0}\")]\n    InvalidDecision(String),\n    #[error(\"invalid pattern element: {0}\")]\n    InvalidPattern(String),\n    #[error(\"invalid example: {0}\")]\n    InvalidExample(String),\n    #[error(\"invalid rule: {0}\")]\n    InvalidRule(String),\n    #[error(\n        \"expected every example to match at least one rule. rules: {rules:?}; unmatched examples: \\\n         {examples:?}\"\n    )]\n    ExampleDidNotMatch {\n        rules: Vec<String>,\n        examples: Vec<String>,\n        location: Option<ErrorLocation>,\n    },\n    #[error(\"expected example to not match rule `{rule}`: {example}\")]\n    ExampleDidMatch {\n        rule: String,\n        example: String,","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/execpolicy/src/error.rs#L10-L46","documentation":"Validation error fired when a pattern element within a rule is not a recognized element kind (e.g. an unexpected token or malformed glob component). The payload names the invalid element; the input at fault is the rule pattern in the policy.","triggerScenarios":"Thrown at codex-rs/execpolicy/src/error.rs:28 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the pattern element in the policy rule to use supported syntax (literals, globs, recognized placeholders)","Check for typos or unsupported wildcards in the pattern","Consult execpolicy pattern documentation for valid element forms"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}