Skip to content

test(tui): relax yolo ask-rule event timeout on windows#3644

Merged
Hmbown merged 1 commit into
mainfrom
codex/yolo-model-ask-rule-timeout
Jun 26, 2026
Merged

test(tui): relax yolo ask-rule event timeout on windows#3644
Hmbown merged 1 commit into
mainfrom
codex/yolo-model-ask-rule-timeout

Conversation

@Hmbown

@Hmbown Hmbown commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

Validation

  • cargo fmt --all -- --check
  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target cargo test -p codewhale-tui --bin codewhale-tui --locked core::engine::tests::yolo_mode_does_not_prompt_for_model_driven_typed_ask_rule -- --nocapture
  • CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target cargo test -p codewhale-tui --bin codewhale-tui --locked core::engine::tests::yolo_mode_does_not_prompt_for_background_shell_safety_floor -- --nocapture

The model-driven YOLO ask-rule regression test can exceed ten seconds under the Windows full-suite runner before the relevant engine event arrives. Keep the behavior assertion intact but give model-turn event waits a Windows-sized timeout so the release lane does not go red from runner slowness.
@claude

claude Bot commented Jun 26, 2026

Copy link
Copy Markdown

Claude finished @Hmbown's task in 46s —— View job


Review

  • Read changed files
  • Analyze diff and surrounding context

Summary: Straightforward and correct. The change extracts a model_turn_event_timeout() helper that returns 30 s on Windows and 10 s elsewhere, then applies it to the two async engine-event loop tests that were timing out on Windows CI.

Correctness — no issues found

  • cfg!(windows) is the right mechanism here: it's a compile-time gate, so the Windows path has zero overhead on non-Windows builds and there's nothing to go wrong at runtime.
  • 30 s is a sensible ceiling for a Windows runner doing shell-spawning I/O inside an async engine loop. It's generous without being unbounded.
  • The two call sites (yolo_mode_does_not_prompt_for_model_driven_typed_ask_rule and yolo_mode_does_not_prompt_for_background_shell_safety_floor) are the only places in the file that hit the Duration::from_secs(10) pattern for engine-event polling — confirmed by grep, no remaining hardcoded 10 s timeouts are left behind.
  • The other two timeout(Duration::from_secs(2), …) calls at lines 3237/3261 are for unrelated lightweight queries (provider-runtime-status), not shell-execution event loops, so they don't need the same treatment.

Placement — fine

The helper sits between file_ask_rule_engine and the first #[test], a natural spot for shared test utilities. No concerns.

Reuse — nothing to consolidate

Only two call sites exist and they're both updated. No dead code introduced.

Verdict: Ready to merge as-is. Good minimal fix for the Windows CI regression.


@Hmbown Hmbown merged commit 3e9e855 into main Jun 26, 2026
17 checks passed
@Hmbown Hmbown deleted the codex/yolo-model-ask-rule-timeout branch June 26, 2026 07:30
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