{"record":{"id":"4aa80f89fd7fc73d","repo":"tinyhumansai/openhuman","slug":"tokenjuice-ml-compression-enabled-is-false","errorCode":null,"errorMessage":"tokenjuice.ml_compression_enabled is false","messagePattern":"tokenjuice\\.ml_compression_enabled is false","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/runtime/python_server/kompress.rs","lineNumber":109,"sourceCode":"        })\n        .collect();\n    venv_dir.join(format!(\".openhuman-kompress-ready-{safe_model}\"))\n}\n\n/// Cheap, network-free probe: are torch + transformers + the model provisioned?\npub fn kompress_provisioned(config: &Config) -> bool {\n    let venv = kompress_venv_dir(config);\n    marker_path(&venv, &config.tokenjuice.ml_model_id).exists() && venv_python_path(&venv).exists()\n}\n\n/// Ensure a dedicated Kompress venv exists (torch + transformers + model).\npub async fn ensure_kompress(config: &Config) -> Result<KompressRuntime> {\n    let _guard = provision_lock().await.lock().await;\n    if !config.runtime_python.enabled {\n        bail!(\"runtime_python disabled — cannot provision Kompress\");\n    }\n    if !config.tokenjuice.ml_compression_enabled {\n        bail!(\"tokenjuice.ml_compression_enabled is false\");\n    }\n\n    let venv_dir = kompress_venv_dir(config);\n    let venv_python = venv_python_path(&venv_dir);\n    let hf = hf_home(config);\n\n    if marker_path(&venv_dir, &config.tokenjuice.ml_model_id).exists() && venv_python.exists() {\n        return Ok(KompressRuntime {\n            python_bin: venv_python,\n            hf_home: hf,\n        });\n    }\n\n    tokio::fs::create_dir_all(&hf)\n        .await\n        .with_context(|| format!(\"creating kompress hf home {}\", hf.display()))?;\n\n    log::info!(","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/runtime/python_server/kompress.rs#L91-L127","documentation":"ensure_kompress's precondition check found tokenjuice.ml_compression_enabled = false — the caller asked for the Kompress runtime while the feature flag that owns it is off. Deliberate opt-out, not a provisioning failure.","triggerScenarios":"Thrown at src/openhuman/runtime/python_server/kompress.rs:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set tokenjuice.ml_compression_enabled = true if ML compression is wanted","Avoid the code path that requests Kompress compression"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}