Commit Graph

1641 Commits

Author SHA1 Message Date
emma 78e1d6f229 chore: revert accidental .beads/ changes from #1231
The autoimport fix PR accidentally included local beads data changes.
This reverts the data files while keeping the code fixes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:51:07 -08:00
matt wilkie 1f8a6bf84e fix(autoimport): auto-correct deleted status to tombstone for JSONL compatibility (#1231)
* fix(autoimport): auto-correct deleted status to tombstone for JSONL compatibility (GH#1223)

This fix addresses the 'Stuck in sync diversion loop' issue where v0.48.0
encountered validation errors during JSONL import. The issue occurs when
JSONL files from older versions have issues with status='deleted' but the
current code expects status='tombstone' for deleted issues.

Changes:
- Add migration logic in parseJSONL to auto-correct 'deleted' status to 'tombstone'
- Ensure tombstones always have deleted_at timestamp set
- Add debug logging for both migration operations
- Prevents users from being stuck in sync divergence when upgrading

Fixes GH#1223: Stuck in sync diversion loop

* fix(autoimport): comprehensively fix corrupted deleted_at on non-tombstone issues (GH#1223)

The initial fix for GH#1223 only caught issues with status='deleted', but the real
data in the wild had issues with status='closed' (or other statuses) but also
had deleted_at set, which violates the validation rule.

Changes:
- Add broader migration logic: any non-tombstone issue with deleted_at should become tombstone
- Apply fix in all three JSONL parsing locations:
  - internal/autoimport/autoimport.go (parseJSONL for auto-import)
  - cmd/bd/import.go (import command)
  - cmd/bd/daemon_sync.go (daemon sync helper)
- Add comprehensive test case for corrupted closed issues with deleted_at
- Fixes the 'non-tombstone issues cannot have deleted_at timestamp' validation error
  during fresh bd init or import

Fixes GH#1223: Stuck in sync diversion loop

* Add merge driver comment to .gitattributes

* fix: properly clean up .gitattributes during bd admin reset

Fixes GH#1223 - Stuck in sync diversion loop

The removeGitattributesEntry() function was not properly cleaning up
beads-related entries from .gitattributes. It only removed lines
containing "merge=beads" but left behind:
- The comment line "# Use bd merge for beads JSONL files"
- Empty lines following removed entries

This caused .gitattributes to remain in a modified state after
bd admin reset --force, triggering sync divergence warning loop.

The fix now:
- Skips lines containing "merge=beads" (existing behavior)
- Skips beads-related comment lines
- Skips empty lines that follow removed beads entries
- Properly cleans up file so it's either empty (and gets deleted)
  or contains only non-beads content

---------

Co-authored-by: Amp <amp@example.com>
2026-01-21 21:50:38 -08:00
emma 1d3ca43620 chore: revert accidental .beads/issues.jsonl changes from #1243
The Codex setup feature PR accidentally included local beads data changes.
This reverts just the data file while keeping the code changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 21:50:18 -08:00
matt wilkie ce622f5688 feat(setup): add Codex CLI setup recipe (#1243)
* Add Codex setup recipe

* Sync beads issues (bd-1zo)

---------

Co-authored-by: Amp <amp@example.com>
2026-01-21 21:50:01 -08:00
mayor 6af5cae1d1 chore: ignore metadata.json in .beads 2026-01-17 04:22:35 -08:00
obsidian 2cbffca4f3 feat(dolt): implement automatic bootstrap from JSONL on first access
Add automatic Dolt database bootstrapping when JSONL files exist but no
Dolt database is present (cold-start scenario after git clone).

Key features:
- Lock/wait pattern prevents concurrent bootstrap races
- Graceful degradation skips malformed JSONL lines with warnings
- Multi-table ordering: issues → labels → dependencies
- Prefix auto-detection from JSONL content

New files:
- internal/storage/dolt/bootstrap.go - Bootstrap logic
- internal/storage/dolt/bootstrap_test.go - Comprehensive tests

Modified:
- internal/storage/factory/factory_dolt.go - Integration point

Closes: hq-ew1mbr.10

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 01:54:31 -08:00
tom ba77a1095f fix: ignore entire .claude/ directory, not just settings
The .claude/skills/ directories are created by Claude Code when agents
add skills (ghi-list, pr-list, handoff). These should not be tracked.

Fixes: gt-q0jy15.2
2026-01-17 00:36:38 -08:00
mayor 669ea40684 feat(storage): add --backend flag for Dolt backend selection
Phase 2 of Dolt integration - enables runtime backend selection:

- Add --backend flag to bd init (sqlite|dolt)
- Create storage factory for backend instantiation
- Update daemon and main.go to use factory with config detection
- Update database discovery to find Dolt backends via metadata.json
- Fix Dolt schema init to split statements for MySQL compatibility
- Add ReadOnly mode to skip schema init for read-only commands

Usage: bd init --backend dolt --prefix myproject

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:42:31 -08:00
beads/crew/emma e861a667fc chore: add role templates and gitignore bd_test
- Add witness, deacon, refinery role templates
- Ignore bd_test binary (bd-test was already ignored)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 21:14:45 -08:00
beads/refinery 218ee6d2b4 bd daemon sync: 2026-01-13 11:50:27 2026-01-14 21:14:45 -08:00
beads/crew/dave 213c11453f bd sync: 2026-01-13 01:22:58 2026-01-14 21:14:45 -08:00
beads/crew/dave 3298c45e4b fix(sync): handle redirect + sync-branch incompatibility (bd-wayc3)
When a crew worker's .beads/ is redirected to another repo, bd sync
now detects this and skips all git operations (sync-branch worktree
manipulation). Instead, it just exports to JSONL and lets the target
repo's owner handle the git sync.

Changes:
- sync.go: Detect redirect early, skip git operations when active
- beads.go: Update GetRedirectInfo() to check git repo even when
  BEADS_DIR is pre-set (findLocalBdsDirInRepo helper)
- validation.go: Add doctor check for redirect + sync-branch conflict
- doctor.go: Register new check, remove undefined CheckMisclassifiedWisps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Executed-By: beads/crew/dave
Rig: beads
Role: crew
2026-01-14 20:36:30 -08:00
beads/crew/emma c51022a3d6 chore: add role templates and gitignore bd_test
- Add witness, deacon, refinery role templates
- Ignore bd_test binary (bd-test was already ignored)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:03:43 -08:00
dennis c9cc1308d5 fix(test): ignore mtime-only changes in repo beads guard
The test guard was flagging false positives when SQLite shm/wal files
had their mtime updated from read-only operations (config loading, etc.)
without any actual content modification.

Now only reports when file size changes, which indicates actual content
modification rather than just file access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:20:48 -08:00
beads/refinery 82a824ed92 bd daemon sync: 2026-01-13 00:17:32 2026-01-13 00:17:32 -08:00
beads/refinery 0625726e53 bd daemon sync: 2026-01-12 23:53:27 2026-01-13 00:14:12 -08:00
dennis f703237c3d fix(ready): prevent wisps from appearing in bd ready
Add multiple layers of defense against misclassified wisps:
- Importer auto-detects -wisp- pattern and sets ephemeral flag
- GetReadyWork excludes -wisp- IDs via SQL LIKE clause
- Doctor check 26d detects misclassified wisps in JSONL

This addresses recurring issue where wisps with missing ephemeral
flag would pollute bd ready output after JSONL import.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 00:14:12 -08:00
beads/refinery 0c95d695db Merge sync branch 'beads-sync' 2026-01-12 23:50:06 -08:00
emma ef94ca8d38 sync: beads changes 2026-01-12 23:32:27 -08:00
beads/refinery c706e0ac0f sync: patrol cycle complete, queue empty 2026-01-12 16:46:12 -08:00
wolf b171ab083c sync: closed bd-u1mcn (PR #1045 merged) 2026-01-12 16:44:15 -08:00
grip 24e0afc0f3 sync: closed bd-d7kdn 2026-01-12 16:43:42 -08:00
grip 4a50cadba0 sync: update issues.jsonl 2026-01-12 16:43:14 -08:00
grip 1a849120e0 sync: update issues.jsonl 2026-01-12 16:42:29 -08:00
beads/refinery fb0a9816d8 bd daemon sync: 2026-01-12 16:41:23 2026-01-12 16:41:23 -08:00
beads/refinery 388ec7573b bd daemon sync: 2026-01-12 16:40:18 2026-01-12 16:40:18 -08:00
beads/refinery 9e2b8bea18 bd daemon sync: 2026-01-12 16:40:12 2026-01-12 16:40:12 -08:00
dave f64290e2a5 sync: beads/crew/dave
Executed-By: beads/crew/dave
Rig: beads
Role: crew
2026-01-12 16:39:52 -08:00
beads/refinery b11f8056a7 bd daemon sync: 2026-01-12 16:39:09 2026-01-12 16:39:09 -08:00
beads/refinery d8e3bf1c82 bd daemon sync: 2026-01-12 16:38:48 2026-01-12 16:38:48 -08:00
beads/refinery 216ea80f18 bd daemon sync: 2026-01-12 16:38:06 2026-01-12 16:38:06 -08:00
beads/refinery df526638f5 bd daemon sync: 2026-01-12 16:37:03 2026-01-12 16:37:03 -08:00
beads/refinery 1770f75715 bd daemon sync: 2026-01-12 16:36:01 2026-01-12 16:36:01 -08:00
beads/refinery f1d9bf65c6 bd daemon sync: 2026-01-12 16:35:32 2026-01-12 16:35:32 -08:00
beads/refinery b4d305d9e8 bd daemon sync: 2026-01-12 16:35:30 2026-01-12 16:35:30 -08:00
beads/refinery 175b891413 bd daemon sync: 2026-01-12 16:35:28 2026-01-12 16:35:28 -08:00
beads/refinery e9eef8d09a bd daemon sync: 2026-01-12 16:34:51 2026-01-12 16:34:51 -08:00
beads/refinery 29c765c4a3 bd daemon sync: 2026-01-12 03:22:17 2026-01-12 03:22:17 -08:00
beads/refinery 42079fba5b bd daemon sync: 2026-01-12 03:15:38 2026-01-12 03:15:38 -08:00
beads/refinery 080eb77ea8 bd daemon sync: 2026-01-12 03:11:01 2026-01-12 03:11:01 -08:00
beads/refinery 22cd96bf70 bd daemon sync: 2026-01-12 03:04:17 2026-01-12 03:04:17 -08:00
beads/refinery da072fbf68 bd daemon sync: 2026-01-12 02:45:45 2026-01-12 02:45:45 -08:00
beads/refinery 53cc3ff7fe bd daemon sync: 2026-01-12 02:45:39 2026-01-12 02:45:39 -08:00
beads/refinery b1b07c8af6 bd daemon sync: 2026-01-12 02:43:42 2026-01-12 02:43:42 -08:00
beads/refinery 47c19515f3 bd daemon sync: 2026-01-12 02:40:28 2026-01-12 02:40:28 -08:00
beads/refinery 615dd751ef bd daemon sync: 2026-01-12 02:33:45 2026-01-12 02:33:45 -08:00
beads/refinery 95de986bf3 bd daemon sync: 2026-01-12 02:33:14 2026-01-12 02:33:14 -08:00
beads/refinery 6df98e78dc bd daemon sync: 2026-01-12 02:32:13 2026-01-12 02:32:13 -08:00
beads/refinery 453400433b bd daemon sync: 2026-01-12 02:29:22 2026-01-12 02:29:22 -08:00
beads/refinery 6bf6f469dc bd daemon sync: 2026-01-12 02:27:11 2026-01-12 02:27:11 -08:00