{"record":{"id":"e3cbf6b6a5959219","repo":"gastownhall/beads","slug":"unknown-dependency-type-q-valid-types-s","errorCode":null,"errorMessage":"unknown dependency type %q; valid types: %s","messagePattern":"unknown dependency type %q; valid types: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/create_deps.go","lineNumber":189,"sourceCode":"\t\treturn types.DepBlocks\n\tdefault:\n\t\treturn t\n\t}\n}\n\n// validateDependencyType enforces that a (post-alias-normalization)\n// dependency type is both structurally valid and one of the well-known\n// built-in types. `bd create --deps` and `bd dep add --type` intentionally\n// reject custom/unknown dependency types (see the comment on\n// WellKnownDependencyTypes) — this is the single shared check so both\n// commands stay in lockstep.\nfunc validateDependencyType(t types.DependencyType) error {\n\tif !t.IsValid() {\n\t\treturn fmt.Errorf(\"invalid dependency type %q (must be non-empty, max %d chars); valid types: %s\",\n\t\t\tt, types.MaxDependencyTypeLen, createDepsAcceptedTypeList())\n\t}\n\tif !t.IsWellKnown() {\n\t\treturn fmt.Errorf(\"unknown dependency type %q; valid types: %s\",\n\t\t\tt, createDepsAcceptedTypeList())\n\t}\n\treturn nil\n}\n\n// buildWaitsFor validates and constructs a WaitsForSpec from the --waits-for\n// and --waits-for-gate flag values. gateExplicit must be true when the caller\n// explicitly passed --waits-for-gate (not relying on its default); in that case\n// a missing spawnerID is rejected rather than silently ignored.\nfunc buildWaitsFor(spawnerID, gate string, gateExplicit bool) (*domain.WaitsForSpec, error) {\n\tspawnerID = strings.TrimSpace(spawnerID)\n\tif spawnerID == \"\" {\n\t\tif gateExplicit {\n\t\t\treturn nil, fmt.Errorf(\"--waits-for-gate requires --waits-for (no spawner ID specified)\")\n\t\t}\n\t\treturn nil, nil\n\t}\n\tif gate == \"\" {","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/create_deps.go#L171-L207","documentation":"The second validateDependencyType branch: the type string is well-formed (non-empty, within length) but not in WellKnownDependencyTypes (blocks, parent-child, conditional-blocks, waits-for, related, discovered-from, ...). `bd create --deps` and `bd dep add` deliberately reject custom dependency types so both commands stay in lockstep; the error lists the valid set.","triggerScenarios":"`bd create ... --deps \"requires:bd-5\"` or `bd dep add bd-1 --type finish-to-start --target bd-2` — any plausible-sounding but non-built-in type, from parseDepSpec, readBulkDepEdges (bulk files), or runDepAddProxiedServer.","commonSituations":"Users porting habits from other trackers (e.g. \"requires\", \"duplicates\", \"finish-to-start\"); bulk dep files written for an older beads version that allowed custom types; typos like \"parent\" instead of \"parent-child\".","solutions":["Replace the type with one from the printed valid list (blocks, parent-child, conditional-blocks, waits-for, related, discovered-from)","Use \"blocked-by\"/\"depends-on\" aliases if you meant gating semantics — they map to blocks","If you truly need a custom relation, model it as a related edge plus a label, or via an external reference"],"exampleFix":"// before\nbd dep add bd-1 --type duplicates --target bd-2\n// after\nbd dep add bd-1 --type related --target bd-2","handlingStrategy":"validation","validationCode":"var wellKnown = map[string]bool{\n  \"blocks\":true, \"parent-child\":true, \"conditional-blocks\":true,\n  \"waits-for\":true, \"related\":true, \"discovered-from\":true,\n}\nif !wellKnown[strings.TrimSpace(depType)] {\n    return fmt.Errorf(\"type %q not accepted by bd; use a built-in\", depType)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Consult the error's valid-types list rather than inventing relations","Use blocked-by/depends-on aliases for gating semantics","Model custom relations as related + label, since custom types are rejected by design"],"tags":["cli","dependencies","validation","custom-types-rejected"],"backgroundTag":"invalid-dependency-type","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}