gastownhall/beads · error
reading existing dependencies for %s: %w
Error message
reading existing dependencies for %s: %w
What it means
Wraps an error from tx.GetDependencyRecords while graphApplyHasPath walks existing dependencies to detect cycles. The wrapped error is the actual failure (storage/tx level); this message adds which issue's deps could not be read.
Source
Thrown at cmd/bd/graph_apply.go:1234
if id == toID {
return true, nil
}
if seen[id] {
return false, nil
}
seen[id] = true
for _, next := range adj[id] {
found, err := visit(next)
if err != nil || found {
return found, err
}
}
deps, ok := depCache[id]
if !ok {
var err error
deps, err = tx.GetDependencyRecords(ctx, id)
if err != nil {
return false, fmt.Errorf("reading existing dependencies for %s: %w", id, err)
}
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)
}
// graphApplyEdgeIsLocalCycleRelevant reports whether an edge participates in theView on GitHub (pinned to 71377f2769)
Solutions
- Fix the underlying error shown after this prefix (connection, lock, missing issue)
- Retry the apply after confirming the referenced issue still exists
- Check database health/integrity if GetDependencyRecords fails repeatedly
Defensive patterns
Strategy: retry
Try / catch
err := bd.GraphApply(ctx, plan)
if err != nil && strings.Contains(err.Error(), "reading existing dependencies") {
time.Sleep(backoff)
err = bd.GraphApply(ctx, plan) // retry after transient storage failure
} Prevention
- Verify DB connectivity/health before long apply operations
- Avoid concurrent writers deleting issues during apply
- Monitor for underlying GetDependencyRecord failures
When it happens
Trigger: Cycle detection during bd graph apply needs the existing dependency records for issue `id` and the transaction's GetDependencyRecords call fails.
Common situations: DB locked or connection dropped mid-apply; issue referenced in the plan was deleted concurrently; storage backend error.
Related errors
- edge %d %s->%s: checking planned blocking cycle: %w
- not found
- load wisp labels: %w
- applyGraph: node %q: %w
- CountOpenChildren %s: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/c88b32a724ab32e3.
Report an issue: GitHub.