gastownhall/beads · error
applyGraph: read existing wisp deps for %s: %w
Error message
applyGraph: read existing wisp deps for %s: %w
What it means
Same as the regular-deps variant but for the wisp_dependencies table: the second ListByIssueIDs call (UseWispsTable: true) in graphHasPath failed. Both tables must be readable so a blocking cycle closing through a wisp edge is detected.
Source
Thrown at internal/storage/domain/issue.go:1540
if err != nil || found {
return found, err
}
}
deps, ok := depCache[id]
if !ok {
regular, err := u.depRepo.ListByIssueIDs(ctx, []string{id}, DepListOpts{
Direction: DepDirectionOut,
UseWispsTable: false,
})
if err != nil {
return false, fmt.Errorf("applyGraph: read existing deps for %s: %w", id, err)
}
wisp, err := u.depRepo.ListByIssueIDs(ctx, []string{id}, DepListOpts{
Direction: DepDirectionOut,
UseWispsTable: true,
})
if err != nil {
return false, fmt.Errorf("applyGraph: read existing wisp deps for %s: %w", id, err)
}
deps = append(regular.Outgoing[id], wisp.Outgoing[id]...)
depCache[id] = deps
}
for _, dep := range deps {
if !followExistingDep(dep.Type) {
continue
}
found, err := visit(dep.DependsOnID)
if err != nil || found {
return found, err
}
}
return false, nil
}
return visit(fromID)
}
View on GitHub (pinned to 71377f2769)
Solutions
- Verify wisp_dependencies table exists in the Dolt DB (migrate/run bd doctor).
- Check driver connectivity and retry; read the wrapped error for the storage cause.
- Confirm storage mode/config matches the initialized schema version.
- If context timeouts recur, raise timeout or batch graph applies.
Defensive patterns
Strategy: retry
Validate before calling
// confirm wisp table is available before graph applies
rows, err := db.Query("SHOW TABLES LIKE 'wisp_dependencies'")
if err != nil || !rows.Next() {
return fmt.Errorf("wisp_dependencies table missing; run migration")
} Try / catch
if err != nil {
if errors.Is(err, context.Canceled) {
return err // do not retry cancellation
}
return fmt.Errorf("applyGraph: wisp deps unavailable for %s: %w", id, err)
} Prevention
- Run bd init/doctor after upgrading so the wisp table exists.
- Verify storage mode (embedded vs server) matches the initialized schema.
- Retry transient network errors with backoff.
- Set generous context deadlines for graph walks.
When it happens
Trigger: ApplyGraph walk reaches an uncached node and the wisp-table ListByIssueIDs query errors — wisp_dependencies table missing/corrupt, driver error, canceled context, or wrong storage mode (wisp table unsupported).
Common situations: Older database initialized before wisp_dependencies existed; embedded vs server storage mode mismatch; partial migration leaving wisp table absent.
Related errors
- applyGraph: read existing deps for %s: %w
- delete: drop wisp deps: %w
- delete: drop sync-plane edges into deleted wisps: %w
- delete: drop wisp labels: %w
- delete: drop wisp events: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/0974d55fcd24ada6.
Report an issue: GitHub.