Skip to content

fix(autoresearch): report a detach abandoned after repeated Ctrl-C (#5281 follow-up) - #5285

Merged
zackees merged 2 commits into
masterfrom
fix/attach-detach-followup-5281
Nov 18, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/attach-detach-followup-5281

Conversation

@zackees

@zackees zackees commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Refs #5281, #5271, #5268

This fixes two CodeRabbit findings on #5284. They were posted after #5284 entered the merge queue, which locked its branch.

  • RpcBench._close_after_interrupt (r4617011198): if Ctrl-C keeps landing after the bounded resumes, the close task used to be dropped silently. It is now cancelled, and the bench prints [rpc] Ctrl-C repeated during detach; the serial session may still be attached. Driving the task forever would make repeated Ctrl-C impossible to exit.
  • Test (r4617011215): the double-interrupt test now counts the fake serial's close() calls and asserts exactly one, so a replacement close task cannot pass it.

Verification: uv run pytest ci/tests/test_rpc_bench_liveness.py ci/tests/test_serial_interface_reset.py passes (31 tests). ruff passes.

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling when a serial session is interrupted repeatedly. After three interrupts, the pending close operation is canceled and a warning is displayed that the session may remain attached before the event loop closes.
    • Added coverage confirming that the serial session’s detach operation is called once after a second interrupt.

@zackees
zackees enabled auto-merge November 18, 2026 16:08
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

After three close attempts, RpcBench._close_after_interrupt cancels an unfinished close task and warns that the serial session may remain attached. The double-interrupt test now tracks close calls and asserts that detach is called once.

Changes: Interrupt cleanup

Layer / File(s) Summary
Close task handling and test
ci/autoresearch/rpc_bench.py, ci/tests/test_rpc_bench_liveness.py
After three close attempts, the cleanup path cancels an unfinished task and prints a warning. The test double counts close calls, and the double-interrupt test asserts that detach is called once.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Possibly related PRs

  • FastLED/FastLED#5284: This PR updates the interrupt-cleanup path introduced and tested in that PR.
Merge Risk: Minimal · up to 002f7

This change makes repeated Ctrl-C during RPC benchmark cleanup exit cleanly and warn that the serial session may still be attached. It affects only CI benchmark tooling, and no merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the bench now reports when a detach is abandoned after repeated Ctrl-C, which matches the summary's cancel-and-warn behavior in RpcBench._close_after_interrupt. The co…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the bench now reports when a detach is abandoned after repeated Ctrl-C, which matches the summary's cancel-and-warn behavior in RpcBench._close_after_interrupt. The commit type and the #5281 follow-up reference are clear, and the title is specific to the change. The test change is secondary and is not named, which is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 00c2703 and 002f757.

Files selected for processing: 2

  • ci/autoresearch/rpc_bench.py
  • ci/tests/test_rpc_bench_liveness.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 18, 2026
@github-actions github-actions Bot added the sanitized Title, body and conversation screened; review text requires separate screening. label Nov 18, 2026
@zackees
zackees added this pull request to the merge queue Nov 18, 2026
@github-actions github-actions Bot added sanitized Title, body and conversation screened; review text requires separate screening. and removed sanitized Title, body and conversation screened; review text requires separate screening. labels Nov 18, 2026
@github-actions github-actions Bot added sanitized Title, body and conversation screened; review text requires separate screening. and removed sanitized Title, body and conversation screened; review text requires separate screening. labels Nov 18, 2026
Merged via the queue into master with commit 6e5e78e Nov 18, 2026
129 of 130 checks passed
@zackees
zackees deleted the fix/attach-detach-followup-5281 branch November 18, 2026 16:19
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sanitized Title, body and conversation screened; review text requires separate screening.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant