{"record":{"id":"e48511fa9a7d0009","repo":"zed-industries/zed","slug":"all-actions-in-all-names-should-be-registered","errorCode":null,"errorMessage":"All actions in all_names should be registered","messagePattern":"All actions in all_names should be registered","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui/src/action.rs","lineNumber":386,"sourceCode":"        })\n    }\n\n    pub fn all_action_names(&self) -> &[&'static str] {\n        self.all_names.as_slice()\n    }\n\n    pub fn action_schemas(\n        &self,\n        generator: &mut schemars::SchemaGenerator,\n    ) -> Vec<(&'static str, Option<schemars::Schema>)> {\n        // Use the order from all_names so that the resulting schema has sensible order.\n        self.all_names\n            .iter()\n            .map(|name| {\n                let action_data = self\n                    .by_name\n                    .get(name)\n                    .expect(\"All actions in all_names should be registered\");\n                (*name, (action_data.json_schema)(generator))\n            })\n            .collect::<Vec<_>>()\n    }\n\n    pub fn action_schema_by_name(\n        &self,\n        name: &str,\n        generator: &mut schemars::SchemaGenerator,\n    ) -> Option<Option<schemars::Schema>> {\n        self.by_name\n            .get(name)\n            .map(|action_data| (action_data.json_schema)(generator))\n    }\n\n    pub fn deprecated_aliases(&self) -> &HashMap<&'static str, &'static str> {\n        &self.deprecated_aliases\n    }","sourceCodeStart":368,"sourceCodeEnd":404,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/gpui/src/action.rs#L368-L404","documentation":"A registry consistency invariant in action_schemas: the actions registry maintains by_name alongside all_names, and generating JSON schemas iterates all_names expecting each to resolve in by_name. The expect fires only if the two collections diverge — an action name was recorded in all_names without being registered (or was deregistered from by_name only), which is a bug in registration ordering or in a test that mutates the registry.","triggerScenarios":"Thrown at crates/gpui/src/action.rs:386 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make registration update all_names and by_name together so divergence is unrepresentable","Skip missing names (or surface them in the schema output as errors) instead of panicking when generating schemas","Add a registry self-check test asserting every all_names entry resolves in by_name"],"exampleFix":null,"handlingStrategy":"validation","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"}