Skip to content

Conversation

@max-sixty
Copy link
Owner

Problem

CI test test_list_full_working_tree_conflicts was failing with snapshot mismatch:

  • Expected: + feature ! ✗ +1 -1 ↓1 (conflict symbol )
  • Actual: + feature ! ↓ +1 -1 ↓1 (behind symbol )

The test creates uncommitted changes that conflict with main, but in CI the WorkingTreeConflictsTask was seeing the working tree as clean and falling back to commit-based conflict detection.

Root Cause

"Racy git" timing issue: when files are modified within git's timestamp granularity, git's index may not detect them as dirty until git update-index --refresh is run. The WorkingTreeConflictsTask was checking git status --porcelain without refreshing the index first, causing intermittent failures in CI where commands run in quick succession.

Solution

Added git update-index --refresh before the git status --porcelain check in WorkingTreeConflictsTask::compute(). This ensures git's index is refreshed before checking if the working tree is dirty. Errors are ignored since status will still work even if refresh fails.

Testing

  • ✅ Test passes locally
  • ✅ Unit tests pass
  • Waiting for CI to confirm fix

Related


🤖 This is an automated fix for CI failure. Please review before merging.

… contention

WorkingTreeDiffTask and WorkingTreeConflictsTask both run in parallel for
the same worktree. WorkingTreeConflictsTask needs `git stash create` which
requires the index lock. By default, `git status` also writes to the index
(to update stat cache), causing lock contention.

Using `--no-optional-locks` makes status read-only, allowing it to run
concurrently with stash create without conflicts.

Co-Authored-By: Claude <[email protected]>
@max-sixty max-sixty merged commit 55223ad into main Jan 10, 2026
19 checks passed
@max-sixty max-sixty deleted the fix/ci-20872461469 branch January 10, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants