Repository navigation
fix: serialise _change_working_dir to stop cwd races (#3553) - #4229
lsmlhi_25 (FOWEPJF255) wants to merge 2 commits into
Conversation
os.chdir is process-global; concurrent threads sharing the line-execution pool could spawn workers with the wrong working directory (microsoft#3553). Hold a module lock around getcwd/chdir/restore and add regression tests.
|
Hi, thank you for your interest in helping to improve the prompt flow experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. |
|
Yes, this PR is still active. I pushed a follow-up fix that moves relative directory creation under Validation: the targeted context-utils test file passes 5/5 on Python 3.12.10; Black formatting, Python compilation, and Commit: 27dae5c |
|
The latest parallel unit and end-to-end workflow runs both ended with |
Summary
_change_working_dir, including creation of relative working directories, with a module-levelthreading.Lockso concurrent threads in the line-execution process pool cannot observe each other's intermediateos.chdirstate.Context
Reclaims the approach from stale closed PR #4205. Issue has 0 open competing PRs.
Test plan
git diff --checkpassed for the changed files.Disclosure: drafted with AI assistance; personally reviewed against #3553 repro and prior #4205.