{"record":{"id":"843bb60871b11df6","repo":"gastownhall/beads","slug":"s-is-not-a-proto-missing-s-label","errorCode":null,"errorMessage":"%s is not a proto (missing '%s' label)","messagePattern":"(.+?) is not a proto \\(missing '(.+?)' label\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/mol_proxied_server.go","lineNumber":68,"sourceCode":"\t}\n\n\tres, err := uow.RunTxResult(ctx, uowProvider, func(ctx context.Context, uw uow.UnitOfWork) (pourProxiedResult, string, error) {\n\t\tw := newUOWMolWriter(uw)\n\n\t\tsubgraph := formulaSubgraph\n\t\tprotoID := formulaProtoID\n\t\tif subgraph == nil {\n\t\t\tresolvedID, err := utils.ResolvePartialID(ctx, w, in.protoArg)\n\t\t\tif err != nil {\n\t\t\t\treturn pourProxiedResult{}, \"\", fmt.Errorf(\"%s not found as formula or proto ID\", in.protoArg)\n\t\t\t}\n\t\t\tprotoID = resolvedID\n\t\t\tprotoIssue, err := w.GetIssue(ctx, protoID)\n\t\t\tif err != nil {\n\t\t\t\treturn pourProxiedResult{}, \"\", fmt.Errorf(\"loading proto %s: %w\", protoID, err)\n\t\t\t}\n\t\t\tif !isProto(protoIssue) {\n\t\t\t\treturn pourProxiedResult{}, \"\", fmt.Errorf(\"%s is not a proto (missing '%s' label)\", protoID, MoleculeLabel)\n\t\t\t}\n\t\t\tsubgraph, err = loadTemplateSubgraph(ctx, w, protoID)\n\t\t\tif err != nil {\n\t\t\t\treturn pourProxiedResult{}, \"\", fmt.Errorf(\"loading proto: %w\", err)\n\t\t\t}\n\t\t}\n\n\t\ttype attachmentInfo struct {\n\t\t\tid       string\n\t\t\tissue    *types.Issue\n\t\t\tsubgraph *TemplateSubgraph\n\t\t}\n\t\tvar attachments []attachmentInfo\n\t\tfor _, attachArg := range in.attachArgs {\n\t\t\tattachID, err := utils.ResolvePartialID(ctx, w, attachArg)\n\t\t\tif err != nil {\n\t\t\t\treturn pourProxiedResult{}, \"\", fmt.Errorf(\"resolving attachment ID %s: %w\", attachArg, err)\n\t\t\t}","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/mol_proxied_server.go#L50-L86","documentation":"bd mol pour requires the target issue to be a proto — an issue carrying the molecule label (MoleculeLabel). After loading the issue, isProto checks the label; if missing, pour refuses with '<id> is not a proto (missing '<label>' label)'. This prevents pouring an ordinary issue as if it were a reusable template.","triggerScenarios":"Running `bd mol pour <id>` where <id> resolves to a regular issue (no molecule label): passing a child step ID instead of the molecule root ID, or an issue whose molecule label was removed (e.g. after promotion/hydration of a molecule into regular issues).","commonSituations":"Copy-pasting a step ID like bd-456 (a child) instead of the parent molecule ID; labels stripped by an import/export round-trip or a sync conflict; trying to pour a previously-poured instance that no longer carries the proto label.","solutions":["Use the molecule ROOT id, not a child step: bd show <id> and check the parent-child dependencies","Verify the label: bd show <id> should list the molecule label; re-add it if stripped (bd update <id> --add-label <MoleculeLabel> or the equivalent label command)","If the molecule was promoted to regular issues, re-create a proto with bd mol create / pour from the original formula","Confirm with bd mol list which IDs are actual protos"],"exampleFix":"// before: pouring a child\n$ bd mol pour bd-456\nError: bd-456 is not a proto (missing 'molecule' label)\n// after: use the molecule root\n$ bd mol pour bd-100","handlingStrategy":"validation","validationCode":"// confirm the target carries the molecule label before pouring\nissue, err := reader.GetIssue(ctx, protoID)\nif err == nil && !hasLabel(issue.Labels, MoleculeLabel) {\n\treturn fmt.Errorf(\"%s is not a molecule proto\", protoID)\n}","typeGuard":"func isProtoIssue(issue *types.Issue) bool {\n\treturn issue != nil && slices.Contains(issue.Labels, MoleculeLabel)\n}","tryCatchPattern":"err := pourCmd(protoID)\nif err != nil && strings.Contains(err.Error(), \"is not a proto\") {\n\treturn fmt.Errorf(\"%s is not a proto; pick a root from `bd mol list`\", protoID)\n}","preventionTips":["Always pour molecule ROOT ids, never child step ids","Check bd show <id> labels before pouring","Never strip the molecule label from protos during import/export scripts","Use bd mol list as the source of truth for pourable protos"],"tags":["cli","molecule","label","validation"],"backgroundTag":"missing-required-label","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}