{"record":{"id":"d2cf61ed46dcbd99","repo":"zeroclaw-labs/zeroclaw","slug":"plugin-archive-manifest-name-does-not-match-r","errorCode":null,"errorMessage":"plugin archive manifest name '{}' does not match registry name '{}'","messagePattern":"plugin archive manifest name '(.+?)' does not match registry name '(.+?)'","errorType":"console","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/plugin_registry.rs","lineNumber":295,"sourceCode":"        }\n        writer.write_all(&buffer[..read])?;\n        *extracted_bytes += read as u64;\n    }\n}\n\nfn load_plugin_manifest(plugin_dir: &Path) -> Result<PluginManifest> {\n    let manifest_path = plugin_dir.join(\"manifest.toml\");\n    let manifest_toml = std::fs::read_to_string(&manifest_path)\n        .with_context(|| format!(\"reading {}\", manifest_path.display()))?;\n    toml::from_str(&manifest_toml).with_context(|| format!(\"parsing {}\", manifest_path.display()))\n}\n\nfn verify_manifest_matches_registry(\n    entry: &PluginRegistryEntry,\n    manifest: &PluginManifest,\n) -> Result<()> {\n    if manifest.name != entry.name {\n        bail!(\n            \"plugin archive manifest name '{}' does not match registry name '{}'\",\n            manifest.name,\n            entry.name\n        );\n    }\n    if manifest.version != entry.version {\n        bail!(\n            \"plugin archive manifest version '{}' does not match registry version '{}'\",\n            manifest.version,\n            entry.version\n        );\n    }\n    Ok(())\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/src/plugin_registry.rs#L277-L313","documentation":"After extraction, verify_manifest_matches_registry compares the plugin's manifest.toml name against the name in the registry index entry; a mismatch bails. This prevents an archive from being installed under a different identity than the one the user requested (a supply-chain guard).","triggerScenarios":"Installing plugin `zeroclaw plugin install foo` where the registry entry is named \"foo\" but the archive's manifest.toml declares name = \"bar\". Reached at the end of download_registry_plugin, before the plugin is installed.","commonSituations":"Forked/renamed plugin republished under a new registry name without updating the manifest; copy-pasted registry JSON entries pointing at another plugin's artifact; publisher renamed the crate but shipped the old archive URL.","solutions":["If you publish the plugin, make manifest.toml `name` identical to the registry entry's `name` field and republish both together","If installing, report the mismatch to the registry maintainer — the entry and artifact disagree","Re-check the registry index for an entry whose name matches the artifact you actually want, and install that one","After fixing, refresh the index so the corrected entry is fetched"],"exampleFix":"# before\n# registry entry: { \"name\": \"webhooks\", ... } ; manifest.toml: name = \"http-hooks\"\n# after (manifest)\nname = \"webhooks\"\nversion = \"0.3.0\"\n# republish archive + update entry url/sha256","handlingStrategy":"retry","validationCode":"// If you orchestrate installs, compare names before invoking the tool:\nlet manifest_name = toml::from_str::<PluginManifest>(&manifest_src)?.name;\nif manifest_name != registry_entry.name {\n    anyhow::bail!(\"entry/artifact name mismatch: skip install\");\n}","typeGuard":null,"tryCatchPattern":"// On the name-mismatch bail: refresh the registry index and retry once (stale\n// entry). A repeat mismatch is a publisher bug — report instead of installing.","preventionTips":["Publish manifest and registry entry together in one change","Add a registry lint that opens each artifact and asserts name/version match the entry","Prefer installing by exact name+version+sha256 pins"],"tags":["plugin-registry","manifest","identity","supply-chain"],"backgroundTag":"package-name-mismatch","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}