{"record":{"id":"8989a43043f4cd87","repo":"gastownhall/beads","slug":"parent-only-supports-operator","errorCode":null,"errorMessage":"parent only supports = operator","messagePattern":"parent only supports = operator","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/query/evaluator.go","lineNumber":455,"sourceCode":"\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\nfunc (e *Evaluator) applyBoolFilter(comp *ComparisonNode, filter *types.IssueFilter, field string) error {\n\tif comp.Op != OpEquals {\n\t\treturn fmt.Errorf(\"%s only supports = operator\", field)\n\t}\n\tval := strings.ToLower(comp.Value)\n\tvar boolVal bool\n\tswitch val {\n\tcase \"true\", \"yes\", \"1\":\n\t\tboolVal = true\n\tcase \"false\", \"no\", \"0\":\n\t\tboolVal = false\n\tdefault:\n\t\treturn fmt.Errorf(\"invalid boolean value for %s: %s\", field, comp.Value)","sourceCodeStart":437,"sourceCodeEnd":473,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/query/evaluator.go#L437-L473","documentation":"Thrown when the `parent` field is compared with any operator other than `=`. Parent filtering only supports exact parent-ID equality (sets filter.ParentID); no inequality, comparison, or prefix operators exist for it.","triggerScenarios":"Queries like `parent != bd-1`, `parent = bd-1*` is fine but `parent ~ bd-1*` or `parent > x` reach the error branch.","commonSituations":"Trying to find issues NOT children of a given parent using `!=`; assuming prefix matching like `id`/`spec` support; stale queries from query-language changes.","solutions":["Use `parent = <issue-id>` exactly.","To exclude children of a parent, use a top-level `not`/negation if the query language supports it, or filter client-side.","Note: unlike `id` and `spec`, `parent` does not document trailing-`*` prefix support — use the exact full ID."],"exampleFix":"// before\nbd list 'parent != bd-42'\n// after\nbd list 'not (parent = bd-42)'  // or filter client-side","handlingStrategy":"validation","validationCode":"func validateParentComparison(op string) error {\n\tif op != \"=\" {\n\t\treturn fmt.Errorf(\"parent supports only = with an exact issue ID, got %q\", op)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass a full exact issue ID to `parent =`.","Do not assume prefix or != support on parent.","For 'not a child of X', filter results client-side."],"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"}