{"record":{"id":"449deca4d19b34a1","repo":"jdx/mise","slug":"unexpected-compose-config-hash-row-line","errorCode":null,"errorMessage":"unexpected compose config hash row: {line}","messagePattern":"unexpected compose config hash row: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/compose.rs","lineNumber":1033,"sourceCode":"        .filter(|line| !line.trim().is_empty())\n        .map(|line| Ok(serde_json::from_str(line)?))\n        .collect()\n}\n\nfn parse_config_hashes(output: &str) -> Result<HashMap<String, String>> {\n    output\n        .lines()\n        .filter(|line| !line.trim().is_empty())\n        .map(|line| {\n            let mut fields = line.split_whitespace();\n            let service = fields\n                .next()\n                .ok_or_else(|| eyre!(\"compose config hash row is missing a service\"))?;\n            let hash = fields.next().ok_or_else(|| {\n                eyre!(\"compose config hash row for '{service}' is missing a hash\")\n            })?;\n            if fields.next().is_some() {\n                bail!(\"unexpected compose config hash row: {line}\");\n            }\n            Ok((service.to_string(), hash.to_string()))\n        })\n        .collect()\n}\n\nfn container_is_ready(container: &ComposeContainer) -> bool {\n    container.state == \"running\" && matches!(container.health.as_str(), \"\" | \"healthy\")\n}\n\nfn container_is_active(container: &ComposeContainer) -> bool {\n    matches!(\n        container.state.as_str(),\n        \"running\" | \"restarting\" | \"paused\"\n    )\n}\n\nfn describe_current(target_services: &IndexSet<String>, containers: &[ComposeContainer]) -> String {","sourceCodeStart":1015,"sourceCodeEnd":1051,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/compose.rs#L1015-L1051","documentation":"Thrown while parsing the output of a compose config-hash listing: each line is expected to contain exactly two whitespace-separated fields (service and hash). A line with a third (or more) field means the output format differs from what the parser expects, so parsing is aborted rather than guessing.","triggerScenarios":"Calling the function that collects compose config hashes when `docker compose config` (or equivalent) emits rows with extra columns — typically due to a docker-compose version whose output format changed.","commonSituations":"Upgrading or downgrading docker compose so the tabular config output gains extra fields; custom output formatting or plugins altering row shape.","solutions":["Check the docker compose version and align it with the version the tool expects","Print the raw command output and inspect the offending line's field layout","Adjust the parsing/normalization or pin a compatible compose binary version"],"exampleFix":"// before: row 'web <hash> extra' -> bail\n// after: ensure `docker compose config --format json` or a compatible compose version is used","handlingStrategy":"validation","validationCode":"let line = \"web abc123\";\nlet fields: Vec<&str> = line.split_whitespace().collect();\nlet ok = fields.len() == 2;\nassert!(ok, \"config hash rows must have exactly 2 fields, got {}\", fields.len());","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin a docker compose version known to emit the expected two-field rows","Log raw command output before parsing to detect format drift early","Add integration tests that assert the parser against real compose output"],"tags":["parsing","docker-compose","unexpected-output"],"backgroundTag":"unexpected-response-shape","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}