-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Closed as not planned
Copy link
Description
Summary
bd import -i .beads/issues.jsonl fails on a normal existing Dolt workspace with:
Import failed: failed to insert issue <id>: Error 1062: duplicate primary key given: [<id>]
This breaks both direct import and hook-driven import flows (bd hook post-merge / post-checkout) because those paths import into already-populated DBs.
Version
bd version 0.55.4 (Homebrew: v0.55.4@Homebrew)- macOS arm64
Minimal Repro
tmpdir=$(mktemp -d)
cd "$tmpdir"
git init -q
bd init --quiet --prefix test
bd create "repro issue" -p 1
bd sync
bd import -i .beads/issues.jsonl --jsonActual
Import failed: failed to insert issue test-3vo: Error 1062: duplicate primary key given: [test-3vo]
Expected
Import should be idempotent for existing IDs (update/no-op), not fail on PK collisions.
Extra Context
In our production repo, this surfaces as repeated warnings from hook flows:
Warning: could not import JSONL: failed to insert issue compound-07t: Error 1062: duplicate primary key given: [compound-07t]
Likely Cause
In cmd/bd/import_shared.go, importIssuesCore calls CreateIssuesWithFullOptions directly, and that appears create-only rather than update/upsert semantics for existing IDs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels