[codex] Fix driver error monitoring - #999
Conversation
|
/githoney link-bounty --bountyId 64 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCentralizes driver task monitoring for daemon and serve entry points. The shared ChangesDriver monitoring refactor
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant DaemonOrServe
participant monitor_drivers
participant DriverTasks
participant ExitToken
DaemonOrServe->>monitor_drivers: pass driver tasks and exit token
monitor_drivers->>DriverTasks: await completed task
DriverTasks-->>monitor_drivers: return success or failure
monitor_drivers->>ExitToken: cancel when a failure occurs
monitor_drivers->>DriverTasks: monitor remaining tasks
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ba00b6c to
3c982c8
Compare
Summary
serveanddaemonso driver failures are observed promptlyRoot cause
serveanddaemoncollected driver join handles in aFuturesUnordered, but then awaited each join handle from the collection iterator. That made failures depend on insertion order rather than completion order. If an earlier driver kept running and a later Ouroboros Unix socket driver failed to bind, the bind error could remain unread until shutdown.Fixes #293.
Bounty note
I linked Githoney bounty
64from #293 with/githoney link-bounty --bountyId 64. The issue bot comment shows a2025-01-26deadline, so please confirm whether it is still claimable.Verification
cargo test monitor_drivers_observes_later_failures_before_waiting_for_earlier_drivers --no-default-featurescargo test --no-default-featuresgit diff --checkI also tried
cargo fmt --check, but this checkout has pre-existing rustfmt drift outside this PR on stable rustfmt, so I left those unrelated files untouched.Summary by CodeRabbit
Bug Fixes
Refactor