{"record":{"id":"802911d140564d80","repo":"jdx/mise","slug":"expected-mapped-node-task-tool","errorCode":null,"errorMessage":"expected mapped node task tool","messagePattern":"expected mapped node task tool","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/mod.rs","lineNumber":5904,"sourceCode":"            shellcheck = { path = \"/opt/shellcheck\" }\n            \"#,\n        )\n        .unwrap();\n\n        for (tool, expected) in [\n            (\"node\", \"20\"),\n            (\"go\", \"prefix:1.22\"),\n            (\"python\", \"ref:main\"),\n            (\"shellcheck\", \"path:/opt/shellcheck\"),\n        ] {\n            let TaskToolValue::Map(value) = &parsed.tools[tool] else {\n                panic!(\"expected mapped task tool for {tool}\");\n            };\n            assert_eq!(value.version, expected);\n        }\n\n        let TaskToolValue::Map(node) = &parsed.tools[\"node\"] else {\n            panic!(\"expected mapped node task tool\");\n        };\n        assert_eq!(\n            node.opts[\"backend_options\"][\"nested\"].as_array(),\n            Some(&vec![toml::Value::Integer(1), toml::Value::Boolean(true)])\n        );\n\n        for (invalid, expected) in [\n            (\n                \"[tools]\\nnode = { version = \\\"20\\\", prefix = \\\"20\\\" }\\n\",\n                \"tool definition cannot specify both `version` and `prefix`\",\n            ),\n            (\n                \"[tools]\\nnode = { os = \\\"linux\\\" }\\n\",\n                \"tool definition must include exactly one of `version`, `path`, `prefix`, or `ref`\",\n            ),\n            (\n                \"[tools]\\nnode = { prefix = 20 }\\n\",\n                \"tool selector `prefix` must be a string\",","sourceCodeStart":5886,"sourceCodeEnd":5922,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/task/mod.rs#L5886-L5922","documentation":"Second let-else panic in the same task TOML test, specifically asserting the node entry: parsed.tools[\"node\"] was not TaskToolValue::Map after the per-tool loop passed. It isolates the node entry's backend_options.nested handling — the map variant or its fields were lost during deserialization of node = { version = \"20\", backend_options = { nested = [1, true] } }.","triggerScenarios":"Thrown at src/task/mod.rs:5904 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure TaskToolValue::Map preserves backend_options (including nested mixed-type arrays) for the node entry","Compare the deserialized Map fields against the raw TOML to find the dropped key","Rerun the test after fixing the deserializer"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}