gastownhall/beads · error
checking wisp_dependencies.%s: %w
Error message
checking wisp_dependencies.%s: %w
What it means
Wraps a failure from schemaColumnExists when checking whether one of the split-target columns (depends_on_issue_id, depends_on_wisp_id, depends_on_external) exists on wisp_dependencies via INFORMATION_SCHEMA.COLUMNS. Thrown by ensureWispDependenciesSplitTargets before it would ADD COLUMN anything, so the schema is left untouched. The underlying cause is a query failure, not a missing column (a missing column is handled by adding it).
Source
Thrown at internal/storage/schema/migration_repairs.go:628
// depends_on_id (the legacy source the backfill reads from) is still around,
// which is itself idempotent (each statement below is scoped to the rows it
// hasn't yet filled in). Skipping this matters because a later ignored
// migration (0005) drops depends_on_id once it assumes the split is done;
// after that the source data needed to finish an interrupted backfill is
// gone for good.
func ensureWispDependenciesSplitTargets(ctx context.Context, db DBConn) error {
table, err := schemaTableExists(ctx, db, "wisp_dependencies")
if err != nil {
return fmt.Errorf("checking wisp_dependencies table: %w", err)
}
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
}View on GitHub (pinned to 71377f2769)
Solutions
- Check the wrapped driver error for the real cause (connection lost, timeout, permission).
- Retry the migration repair — it is idempotent and re-probes all columns.
- Ensure the process has network access to the Dolt server and the context deadline is generous enough for migration-time probes.
- Verify the DB user can read INFORMATION_SCHEMA.COLUMNS.
Defensive patterns
Strategy: retry
Validate before calling
// pre-check column presence outside the error path var n int db.QueryRowContext(ctx, `SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME='wisp_dependencies' AND COLUMN_NAME=?`, col).Scan(&n)
Type guard
func isSchemaProbeErr(err error) bool {
return strings.Contains(err.Error(), "checking wisp_dependencies.")
} Try / catch
if err := ensureWispDependenciesSplitTargets(ctx, db); err != nil {
if isRetryableDB(err) { time.Sleep(backoff); return ensureWispDependenciesSplitTargets(ctx, db) }
return err
} Prevention
- Ensure the DB user can read INFORMATION_SCHEMA
- Avoid cancelling the context mid-migration
- Retry idempotent repairs on transient driver errors
- Run repairs against a healthy, connected server
When it happens
Trigger: The repair loop iterates wispDependenciesSplitTargetColumns() and the INFORMATION_SCHEMA.COLUMNS count query errors — server unreachable, context cancelled mid-probe, or the database handle invalidated between statements.
Common situations: Long-running repair interrupted by context timeout; Dolt restart between the table check and the column check; read-only or restricted account that cannot query INFORMATION_SCHEMA.
Related errors
- checking wisp_dependencies.depends_on_id: %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/6bb006a867a42fe4.
Report an issue: GitHub.