bd sync: 2025-12-28 16:02:46
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
{"id":"bd-1pr6","title":"Time-dependent worktree detection tests may be flaky","status":"open","priority":3,"issue_type":"task","created_at":"2025-12-26T01:21:22.065353-08:00","updated_at":"2025-12-26T01:21:22.065353-08:00"}
|
||||
{"id":"bd-1ri4","title":"Test prefix bd-","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T14:24:41.240483-08:00","created_by":"stevey","updated_at":"2025-12-27T14:24:50.419881-08:00","deleted_at":"2025-12-27T14:24:50.419881-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"}
|
||||
{"id":"bd-1slh","title":"Investigate charmbracelet-based TUI for beads","description":"Now that we've merged the create-form command (PR #603) which uses charmbracelet/huh, investigate whether beads should have a more comprehensive TUI.\n\nConsiderations:\n- Should this be in core or a separate binary (bd-tui)?\n- What functionality would benefit from a TUI? (list view, issue details, search, bulk operations)\n- Plugin/extension architecture vs build tags vs separate binary\n- Dependency cost vs user experience tradeoff\n- Target audience: humans who want interactive workflows vs CLI/scripting users\n\nRelated: PR #603 added charmbracelet/huh dependency for create-form command.","notes":"Foundation is in place (lipgloss, huh), but not a priority right now","status":"deferred","priority":3,"issue_type":"feature","created_at":"2025-12-17T14:20:51.503563-08:00","updated_at":"2025-12-20T23:31:34.354023-08:00"}
|
||||
{"id":"bd-1tkd","title":"Code smell: ComputeContentHash() is 100+ lines of repetitive code","description":"The ComputeContentHash() method in internal/types/types.go (lines 87-190) is over 100 lines of repetitive code:\n\n```go\nh.Write([]byte(i.Title))\nh.Write([]byte{0}) // separator\nh.Write([]byte(i.Description))\nh.Write([]byte{0})\nh.Write([]byte(i.Design))\n// ... repeated 40+ times\n```\n\nConsider:\n1. Using reflection to iterate over struct fields tagged for hashing\n2. Creating a helper function that takes field name and value\n3. Using a slice of fields to hash and iterating over it\n4. At minimum, extracting the repetitive pattern into a helper\n\nLocation: internal/types/types.go:87-190","acceptance_criteria":"1. ComputeContentHash() refactored to reduce repetition\n2. Helper function or data-driven approach replaces repetitive h.Write() calls\n3. Hash output unchanged for same input (backwards compatible)\n4. All existing tests pass: go test ./internal/types/...\n5. Benchmark shows no significant performance regression","status":"open","priority":3,"issue_type":"chore","created_at":"2025-12-28T15:31:55.514941-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T15:37:17.0941-08:00","dependencies":[{"issue_id":"bd-1tkd","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.204723-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-1tkd","title":"Code smell: ComputeContentHash() is 100+ lines of repetitive code","description":"attached_args: Refactor ComputeContentHash repetitive code\n\nThe ComputeContentHash() method in internal/types/types.go (lines 87-190) is over 100 lines of repetitive code:\n\n```go\nh.Write([]byte(i.Title))\nh.Write([]byte{0}) // separator\nh.Write([]byte(i.Description))\nh.Write([]byte{0})\nh.Write([]byte(i.Design))\n// ... repeated 40+ times\n```\n\nConsider:\n1. Using reflection to iterate over struct fields tagged for hashing\n2. Creating a helper function that takes field name and value\n3. Using a slice of fields to hash and iterating over it\n4. At minimum, extracting the repetitive pattern into a helper\n\nLocation: internal/types/types.go:87-190","acceptance_criteria":"1. ComputeContentHash() refactored to reduce repetition\n2. Helper function or data-driven approach replaces repetitive h.Write() calls\n3. Hash output unchanged for same input (backwards compatible)\n4. All existing tests pass: go test ./internal/types/...\n5. Benchmark shows no significant performance regression","status":"pinned","priority":3,"issue_type":"chore","assignee":"gt-beads-toast","created_at":"2025-12-28T15:31:55.514941-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T16:02:15.871379-08:00","dependencies":[{"issue_id":"bd-1tkd","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.204723-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-1tw","title":"Fix G104 errors unhandled in internal/storage/sqlite/queries.go:1186","description":"Linting issue: G104: Errors unhandled (gosec) at internal/storage/sqlite/queries.go:1186:2. Error: rows.Close()","status":"tombstone","priority":0,"issue_type":"bug","created_at":"2025-12-07T15:35:13.051671889-07:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}
|
||||
{"id":"bd-20j","title":"sync branch not match config","description":"./bd sync\n→ Exporting pending changes to JSONL...\n→ No changes to commit\n→ Pulling from sync branch 'gh-386'...\nError pulling from sync branch: failed to create worktree: failed to create worktree parent directory: mkdir /var/home/matt/dev/beads/worktree-db-fail/.git: not a directory\nmatt@blufin-framation ~/d/b/worktree-db-fail (worktree-db-fail) [1]\u003e bd config list\n\nConfiguration:\n auto_compact_enabled = false\n compact_batch_size = 50\n compact_model = claude-3-5-haiku-20241022\n compact_parallel_workers = 5\n compact_tier1_days = 30\n compact_tier1_dep_levels = 2\n compact_tier2_commits = 100\n compact_tier2_days = 90\n compact_tier2_dep_levels = 5\n compaction_enabled = false\n issue_prefix = worktree-db-fail\n sync.branch = worktree-db-fail","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-08T06:49:04.449094018-07:00","updated_at":"2025-12-08T06:49:04.449094018-07:00"}
|
||||
{"id":"bd-28db","title":"Add 'bd status' command for issue database overview","description":"Implement a bd status command that provides a quick snapshot of the issue database state, similar to how git status shows working tree state.\n\nExpected output: Show summary including counts by state (open, in-progress, blocked, closed), recent activity (last 7 days), and quick overview without needing multiple queries.\n\nExample output showing issue counts, recent activity stats, and pointer to bd list for details.\n\nProposed options: --all (show all issues), --assigned (show issues assigned to current user), --json (JSON format output)\n\nUse cases: Quick project health check, onboarding for new contributors, integration with shell prompts or CI/CD, daily standup reference","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-02T17:25:59.203549-08:00","updated_at":"2025-12-21T17:54:00.205191-08:00","closed_at":"2025-12-21T17:54:00.205191-08:00","close_reason":"Already implemented - bd status shows summary and activity"}
|
||||
@@ -100,7 +100,7 @@
|
||||
{"id":"bd-5e9q","title":"Add backwards-compatible aliases and deprecation warnings","description":"## Task\nEnsure backwards compatibility by adding hidden aliases for all moved commands.\n\n## Implementation\n\n### Create aliases.go\nNew file to centralize alias management:\n```go\npackage main\n\nimport (\n \"fmt\"\n \"os\"\n \n \"github.com/spf13/cobra\"\n)\n\n// Deprecated command aliases for backwards compatibility\n// These will be removed in v0.XX.0\n\nfunc init() {\n // migrate-* → migrate *\n addDeprecatedAlias(\"migrate-hash-ids\", \"migrate hash-ids\")\n addDeprecatedAlias(\"migrate-issues\", \"migrate issues\")\n addDeprecatedAlias(\"migrate-sync\", \"migrate sync\")\n addDeprecatedAlias(\"migrate-tombstones\", \"migrate tombstones\")\n \n // top-level → admin *\n addDeprecatedAlias(\"cleanup\", \"admin cleanup\")\n addDeprecatedAlias(\"compact\", \"admin compact\")\n addDeprecatedAlias(\"reset\", \"admin reset\")\n \n // top-level → formula *\n addDeprecatedAlias(\"cook\", \"formula cook\")\n}\n\nfunc addDeprecatedAlias(old, new string) {\n cmd := \u0026cobra.Command{\n Use: old,\n Hidden: true,\n Run: func(cmd *cobra.Command, args []string) {\n fmt.Fprintf(os.Stderr, \"⚠️ '%s' is deprecated, use '%s' instead\\n\", old, new)\n // Forward execution to new command\n },\n }\n rootCmd.AddCommand(cmd)\n}\n```\n\n### Deprecation behavior\n1. First release: Show warning, execute command\n2. One release later: Show warning, still execute\n3. Third release: Remove aliases entirely\n\n## Files to create\n- cmd/bd/aliases.go\n\n## Files to modify \n- cmd/bd/main.go (ensure aliases loaded)\n","status":"closed","priority":2,"issue_type":"task","assignee":"opal","created_at":"2025-12-27T15:11:33.54574-08:00","created_by":"mayor","updated_at":"2025-12-27T16:06:08.157887-08:00","closed_at":"2025-12-27T16:06:08.157887-08:00","close_reason":"Added aliases.go with infrastructure for backwards-compatible command aliases. Aliases only activate after commands are moved to their new locations.","pinned":true}
|
||||
{"id":"bd-5exm","title":"Merge: bd-49kw","description":"branch: polecat/nux\ntarget: main\nsource_issue: bd-49kw\nrig: beads","status":"closed","priority":1,"issue_type":"merge-request","created_at":"2025-12-23T20:43:23.156375-08:00","updated_at":"2025-12-23T21:21:57.693169-08:00","closed_at":"2025-12-23T21:21:57.693169-08:00","close_reason":"stale - no code pushed"}
|
||||
{"id":"bd-5hrq","title":"bd doctor: detect issues referenced in commits but still open","description":"Add a doctor check that finds 'orphaned' issues - ones referenced in git commit messages (e.g., 'fix bug (bd-xxx)') but still marked as open in beads.\n\n**Detection logic:**\n1. Get all open issue IDs from beads\n2. Parse git log for issue ID references matching pattern \\(prefix-[a-z0-9.]+\\)\n3. Report issues that appear in commits but are still open\n\n**Output:**\n⚠ Warning: N issues referenced in commits but still open\n bd-xxx: 'Issue title' (commit abc123)\n bd-yyy: 'Issue title' (commit def456)\n \n These may be implemented but not closed. Run 'bd show \u003cid\u003e' to check.\n\n**Implementation:**\n- Add check to doctor/checks.go\n- Use git log parsing (already have git utilities)\n- Match against configured issue_prefix","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-21T21:48:08.473165-08:00","updated_at":"2025-12-21T21:55:37.795109-08:00","closed_at":"2025-12-21T21:55:37.795109-08:00","close_reason":"Implemented CheckOrphanedIssues in git.go with 8 test cases. Detects issues referenced in commits (e.g., 'fix bug (bd-xxx)') that are still open. Shows warning with issue IDs and commit hashes."}
|
||||
{"id":"bd-5l59","title":"Code smell: Issue struct is a God Object (50+ fields)","description":"The Issue struct in internal/types/types.go has 50+ fields covering many different concerns:\n\n- Basic issue tracking (ID, Title, Description, Status, Priority)\n- Messaging/communication (Sender, Ephemeral, etc.)\n- Agent identity (HookBead, RoleBead, AgentState, RoleType, Rig)\n- Gate/async coordination (AwaitType, AwaitID, Timeout, Waiters)\n- Source tracing (SourceFormula, SourceLocation)\n- HOP validation/entities (Creator, Validations)\n- Compaction (CompactionLevel, CompactedAt, OriginalSize)\n- Tombstones (DeletedAt, DeletedBy, DeleteReason)\n\nConsider:\n1. Extracting field groups into embedded structs (e.g., AgentFields, GateFields)\n2. Using composition pattern to make the struct more modular\n3. At minimum, grouping related fields together with section comments\n\nLocation: internal/types/types.go:12-82","acceptance_criteria":"1. Related fields grouped with clear section comments (e.g., // Agent identity fields)\n2. Consider extracting into embedded structs if grouping reveals clean boundaries\n3. All existing tests pass: go test ./internal/types/...\n4. ComputeContentHash() still works correctly after any struct changes\n5. JSON serialization unchanged (no breaking changes to JSONL format)","status":"open","priority":3,"issue_type":"chore","created_at":"2025-12-28T15:31:34.021236-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T15:37:14.582707-08:00","dependencies":[{"issue_id":"bd-5l59","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.187103-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-5l59","title":"Code smell: Issue struct is a God Object (50+ fields)","description":"attached_args: Refactor Issue struct God Object\n\nThe Issue struct in internal/types/types.go has 50+ fields covering many different concerns:\n\n- Basic issue tracking (ID, Title, Description, Status, Priority)\n- Messaging/communication (Sender, Ephemeral, etc.)\n- Agent identity (HookBead, RoleBead, AgentState, RoleType, Rig)\n- Gate/async coordination (AwaitType, AwaitID, Timeout, Waiters)\n- Source tracing (SourceFormula, SourceLocation)\n- HOP validation/entities (Creator, Validations)\n- Compaction (CompactionLevel, CompactedAt, OriginalSize)\n- Tombstones (DeletedAt, DeletedBy, DeleteReason)\n\nConsider:\n1. Extracting field groups into embedded structs (e.g., AgentFields, GateFields)\n2. Using composition pattern to make the struct more modular\n3. At minimum, grouping related fields together with section comments\n\nLocation: internal/types/types.go:12-82","acceptance_criteria":"1. Related fields grouped with clear section comments (e.g., // Agent identity fields)\n2. Consider extracting into embedded structs if grouping reveals clean boundaries\n3. All existing tests pass: go test ./internal/types/...\n4. ComputeContentHash() still works correctly after any struct changes\n5. JSON serialization unchanged (no breaking changes to JSONL format)","status":"pinned","priority":3,"issue_type":"chore","assignee":"gt-beads-furiosa","created_at":"2025-12-28T15:31:34.021236-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T15:57:07.884245-08:00","dependencies":[{"issue_id":"bd-5l59","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.187103-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-5qim","title":"Optimize GetReadyWork performance - 752ms on 10K database (target: \u003c50ms)","notes":"# Performance Analysis (10K Issue Database)\n\nAnalyzed using CPU profiles from benchmark suite on Apple M2 Pro.\n\n## Operation Performance\n\n| Operation | Time | Allocations | Memory |\n|----------------------------------|---------|-------------|--------|\n| bd ready (GetReadyWork) | ~752ms | 167,466 | 16MB |\n| bd list (SearchIssues no filter) | ~11.6ms | 89,214 | 5.8MB |\n| bd list (SearchIssues filtered) | ~9.2ms | 62,365 | 3.5MB |\n| bd create (CreateIssue) | ~2.6ms | 146 | 8.6KB |\n| bd update (UpdateIssue) | ~0.32ms | 364 | 15KB |\n| bd close (UpdateIssue) | ~0.32ms | 364 | 15KB |\n\n**Target: \u003c50ms for all operations on 10K database**\n\n**Current issue: GetReadyWork is 15x over target (752ms vs 50ms)**\n\n## Root Cause\n\nGetReadyWork (internal/storage/sqlite/ready.go:90-128) uses recursive CTE to propagate blocking:\n- 65x slower than SearchIssues\n- Recalculates entire blocked issue tree on every call\n- Algorithm:\n 1. Find directly blocked issues via 'blocks' dependencies\n 2. Recursively propagate blockage to descendants (max depth: 50)\n 3. Exclude all blocked issues from results\n\n## CPU Profile Analysis\n\n- Database syscalls (pthread_cond_signal, syscall6): ~75%\n- SQLite engine overhead: inherent to recursive CTE\n- Application code (query construction): \u003c1%\n\n**Bottleneck is the recursive CTE query execution, not application code.**\n\n## Optimization Recommendations\n\n### High Impact (Likely to achieve \u003c50ms target)\n\n1. **Cache blocked issue calculation**\n - Add `blocked_issues` table updated on dependency changes\n - Trade write complexity for read speed (ready called \u003e\u003e dependency changes)\n - Eliminates recursive CTE on every read\n\n2. **Add/verify database indexes**\n ```sql\n CREATE INDEX IF NOT EXISTS idx_dependencies_blocked \n ON dependencies(issue_id, type, depends_on_id);\n CREATE INDEX IF NOT EXISTS idx_issues_status \n ON issues(status);\n ```\n\n### Medium Impact\n\n3. **Reduce allocations** (167K allocations for GetReadyWork)\n - Profile `scanIssues()` for object pooling opportunities\n - Reuse slice capacity for repeated calls\n\n### Low Impact (Not recommended)\n- Query optimization for CRUD operations (already \u003c3ms)\n- Connection pooling tuning (not showing in profiles)\n\n## Verification\n\nRun benchmarks to validate optimization:\n```bash\nmake bench-quick\ngo tool pprof -http=:8080 internal/storage/sqlite/bench-cpu-*.prof\n```\n\nProfile files automatically generated in `internal/storage/sqlite/`.","status":"tombstone","priority":0,"issue_type":"bug","created_at":"2025-11-14T09:02:46.507526-08:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}
|
||||
{"id":"bd-5rj1","title":"Merge: bd-gqxd","description":"branch: polecat/furiosa\ntarget: main\nsource_issue: bd-gqxd\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-23T16:40:21.707706-08:00","updated_at":"2025-12-23T19:12:08.349245-08:00","closed_at":"2025-12-23T19:12:08.349245-08:00","close_reason":"Stale merge-requests from orphaned polecat branches - refinery not processing"}
|
||||
{"id":"bd-5s91","title":"CLI API Audit for OSS Launch","description":"Comprehensive CLI API audit before OSS launch.\n\n## Tasks\n1. Review gt command groupings - propose consolidation\n2. Review bd command groupings \n3. Document gt vs bd ownership boundaries\n4. Identify naming inconsistencies\n5. Document flag vs subcommand criteria\n\n## Context\n- Pre-OSS launch cleanup\n- Goal: clean, consistent, discoverable CLI surface","status":"closed","priority":1,"issue_type":"epic","created_at":"2025-12-25T00:15:41.355013-08:00","updated_at":"2025-12-25T13:26:25.587476-08:00","closed_at":"2025-12-25T13:26:25.587476-08:00","close_reason":"Completed"}
|
||||
@@ -176,7 +176,7 @@
|
||||
{"id":"bd-95k8","title":"Pinned field available in beads v0.37.0","description":"Hey max,\n\nHeads up on your mail overhaul work:\n\n1. **Pinned field is available** - beads v0.37.0 (released by dave earlier) includes the pinned field on issues. You'll want to add this to BeadsMessage in types.go.\n\n2. **Database migration** - Check if existing .beads databases need migration to support the pinned field. Run `bd doctor` to see if it flags anything.\n\n3. **Sorting task** - Once you have the pinned field, gt-ngu1 (pinned beads first in mail inbox) needs implementing. Since messages now come from `bd list --type=message`, you'll need to either:\n - Sort in listBeads() after fetching, or\n - Ensure bd list returns pinned items first (may already do this?)\n\nCheck what version of bd you're building against.\n\n-- Mayor","status":"closed","priority":2,"issue_type":"message","assignee":"gastown/crew/max","created_at":"2025-12-20T17:51:57.315956-08:00","updated_at":"2025-12-21T17:52:18.542169-08:00","closed_at":"2025-12-21T17:52:18.542169-08:00","close_reason":"Stale message - pinned field already available","labels":["from:beads-crew-dave","thread:thread-71ac20c7e432"]}
|
||||
{"id":"bd-987a","title":"bd mol run: panic slice bounds out of range in mol_run.go:130","description":"## Problem\nbd mol run panics after successfully creating the molecule:\n\n```\n✓ Molecule running: created 9 issues\n Root issue: gt-i4lo (pinned, in_progress)\n Assignee: stevey\n\nNext steps:\n bd ready # Find unblocked work in this molecule\npanic: runtime error: slice bounds out of range [:8] with length 7\n\ngoroutine 1 [running]:\nmain.runMolRun(0x1014fc0c0, {0x140001e0f80, 0x1, 0x10089daad?})\n /Users/stevey/gt/beads/crew/dave/cmd/bd/mol_run.go:130 +0xc38\n```\n\n## Reproduction\n```bash\nbd --no-daemon mol run gt-lwuu --var issue=gt-test123\n```\nWhere gt-lwuu is a mol-polecat-work proto with 8 child steps.\n\n## Impact\nThe molecule IS created successfully - the panic happens after creation when formatting the \"Next steps\" output.","status":"closed","priority":1,"issue_type":"bug","created_at":"2025-12-21T21:48:55.396018-08:00","updated_at":"2025-12-21T22:57:46.827469-08:00","closed_at":"2025-12-21T22:57:46.827469-08:00","close_reason":"Fixed: removed unsafe rootID[:8] slice - now uses full ID"}
|
||||
{"id":"bd-9avq","title":"Fix wisp leak in nodb mode writeIssuesToJSONL","description":"writeIssuesToJSONL in nodb.go calls writeJSONLAtomic without filtering wisps. This means any wisps created during a nodb session would be written to issues.jsonl, leaking ephemeral data into the git-tracked file.\n\nFix: Add the same wisp filter pattern used in sync_export.go, autoflush.go, and export.go:\n\n```go\n// Filter out wisps before writing\nfiltered := make([]*types.Issue, 0, len(issues))\nfor _, issue := range issues {\n if !issue.Wisp {\n filtered = append(filtered, issue)\n }\n}\nissues = filtered\n```\n\nLocation: cmd/bd/nodb.go:writeIssuesToJSONL()","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-24T21:15:47.980048-08:00","updated_at":"2025-12-24T21:18:42.607711-08:00","closed_at":"2025-12-24T21:18:42.607711-08:00","close_reason":"Added wisp filter in writeIssuesToJSONL"}
|
||||
{"id":"bd-9btu","title":"Code smell: Duplicated step collection functions in cook.go","description":"Two pairs of nearly identical functions exist in cook.go:\n\n1. collectStepsRecursive() (line 754) vs collectStepsToSubgraph() (line 415)\n - Both iterate over steps and create issues\n - Main difference: one writes to DB, one builds in-memory subgraph\n \n2. collectDependencies() (line 833) vs collectDependenciesToSubgraph() (line 502)\n - Both collect dependencies from steps\n - Nearly identical logic\n\nConsider:\n1. Extract common step/dependency processing logic\n2. Use a strategy pattern or callback for the DB vs in-memory difference\n3. Create a single function that returns data, then have callers decide how to persist\n\nLocation: cmd/bd/cook.go:415-567 and cmd/bd/cook.go:754-898","acceptance_criteria":"1. Common step collection logic extracted to shared function(s)\n2. collectStepsRecursive and collectStepsToSubgraph unified or share core logic\n3. collectDependencies and collectDependenciesToSubgraph unified or share core logic\n4. All existing tests pass: go test ./cmd/bd/... -run Cook\n5. No functional change to cook command behavior","status":"open","priority":2,"issue_type":"chore","created_at":"2025-12-28T15:31:57.401447-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T15:36:53.443253-08:00","dependencies":[{"issue_id":"bd-9btu","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.168908-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-9btu","title":"Code smell: Duplicated step collection functions in cook.go","description":"attached_args: Fix duplicated step collection functions in cook.go\n\nTwo pairs of nearly identical functions exist in cook.go:\n\n1. collectStepsRecursive() (line 754) vs collectStepsToSubgraph() (line 415)\n - Both iterate over steps and create issues\n - Main difference: one writes to DB, one builds in-memory subgraph\n \n2. collectDependencies() (line 833) vs collectDependenciesToSubgraph() (line 502)\n - Both collect dependencies from steps\n - Nearly identical logic\n\nConsider:\n1. Extract common step/dependency processing logic\n2. Use a strategy pattern or callback for the DB vs in-memory difference\n3. Create a single function that returns data, then have callers decide how to persist\n\nLocation: cmd/bd/cook.go:415-567 and cmd/bd/cook.go:754-898","acceptance_criteria":"1. Common step collection logic extracted to shared function(s)\n2. collectStepsRecursive and collectStepsToSubgraph unified or share core logic\n3. collectDependencies and collectDependenciesToSubgraph unified or share core logic\n4. All existing tests pass: go test ./cmd/bd/... -run Cook\n5. No functional change to cook command behavior","status":"pinned","priority":2,"issue_type":"chore","assignee":"gt-beads-nux","created_at":"2025-12-28T15:31:57.401447-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T15:57:04.650238-08:00","dependencies":[{"issue_id":"bd-9btu","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.168908-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-9cdc","title":"Update docs for import bug fix","description":"Update AGENTS.md, README.md, TROUBLESHOOTING.md with import.orphan_handling config documentation. Document resurrection behavior, tombstones, config modes. Add troubleshooting section for import failures with deleted parents.","status":"closed","priority":2,"issue_type":"task","created_at":"2025-11-04T12:32:30.770415-08:00","updated_at":"2025-12-21T21:14:08.328627-08:00","closed_at":"2025-12-21T21:14:08.328627-08:00","close_reason":"Already completed - documentation in CONFIG.md, CLI_REFERENCE.md, and TROUBLESHOOTING.md"}
|
||||
{"id":"bd-9g1z","title":"Fix or remove TestFindJSONLPathDefault (issue #356)","description":"Code health review found .test-skip permanently skips TestFindJSONLPathDefault.\n\nThe test references issue #356 about wrong JSONL filename expectations (issues.jsonl vs beads.jsonl).\n\nTest file: internal/beads/beads_test.go\n\nThe underlying migration from beads.jsonl to issues.jsonl may be complete, so either:\n1. Fix the test expectations\n2. Remove the test if no longer needed\n3. Document why it remains skipped","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-16T18:17:31.33975-08:00","updated_at":"2025-12-22T21:24:50.357688-08:00","closed_at":"2025-12-22T21:24:50.357688-08:00","close_reason":"Test now passes - removed from .test-skip. Code was fixed in utils.FindJSONLInDir to return issues.jsonl as default."}
|
||||
{"id":"bd-9gvf","title":"Add prefix-based routing with routes.jsonl","description":"## Summary\n\nWhen running `bd show gt-xyz` from a location where that bead doesn't exist locally,\nbd should check a `routes.jsonl` file to find where beads with that prefix live.\n\n## Problem\n\nFrom ~/gt (town root):\n- `bd show hq-xxx` works (hq-* beads are local)\n- `bd show gt-xxx` fails (gt-* beads live in gastown/mayor/rig)\n\nThis breaks `gt hook`, `gt handoff`, and `gt prime` which need to verify beads exist.\n\n## Solution\n\nAdd `.beads/routes.jsonl` for prefix-based routing:\n\n\\`\\`\\`json\n{\"prefix\": \"gt-\", \"path\": \"gastown/mayor/rig\"}\n{\"prefix\": \"hq-\", \"path\": \".\"}\n{\"prefix\": \"bd-\", \"path\": \"beads/crew/dave\"}\n\\`\\`\\`\n\n### Lookup Algorithm\n\n1. Try local .beads/ first (current behavior)\n2. If not found, check for routes.jsonl in current .beads/\n3. Match ID prefix against routes\n4. If match found, resolve path relative to routes file location and retry\n5. If still not found, error as usual\n\n### Affected Commands\n\nRead operations that take a bead ID:\n- bd show \u003cid\u003e\n- bd update \u003cid\u003e\n- bd close \u003cid\u003e\n- bd dep add \u003cid\u003e \u003cdep\u003e (both IDs)\n\nWrite operations (bd create) still go to local .beads/ - no change needed.\n\n## Implementation Notes\n\n1. New file: routes.jsonl in .beads/ directory\n2. New function: resolveBeadsPath(id string) (string, error)\n3. Update: beads.Show(), beads.Update(), beads.Close(), etc. to use resolver\n4. Caching: Can cache routes in memory since file rarely changes\n\n## Context\n\nThis unblocks the gt handoff flow for Mayor. Currently gt handoff gt-xyz fails\nbecause it can't verify the bead exists when running from town root.","status":"closed","priority":1,"issue_type":"feature","created_at":"2025-12-26T14:18:19.399691-08:00","updated_at":"2025-12-26T14:36:43.551435-08:00","closed_at":"2025-12-26T14:36:43.551435-08:00","close_reason":"Implemented prefix-based routing with routes.jsonl. Tested with gt- and bd- prefixes from town root."}
|
||||
@@ -375,7 +375,7 @@
|
||||
{"id":"bd-jvu","title":"Add bd update --parent flag to change issue parent","description":"Allow changing an issue's parent with bd update --parent \u003cnew-parent-id\u003e. Useful for reorganizing tasks under different epics or moving issues between hierarchies. Should update the parent-child dependency relationship.","status":"tombstone","priority":3,"issue_type":"feature","created_at":"2025-12-17T22:24:07.274485-08:00","updated_at":"2025-12-25T01:21:01.952723-08:00","deleted_at":"2025-12-25T01:21:01.952723-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"feature"}
|
||||
{"id":"bd-kblo","title":"bd prime should mention when beads is redirected","description":"## Problem\n\nAgents running in a redirected clone don't know they're sharing beads with other clones. This can cause confusion when molecules or issues seem to 'appear' or 'disappear'.\n\n## Proposed Solution\n\nWhen `bd prime` runs and detects a redirect, include it in the output:\n\n```\nBeads: /Users/stevey/gt/beads/mayor/rig/.beads\n (redirected from crew/dave - you share issues with other clones)\n```\n\n## Why\n\nVisibility over magic. If agents can see the redirect, they can reason about it.\n\n## Related\n\n- bd where command (shows this on demand)\n- gt redirect following (ensures gt matches bd behavior)","status":"closed","priority":3,"issue_type":"feature","assignee":"beads/crew/dave","created_at":"2025-12-27T21:15:55.026907-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-27T21:33:33.765635-08:00","closed_at":"2025-12-27T21:33:33.765635-08:00","close_reason":"Closed"}
|
||||
{"id":"bd-kff0","title":"Integrate detect-pollution into bd doctor","description":"## Task\nMove `bd detect-pollution` → `bd doctor --check=pollution`\n\n## Current state\n- detect-pollution already shows deprecation hint pointing to doctor\n- Doctor command exists with multiple checks\n\n## Implementation\n\n### 1. Update doctor.go\n- Add pollution check to the doctor checks\n- Add `--check=pollution` flag option\n- Integrate detect-pollution logic\n\n### 2. Update detect_pollution.go\n- Mark as hidden (deprecated)\n- Forward to doctor --check=pollution\n- Keep for one release cycle\n\n### 3. Update docs\n- Remove detect-pollution from any command lists\n- Update doctor docs to include pollution check\n\n## Files to modify\n- cmd/bd/doctor.go\n- cmd/bd/detect_pollution.go\n","status":"closed","priority":2,"issue_type":"task","assignee":"onyx","created_at":"2025-12-27T15:11:10.46326-08:00","created_by":"mayor","updated_at":"2025-12-27T16:04:58.471341-08:00","closed_at":"2025-12-27T16:04:58.471341-08:00","close_reason":"Integrated detect-pollution into bd doctor --check=pollution","pinned":true}
|
||||
{"id":"bd-kkka","title":"Dead code: fetchAndRebaseInWorktree() marked DEPRECATED but still exists","description":"The function fetchAndRebaseInWorktree() in internal/syncbranch/worktree.go (lines 811-830) is marked as DEPRECATED with a comment:\n\n```go\n// fetchAndRebaseInWorktree is DEPRECATED - kept for reference only.\n// Use contentMergeRecovery instead to avoid tombstone resurrection.\n```\n\nSince contentMergeRecovery() is the replacement and is being used, this dead code should be removed to reduce maintenance burden.\n\nLocation: internal/syncbranch/worktree.go:811-830","acceptance_criteria":"1. fetchAndRebaseInWorktree() function removed from worktree.go\n2. No remaining references to the function in codebase\n3. All existing tests pass: go test ./internal/syncbranch/...\n4. Sync functionality unchanged (contentMergeRecovery still used)","status":"open","priority":3,"issue_type":"chore","created_at":"2025-12-28T15:32:21.97865-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T15:37:18.882088-08:00","dependencies":[{"issue_id":"bd-kkka","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.241483-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-kkka","title":"Dead code: fetchAndRebaseInWorktree() marked DEPRECATED but still exists","description":"attached_args: Remove dead code fetchAndRebaseInWorktree\n\nThe function fetchAndRebaseInWorktree() in internal/syncbranch/worktree.go (lines 811-830) is marked as DEPRECATED with a comment:\n\n```go\n// fetchAndRebaseInWorktree is DEPRECATED - kept for reference only.\n// Use contentMergeRecovery instead to avoid tombstone resurrection.\n```\n\nSince contentMergeRecovery() is the replacement and is being used, this dead code should be removed to reduce maintenance burden.\n\nLocation: internal/syncbranch/worktree.go:811-830","acceptance_criteria":"1. fetchAndRebaseInWorktree() function removed from worktree.go\n2. No remaining references to the function in codebase\n3. All existing tests pass: go test ./internal/syncbranch/...\n4. Sync functionality unchanged (contentMergeRecovery still used)","status":"closed","priority":3,"issue_type":"chore","assignee":"gt-beads-toast","created_at":"2025-12-28T15:32:21.97865-08:00","created_by":"beads/crew/dave","updated_at":"2025-12-28T16:01:14.87213-08:00","closed_at":"2025-12-28T16:01:14.87213-08:00","close_reason":"Removed deprecated fetchAndRebaseInWorktree function and its test. No remaining references. Tests pass.","dependencies":[{"issue_id":"bd-kkka","depends_on_id":"bd-784c","type":"parent-child","created_at":"2025-12-28T15:38:04.241483-08:00","created_by":"daemon"}]}
|
||||
{"id":"bd-knta","title":"Deacon Patrol","description":"Mayor's daemon patrol loop for handling callbacks, health checks, and cleanup.","status":"tombstone","priority":2,"issue_type":"molecule","created_at":"2025-12-26T13:08:21.233771-08:00","updated_at":"2025-12-27T00:10:54.179341-08:00","deleted_at":"2025-12-27T00:10:54.179341-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"molecule"}
|
||||
{"id":"bd-kptp","title":"Merge: bd-qioh","description":"branch: polecat/Errata\ntarget: main\nsource_issue: bd-qioh\nrig: beads","status":"closed","priority":2,"issue_type":"merge-request","created_at":"2025-12-23T13:46:08.832073-08:00","updated_at":"2025-12-23T19:12:08.350136-08:00","closed_at":"2025-12-23T19:12:08.350136-08:00","close_reason":"Stale merge-requests from orphaned polecat branches - refinery not processing"}
|
||||
{"id":"bd-kpy","title":"Sync race: rebase-based divergence recovery resurrects tombstones","description":"## Problem\nWhen two repos sync simultaneously, tombstones can be resurrected:\n\n1. Repo A deletes issue (creates tombstone), pushes to sync branch\n2. Repo B (with 'closed' status) exports and tries to push\n3. Push fails (non-fast-forward)\n4. fetchAndRebaseInWorktree does git rebase\n5. Git rebase applies B's 'closed' patch on top of A's 'tombstone'\n6. TEXT-level rebase doesn't invoke beads merge driver\n7. 'closed' overwrites 'tombstone' = resurrection\n\n## Root Cause\nCommitToSyncBranch uses git rebase for divergence recovery, but rebase is text-level, not content-level. The proper content-level merge in PullFromSyncBranch handles tombstones correctly, but it runs AFTER the problematic push.\n\n## Proposed Fix\nOption 1: Don't push in CommitToSyncBranch - let PullFromSyncBranch handle merge+push\nOption 2: Replace git rebase with content-level merge in fetchAndRebaseInWorktree\nOption 3: Reorder sync steps: Export → Pull/Merge → Commit → Push\n\n## Workaround Applied\nExcluded tombstones from orphan detection warnings (commit 1e97d9cc).\n\nSee also: bd-3852 (Add orphan detection migration)","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-12-17T23:29:33.049272-08:00","updated_at":"2025-12-24T22:41:09.184574-08:00","closed_at":"2025-12-24T22:41:09.184574-08:00","close_reason":"Fixed by replacing git rebase with content-level merge in divergence recovery"}
|
||||
|
||||
Reference in New Issue
Block a user