{"record":{"id":"2dcc01e2fa42e052","repo":"jdx/mise","slug":"executable-identity-exceeds-max-executable-identi","errorCode":null,"errorMessage":"executable identity exceeds {MAX_EXECUTABLE_IDENTITY_SIZE} bytes","messagePattern":"executable identity exceeds (.+?) bytes","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"crates/mise-cache-core/src/agent.rs","lineNumber":1706,"sourceCode":"    ) -> Result<AgentResponse> {\n        let key = self.executable_identity_key(executable, environment)?;\n        let stdout = self\n            .executable_identities\n            .lock()\n            .unwrap()\n            .get(&key)\n            .cloned();\n        Ok(AgentResponse::ExecutableIdentity { stdout })\n    }\n\n    fn store_executable_identity(\n        &self,\n        executable: PathBuf,\n        environment: BTreeMap<String, Option<String>>,\n        stdout: Vec<u8>,\n    ) -> Result<AgentResponse> {\n        if stdout.len() > MAX_EXECUTABLE_IDENTITY_SIZE {\n            bail!(\"executable identity exceeds {MAX_EXECUTABLE_IDENTITY_SIZE} bytes\");\n        }\n        let key = self.executable_identity_key(executable, environment)?;\n        let mut identities = self.executable_identities.lock().unwrap();\n        let is_new = !identities.contains_key(&key);\n        let previous_size = identities.get(&key).map_or(0, Vec::len);\n        if is_new && identities.len() >= MAX_EXECUTABLE_IDENTITIES {\n            bail!(\"executable identity cache contains too many entries\");\n        }\n        let retained_bytes = identities.values().map(Vec::len).sum::<usize>();\n        if retained_bytes - previous_size + stdout.len() > MAX_EXECUTABLE_IDENTITY_BYTES {\n            bail!(\"executable identity cache contains too many bytes\");\n        }\n        identities.insert(key, stdout.clone());\n        Ok(AgentResponse::ExecutableIdentity {\n            stdout: Some(stdout),\n        })\n    }\n","sourceCodeStart":1688,"sourceCodeEnd":1724,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/crates/mise-cache-core/src/agent.rs#L1688-L1724","documentation":"store_executable_identity rejects identity stdout blobs larger than MAX_EXECUTABLE_IDENTITY_SIZE (65,536 bytes). Identity output is expected to be a tiny version string; 64KiB+ output almost always means the wrong executable was probed.","triggerScenarios":"Probing an executable that prints a long usage dump, debug log, or binary garbage instead of a one-line version (e.g. pointing at a script without a -V handler, or capturing stderr chatter into stdout).","commonSituations":"Misconfigured executable path (wrapper script, shell function shim, wrong arch binary); verbose toolchain wrappers that echo environment dumps.","solutions":["Check which executable is being probed and run its version command by hand — >64KiB output means the wrong binary or flags","Capture only the needed identity line(s) (e.g. first line of `rustc -vV`) before storing","Note there is no runtime knob: the 64KiB limit is the compiled constant MAX_EXECUTABLE_IDENTITY_SIZE"],"exampleFix":"// before\nlet stdout = run_capture(rustc, [\"--version\", \"--verbose\", \"--help\"]).stdout;\n// after\nlet stdout = run_capture(rustc, [\"-vV\"]).stdout;\nassert!(stdout.len() <= 64 * 1024);","handlingStrategy":"validation","validationCode":"const MAX_IDENTITY_SIZE: usize = 64 * 1024;\nlet stdout = capture_identity_stdout(&executable).await?;\nif stdout.len() > MAX_IDENTITY_SIZE {\n    bail!(\"identity probe produced {} bytes; wrong executable or flags?\", stdout.len());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Probe with the tool's terse version flag (e.g. rustc -vV) and capture stdout only","Run the probe manually once when wiring up a new executable to see its real output size","Oversized identity output is a misconfiguration smell — fix the probe, not the limit"],"tags":["mise-cache","executable-identity","payload-limit"],"backgroundTag":"payload-too-large","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}