gastownhall/beads · error
staging seeded dolt_ignore patterns: %w
Error message
staging seeded dolt_ignore patterns: %w
What it means
This error wraps a failure of `CALL DOLT_ADD('dolt_ignore')` when committing freshly seeded dolt_ignore patterns during MigrateUp. The seed must be staged and committed as a scoped, labeled commit so an interrupted migration pass leaves a clean working set (#4566 self-heal contract); failing at the DOLT_ADD step means the seed rows stay dirty.
Source
Thrown at internal/storage/schema/schema.go:458
}
// A RowsAffected error degrades to changed=false for that row: the
// seed then stays an uncommitted working-set diff swept up by the
// next commit, exactly the pre-scoped-commit behavior.
if n, raErr := res.RowsAffected(); raErr == nil && n > 0 {
changed = true
}
}
return changed, nil
}
// commitSeededDoltIgnore stages and commits freshly seeded dolt_ignore rows
// in a scoped, labeled commit. Both MigrateUp paths use it: on the no-work
// short-circuit nothing downstream would ever commit the seed, and on the
// migration path the seed must be committed before the first step so an
// interrupted pass leaves a clean working set (#4566 self-heal contract).
func commitSeededDoltIgnore(ctx context.Context, db DBConn) error {
if err := DrainCall(ctx, db, "CALL DOLT_ADD('dolt_ignore')"); err != nil {
return fmt.Errorf("staging seeded dolt_ignore patterns: %w", err)
}
if err := DrainCall(ctx, db, "CALL DOLT_COMMIT('-m', 'schema: seed dolt_ignore patterns')"); err != nil {
return fmt.Errorf("committing seeded dolt_ignore patterns: %w", err)
}
return nil
}
func LatestVersion() int {
latestOnce.Do(func() {
latestVer = mainSource.latest()
})
return latestVer
}
func LatestIgnoredVersion() int {
latestIgnoredOnce.Do(func() {
latestIgnoredVer = ignoredSource.latest()
})View on GitHub (pinned to 71377f2769)
Solutions
- Inspect the wrapped DOLT_ADD error; run `dolt status` to see the working-set state
- Resolve any conflicts or dirty staged state, then re-run migrations
- Confirm the database is opened read-write and the Dolt server is healthy
- Retry MigrateUp — seeding and staging are idempotent
Example fix
// before: dirty working set blocks DOLT_ADD dolt status // shows conflicts // after: clean the working set first dolt checkout . && bd migrate
Defensive patterns
Strategy: try-catch
Validate before calling
// ensure a clean working set before migrations that stage dolt_ignore
rows, err := db.QueryContext(ctx, "CALL DOLT_STATUS()")
if err != nil { return err }
for rows.Next() { /* any non-empty dirty state -> resolve first */ } Try / catch
if err := commitSeededDoltIgnore(ctx, db); err != nil {
if strings.Contains(err.Error(), "staging seeded dolt_ignore") {
// DOLT_ADD failed: inspect DOLT_STATUS, resolve conflicts, retry
}
} Prevention
- Resolve conflicts and clean the working set before running bd migrate
- Confirm Dolt stored-procedure calls (CALL DOLT_ADD) work against the server
- Use the locked migration path to avoid concurrent writers
When it happens
Trigger: MigrateUp (both no-work short-circuit and migration paths) calling commitSeededDoltIgnore when the Dolt working set or server refuses DOLT_ADD — e.g. merge conflict state, server not accepting stored-procedure calls, or a read-only store.
Common situations: Repo in a conflicted/detached Dolt state; Dolt server freshly auto-started and rejecting procedure calls; running migrations where the dolt_ignore table is in an unexpected staged state.
Related errors
- seeding dolt_ignore pattern %q: %w
- committing seeded dolt_ignore patterns: %w
- unstaging pre-migration tables: %w
- staging migrations: %w
- dolt add %s: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/e41522c5b37c3c22.
Report an issue: GitHub.