Skip to content

fix(test): remove duplicate on_file_select call causing flaky CI#314

Merged
esmuellert merged 1 commit intomainfrom
dev
Mar 7, 2026
Merged

fix(test): remove duplicate on_file_select call causing flaky CI#314
esmuellert merged 1 commit intomainfrom
dev

Conversation

@esmuellert
Copy link
Owner

Summary

Fixes flaky CI failure on Windows x64 and macOS ARM in hunk_operations_spec.lua ("unstage_hunk from staged view reduces hunk count").

Root Cause

The test called explorer.on_file_select() for the staged file immediately after open_codediff_and_wait(), but the explorer already auto-selects that same file on startup when all changes are staged. The two concurrent async git operations raced — on slower CI runners the callbacks would interfere, leaving modified_revision unset and failing the assertion.

Changes

  • Removed the redundant on_file_select() call in the test
  • Let the explorer's built-in auto-selection handle the initial file selection
  • All tests pass locally (0 failures across full suite)

Testing

  • Full test suite passes locally
  • The specific unstage_hunk from staged view reduces hunk count test passes reliably

The unstage_hunk test called explorer.on_file_select() for the staged
file immediately after open_codediff_and_wait(), but the explorer
already auto-selects that same file on startup when all changes are
staged. The two concurrent async git operations raced — on slower
Windows/macOS CI runners the callbacks would interfere, leaving
modified_revision unset and failing the assertion.

Remove the redundant on_file_select() call and let the explorer's
built-in auto-selection handle it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@esmuellert esmuellert enabled auto-merge March 7, 2026 04:47
@esmuellert esmuellert merged commit 623413d into main Mar 7, 2026
13 checks passed
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.

1 participant