Skip to content

fix(claude): use cleanup-tolerant temporary directory - #137

Merged
Yifan Yang (Yif-Yang) merged 1 commit into
microsoft:mainfrom
Yif-Yang:fix/claude-tempdir-cleanup
Jul 14, 2026
Merged

fix(claude): use cleanup-tolerant temporary directory#137
Yifan Yang (Yif-Yang) merged 1 commit into
microsoft:mainfrom
Yif-Yang:fix/claude-tempdir-cleanup

Conversation

@Yif-Yang

Copy link
Copy Markdown
Contributor

Summary

Immediate maintainer follow-up to #135, which was merged first with the contributor commit and attribution intact.

Python 3.10, the project minimum, already supports TemporaryDirectory(ignore_cleanup_errors=True). Use that standard lifecycle instead of manual mkdtemp plus rmtree(ignore_errors=True), while preserving the Windows WinError 32 tolerance introduced by #135.

The new platform-neutral regression test mocks a successful Claude result and simulates a Windows cleanup failure through TemporaryDirectory._rmtree. It verifies cleanup receives ignore_errors=True, the model result is preserved, and the temporary directory is removed.

Validation

  • Focused regression: 1 passed
  • pytest tests/ -q: 276 passed, 6 skipped
  • git diff --check: clean
  • Claude Code / Opus 4.8 read-only review: no blockers, MERGE

@Yif-Yang
Yifan Yang (Yif-Yang) merged commit 940c3cd into microsoft:main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant