{"record":{"id":"eb258240424c886a","repo":"zed-industries/zed","slug":"true-schema-should-serialize","errorCode":null,"errorMessage":"true schema should serialize","messagePattern":"true schema should serialize","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/json_schema_store/src/json_schema_store.rs","lineNumber":191,"sourceCode":"    let schema_name = schema_name.unwrap_or(path);\n\n    match schema_name {\n        \"tsconfig\" => Some(TSCONFIG_SCHEMA.to_string()),\n        \"package_json\" => Some(PACKAGE_JSON_SCHEMA.to_string()),\n        \"tasks\" => Some(TASKS_SCHEMA.clone()),\n        \"snippets\" => Some(SNIPPETS_SCHEMA.clone()),\n        \"jsonc\" => Some(JSONC_SCHEMA.clone()),\n        \"keymap\" => Some(KEYMAP_SCHEMA.clone()),\n        \"zed_inspector_style\" => {\n            #[cfg(debug_assertions)]\n            {\n                Some(INSPECTOR_STYLE_SCHEMA.clone())\n            }\n            #[cfg(not(debug_assertions))]\n            {\n                Some(\n                    serde_json::to_string(&schemars::json_schema!(true).to_value())\n                        .expect(\"true schema should serialize\"),\n                )\n            }\n        }\n\n        \"action\" => {\n            let normalized_action_name = match rest {\n                Some(name) => name,\n                None => return None,\n            };\n            let action_name = denormalize_action_name(normalized_action_name);\n\n            if let Some(cached) = ACTION_SCHEMA_CACHE.read().get(&action_name).cloned() {\n                return Some(cached);\n            }\n\n            let mut generator = settings::KeymapFile::action_schema_generator();\n            let schema =\n                settings::KeymapFile::get_action_schema_by_name(&action_name, &mut generator);","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/json_schema_store/src/json_schema_store.rs#L173-L209","documentation":"LazyLock clone-site for schema lookups: resolve_static_schema matched a known schema name (tsconfig, package_json, tasks, snippets, jsonc, keymap) and the corresponding static schema string is being handed out. The asserted initialization already happened once lazily; if serialization of the schema ever failed the first access would have panicked there, not here — this site only surfaces the precomputed value.","triggerScenarios":"Thrown at crates/json_schema_store/src/json_schema_store.rs:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["If this fires, inspect which static schema failed and fix the underlying generate_json_schema/serialize call for that settings type","Add serialization smoke tests for every static schema to catch failures at build time rather than first request"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}