beads/docs/workflows
Bee b485a0975e
feat(gate): bd gate create --repo names the repository a gh:run/gh:pr gate is checked in (#7176)
* feat(gate): bd gate create --repo names the repository a gh:run/gh:pr gate is checked in

A gh:pr gate for a PR in another repository could only be pointed there
through the blocked issue's metadata.repo; with none, `bd gate check`
resolved the bare number against the current repository and escalated
"pull request not found" on every check, with nothing in the text saying
which repository it had looked in. Five gates armed that way on 2026-10-03
never released after their PRs merged.

- `--repo OWNER/REPO` (or HOST/OWNER/REPO) on `bd gate create`: an
  explicit value wins over the inherited one; it goes through the same
  validator as metadata.repo (now `validateGitHubRepo`, split out of
  `githubRepoFromIssue`); it is refused on human/timer/bead gates, where
  nothing would read it. Both create routes call one helper,
  `gateMetadataForCreate`, so the flag cannot drift between them.
- The gh:pr not-found escalation reason names the repository the number
  was resolved against ("pull request not found: #42 in owner/repo" or
  "... in the current repository").
- Help text, docs/workflows/gates.md and the plugin's ASYNC_GATES.md say
  when the flag is needed. docs/cli-reference is pinned to the release
  and regenerates on its own.

Tests: TestGateMetadataForCreateExplicitRepo, TestCheckGHPRNotFoundNamesTheRepository
(unit); TestEmbeddedGateCreate/create_gate_with_repo + /repo_flag_on_human_gate_is_refused
(embedded); TestProxiedServerGateCreateInheritsRepoMetadata/explicit_repo_flag_wins_over_inherited
(proxied).

Refs ghosttrack/wyvern wy-2jh4v5.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* fix(gate): keep the create --repo workspace bypass off bd gate create

The root pre-run bypass for `bd create --repo` (GH#3686) matched the leaf
name "create", so `bd gate create --repo` outside a workspace took it: an
OWNER/REPO slug opened a stray ./OWNER/REPO/.beads workspace under the cwd
and failed with "issue not found", and an https:// URL skipped store wiring
and panicked on the nil store. Key the bypass on the command path, as
proxy_capability.go already does; gate create now fails with "no beads
database found" outside a workspace like every other command, and top-level
create --repo (local path and remote URL) still takes the bypass.

Also name the repository in the gh:run not-found escalation, as the gh:pr
one already does. Only stderr with a lowercase "not found" reaches that
arm: real gh reports a missing run as "HTTP 404: Not Found (<api url>)",
which takes the existing error path, and that URL already names the
repository. The match stays case-sensitive because a token without access
to the repository gets the same 404.

Tests: TestEmbeddedCreateRepoFromNonBeadsCwd/gate_create_repo_flag_is_not_a_workspace
(slug and URL forms, built binary run from an empty cwd) and the
cross_repo/current_repo subtests of TestCheckGHRunNotFoundNamesTheRepository
fail with the fixes reverted. Its real_gh_404_names_the_repository subtest
feeds gh's real 404 stderr and fails if the match is widened.

Agent-Signature: claude-code-claude-opus-5-5-max on behalf of Gas City Adopt-PR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Eddie the Engineer <julianknutsen@users.noreply.github.com>
2026-10-08 08:02:46 +00:00
..
formulas.md docs: apply PR #4722 review feedback to user docs 2026-07-12 11:06:57 -07:00
gates.md feat(gate): bd gate create --repo names the repository a gh:run/gh:pr gate is checked in (#7176) 2026-10-08 08:02:46 +00:00
index.md docs: canonical concept page, section overviews, and concept diagrams 2026-07-12 10:37:07 -07:00
molecules.md docs: caveat --parent label inheritance with size/effort labels (#4562) (#5123) 2026-07-31 01:44:50 -07:00
todo.md fix(ui): stop using blocked ● for priority in CLI output (#5511) 2026-08-10 06:19:51 -07:00
wisps.md docs: fix phantom command surfaces in workflow pages 2026-07-12 10:37:07 -07:00