{"record":{"id":"6545952b7f258b4c","repo":"jdx/mise","slug":"expected-a-zip-source","errorCode":null,"errorMessage":"Expected a Zip source","messagePattern":"Expected a Zip source","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/mod.rs","lineNumber":756,"sourceCode":"                assert_eq!(url, \"https://example.com/plugins/my-plugin.zip\");\n            }\n            _ => panic!(\"Expected a Zip source\"),\n        }\n    }\n\n    #[test]\n    fn test_plugin_source_parse_uppercase_zip_with_query() {\n        // Test parsing zip URL with query\n        let source =\n            PluginSource::parse(\"https://example.com/plugins/my-plugin.ZIP?version=v1.0.0\");\n        match source {\n            PluginSource::Zip { url } => {\n                assert_eq!(\n                    url,\n                    \"https://example.com/plugins/my-plugin.ZIP?version=v1.0.0\"\n                );\n            }\n            _ => panic!(\"Expected a Zip source\"),\n        }\n    }\n\n    #[test]\n    fn test_plugin_source_parse_remote_git_zip_subdir() {\n        let source = PluginSource::parse(\n            \"git::https://github.com/user/plugin.git//plugins/my-plugin.zip?ref=main\",\n        );\n        match source {\n            PluginSource::Git {\n                url,\n                git_ref,\n                subdir,\n            } => {\n                assert_eq!(url, \"https://github.com/user/plugin.git\");\n                assert_eq!(git_ref, Some(\"main\".to_string()));\n                assert_eq!(subdir, Some(\"plugins/my-plugin.zip\".to_string()));\n            }","sourceCodeStart":738,"sourceCodeEnd":774,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/plugins/mod.rs#L738-L774","documentation":"Sentinel panic in the plugin-source parsing unit test: the match on PluginSource::parse(\"https://example.com/plugins/my-plugin.zip\") fell through to a non-Zip variant, meaning the parser misclassified a .zip URL. It fires when PluginSource::parse stops recognizing .zip (or uppercase .ZIP with query) URLs as PluginSource::Zip.","triggerScenarios":"Thrown at src/plugins/mod.rs:756 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix PluginSource::parse so URL suffix (case-insensitive) detection of .zip yields PluginSource::Zip before other variants","Check whether a new source variant added earlier in the match is now capturing zip URLs and reorder the match arms","Rerun test_plugin_source_parse_uppercase_zip_with_query after the parser change"],"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-14T00:17:10.932Z"}