{"record":{"id":"7a28c3541104abb8","repo":"gastownhall/beads","slug":"committing-seeded-dolt-ignore-patterns-w","errorCode":null,"errorMessage":"committing seeded dolt_ignore patterns: %w","messagePattern":"committing seeded dolt_ignore patterns: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/schema/schema.go","lineNumber":461,"sourceCode":"\t\t// next commit, exactly the pre-scoped-commit behavior.\n\t\tif n, raErr := res.RowsAffected(); raErr == nil && n > 0 {\n\t\t\tchanged = true\n\t\t}\n\t}\n\treturn changed, nil\n}\n\n// commitSeededDoltIgnore stages and commits freshly seeded dolt_ignore rows\n// in a scoped, labeled commit. Both MigrateUp paths use it: on the no-work\n// short-circuit nothing downstream would ever commit the seed, and on the\n// migration path the seed must be committed before the first step so an\n// interrupted pass leaves a clean working set (#4566 self-heal contract).\nfunc commitSeededDoltIgnore(ctx context.Context, db DBConn) error {\n\tif err := DrainCall(ctx, db, \"CALL DOLT_ADD('dolt_ignore')\"); err != nil {\n\t\treturn fmt.Errorf(\"staging seeded dolt_ignore patterns: %w\", err)\n\t}\n\tif err := DrainCall(ctx, db, \"CALL DOLT_COMMIT('-m', 'schema: seed dolt_ignore patterns')\"); err != nil {\n\t\treturn fmt.Errorf(\"committing seeded dolt_ignore patterns: %w\", err)\n\t}\n\treturn nil\n}\n\nfunc LatestVersion() int {\n\tlatestOnce.Do(func() {\n\t\tlatestVer = mainSource.latest()\n\t})\n\treturn latestVer\n}\n\nfunc LatestIgnoredVersion() int {\n\tlatestIgnoredOnce.Do(func() {\n\t\tlatestIgnoredVer = ignoredSource.latest()\n\t})\n\treturn latestIgnoredVer\n}\n","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/schema/schema.go#L443-L479","documentation":"This error wraps a failure of `CALL DOLT_COMMIT('-m', 'schema: seed dolt_ignore patterns')` in commitSeededDoltIgnore. After seeding and staging dolt_ignore patterns, MigrateUp commits them as an isolated labeled commit; failing here means the seed is staged but uncommitted, violating the clean-working-set contract.","triggerScenarios":"MigrateUp calling commitSeededDoltIgnore where DOLT_ADD succeeded but DOLT_COMMIT fails — e.g. no user.name/user.email configured for Dolt commits, nothing staged, or server-side commit rejection.","commonSituations":"Fresh machine where Dolt committer identity is unset (most common); HEAD in detached/conflicted state; database opened in a mode that disallows commits.","solutions":["Check the wrapped cause; configure committer identity if it's an identity error (dolt config --global user.email/user.name)","Run `dolt status` to verify dolt_ignore is actually staged; if unstaged, the DOLT_ADD step failed silently — re-run migrations","Resolve any HEAD/detached-branch state, then retry MigrateUp","As a last resort, commit the staged dolt_ignore change manually and re-run migrations"],"exampleFix":"// before: DOLT_COMMIT fails with missing identity\n$ bd migrate\n// after: set Dolt identity once\n$ dolt config --global user.email \"you@example.com\"\n$ dolt config --global user.name \"You\"\n$ bd migrate","handlingStrategy":"try-catch","validationCode":"// ensure Dolt committer identity exists before migrations that commit\nout, err := db.QueryContext(ctx, \"SELECT config_value FROM dolt_config WHERE config_name='user.email'\")\n// empty result => set identity before migrating","typeGuard":null,"tryCatchPattern":"if err := commitSeededDoltIgnore(ctx, db); err != nil {\n\tif strings.Contains(err.Error(), \"committing seeded dolt_ignore\") {\n\t\t// DOLT_COMMIT failed: check identity/HEAD state, then retry\n\t}\n}","preventionTips":["Configure dolt user.name/user.email globally on new machines","Keep HEAD on a real branch (not detached/conflicted) before migrating","Run migrations once per workspace, serialized via MigrateUpWithLock"],"tags":["dolt","migration","dolt-ignore","commit"],"backgroundTag":"dolt-commit-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}