{"record":{"id":"e3b0f849ba2618b8","repo":"rohitg00/ai-engineering-from-scratch","slug":"fixture-f-id-unknown-category-f-category","errorCode":null,"errorMessage":"fixture {f.id} unknown category {f.category}","messagePattern":"fixture (.+?) unknown category (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"phases/19-capstone-projects/82-jailbreak-taxonomy/code/main.py","lineNumber":110,"sourceCode":"    def from_default(cls) -> \"Taxonomy\":\n        return cls(load_fixtures())\n\n    def validate(self) -> None:\n        if not self._records:\n            raise ValueError(\"empty fixture corpus\")\n        seen_ids: set[str] = set()\n        per_cat: defaultdict[str, int] = defaultdict(int)\n        for f in self._records:\n            if not f.prompt.strip():\n                raise ValueError(f\"fixture {f.id} has empty prompt\")\n            if f.id in seen_ids:\n                raise ValueError(f\"duplicate fixture id: {f.id}\")\n            seen_ids.add(f.id)\n            lo, hi = SEVERITY_RANGE\n            if not (lo <= f.severity <= hi):\n                raise ValueError(f\"fixture {f.id} severity {f.severity} out of {SEVERITY_RANGE}\")\n            if f.category not in CATEGORIES:\n                raise ValueError(f\"fixture {f.id} unknown category {f.category}\")\n            per_cat[f.category] += 1\n        for cat in CATEGORIES:\n            if per_cat[cat] < MIN_PER_CATEGORY:\n                raise ValueError(f\"category {cat} has {per_cat[cat]} fixtures, need >= {MIN_PER_CATEGORY}\")\n\n    def all(self) -> list[Fixture]:\n        return list(self._records)\n\n    def by_category(self) -> dict[str, list[Fixture]]:\n        grouped: dict[str, list[Fixture]] = {c: [] for c in CATEGORIES}\n        for f in self._records:\n            grouped[f.category].append(f)\n        return grouped\n\n    def stats(self) -> dict[str, object]:\n        per_cat = {c: 0 for c in CATEGORIES}\n        sev_hist = {s: 0 for s in range(SEVERITY_RANGE[0], SEVERITY_RANGE[1] + 1)}\n        for f in self._records:","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/rohitg00/ai-engineering-from-scratch/blob/39ea8a1c6d0b61f071226eff7ede4d4105fed820/phases/19-capstone-projects/82-jailbreak-taxonomy/code/main.py#L92-L128","documentation":"Error \"fixture {f.id} unknown category {f.category}\" thrown in rohitg00/ai-engineering-from-scratch.","triggerScenarios":"Thrown at phases/19-capstone-projects/82-jailbreak-taxonomy/code/main.py:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"39ea8a1c6d0b61f071226eff7ede4d4105fed820","analyzedAt":"2026-08-26T03:13:46.626Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}