{"record":{"id":"85651c4ab64a121b","repo":"gastownhall/beads","slug":"federation-filter-commit-filtered-state-w","errorCode":null,"errorMessage":"federation filter: commit filtered state: %w","messagePattern":"federation filter: commit filtered state: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/dolt/federation.go","lineNumber":615,"sourceCode":"\n// commitFilteredStaging repairs and commits the filtered graph on the staging\n// branch selected by conn. Dolt branch state is session-scoped, so every step\n// stays on that pinned connection.\nfunc (s *DoltStore) commitFilteredStaging(ctx context.Context, conn *sql.Conn) error {\n\ttx, err := conn.BeginTx(ctx, nil)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"federation filter: begin staged is_blocked recompute: %w\", err)\n\t}\n\tif _, err := issueops.RecomputeAllIsBlockedInTx(ctx, tx); err != nil {\n\t\t_ = tx.Rollback()\n\t\treturn fmt.Errorf(\"federation filter: recompute staged is_blocked: %w\", err)\n\t}\n\tif err := tx.Commit(); err != nil {\n\t\treturn fmt.Errorf(\"federation filter: commit staged is_blocked recompute: %w\", err)\n\t}\n\tif _, err := conn.ExecContext(ctx, \"CALL DOLT_COMMIT('-Am', ?)\",\n\t\t\"federation: exclude private issue types\"); err != nil {\n\t\treturn fmt.Errorf(\"federation filter: commit filtered state: %w\", err)\n\t}\n\treturn nil\n}\n\n// prepareCLIRouteForPeerGitProtocol reports whether the SQL-visible peer\n// remote uses git wire protocol and prepares the matching local CLI remote\n// before routing.\nfunc (s *DoltStore) prepareCLIRouteForPeerGitProtocol(ctx context.Context, peer string) (bool, error) {\n\tif s.CLIDir() == \"\" {\n\t\treturn false, nil\n\t}\n\tif !s.hasCLIDatabase() {\n\t\treturn false, nil\n\t}\n\tremotes, err := s.ListRemotes(ctx)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"list Dolt remotes before git-protocol routing for peer %q: %w\", peer, err)\n\t}","sourceCodeStart":597,"sourceCodeEnd":633,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/dolt/federation.go#L597-L633","documentation":"Wraps a failure from CALL DOLT_COMMIT('-Am', 'federation: exclude private issue types') on the pinned staging-branch connection. The SQL transaction committed the is_blocked recompute, but Dolt refused to record the working-set changes as a commit on the staging branch, so the filtered state is not durable.","triggerScenarios":"commitFilteredStaging runs DOLT_COMMIT -Am on the staging branch and Dolt returns an error: nothing to commit, working-set merge conflicts, session not checked out to the staging branch, or invalid session state.","commonSituations":"Another writer committed to the staging branch concurrently producing a dirty/conflicting working set; Dolt version incompatibility with the -Am flag usage; the pinned session lost its branch state after an earlier error.","solutions":["Retry the operation to get a fresh staging branch and session","Check the Dolt server version supports the flags used in CALL DOLT_COMMIT('-Am', ?)","Ensure no other session operates on the staging branch concurrently","Inspect the wrapped Dolt error for 'nothing to commit' vs conflict messages to distinguish benign vs real failures"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := stageFilteredBranch(ctx, conn); err != nil {\n\tif strings.Contains(err.Error(), \"commit filtered state\") {\n\t\t// check dolt version, retry on fresh staging branch\n\t\treturn retryStageFiltered(ctx)\n\t}\n}","preventionTips":["Pin a Dolt server version compatible with CALL DOLT_COMMIT('-Am', ?)","Never share the staging branch across sessions","Treat 'nothing to commit' as benign when it appears"],"tags":["dolt","dolt-commit","staging-branch","federation"],"backgroundTag":"dolt-commit-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}