{"record":{"id":"df37829b1e928524","repo":"jdx/mise","slug":"vfox-plugin-artifact-must-be-portable","errorCode":null,"errorMessage":"vfox plugin artifact must be portable","messagePattern":"vfox plugin artifact must be portable","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/packslip.rs","lineNumber":190,"sourceCode":"    }\n    Ok(())\n}\n\npub(crate) fn validate_artifact(artifact: &packslip::model::Artifact) -> Result<()> {\n    ensure!(\n        artifact\n            .extensions\n            .get(\"mise\")\n            .and_then(|v| v.get(\"plugin\"))\n            .and_then(|v| v.as_str())\n            == Some(\"vfox\"),\n        \"packslip artifact must declare extensions.mise.plugin = vfox\"\n    );\n    ensure!(\n        artifact.bin.is_empty(),\n        \"vfox plugin artifacts must not declare executables\"\n    );\n    ensure!(\n        artifact.os.is_none() && artifact.arch.is_none() && artifact.libc.is_none(),\n        \"vfox plugin artifact must be portable\"\n    );\n    ensure!(\n        artifact.requires.is_none(),\n        \"vfox plugin artifacts must not declare host requirements\"\n    );\n    ensure!(\n        matches!(artifact.format.as_deref(), Some(\"tar.gz\" | \"tgz\")),\n        \"vfox plugin artifacts currently require tar.gz format\"\n    );\n    Ok(())\n}\n\n/// Reject links and special files before extraction, including links whose\n/// targets might otherwise be resolved while unpacking a later archive entry.\npub(crate) fn validate_archive(path: &Path) -> Result<()> {\n    let reader = flate2::read::GzDecoder::new(std::fs::File::open(path)?);","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/plugins/packslip.rs#L172-L208","documentation":"`validate_artifact` requires a vfox plugin artifact to be portable: its manifest must not declare `os`, `arch`, or `libc`. vfox plugins handle platform dispatch themselves at runtime, so platform-scoped artifacts are considered a manifest error and rejected.","triggerScenarios":"A packslip manifest declares any of `os`, `arch`, or `libc` (e.g. os = \"linux\", arch = \"x86_64\", libc = \"gnu\") on an artifact validated as a vfox plugin.","commonSituations":"Release tooling that generates per-platform artifacts also emits os/arch/libc fields; author copied a manifest from a binary tool; CI matrix builds annotate each artifact with its platform.","solutions":["Remove the `os`, `arch`, and `libc` keys from the plugin artifact's manifest so it is platform-neutral, and republish.","Ship a single portable tar.gz plugin artifact and let vfox's Lua hooks handle platform differences.","If per-platform binaries are truly needed, publish them as a separate non-plugin tool source (aqua/github) instead."],"exampleFix":"// before (manifest)\n[artifacts.plugin]\nos = \"linux\"\narch = \"x86_64\"\n\n// after (manifest)\n[artifacts.plugin]\n# os/arch/libc removed — plugin must be portable\n","handlingStrategy":"validation","validationCode":"jq -e '.artifacts[] | select(.extensions.mise.plugin == \"vfox\" and (.os == null and .arch == null and .libc == null))' manifest.json \\\n  || { echo \"vfox plugin artifact must be portable (no os/arch/libc)\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ship one portable tar.gz for plugins; handle platform logic in the plugin's Lua hooks.","Configure the release generator with a 'plugin' profile that omits os/arch/libc fields.","Keep binary-tool manifests out of the plugin release path."],"tags":["packslip","vfox","platform","manifest"],"backgroundTag":"schema-validation-failed","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"}