{"record":{"id":"f3656c22d0f6a171","repo":"gastownhall/beads","slug":"closed-does-not-support-s-operator","errorCode":null,"errorMessage":"closed does not support %s operator","messagePattern":"closed does not support (.+?) operator","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":401,"sourceCode":"}\n\nfunc (e *Evaluator) applyClosedFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tt, err := e.parseTimeValue(comp)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid closed time: %w\", err)\n\t}\n\tswitch comp.Op {\n\tcase OpGreater:\n\t\tfilter.ClosedAfter = &t\n\tcase OpGreaterEq:\n\t\tfilter.ClosedAfter = &t\n\tcase OpLess:\n\t\tfilter.ClosedBefore = &t\n\tcase OpLessEq:\n\t\tendOfDay := time.Date(t.Year(), t.Month(), t.Day(), 23, 59, 59, 999999999, t.Location())\n\t\tfilter.ClosedBefore = &endOfDay\n\tdefault:\n\t\treturn fmt.Errorf(\"closed does not support %s operator\", comp.Op.String())\n\t}\n\treturn nil\n}\n\nfunc (e *Evaluator) applyStartedFilter(comp *ComparisonNode, filter *types.IssueFilter) error {\n\tt, err := e.parseTimeValue(comp)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"invalid started time: %w\", err)\n\t}\n\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())","sourceCodeStart":383,"sourceCodeEnd":419,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L383-L419","documentation":"This error is thrown by the query evaluator when a query compares the `closed` field with an operator other than `<` or `<=` (e.g. `closed > ...`, `closed = ...`). The `closed` timestamp only maps to ClosedBefore/ClosedAfter-style filters via less-than comparisons, so any other operator is rejected. It is a query-syntax validation error, not a runtime failure.","triggerScenarios":"Running a query like `closed = 2024-01-01`, `closed >= yesterday`, or `closed != today` — any ComparisonNode on field \"closed\" whose Op is not OpLess or OpLessEq reaches the default branch of applyClosedFilter.","commonSituations":"Users writing `closed = <date>` expecting exact-day equality instead of `closed <= <date>`; hand-editing saved queries; porting SQL habits (`closed > x`) into the bd query language.","solutions":["Rewrite the comparison to use `<` or `<=` on `closed` (e.g. `closed <= 2024-06-01` means closed before end of that day).","To express 'closed after a date', use the appropriate supported filter or combine with a different field if the query language offers closed-after syntax only through >= on other time fields — check supported operators for `closed`.","Validate the query with the query parser/list command before embedding it in scripts to get this error up front."],"exampleFix":"// before (query)\nbd list 'closed = 2024-06-01'\n// after (query)\nbd list 'closed <= 2024-06-01'","handlingStrategy":"validation","validationCode":"func validateClosedOp(op string) error {\n\tif op != \"<\" && op != \"<=\" {\n\t\treturn fmt.Errorf(\"closed supports only < and <=, got %q\", op)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only build `closed` comparisons with < or <=.","Test queries through the parser before scripting them.","Encode allowed operators per field in any query-builder UI."],"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"}