{"record":{"id":"1deb2a920c5f870e","repo":"gastownhall/beads","slug":"resolving-parent-q-not-found","errorCode":null,"errorMessage":"resolving parent %q: not found","messagePattern":"resolving parent %q: not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/label_proxied_server.go","lineNumber":154,"sourceCode":"\tlabel := strings.TrimSpace(args[1])\n\tif label == \"\" {\n\t\treturn HandleErrorRespectJSON(\"label cannot be empty\")\n\t}\n\tif strings.HasPrefix(label, \"provides:\") {\n\t\treturn HandleErrorRespectJSON(\"'provides:' labels are reserved for cross-project capabilities. Hint: use 'bd ship %s' instead\", strings.TrimPrefix(label, \"provides:\"))\n\t}\n\tif uowProvider == nil {\n\t\treturn HandleError(\"proxied-server UOW provider not initialized\")\n\t}\n\n\tvar (\n\t\tchildren []*types.Issue\n\t\tparentID string\n\t)\n\terr := uow.RunTx(ctx, uowProvider, func(ctx context.Context, uw uow.UnitOfWork) (string, error) {\n\t\tparent, _, rerr := workapi.GetIssueOrWisp(ctx, workapi.NewUOWDetailSource(uw), args[0])\n\t\tif errors.Is(rerr, storage.ErrNotFound) {\n\t\t\treturn \"\", fmt.Errorf(\"resolving parent %q: not found\", args[0])\n\t\t}\n\t\tif rerr != nil {\n\t\t\treturn \"\", fmt.Errorf(\"resolving parent %q: %w\", args[0], rerr)\n\t\t}\n\t\tparentID = parent.ID\n\n\t\tpage, err := uw.IssueUseCase().SearchIssues(ctx, \"\", types.IssueFilter{ParentID: &parentID})\n\t\tif err != nil {\n\t\t\treturn \"\", fmt.Errorf(\"searching children of %s: %w\", parentID, err)\n\t\t}\n\t\tchildren = page.Items\n\t\tif len(children) == 0 {\n\t\t\treturn \"\", nil\n\t\t}\n\t\t// THE ONE SURVIVING WISP SWITCH, and it is named rather than hidden.\n\t\t// This is the same four-way shape ga-26w10 deleted from `bd label` and\n\t\t// ga-2ltro.12 deleted from `bd tag`, `bd set-state` and the molecule\n\t\t// port — the branch a front door can get backwards and put a wisp's","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/label_proxied_server.go#L136-L172","documentation":"In the proxied-server label path, after GetIssueOrWisp returns storage.ErrNotFound the error is normalized to `resolving parent %q: not found`, meaning the parent issue ID supplied to the label command does not exist (or is not visible through the server).","triggerScenarios":"`bd label <sub> <parent-id> ...` against a proxied server where args[0] matches no issue: mistyped ID, issue deleted, or the wisp/issue is not visible to the current connection.","commonSituations":"Stale IDs cached in scripts after an issue was deleted; pointing at the wrong database via server config; case/prefix mistakes in the ID.","solutions":["Verify the parent exists: bd show <parent-id> (or bd list).","Correct the ID and retry the label command.","Confirm the CLI is connected to the server/database that actually contains the issue."],"exampleFix":"// before\nbd label add bd-999 mylabel   // bd-999 not found\n// after\nbd label add bd-123 mylabel   // verified to exist","handlingStrategy":"validation","validationCode":"bd show \"$PARENT_ID\" >/dev/null 2>&1 || { echo \"parent $PARENT_ID not found\" >&2; exit 1; }","typeGuard":null,"tryCatchPattern":"out=$(bd label add \"$PARENT_ID\" \"$LABEL\" 2>&1) || {\n  case \"$out\" in *\": not found\"*) echo \"verify id: $PARENT_ID\" >&2;; *) echo \"$out\" >&2;; esac\n  exit 1\n}","preventionTips":["Validate parent IDs exist before label commands against a proxied server.","Ensure the CLI server config points at the database containing the issue.","Prune scripts referencing deleted issues."],"tags":["labels","proxied-server","not-found"],"backgroundTag":"issue-id-resolution-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}