{"record":{"id":"355c8490a7db3838","repo":"jdx/mise","slug":"unknown-shim-mode","errorCode":null,"errorMessage":"Unknown shim mode","messagePattern":"Unknown shim mode","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/shims.rs","lineNumber":576,"sourceCode":"            })\n        }\n        \"hardlink\" => fs::hard_link(mise_bin, symlink_path).wrap_err_with(|| {\n            eyre!(\n                \"Failed to create hardlink from {} to {}\",\n                display_path(mise_bin),\n                display_path(symlink_path)\n            )\n        }),\n        \"symlink\" => {\n            std::os::windows::fs::symlink_file(mise_bin, symlink_path).wrap_err_with(|| {\n                eyre!(\n                    \"Failed to create symlink from {} to {}\",\n                    display_path(mise_bin),\n                    display_path(symlink_path)\n                )\n            })\n        }\n        _ => panic!(\"Unknown shim mode\"),\n    }\n}\n\n#[cfg(unix)]\nfn add_shim(mise_bin: &Path, symlink_path: &Path, _shim: &str) -> Result<()> {\n    file::make_symlink(mise_bin, symlink_path).wrap_err_with(|| {\n        eyre!(\n            \"Failed to create symlink from {} to {}\",\n            display_path(mise_bin),\n            display_path(symlink_path)\n        )\n    })?;\n    Ok(())\n}\n\npub(crate) struct ShimDiffs {\n    pub missing: BTreeSet<String>,\n    pub extra: BTreeSet<String>,","sourceCodeStart":558,"sourceCodeEnd":594,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/shims.rs#L558-L594","documentation":"Defensive assertion in `load_bootstrap_config_maps`: the code finds the config file declaring `[bootstrap].config_roots` by iterating `config.config_files` (src/config/mod.rs:1537), then immediately fetches that same path back out of the map. Since the key came from the map itself, `.get()` cannot miss — hitting this expect indicates an internal consistency bug in mise's bootstrap/monorepo config loading, not a user configuration error.","triggerScenarios":"Having a `mise.toml` with `[bootstrap] config_roots = [...]` in the loaded config hierarchy AND an internal state where the declaring path is no longer a key of `config.config_files` at fetch time — e.g. the map was rebuilt or replaced between the `find_map` and the `get` in a buggy mise version.","commonSituations":"New mise releases changing bootstrap/monorepo internals; monorepo root declarations with nested config roots; essentially only occurs as a mise bug — no legitimate user configuration triggers it.","solutions":["Update mise — as an internal invariant, the fix lands in the CLI, not your config","Re-run with `RUST_BACKTRACE=1` to capture the trace for a report","Report at https://github.com/jdx/mise/issues with your `[bootstrap]`/`[monorepo]` blocks (redacted)","As a stopgap, comment out `[bootstrap].config_roots` until a fixed release is available"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep `[bootstrap].config_roots` patterns pointing at stable, existing directories","Pin the mise version used by the team so a single bad release cannot break everyone at once","Run `RUST_BACKTRACE=1` in CI wrappers so invariant panics include traces when reported"],"tags":["bootstrap","config-roots","monorepo","config","internal-invariant","panic"],"backgroundTag":"unreachable-invariant-panic","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}