gastownhall/beads · warning
Failed to resolve dependency target %s: %v
Error message
Failed to resolve dependency target %s: %v
What it means
Same as the source-side failure but for the dependency's target (DependsOn) issue: resolveIssue failed with an error while translating the To external ID to a local issue. The dependency is skipped and counted as failed; processing continues with remaining dependencies.
Source
Thrown at internal/tracker/engine.go:1337
}
resolveIssue, err := e.dependencyIssueResolver(ctx, nil)
if err != nil {
e.warn("Failed to build dependency resolver: %v", err)
return len(deps)
}
errCount := 0
for _, dep := range deps {
fromIssue, err := resolveIssue(ctx, dep.FromExternalID)
if err != nil {
e.warn("Failed to resolve dependency source %s: %v", dep.FromExternalID, err)
errCount++
continue
}
toIssue, err := resolveIssue(ctx, dep.ToExternalID)
if err != nil {
e.warn("Failed to resolve dependency target %s: %v", dep.ToExternalID, err)
errCount++
continue
}
if fromIssue == nil || toIssue == nil {
continue // Not found (no error) — expected if issue wasn't imported
}
d := &types.Dependency{
IssueID: fromIssue.ID,
DependsOnID: toIssue.ID,
Type: types.DependencyType(dep.Type),
}
if err := e.Store.AddDependency(ctx, d, e.Actor); err != nil {
e.warn("Failed to create dependency %s -> %s: %v", fromIssue.ID, toIssue.ID, err)
errCount++
}
}View on GitHub (pinned to 71377f2769)
Solutions
- Read the wrapped error to identify the storage-level cause.
- Ensure pull filters don't exclude the dependency endpoints (pull all types/states that dependencies reference).
- Re-run `bd pull` after fixing storage issues.
- Verify the target issue's external_ref in the local store is intact (`bd show <id>`).
- Check tracker-side that the dependency target still exists.
Example fix
// before: target excluded by state filter bd pull --status=open // after: include states that dependency targets may have bd pull
Defensive patterns
Strategy: validation
Validate before calling
// confirm dependency targets are covered by your pull scope
for _, dep := range deps {
if !inPullScope(dep.ToExternalID) {
log.Printf("dependency target %s outside pull scope", dep.ToExternalID)
}
} Try / catch
// retry unresolved targets on a second pass
stats, err := engine.Sync(ctx, opts)
if stats != nil && stats.FailedDeps > 0 && isStorageErr(err) {
time.Sleep(backoff)
engine.Sync(ctx, opts)
} Prevention
- Use unfiltered pulls when dependency graph integrity matters
- Keep external_ref data intact (don't hand-edit the DB)
- Serialize storage writes during pull
- Verify target issues exist in the tracker before mapping links
When it happens
Trigger: resolveIssue(ctx, dep.ToExternalID) returns a non-nil error during pull dependency import — storage query error, DB lock, or transient driver failure for the target lookup.
Common situations: Target issue blocked from import by type/state filters while dependencies still reference it; DB contention; corrupted external_ref on the target issue's local record.
Related errors
- Failed to resolve dependency source %s: %v
- Failed to build dependency resolver: %v
- Failed to create dependency %s -> %s: %v
- no store is open for this workspace
- database not available: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/71a9ad2bec12f167.
Report an issue: GitHub.