{"record":{"id":"4f5bff8da90a586b","repo":"gastownhall/beads","slug":"id-only-supports-operator","errorCode":null,"errorMessage":"id only supports = operator","messagePattern":"id only supports = operator","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":429,"sourceCode":"\tswitch comp.Op {\n\tcase OpGreater:\n\t\tfilter.StartedAfter = &t\n\tcase OpGreaterEq:\n\t\tfilter.StartedAfter = &t\n\tcase OpLess:\n\t\tfilter.StartedBefore = &t\n\tcase OpLessEq:\n\t\tendOfDay := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 999999999, t.Location())\n\t\tfilter.StartedBefore = &endOfDay\n\tdefault:\n\t\treturn fmt.Errorf(\"started does not support %s operator\", comp.Op.String())\n\t}\n\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 {","sourceCodeStart":411,"sourceCodeEnd":447,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L411-L447","documentation":"Thrown when the `id` field is used with any operator other than `=`. ID matching only supports equality (with a trailing `*` for prefix matching), so operators like `!=`, `>`, or `~` are rejected.","triggerScenarios":"Queries like `id != bd-123`, `id > bd-100`, or `id ~ bd-1*` reaching applyIDFilter.","commonSituations":"Users attempting exclusion queries with `!=` and not knowing the negation must be expressed differently; guessing regex-ish operators; old SQL habits.","solutions":["Use `id = <issue-id>` for exact match or `id = <prefix>*` for prefix match.","To exclude an ID, combine with `not` at the query level if supported, or filter results client-side.","Drop regex/comparison operators; IDs support only equality semantics."],"exampleFix":"// before\nbd list 'id ~ bd-12*'\n// after\nbd list 'id = bd-12*'","handlingStrategy":"validation","validationCode":"func validateIDComparison(op, val string) error {\n\tif op != \"=\" {\n\t\treturn fmt.Errorf(\"id supports only = (with optional trailing *), got %q\", op)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `id = <id>` or `id = <prefix>*` only.","Handle exclusions at the query/result level, not with != on id.","Do not attempt regex operators on ID fields."],"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"}