mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
2383978a2c
## 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.
2383978a2c
ยท
2026-02-13 09:51:22 -08:00
History