{"record":{"id":"ba5f87398b7a957f","repo":"gastownhall/beads","slug":"gate-condition-not-satisfied-s-use-force-to-o","errorCode":null,"errorMessage":"gate condition not satisfied: %s (use --force to override)","messagePattern":"gate condition not satisfied: (.+?) \\(use --force to override\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/close.go","lineNumber":575,"sourceCode":"\n\tvar resolved bool\n\tvar escalated bool\n\tvar reason string\n\tvar err error\n\n\tswitch {\n\tcase strings.HasPrefix(issue.AwaitType, \"gh:run\"):\n\t\tresolved, escalated, reason, err = checkGHRun(issue, func(gateID, runID string) error { return updateGateAwaitIDFunc(nil, gateID, runID) })\n\tcase strings.HasPrefix(issue.AwaitType, \"gh:pr\"):\n\t\tresolved, escalated, reason, err = checkGHPR(issue)\n\tcase issue.AwaitType == \"timer\":\n\t\tresolved, escalated, reason, err = checkTimer(issue, time.Now())\n\tcase issue.AwaitType == \"bead\":\n\t\tresolved, reason = checkBeadGate(rootCtx, store, issue.AwaitID)\n\t\tif resolved {\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"gate condition not satisfied: %s (use --force to override)\", reason)\n\t}\n\n\tif err != nil {\n\t\t// If we can't check the condition, allow close with a warning\n\t\tfmt.Fprintf(os.Stderr, \"Warning: could not evaluate gate condition: %v\\n\", err)\n\t\treturn nil\n\t}\n\n\tif resolved {\n\t\treturn nil\n\t}\n\n\tif escalated {\n\t\treturn fmt.Errorf(\"gate condition not satisfied: %s (use --force to override)\", reason)\n\t}\n\n\treturn fmt.Errorf(\"gate condition not satisfied: %s (use --force to override)\", reason)\n}","sourceCodeStart":557,"sourceCodeEnd":593,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/close.go#L557-L593","documentation":"checkGateSatisfaction enforces that an issue with `await-type: bead` has had its gating bead (await-id) resolved before the issue can be closed. If checkBeadGate reports unresolved, close is blocked and the user is told to use --force to override.","triggerScenarios":"Running `bd close` on an issue whose AwaitType is \"bead\" and whose referenced gate bead (issue.AwaitID) is not yet closed/resolved.","commonSituations":"Closing a work item whose blocking dependency bead is still open; forgetting to close the gate bead first; deliberate early closure requiring --force.","solutions":["Close (or resolve) the gate bead referenced by the issue's await-id, then retry the close.","Re-run with `--force` if you intentionally want to close past the unsatisfied gate.","Check the gate with `bd show <gate-id>` to see why it is still unresolved."],"exampleFix":"// before\nbd close bd-42\n// error: gate condition not satisfied: bd-7 still open\n// after\nclose bd-7 first, or:\nbd close bd-42 --force","handlingStrategy":"validation","validationCode":"bd show bd-42 | grep await-id   # then verify the gate bead is closed:\nbd show <await-id> | grep -i status","typeGuard":"func gateSatisfied(issue Issue, isClosed func(string) bool) bool {\n\treturn issue.AwaitType != \"bead\" || isClosed(issue.AwaitID)\n}","tryCatchPattern":"if err := checkGateSatisfaction(issue); err != nil {\n\tif strings.Contains(err.Error(), \"gate condition not satisfied\") {\n\t\t// close the gate bead first or retry with --force\n\t}\n}","preventionTips":["Check the issue's await-id before closing","Close gate beads in dependency order","Use --force only deliberately and document why"],"tags":["gates","dependency","cli"],"backgroundTag":"gate-condition-not-satisfied","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}