{"record":{"id":"58df96c52244bdd8","repo":"Hmbown/CodeWhale","slug":"failed-to-parse-requirements-file-file-content","errorCode":null,"errorMessage":"Failed to parse requirements file {}; file contents were omitted","messagePattern":"Failed to parse requirements file (.+?); file contents were omitted","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/config.rs","lineNumber":10124,"sourceCode":"    configured.is_some_and(|base| !base.trim().is_empty())\n}\n\nfn apply_requirements(config: &mut Config) -> Result<()> {\n    let path = config\n        .requirements_path\n        .as_deref()\n        .map(expand_path)\n        .or_else(default_requirements_path);\n    let Some(path) = path else {\n        return Ok(());\n    };\n    if !path.exists() {\n        return Ok(());\n    }\n    let contents = fs::read_to_string(&path)\n        .with_context(|| format!(\"Failed to read requirements file: {}\", path.display()))?;\n    let requirements: RequirementsFile = toml::from_str(&contents).map_err(|_| {\n        anyhow::anyhow!(\n            \"Failed to parse requirements file {}; file contents were omitted\",\n            codewhale_config::quote_os_path(&path)\n        )\n    })?;\n\n    if !requirements.allowed_approval_policies.is_empty()\n        && let Some(policy) = config.approval_policy.as_ref()\n    {\n        let policy = policy.to_ascii_lowercase();\n        if !requirements\n            .allowed_approval_policies\n            .iter()\n            .any(|p| p.eq_ignore_ascii_case(&policy))\n        {\n            anyhow::bail!(\n                \"approval_policy '{policy}' is not allowed by requirements ({})\",\n                requirements.allowed_approval_policies.join(\", \")\n            );","sourceCodeStart":10106,"sourceCodeEnd":10142,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/config.rs#L10106-L10142","documentation":"Error \"Failed to parse requirements file {}; file contents were omitted\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/config.rs:10124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}