{"record":{"id":"84c741829ee0e51a","repo":"jdx/mise","slug":"registry-archive-entry-is-too-large","errorCode":null,"errorMessage":"registry archive entry is too large","messagePattern":"registry archive entry is too large","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/registry.rs","lineNumber":376,"sourceCode":"    }\n\n    ensure!(\n        !sources.is_empty(),\n        \"archive does not contain registry entries\"\n    );\n    registry_from_sources(sources)\n}\n\nfn track_registry_archive_entry(\n    index: usize,\n    entry_size: u64,\n    archive_size: &mut u64,\n) -> Result<()> {\n    ensure!(\n        index < MAX_REGISTRY_ARCHIVE_ENTRIES,\n        \"registry archive contains too many entries\"\n    );\n    ensure!(\n        entry_size <= MAX_REGISTRY_ARCHIVE_ENTRY_SIZE,\n        \"registry archive entry is too large\"\n    );\n    *archive_size = archive_size\n        .checked_add(entry_size)\n        .ok_or_else(|| eyre::eyre!(\"registry archive size overflow\"))?;\n    ensure!(\n        *archive_size <= MAX_REGISTRY_ARCHIVE_SIZE,\n        \"registry archive is too large\"\n    );\n    Ok(())\n}\n\nfn registry_from_sources(sources: BTreeMap<String, String>) -> Result<Registry> {\n    let mut entries = BTreeMap::new();\n    let mut missing_version_order = false;\n    for (short, source) in sources {\n        let value: toml::Value = toml::from_str(&source)","sourceCodeStart":358,"sourceCodeEnd":394,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/registry.rs#L358-L394","documentation":"This error is thrown while validating a registry archive's individual entries during parse. The registry loader enforces a per-entry size limit (MAX_REGISTRY_ARCHIVE_ENTRY_SIZE) so that a single oversized entry cannot blow up memory or stall parsing. If any one entry's declared size exceeds that constant, parsing fails immediately.","triggerScenarios":"Calling registry parsing/loading code with an archive in which one entry's entry_size exceeds MAX_REGISTRY_ARCHIVE_ENTRY_SIZE; the check runs per entry after the entry-count check.","commonSituations":"Hand-editing or regenerating a registry archive with a huge embedded blob (e.g. a bundled binary or giant vendored file), a corrupted/truncated archive whose entry header reports a bogus size, or a tool that packs registry data without respecting size limits.","solutions":["Find the oversized entry in the archive and remove or split it so each entry is under MAX_REGISTRY_ARCHIVE_ENTRY_SIZE","Regenerate the registry archive with the official packing tool instead of hand-rolled tooling","Re-download the archive — a corrupted download may have malformed entry headers","If the data legitimately needs to be larger, host it out-of-band rather than embedding it in a registry entry"],"exampleFix":"// before: single entry embedding a 200MB vendored binary\n[[tools.node.backends]]\narchive = \"node-v20-bundle.tar.gz\" // 200MB entry\n// after: keep registry entries small; host large artifacts externally\n[[tools.node.backends]]\nurl = \"https://example.com/node-v20.tar.gz\"","handlingStrategy":"validation","validationCode":"const MAX_REGISTRY_ARCHIVE_ENTRY_SIZE: u64 = /* limit from src/registry.rs */;\nfn validate_entry_size(entry_size: u64) -> Result<(), String> {\n    if entry_size > MAX_REGISTRY_ARCHIVE_ENTRY_SIZE {\n        return Err(format!(\"entry size {entry_size} exceeds limit {MAX_REGISTRY_ARCHIVE_ENTRY_SIZE}\"));\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep large artifacts out of registry entries; host them via URLs instead","Run the registry packing tool's validation step in CI before publishing","Verify archive integrity (checksums) after download to catch corrupt headers"],"tags":["registry","validation","size-limit"],"backgroundTag":"file-size-limit-exceeded","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"}