{"record":{"id":"fc35b905e6359050","repo":"jdx/mise","slug":"expected-a-git-plugin","errorCode":null,"errorMessage":"Expected a git plugin","messagePattern":"Expected a git plugin","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/mod.rs","lineNumber":775,"sourceCode":"        }\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            }\n            _ => panic!(\"Expected a git plugin\"),\n        }\n    }\n\n    #[test]\n    fn test_plugin_source_parse_edge_cases() {\n        // Test parsing git url which contains `.zip`\n        let source = PluginSource::parse(\"https://example.com/.zip/plugin\");\n        match source {\n            PluginSource::Git { .. } => {}\n            _ => panic!(\"Expected a git plugin\"),\n        }\n    }\n\n    #[test]\n    fn test_plugin_source_parse_remote_git_https() {\n        let source = PluginSource::parse(\n            \"git::https://github.com/org/repo.git//dev/plugins/tool?ref=feature/test\",\n        );","sourceCodeStart":757,"sourceCodeEnd":793,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/plugins/mod.rs#L757-L793","documentation":"Sentinel panic in the plugin-source unit test: PluginSource::parse of a git::...//plugins/my-plugin.zip?ref=main URL did not return the Git variant with the expected url/ref/subdir fields. It fires when the git:: scheme prefix, //subdir syntax, or ?ref= query handling in parse regresses.","triggerScenarios":"Thrown at src/plugins/mod.rs:775 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure parse detects the git:: scheme prefix and returns PluginSource::Git with url, git_ref, and subdir populated","Verify the //subdir extraction keeps the trailing path (plugins/my-plugin.zip) verbatim","Add regression coverage for other git:: URL shapes after fixing the parser"],"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"}