Skip to content

fix: box apply_patch test harness futures#15835

Merged
bolinfest merged 1 commit intomainfrom
pr15835
Mar 26, 2026
Merged

fix: box apply_patch test harness futures#15835
bolinfest merged 1 commit intomainfrom
pr15835

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented Mar 26, 2026

Why

#[large_stack_test] made the apply_patch_cli tests pass by giving them more stack, but it did not address why those tests needed the extra stack in the first place.

The real problem is the async state built by the apply_patch_cli harness path. Those tests await three helper boundaries directly: harness construction, turn submission, and apply-patch output collection. If those helpers inline their full child futures, the test future grows to include the whole harness startup and request/response path.

This change replaces the workaround from #12768 with the same basic approach used in #13429, but keeps the fix narrower: only the helper boundaries awaited directly by apply_patch_cli stay boxed.

What Changed

  • removed #[large_stack_test] from core/tests/suite/apply_patch_cli.rs
  • restored ordinary #[tokio::test(flavor = "multi_thread", worker_threads = 2)] annotations in that suite
  • deleted the now-unused codex-test-macros crate and removed its workspace wiring
  • boxed only the three helper boundaries that the suite awaits directly:
    • apply_patch_harness_with(...)
    • TestCodexHarness::submit(...)
    • TestCodexHarness::apply_patch_output(...)
  • added comments at those boxed boundaries explaining why they remain boxed

Testing

  • cargo test -p codex-core --test all suite::apply_patch_cli -- --nocapture

References

@bolinfest bolinfest changed the title fix: remove apply_patch large-stack test workaround Mar 26, 2026
@bolinfest bolinfest force-pushed the pr15835 branch 3 times, most recently from 6ec7a2d to e679a8e Compare March 26, 2026 05:54
@bolinfest bolinfest requested a review from jif-oai March 26, 2026 06:03
@bolinfest bolinfest enabled auto-merge (squash) March 26, 2026 15:26
@bolinfest bolinfest merged commit e36ebaa into main Mar 26, 2026
94 of 103 checks passed
@bolinfest bolinfest deleted the pr15835 branch March 26, 2026 17:32
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants