Commit Graph

5459 Commits

Author SHA1 Message Date
Marvin Bitterlich
68da7c9f78 fix(mcp): support custom issue types and statuses (#1023)
Change IssueType and IssueStatus from Literal to str to support
custom types configured via:
  bd config set types.custom "agent,molecule,event"
  bd config set status.custom "awaiting_review,awaiting_testing"

The CLI handles validation of these values against the configured
options. The MCP layer is just a transport and shouldn't re-validate
what the CLI already validates.

This fixes Pydantic validation errors when listing issues that have
custom types like 'event', 'molecule', or 'agent'.

Built-in types: bug, feature, task, epic, chore
Built-in statuses: open, in_progress, blocked, deferred, closed
2026-01-11 18:17:01 -08:00
Eugene Sukhodolin
d04bffb9b6 fix(validation): support hyphenated prefixes in ValidateIDFormat (#1013)
* test(validation): add failing tests for hyphenated prefix parsing

Reproduces bug where `bd create --parent` fails for projects with
hyphenated prefixes like "bead-me-up" or "web-app".

Root cause: ValidateIDFormat splits on first hyphen, so:
  "bead-me-up-3e9.1" → prefix "bead" (wrong, should be "bead-me-up")

The bug flow in create.go:
1. User runs: bd create "Child" --parent bead-me-up-3e9
2. GetNextChildID generates: bead-me-up-3e9.1
3. ValidateIDFormat extracts: "bead" (splits at first hyphen)
4. ValidatePrefix compares: "bead" vs "bead-me-up" → MISMATCH

Tests added:
- TestValidateIDFormat: 6 cases for hyphenated prefix IDs
- TestValidateIDFormat_ParentChildFlow: simulates exact --parent flow,
  showing simple prefixes pass while hyphenated prefixes fail

Workaround: use --force flag to bypass prefix validation.

* fix(validation): support hyphenated prefixes in ValidateIDFormat

Use utils.ExtractIssuePrefix instead of naive first-hyphen splitting.
This fixes bd create --parent failing for projects with hyphenated
prefixes like "bead-me-up" or "web-app".

Before: "bead-me-up-3e9" → prefix "bead" (wrong)
After:  "bead-me-up-3e9" → prefix "bead-me-up" (correct)

ExtractIssuePrefix uses smart heuristics: split on last hyphen,
check if suffix is hash-like (3-8 chars, alphanumeric, digits for 4+).

* Update internal/validation/bead_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-11 18:16:48 -08:00
beads/refinery
63f66c1223 bd daemon sync: 2026-01-11 18:16:14 2026-01-11 18:16:14 -08:00
beads/refinery
2caf5eeba0 bd daemon sync: 2026-01-11 18:16:07 2026-01-11 18:16:07 -08:00
beads/refinery
11445344c7 bd daemon sync: 2026-01-11 18:16:03 2026-01-11 18:16:03 -08:00
Bob Cotton
5941544a5e fix(init): prevent initialization from within git worktrees (#1026)
Add check to prevent 'bd init' from running inside a git worktree.
Worktrees should share the .beads database from the main repository,
not create their own.

The error message guides users to:
    1. Run 'bd init' from the main repository
    2. Use 'bd worktree create' to create worktrees with proper
        redirects

This prevents the confusing behavior where init would create files
in unexpected locations or fail with "pathspec '.beads/.gitignore' did
not match any files" errors.

According to docs/WORKTREES.md, the proper workflow is:
    - Initialize beads once in the main repository
    - Use 'bd worktree create' to create worktrees with redirect files
    - All worktrees share the single .beads/ database via redirects

    Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 18:15:57 -08:00
beads/refinery
ac7cbbec8f bd daemon sync: 2026-01-11 18:15:21 2026-01-11 18:15:21 -08:00
beads/refinery
bbc2462d0d bd daemon sync: 2026-01-11 18:14:58 2026-01-11 18:14:58 -08:00
beads/refinery
5d4459707b bd daemon sync: 2026-01-11 18:14:51 2026-01-11 18:14:51 -08:00
beads/refinery
121071c179 bd daemon sync: 2026-01-11 18:14:49 2026-01-11 18:14:49 -08:00
beads/refinery
e122abfc93 bd daemon sync: 2026-01-11 18:14:45 2026-01-11 18:14:45 -08:00
beads/refinery
2789aa3b33 bd daemon sync: 2026-01-11 18:14:26 2026-01-11 18:14:26 -08:00
beads/refinery
4ff55989b3 bd daemon sync: 2026-01-11 18:14:20 2026-01-11 18:14:20 -08:00
beads/refinery
9055fde839 bd daemon sync: 2026-01-11 18:14:14 2026-01-11 18:14:14 -08:00
beads/refinery
fea1f9c453 bd daemon sync: 2026-01-11 18:14:06 2026-01-11 18:14:06 -08:00
beads/refinery
0ba081d7c4 bd daemon sync: 2026-01-11 18:12:45 2026-01-11 18:12:45 -08:00
beads/refinery
83206e3d3e bd daemon sync: 2026-01-11 18:07:21 2026-01-11 18:07:21 -08:00
beads/refinery
21e7b8b2cc bd daemon sync: 2026-01-11 16:03:31 2026-01-11 16:03:31 -08:00
beads/refinery
c5a080b9b8 bd daemon sync: 2026-01-11 10:53:45 2026-01-11 10:53:45 -08:00
beads/refinery
de4382b345 bd daemon sync: 2026-01-11 10:47:14 2026-01-11 10:47:14 -08:00
beads/refinery
e7f58090d9 bd daemon sync: 2026-01-11 10:40:22 2026-01-11 10:40:22 -08:00
beads/refinery
ade908e0fa bd daemon sync: 2026-01-11 10:33:48 2026-01-11 10:33:48 -08:00
beads/refinery
2e12bf6140 bd daemon sync: 2026-01-11 10:28:32 2026-01-11 10:28:32 -08:00
beads/refinery
142b15d323 bd daemon sync: 2026-01-11 10:20:38 2026-01-11 10:20:38 -08:00
beads/refinery
57daaf6eee bd daemon sync: 2026-01-11 10:14:04 2026-01-11 10:14:04 -08:00
beads/refinery
8cd77cd5c3 bd daemon sync: 2026-01-11 10:07:26 2026-01-11 10:07:26 -08:00
beads/refinery
c5863151b9 bd daemon sync: 2026-01-11 10:00:55 2026-01-11 10:00:55 -08:00
beads/refinery
a98b6321bb bd daemon sync: 2026-01-11 09:54:18 2026-01-11 09:54:18 -08:00
beads/refinery
0a71bf7417 bd daemon sync: 2026-01-11 09:49:06 2026-01-11 09:49:06 -08:00
beads/refinery
ec53be1128 bd daemon sync: 2026-01-11 09:41:07 2026-01-11 09:41:08 -08:00
beads/refinery
98bcf8025d bd daemon sync: 2026-01-11 09:34:41 2026-01-11 09:34:41 -08:00
beads/refinery
675d7f404d bd daemon sync: 2026-01-11 09:27:59 2026-01-11 09:27:59 -08:00
beads/refinery
aef8b8bfeb bd daemon sync: 2026-01-11 09:21:28 2026-01-11 09:21:28 -08:00
beads/refinery
accc68246e bd daemon sync: 2026-01-11 09:16:18 2026-01-11 09:16:18 -08:00
beads/refinery
400ee361c9 bd daemon sync: 2026-01-11 09:09:30 2026-01-11 09:09:30 -08:00
beads/refinery
4a63cae93f bd daemon sync: 2026-01-11 09:01:47 2026-01-11 09:01:47 -08:00
beads/refinery
48f65e5839 bd daemon sync: 2026-01-11 08:56:18 2026-01-11 08:56:18 -08:00
beads/refinery
12d956503c bd daemon sync: 2026-01-11 08:48:30 2026-01-11 08:48:30 -08:00
beads/refinery
2a7cd02f28 bd daemon sync: 2026-01-11 08:41:55 2026-01-11 08:41:55 -08:00
beads/refinery
a86af59cec bd daemon sync: 2026-01-11 08:36:36 2026-01-11 08:36:36 -08:00
beads/refinery
f0e3ed1d2d bd daemon sync: 2026-01-11 08:28:45 2026-01-11 08:28:45 -08:00
beads/refinery
50b94f9e2b bd daemon sync: 2026-01-11 08:22:08 2026-01-11 08:22:08 -08:00
beads/refinery
61ff6a1adf bd daemon sync: 2026-01-11 08:15:36 2026-01-11 08:15:36 -08:00
beads/refinery
69f3dd849b bd daemon sync: 2026-01-11 08:09:04 2026-01-11 08:09:05 -08:00
beads/refinery
b45c8c6edb bd daemon sync: 2026-01-11 08:02:25 2026-01-11 08:02:25 -08:00
beads/refinery
544c6c730a bd daemon sync: 2026-01-11 07:56:14 2026-01-11 07:56:14 -08:00
beads/refinery
ca54883a3f bd daemon sync: 2026-01-11 07:42:42 2026-01-11 07:42:42 -08:00
beads/refinery
8a977ad541 bd daemon sync: 2026-01-11 07:36:09 2026-01-11 07:36:09 -08:00
beads/refinery
b5bdc8e633 bd daemon sync: 2026-01-11 07:29:35 2026-01-11 07:29:35 -08:00
beads/refinery
0840040023 bd daemon sync: 2026-01-11 07:23:02 2026-01-11 07:23:02 -08:00