Files
codex/codex-rs/core/tests
jif-oai 9f47e19b21 test: clean up apply_patch allow-session artifact (#24611)
## Why

The
`approving_apply_patch_for_session_skips_future_prompts_for_same_file`
integration test writes `apply_patch_allow_session.txt` under the
process cwd while exercising outside-workspace patch approval behavior.
With `just test` now being the normal validation path, that file can be
left behind in the checkout when the test runs or fails, creating
confusing untracked state.

## What changed

- Registers the resolved `apply_patch_allow_session.txt` path with
`tempfile::TempPath` before the test removes and recreates it through
`apply_patch`.
- Preserves the existing outside-workspace path shape so the approval
behavior under test does not change.
- Lets `TempPath` remove the generated file when the test exits,
including panic paths.

## Verification

- `just test -p codex-core --test all
approving_apply_patch_for_session_skips_future_prompts_for_same_file`
2026-05-26 18:54:59 +02:00
..