gastownhall/beads · error
checking wisp_dependencies.depends_on_id: %w
Error message
checking wisp_dependencies.depends_on_id: %w
What it means
Wraps a failure from schemaColumnExists when checking whether the legacy depends_on_id column still exists on wisp_dependencies. This check gates the backfill: if depends_on_id is gone, the backfill is skipped because migration 0005 already dropped it (or it never existed). Thrown only when the introspection query itself fails, not when the column is absent.
Source
Thrown at internal/storage/schema/migration_repairs.go:639
if !table {
return nil
}
for _, col := range wispDependenciesSplitTargetColumns() {
present, err := schemaColumnExists(ctx, db, "wisp_dependencies", col.name)
if err != nil {
return fmt.Errorf("checking wisp_dependencies.%s: %w", col.name, err)
}
if !present {
if _, err := db.ExecContext(ctx, "ALTER TABLE wisp_dependencies ADD COLUMN "+col.name+" "+col.definition); err != nil {
return fmt.Errorf("adding wisp_dependencies.%s for migration 0053: %w", col.name, err)
}
}
}
legacyTarget, err := schemaColumnExists(ctx, db, "wisp_dependencies", "depends_on_id")
if err != nil {
return fmt.Errorf("checking wisp_dependencies.depends_on_id: %w", err)
}
if !legacyTarget {
// Nothing left to backfill from: either a prior pass already
// finished (depends_on_id has since been dropped) or this database
// never had the legacy column to begin with.
return nil
}
for _, repair := range wispDependenciesSplitTargetBackfillSQL() {
if _, err := db.ExecContext(ctx, repair); err != nil {
return fmt.Errorf("backfilling wisp_dependencies split targets for migration 0053: %w", err)
}
}
return nil
}
func wispDependenciesSplitTargetColumns() []struct{ name, definition string } {
return []struct{ name, definition string }{View on GitHub (pinned to 71377f2769)
Solutions
- Inspect the wrapped cause and restore the DB connection/server.
- Re-run the repair — it re-probes from the top and is idempotent.
- Ensure the context used for migration has an adequate timeout.
- Verify SELECT access to INFORMATION_SCHEMA for the configured user.
Defensive patterns
Strategy: retry
Validate before calling
// verify server reachable and introspection readable before repair var n int err := db.QueryRowContext(ctx, `SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA=DATABASE()`).Scan(&n)
Type guard
func isConnLoss(err error) bool {
return errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) || strings.Contains(err.Error(), "driver: bad connection")
} Try / catch
if err := ensureWispDependenciesSplitTargets(ctx, db); err != nil {
if isConnLoss(err) { /* reconnect and re-run */ }
return err
} Prevention
- Use a context with adequate deadline for multi-step repairs
- Keep the Dolt server alive for the whole migration window
- Verify INFORMATION_SCHEMA access permissions
- Re-run repairs — they are idempotent
When it happens
Trigger: SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS for depends_on_id errors — Dolt server unreachable, context cancelled, or driver-level failure between the earlier column checks and this one.
Common situations: Server restart or connection drop partway through the multi-step repair; ctx deadline exceeded after several prior statements; permission issues on INFORMATION_SCHEMA.
Related errors
- checking wisp_dependencies.%s: %w
- checking index %s on %s: %w
- checking constraint %s on %s: %w
- failed to migrate credential keys: %w
- failed to scan peer for migration: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/aae37d1b0a4abb8a.
Report an issue: GitHub.