Skip to content

fix: reduce flakiness of compact_resume_after_second_compaction_preserves_history - #11663

Merged
bolinfest merged 1 commit into
mainfrom
pr11663
Feb 13, 2026
Merged

bolinfest merged 1 commit into
mainfrom
pr11663

Conversation

@bolinfest

@bolinfest bolinfest commented Feb 13, 2026 •

Copy link
Copy Markdown
Collaborator

Why

compact_resume_after_second_compaction_preserves_history has been intermittently flaky in Windows CI.

The test had two one-shot request matchers in the second compact/resume phase that could overlap, and it waited for the first Warning event after compaction. In practice, that made the test sensitive to platform/config-specific prompt shape and unrelated warning timing.

What Changed

  • Hardened the second compaction matcher in codex-rs/core/tests/suite/compact_resume_fork.rs so it accepts expected compact-request variants while explicitly excluding the AFTER_SECOND_RESUME payload.
  • Updated compact_conversation() to wait for the specific compaction warning (COMPACT_WARNING_MESSAGE) rather than any Warning event.
  • Added an inline comment explaining why the matcher is intentionally broad but disjoint from the follow-up resume matcher.

Test Plan

  • cargo test -p codex-core --test all suite::compact_resume_fork::compact_resume_after_second_compaction_preserves_history -- --exact
  • Repeated the same test in a loop (40 runs) to check for local nondeterminism.

@bolinfest
bolinfest merged commit 2383978 into main Feb 13, 2026
33 checks passed
@bolinfest
bolinfest deleted the pr11663 branch February 13, 2026 17:51
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants