gastownhall/beads · error
get blocking info: blocker status: %w
Error message
get blocking info: blocker status: %w
What it means
Returned by queryBlockedByInfo when loadStatusByIDInTx fails while fetching the close-status of blocker issue IDs, so the library cannot decide which blockers are still active. The %w wraps the underlying status-load error (query failure on the issues table, connection problem, etc.).
Source
Thrown at internal/storage/issueops/dependency_queries.go:639
var depRows []blockingInfoRow
var blockerIDs []string
for rows.Next() {
var row blockingInfoRow
if scanErr := rows.Scan(&row.issueID, &row.blockerID, &row.depType); scanErr != nil {
_ = rows.Close()
return fmt.Errorf("get blocking info: scan blocked-by: %w", scanErr)
}
depRows = append(depRows, row)
blockerIDs = append(blockerIDs, row.blockerID)
}
_ = rows.Close()
if err := rows.Err(); err != nil {
return fmt.Errorf("get blocking info: blocked-by rows: %w", err)
}
statusByID, err := loadStatusByIDInTx(ctx, tx, blockerIDs)
if err != nil {
return fmt.Errorf("get blocking info: blocker status: %w", err)
}
for _, row := range depRows {
if statusByID[row.blockerID] == types.StatusClosed {
continue
}
if row.depType == "parent-child" {
parentMap[row.issueID] = row.blockerID
} else {
blockedByMap[row.issueID] = append(blockedByMap[row.issueID], row.blockerID)
}
}
}
return nil
}
// queryBlocksInfo queries inbound blocking info across dependency tables.
func queryBlocksInfo(View on GitHub (pinned to 71377f2769)
Solutions
- Inspect the wrapped error from loadStatusByIDInTx for the root cause (missing table, permissions, connection).
- If the issues table is missing, run database initialization/migration.
- If permission denied, grant SELECT on the issues table to the DB user.
- Retry on transient connection errors; verify remote server health.
- If the DB is corrupted, restore from backup or re-sync from the git remote.
Example fix
// before: restricted user cannot read issues table GRANT SELECT ON beads.dependencies TO 'bd'@'%'; // after: grant read on all beads tables including issues GRANT SELECT ON beads.* TO 'bd'@'%'; FLUSH PRIVILEGES;
Defensive patterns
Strategy: validation
Validate before calling
// Go: verify issues table is readable before dependency queries
var n int
if err := tx.QueryRowContext(ctx,
"SELECT COUNT(*) FROM issues LIMIT 1").Scan(&n); err != nil {
return fmt.Errorf("issues table unreadable: %w", err)
} Type guard
func isBlockerStatusError(err error) bool {
return err != nil && strings.Contains(err.Error(), "get blocking info: blocker status")
} Try / catch
blockedBy, blocks, parents, err := GetBlockingInfoForIssuesInTx(ctx, tx, ids)
if isBlockerStatusError(err) {
if isMissingTable(errors.Unwrap(err)) {
return runMigrations(ctx, tx)
}
return fmt.Errorf("cannot resolve blocker statuses: %w", err)
} Prevention
- Ensure migrations create the issues table before dependency features are used.
- Grant SELECT on the issues table to the application DB user.
- Run read-health checks (SELECT 1, SELECT COUNT(*) FROM issues) before batch operations.
- Keep DB restores and client versions in sync.
When it happens
Trigger: Calling GetBlockingInfoForIssuesInTx when the issues table is missing/unreadable, the connection fails during the status lookup, or the batched status query errors — e.g. after a corrupt DB restore or missing grants on the issues table.
Common situations: Database missing the issues table (unmigrated DB); SELECT permissions revoked; connection drop between the dependency query and the status lookup; Dolt server errors.
Related errors
- db: DependencySQLRepository.CountAllForIDs from %s: %w
- get blocked-by info from %s: %w
- failed to begin transaction: %w
- failed to recompute is_blocked: %w
- failed to commit is_blocked repairs: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/d72ef990ba200d70.
Report an issue: GitHub.