Bug
bd dep add and bd delete fail with table not found: wisp_dependencies in embedded mode (v1.0.0). The createIgnoredTables() function that creates the dolt_ignore'd wisp tables (wisps, wisp_dependencies, wisp_labels, wisp_events, wisp_comments) is never called during embedded Dolt initialization.
Reproduction
bd init # or any existing embedded-mode repo
bd create --title="A" --type=task --priority=2
bd create --title="B" --type=task --priority=2
bd dep add <B-id> <A-id>
# Error: failed to check for dependency cycle: Error 1146: table not found: wisp_dependencies
Same for bd delete:
Error: getting dependencies: get dependencies from wisp_dependencies: Error 1146: table not found: wisp_dependencies
Environment
bd version 1.0.0 (Homebrew)
- macOS, embedded Dolt mode (
metadata.json: dolt_mode: "embedded")
dolt_ignore patterns are correctly set (wisps, wisp_%)
- All 23 schema migrations ran successfully
- The
dependencies table exists, but wisp_dependencies does not
Root Cause
createIgnoredTables() in internal/storage/dolt/migrations.go is called during server-mode schema init (initSchemaOnDB) but appears to not be called in the embedded Dolt code path. Since wisp tables are dolt_ignore'd, they only exist in the working set and must be recreated on every new Dolt session.
The cycle detection CTE in internal/storage/issueops/dependencies.go queries both dependencies and wisp_dependencies in a UNION. Unlike blocked.go which gracefully skips missing tables (isTableNotExistError → continue), the cycle detection query fails hard.
Workaround
Manually create the tables via dolt CLI:
dolt --data-dir=.beads/embeddeddolt sql -q "
CREATE TABLE IF NOT EXISTS wisps LIKE issues;
CREATE TABLE IF NOT EXISTS wisp_dependencies LIKE dependencies;
CREATE TABLE IF NOT EXISTS wisp_labels LIKE labels;
CREATE TABLE IF NOT EXISTS wisp_events LIKE events;
CREATE TABLE IF NOT EXISTS wisp_comments LIKE comments;
"
Tables persist in the working set after creation.
Suggested Fix
- Call
createIgnoredTables() during embedded Dolt initialization (same as server mode)
- Additionally: make the cycle detection CTE in
dependencies.go gracefully handle missing wisp_dependencies (like blocked.go already does)
Bug
bd dep addandbd deletefail withtable not found: wisp_dependenciesin embedded mode (v1.0.0). ThecreateIgnoredTables()function that creates thedolt_ignore'd wisp tables (wisps,wisp_dependencies,wisp_labels,wisp_events,wisp_comments) is never called during embedded Dolt initialization.Reproduction
Same for
bd delete:Environment
bd version 1.0.0 (Homebrew)metadata.json: dolt_mode: "embedded")dolt_ignorepatterns are correctly set (wisps,wisp_%)dependenciestable exists, butwisp_dependenciesdoes notRoot Cause
createIgnoredTables()ininternal/storage/dolt/migrations.gois called during server-mode schema init (initSchemaOnDB) but appears to not be called in the embedded Dolt code path. Since wisp tables aredolt_ignore'd, they only exist in the working set and must be recreated on every new Dolt session.The cycle detection CTE in
internal/storage/issueops/dependencies.goqueries bothdependenciesandwisp_dependenciesin a UNION. Unlikeblocked.gowhich gracefully skips missing tables (isTableNotExistError→continue), the cycle detection query fails hard.Workaround
Manually create the tables via dolt CLI:
Tables persist in the working set after creation.
Suggested Fix
createIgnoredTables()during embedded Dolt initialization (same as server mode)dependencies.gogracefully handle missingwisp_dependencies(likeblocked.goalready does)