{"record":{"id":"66bbbae4cecd4027","repo":"jdx/mise","slug":"additional-artifacts-must-be-an-array-in-lockfile","errorCode":null,"errorMessage":"additional_artifacts must be an array in lockfile","messagePattern":"additional_artifacts must be an array in lockfile","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lockfile.rs","lineNumber":870,"sourceCode":"                    github_attestations\n                };\n                let signer = match t.remove(\"signer\") {\n                    Some(toml::Value::String(s)) => Some(s),\n                    _ => None,\n                };\n                let attested_by = match t.remove(\"attested_by\") {\n                    Some(toml::Value::String(s)) if s == \"repackager\" => Some(s),\n                    Some(toml::Value::String(s)) => {\n                        bail!(\"unrecognized attested_by {s:?} in lockfile\")\n                    }\n                    _ => None,\n                };\n                let additional_artifacts = match t.remove(\"additional_artifacts\") {\n                    Some(toml::Value::Array(values)) => values\n                        .into_iter()\n                        .map(|value| value.try_into().map_err(Report::from))\n                        .collect::<Result<Vec<ArtifactInfo>>>()?,\n                    Some(_) => bail!(\"additional_artifacts must be an array in lockfile\"),\n                    None => Vec::new(),\n                };\n                Ok(PlatformInfo {\n                    install,\n                    checksum,\n                    size,\n                    url,\n                    url_api,\n                    conda_deps,\n                    pkgx_deps,\n                    pkgx_provides,\n                    pkgx_runtime_env,\n                    provenance,\n                    provenance_verified,\n                    github_attestations,\n                    signer,\n                    attested_by,\n                    additional_artifacts,","sourceCodeStart":852,"sourceCodeEnd":888,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/lockfile.rs#L852-L888","documentation":"In mise.lock, each platform entry's `additional_artifacts` field must be a TOML array of artifact tables. If the key exists but holds any other TOML type (string, integer, inline table, etc.), the parser rejects it because there is no sensible interpretation of a non-array artifact list.","triggerScenarios":"Parsing a mise.lock where `additional_artifacts` under a tool's platform section is a non-array value — e.g. hand-edited to a string or table, or corrupted by a faulty merge.","commonSituations":"Manual lockfile edits that dropped the array brackets; TOML merge conflicts resolved incorrectly; scripts rewriting the lockfile without preserving the array structure.","solutions":["Fix mise.lock so additional_artifacts is an array of artifact tables: additional_artifacts = [{ url = \"...\", checksum = \"...\" }].","Remove the malformed additional_artifacts key and re-run `mise lock` to regenerate it.","Restore the lockfile from version control if a merge corrupted it."],"exampleFix":"// before (mise.lock)\nadditional_artifacts = \"artifact.tar.gz\"\n\n// after\nadditional_artifacts = [{ url = \"https://example.com/artifact.tar.gz\", checksum = \"sha256:...\" }]","handlingStrategy":"validation","validationCode":"const aa = platformEntry.get('additional_artifacts');\nif (aa != null && !Array.isArray(aa)) throw new Error('additional_artifacts must be an array');","typeGuard":"function isArrayOrAbsent(v) { return v == null || Array.isArray(v); }","tryCatchPattern":null,"preventionTips":["Use TOML array-of-tables syntax ([[...]]) for artifact lists.","Don't hand-edit lockfile artifacts; re-lock instead.","Check merge conflicts in mise.lock carefully — arrays are easy to mangle."],"tags":["lockfile","parsing","toml","type-mismatch"],"backgroundTag":"config-type-mismatch","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}