gastownhall/beads · error

federation filter: commit filtered state: %w

Error message

federation filter: commit filtered state: %w

What it means

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.

Source

Thrown at internal/storage/dolt/federation.go:615

// commitFilteredStaging repairs and commits the filtered graph on the staging
// branch selected by conn. Dolt branch state is session-scoped, so every step
// stays on that pinned connection.
func (s *DoltStore) commitFilteredStaging(ctx context.Context, conn *sql.Conn) error {
	tx, err := conn.BeginTx(ctx, nil)
	if err != nil {
		return fmt.Errorf("federation filter: begin staged is_blocked recompute: %w", err)
	}
	if _, err := issueops.RecomputeAllIsBlockedInTx(ctx, tx); err != nil {
		_ = tx.Rollback()
		return fmt.Errorf("federation filter: recompute staged is_blocked: %w", err)
	}
	if err := tx.Commit(); err != nil {
		return fmt.Errorf("federation filter: commit staged is_blocked recompute: %w", err)
	}
	if _, err := conn.ExecContext(ctx, "CALL DOLT_COMMIT('-Am', ?)",
		"federation: exclude private issue types"); err != nil {
		return fmt.Errorf("federation filter: commit filtered state: %w", err)
	}
	return nil
}

// prepareCLIRouteForPeerGitProtocol reports whether the SQL-visible peer
// remote uses git wire protocol and prepares the matching local CLI remote
// before routing.
func (s *DoltStore) prepareCLIRouteForPeerGitProtocol(ctx context.Context, peer string) (bool, error) {
	if s.CLIDir() == "" {
		return false, nil
	}
	if !s.hasCLIDatabase() {
		return false, nil
	}
	remotes, err := s.ListRemotes(ctx)
	if err != nil {
		return false, fmt.Errorf("list Dolt remotes before git-protocol routing for peer %q: %w", peer, err)
	}

View on GitHub (pinned to 71377f2769)

Solutions

  1. Retry the operation to get a fresh staging branch and session
  2. Check the Dolt server version supports the flags used in CALL DOLT_COMMIT('-Am', ?)
  3. Ensure no other session operates on the staging branch concurrently
  4. Inspect the wrapped Dolt error for 'nothing to commit' vs conflict messages to distinguish benign vs real failures
Defensive patterns

Strategy: retry

Try / catch

if err := stageFilteredBranch(ctx, conn); err != nil {
	if strings.Contains(err.Error(), "commit filtered state") {
		// check dolt version, retry on fresh staging branch
		return retryStageFiltered(ctx)
	}
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/85651c4ab64a121b. Report an issue: GitHub.