WIP: fix serial monitor ack ordering - #852
Conversation
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
✨ 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 |
Test coverage added on top of the WIP fixPushed two regression-test commits covering the three behavioral changes in this PR. Both run locally against the bundled MSVC SDK once
Local validation
The only remaining merge-blocker from the original PR body is the hardware AutoResearch validation. |
|
Note for whoever picks up CI signal review on this PR: The Filed #862 with the one-line fix (pipe stdout/stderr in |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Post-merge simulation — workspace test is green when #862 is appliedCherry-picked PR #862's two commits onto this branch locally and ran the affected crates with So once #862 lands on
The remaining |
Two unit tests in fbuild-python covering the new pending_lines queue: - read_lines_async_drains_pending_before_wire — proves drain happens before any wire access (uses a None ws slot). - write_async_queues_data_arriving_before_ack — spins up an in-process tokio-tungstenite server that sends Data ahead of WriteAck and asserts the data lines land in pending_lines while write_async still returns true on the eventual ack. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PartialWriteSerialPort returns Ok(2) on the first write() call and full length thereafter — exactly the OS-level back-pressure pattern that broke the prior write()-then-return path. write_to_port must report the full payload length (write_all contract) and the OS-side buffer must contain every byte. Prevents regressing to a write_ack with a partial bytes_written count. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pre-populates pending_lines with a REMOTE: response and asserts wait_for_remote_json_rpc_response_async returns the parsed payload on the very first poll — without touching the wire. Closes the end-to-end loop on the write_ack ordering fix: Data-before-Ack lines parked by write_async surface through the next wait_for_remote call. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
522a220 to
e66d556
Compare
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Summary
WIP snapshot of the serial monitor investigation/fix.
write_ackso JSON-RPC responses are not consumed bywrite()/write_async().None.write_all()instead of acknowledging partial writes.Validation
soldr cargo fmt --allcompleted before this WIP snapshot.soldr cargo check -p fbuild-serial -p fbuild-python -p fbuild-clidid not reach code validation because the zccache daemon failed during third-party dependency compilation.soldr --no-cache cargo check ...run was interrupted before completion.Status
Draft/WIP. Needs a clean compile/test pass and hardware AutoResearch validation before merge.