{"record":{"id":"174a96334d14583e","repo":"gastownhall/beads","slug":"spec-only-supports-operator","errorCode":null,"errorMessage":"spec only supports = operator","messagePattern":"spec only supports = operator","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":442,"sourceCode":"\treturn nil\n}\n\nfunc (e *Evaluator) applyIDFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tif comp.Op != OpEquals {\n\t\treturn fmt.Errorf(\"id only supports = operator\")\n\t}\n\t// Check if it looks like a prefix (ends with *)\n\tif strings.HasSuffix(comp.Value, \"*\") {\n\t\tfilter.IDPrefix = strings.TrimSuffix(comp.Value, \"*\")\n\t} else {\n\t\tfilter.IDs = append(filter.IDs, comp.Value)\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applySpecFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tif comp.Op != OpEquals {\n\t\treturn fmt.Errorf(\"spec only supports = operator\")\n\t}\n\t// Support prefix matching\n\tif strings.HasSuffix(comp.Value, \"*\") {\n\t\tfilter.SpecIDPrefix = strings.TrimSuffix(comp.Value, \"*\")\n\t} else {\n\t\tfilter.SpecIDPrefix = comp.Value\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applyParentFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tif comp.Op != OpEquals {\n\t\treturn fmt.Errorf(\"parent only supports = operator\")\n\t}\n\tfilter.ParentID = &comp.Value\n\treturn nil\n}\n","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L424-L460","documentation":"Thrown when the `spec` field is compared with an operator other than `=`. Spec filtering supports only equality, including a trailing-`*` prefix form (which maps to SpecIDPrefix).","triggerScenarios":"Queries like `spec != BD-100`, `spec > foo`, or `spec ~ foo*` reaching applySpecFilter.","commonSituations":"Trying substring/regex matching with `~`; assuming spec behaves like free-text search; typos in saved queries after renaming fields.","solutions":["Use `spec = <spec-id>` or `spec = <prefix>*` for prefix matching.","For fuzzy/substring search, use the text-search field instead of `spec`.","Validate the query with the parser before scripting it."],"exampleFix":"// before\nbd list 'spec ~ auth*'\n// after\nbd list 'spec = auth*'","handlingStrategy":"validation","validationCode":"func validateSpecComparison(op string) error {\n\tif op != \"=\" {\n\t\treturn fmt.Errorf(\"spec supports only = (with optional trailing *), got %q\", op)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `spec = <id>` or `spec = <prefix>*`.","Use full-text search fields for fuzzy matching instead of spec.","Constrain operator choice in query builders."],"tags":["query-language","filter","operator-unsupported"],"backgroundTag":"unsupported-query-operator","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}