feat: enhance migration with Dolt support and comment mapping#4
feat: enhance migration with Dolt support and comment mapping#4greghughespdx wants to merge 3 commits intojayminwest:mainfrom
Conversation
Adds issue comment management with add, list, and delete subcommands. Comments are stored inline on the issue object in JSONL, keeping the git-native single-file approach. Includes 15 integration tests covering CRUD operations, error paths, and SEEDS_AUTHOR env var fallback. - IssueComment type added to types.ts - Comment rendering in sd show output - Full Commander registration with --json and --author flags - CLI reference updated in CLAUDE.md
|
Thanks for tackling the Dolt migration path! The auto-detection fallback (JSONL -> Dolt -> error) is a clean design. A few things to sort out: Must fix:
Nice to have (non-blocking):
|
The migrate-from-beads command now supports two data sources: 1. Legacy JSONL: reads .beads/issues.jsonl directly (existing behavior) 2. Dolt (bd CLI): when .beads/ exists but no JSONL file, shells out to bd list/show --json to extract issues including comments Beads v0.55+ moved from JSONL to Dolt storage, making the JSONL path unreachable for modern installations. The Dolt path auto-detects when the bd CLI is available and extracts all open and closed issues with full comment history. Also maps beads comments (text field) to seeds comments (body field) for both migration paths.
- Wrap JSON.parse calls on bd list --json output in try/catch with a descriptive error message prompting users to check their bd CLI version - Validate issue IDs from bd CLI output against an alphanumeric+hyphen pattern before passing them as subprocess arguments to Bun.spawn; warn and skip any IDs that do not match
bfbe963 to
06f1580
Compare
Summary
sd migrate-from-beadsnow supports Dolt-based beads installations (v0.55+) in addition to legacy JSONLtextfield to seedsbodyfield)Context
Beads v0.55+ moved from JSONL storage to Dolt, making the existing JSONL-only migration path unreachable for modern installations. This adds automatic detection: if
.beads/issues.jsonlexists, it reads from that (legacy path). If only.beads/directory exists and thebdCLI is available, it shells out tobd list --jsonandbd show --jsonto extract all issues with comments.Changes
src/commands/migrate.ts: AddedloadFromDolt()function,BeadsCommentinterface, comment mapping inmapBeadsIssue(), auto-detection of data source, source label in outputDependencies
Depends on PR #3 (comment support) for the
IssueCommenttype.Test plan