Skip to content

test: clean up apply_patch allow-session artifact#24611

Merged
jif-oai merged 1 commit into
mainfrom
jif/use-tmp-for-test
May 26, 2026
Merged

test: clean up apply_patch allow-session artifact#24611
jif-oai merged 1 commit into
mainfrom
jif/use-tmp-for-test

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented May 26, 2026

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

@jif-oai jif-oai requested a review from a team as a code owner May 26, 2026 16:40
@jif-oai jif-oai changed the title fix: use tmp file test: clean up apply_patch allow-session artifact May 26, 2026
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented May 26, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jif-oai jif-oai merged commit 9f47e19 into main May 26, 2026
30 checks passed
@jif-oai jif-oai deleted the jif/use-tmp-for-test branch May 26, 2026 16:55
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 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