fix(tui): report Runtime Chat owner-lock IO faults truthfully - #5736
Conversation
The open path mapped every lock-acquire failure to 'another process owns this session', discarding the underlying io error. Only WouldBlock is genuine contention; anything else (filesystem fault, permission error) is now reported as itself. The next occurrence of the #5735 flake will say what actually failed instead of a blanket ownership claim. Verified: cargo test -p codewhale-tui --lib -- runtime_chat_relay — 16 passed, 0 failed (incl. the genuine-contention test, message unchanged). Refs #5735 Signed-off-by: CodeWhale Bot <bot@codewhale.net>
Codex Review SummaryThis 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. |
|
Claude finished @Hmbown's task in 3m 4s —— View job Reviewing PR #5736
SummaryGood, narrowly-scoped fix. Findings
No provider/model-routing code is touched by this change, and no reuse/duplication or security issues (secrets, exec, input validation) were introduced — the change is a straightforward error-mapping fix confined to one function. Note: I was not able to run |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b73d7700b
ℹ️ 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".
| let contention = error | ||
| .downcast_ref::<std::io::Error>() | ||
| .is_some_and(|io| io.kind() == std::io::ErrorKind::WouldBlock); |
There was a problem hiding this comment.
Treat Windows lock violations as contention
On Windows, a contended LockFile reports raw OS error 33 (ERROR_LOCK_VIOLATION), rather than ErrorKind::WouldBlock, so a second Codewhale process now receives the new local-I/O-fault message instead of the established ownership message. The analogous process lock in crates/tui/src/runtime_threads.rs:3037-3040 explicitly classifies raw errors 32 and 33 as contention; apply the same platform-specific classification here.
Useful? React with 👍 / 👎.
Signed-off-by: CodeWhale Bot <bot@codewhale.net>
|
Claude finished @Hmbown's task in 1m 0s —— View job Reviewing PR #5736 (re-review after new commit
|
Refs #5735.
The
RuntimeChatRelayHost::openlock path mapped every acquire failure to "another process owns this session", discarding the underlying io error — which is why the flaky Safety-gate failure said nothing actionable. OnlyWouldBlockis genuine contention; other failures now report themselves.Verified:
cargo test -p codewhale-tui --lib -- runtime_chat_relay— 16 passed / 0 failed, including the genuine-contention test (message unchanged for that path).This is the diagnosis-enabling half of #5735; the flake itself stays open until a run reports the real errno.
No-Issue: partial fix for tracked flake #5735 — does not close it.