{"record":{"id":"bddd35f2da0734ab","repo":"openai/codex","slug":"invalid-example-0","errorCode":null,"errorMessage":"invalid example: {0}","messagePattern":"invalid example: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"codex-rs/execpolicy/src/error.rs","lineNumber":30,"sourceCode":"#[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,\n        location: Option<ErrorLocation>,\n    },","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/execpolicy/src/error.rs#L12-L48","documentation":"execpolicy Error::InvalidExample: an example in the policy file failed validation — it does not parse or does not satisfy the shape required of examples. The string details the offending example; the whole policy parse fails as a result.","triggerScenarios":"Thrown at codex-rs/execpolicy/src/error.rs:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the example so it is a well-formed command invocation","Quote arguments containing spaces correctly in the example","Verify the example matches the format expected by the policy test harness"],"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"}