Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The change affects shutdown behavior for runtimes used by Python, CLI, and MCP callers. The PR appears safe to merge, with a non-blocking gap in testing failed final scratch lookups.
|
| with pytest.MonkeyPatch.context() as patch: | ||
| patch.setattr(os, "stat", unavailable) | ||
| for _ in range(retry_outages): | ||
| with pytest.raises(OSError): | ||
| runtime.close() |
There was a problem hiding this comment.
Unreadable lookup lacks a test
The generated outages replace os.stat, but the new final check calls os.lstat. These retries test scratch still being present, not the final lookup failing. A regression that treats an unreadable lookup as successful shutdown could pass.
Add a case where os.lstat raises PermissionError or another OSError, then recovers. Check that requests stay refused and a later close() succeeds.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/test_runtime_requests.py
Line: 65-69
Comment:
**Unreadable lookup lacks a test**
The generated outages replace `os.stat`, but the new final check calls `os.lstat`. These retries test scratch still being present, not the final lookup failing. A regression that treats an unreadable lookup as successful shutdown could pass.
Add a case where `os.lstat` raises `PermissionError` or another `OSError`, then recovers. Check that requests stay refused and a later `close()` succeeds.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Verification