Skip to content

test: stabilize settings terminal tests and the macOS config path check - #424

Merged
srothgan merged 1 commit into
mainfrom
fix/ci-test-races
Oct 6, 2026
Merged

srothgan merged 1 commit into
mainfrom
fix/ci-test-races

Conversation

@srothgan

@srothgan srothgan commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add wait_settings_ready to the terminal test harness and use it in all six tests that open settings, so the first edit key is sent only after the open-time settings refresh has finished.
  • Add wait_settings_saved and use it in the hook and permission tests, so the final Esc is sent only after the acknowledged save has closed its editor.
  • Compare canonical paths for the local settings file in config_commands_inspect_only_the_selected_profile.

Test-only change; no production code is touched.

Why

Settings ignore edit keys while a settings request is pending, and the tests sent keys without waiting for that request to finish.

Validation

  • Automated: cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test --locked --all-features --test claude_config_dir (3 passed), and the six changed tests in cargo test --locked --all-features --test terminal_resize -- --test-threads=1 (6 passed), all on Windows. The full cargo test --all-features suite was not run locally.
  • Manual: None. The races did not reproduce locally before the change, and the macOS path case cannot run on Windows, so CI on Ubuntu and macOS is the real check. The full suite on macOS only runs in Nightly.
  • Screenshot/video (if UI changed): N/A

Notes

  • Breaking changes: N/A
  • Docs updated: N/A
  • Governance/release impact: N/A
  • The Nightly macOS job stopped at claude_config_dir, so the test binaries after it have not run on macOS in the full suite since fix(tui): reconcile terminal size before inline redraws #408. Further macOS-only failures may surface once this one is fixed.

- wait for the settings refresh to finish before the first edit key in every terminal test that opens settings
- wait for an acknowledged save to close its editor before leaving settings in the hook and permission tests
- share both waits through `wait_settings_ready` and `wait_settings_saved`
- compare canonical paths for the local settings file so the config profile test passes where the temporary directory is a symlink
@srothgan srothgan added type: refactor Refactoring, performance, tests, and code style area: ci CI/CD pipeline and GitHub Actions area: tui Terminal UI, rendering, input, and keymap labels Oct 5, 2026
@srothgan
srothgan merged commit c08b903 into main Oct 6, 2026
21 checks passed
@srothgan
srothgan deleted the fix/ci-test-races branch October 6, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI/CD pipeline and GitHub Actions area: tui Terminal UI, rendering, input, and keymap type: refactor Refactoring, performance, tests, and code style

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant