{"record":{"id":"79fbcb8a718a1df7","repo":"Hmbown/CodeWhale","slug":"every-controloperation-has-exactly-one-descriptor","errorCode":null,"errorMessage":"every ControlOperation has exactly one descriptor","messagePattern":"every ControlOperation has exactly one descriptor","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/lane/src/control.rs","lineNumber":311,"sourceCode":"        Self::FleetList,\n        Self::FleetStatus,\n        Self::FleetInterrupt,\n        Self::FleetRestart,\n        Self::FleetResume,\n    ];\n\n    /// Stable wire id shared by every surface, receipt, and test.\n    #[must_use]\n    pub fn id(self) -> &'static str {\n        self.descriptor().id\n    }\n\n    #[must_use]\n    pub fn descriptor(self) -> &'static OperationDescriptor {\n        OPERATIONS\n            .iter()\n            .find(|descriptor| descriptor.operation == self)\n            .expect(\"every ControlOperation has exactly one descriptor\")\n    }\n\n    /// Resolve a descriptor from its stable id (`\"lane.status\"`).\n    #[must_use]\n    pub fn from_id(id: &str) -> Option<Self> {\n        OPERATIONS\n            .iter()\n            .find(|descriptor| descriptor.id == id)\n            .map(|descriptor| descriptor.operation)\n    }\n\n    /// Resolve a descriptor from a domain plus the verb word a user typed.\n    ///\n    /// Every surface routes through this so `/lane interrupt`, a hotbar\n    /// dispatch of the same command, and `codewhale lane interrupt` cannot\n    /// drift onto different verbs. Compatibility spellings live here once.\n    #[must_use]\n    pub fn parse_verb(domain: ControlDomain, verb: &str) -> Option<Self> {","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/lane/src/control.rs#L293-L329","documentation":"ControlOperation::descriptor() searches the OPERATIONS table for the variant's descriptor and unwraps, backed by the invariant that each ControlOperation variant appears exactly once in that table. It fires only when a variant is added or renamed without updating OPERATIONS — a code-maintenance bug.","triggerScenarios":"Thrown at crates/lane/src/control.rs:311 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add or fix the OperationDescriptor entry for the missing ControlOperation variant","Keep/extend the exhaustive-variants test that pins OPERATIONS against the enum"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}