{"record":{"id":"ad4814a039a34c53","repo":"Hmbown/CodeWhale","slug":"unclaimed-row","errorCode":null,"errorMessage":"unclaimed row","messagePattern":"unclaimed row","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"info","filePath":"crates/tui/src/client.rs","lineNumber":7730,"sourceCode":"            .await;\n\n        let delta = concentrate_client(&server, DEFAULT_CONCENTRATE_MODEL)\n            .fetch_catalog_delta()\n            .await\n            .expect(\"Concentrate catalog delta\");\n        assert_eq!(delta.provider, \"concentrate\");\n        assert_eq!(delta.offerings.len(), 3);\n        let default = delta\n            .offerings\n            .iter()\n            .find(|offering| offering.wire_model_id == DEFAULT_CONCENTRATE_MODEL)\n            .expect(\"default row\");\n        assert!(default.default_for_provider);\n        let unknown = delta\n            .offerings\n            .iter()\n            .find(|offering| offering.wire_model_id == \"claude-fable-5\")\n            .expect(\"unclaimed row\");\n        assert!(!unknown.default_for_provider);\n        assert_eq!(unknown.canonical_model, None);\n        assert_eq!(\n            unknown.cost, None,\n            \"no pricing claim from a gateway catalog\"\n        );\n        assert!(matches!(unknown.source, CatalogSource::Live { .. }));\n    }\n\n    /// A Codewhale-route client pointed at a loopback stub.\n    ///\n    /// `base_url` goes through the provider table rather than\n    /// `CODEWHALE_API_BASE` so the test does not mutate process env, but it\n    /// exercises the same \"declared origin\" path: the key must follow the\n    /// route to whatever origin the operator pointed it at.\n    fn codewhale_client(server: &MockServer, model: &str) -> CodewhaleClient {\n        let config = Config {\n            provider: Some(\"codewhale\".to_string()),","sourceCodeStart":7712,"sourceCodeEnd":7748,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/client.rs#L7712-L7748","documentation":"This .expect(\"unclaimed row\") is in crates/tui/src/client.rs:7730. Like the default-row expect, it finds the offering with wire_model_id \"claude-fable-5\" and panics when the catalog delta contains no such row. The test then asserts this unknown model is NOT the provider default, has no canonical mapping, and carries no cost — i.e. the gateway must not invent claims for unlisted models.","triggerScenarios":"The mock catalog response no longer includes the \"claude-fable-5\" row (fixture edited/trimmed), or a code change filters/normalizes offerings in a way that drops unknown model ids before they reach the delta.","commonSituations":"Tightening catalog filtering so only known models are returned, silently removing unclaimed rows; renaming the fixture's wire_model_id; changing the mock to only known models while this contract test still requires an unclaimed entry.","solutions":["Inspect the mounted mock JSON and confirm an offering with wire_model_id \"claude-fable-5\" is present.","Check any post-fetch filtering in fetch_catalog_delta and ensure unknown ids pass through with default_for_provider=false, canonical_model=None, cost=None.","Keep the fixture at 3 offerings (default + unknown + one more) as the test's len assertion requires.","If dropping unknown rows is now intended product behavior, rewrite the test to the new contract instead of the fixture."],"exampleFix":"// before\n.find(|offering| offering.wire_model_id == \"claude-fable-5\")\n.expect(\"unclaimed row\");\n// after\n.find(|offering| offering.wire_model_id == \"claude-fable-5\")\n.unwrap_or_else(|| panic!(\"unclaimed row 'claude-fable-5' missing: {:?}\", delta.offerings));","handlingStrategy":"validation","validationCode":"assert!(delta.offerings.iter().any(|o| o.wire_model_id == \"claude-fable-5\"), \"unclaimed row missing from catalog delta\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure catalog ingestion passes unknown model ids through rather than filtering them out.","Keep unclaimed rows with default_for_provider=false, canonical_model=None, cost=None — gateway catalogs must not invent claims.","Update fixtures and product filtering in the same commit when behavior changes."],"tags":["rust","test","catalog","assertion"],"backgroundTag":"record-not-found","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-22T11:17:16.035Z"}