Skip to content

feat: add RP2040 watchdog recovery mode - #3638

Merged
zackees merged 1 commit into
masterfrom
feat/rp2040-rpc-smoke-no-port
Jul 14, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/rp2040-rpc-smoke-no-port

Conversation

@zackees

@zackees zackees commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Add --watchdog-soak to the pin-free AutoResearch workflow. It sends deliberateHang through RpcClient, records the acknowledgement, waits for CDC disappearance/re-enumeration, validates post-reset ping/reset uptime, and reruns the RPC smoke set. Includes stock RP2040 no-port handling and skips GPIO discovery. Tests: 112 autoresearch tests passed. Attached hardware execution is still pending because the current deliberateHang run leaves this Pico in BOOTSEL before ACK/recovery.

Summary by CodeRabbit

  • New Features

    • Added a watchdog soak test mode for validating recovery after a deliberate device hang.
    • Automatically reconnects after recovery and runs follow-up connectivity checks.
    • Added a --watchdog-soak command-line option to enable the new test mode.
  • Validation

    • Watchdog soak runs now verify the connection before and after recovery.
    • Includes post-recovery RPC smoke testing.

@zackees
zackees force-pushed the feat/rp2040-rpc-smoke-no-port branch from 1ff5b0e to c12055b Compare July 14, 2026 21:59
@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d5b0aded-7142-44f0-beea-78a4fcd75514

📥 Commits

Reviewing files that changed from the base of the PR and between 0534dcc and c12055b.

📒 Files selected for processing (3)
  • ci/autoresearch/args.py
  • ci/autoresearch/context.py
  • ci/autoresearch/phases.py

📝 Walkthrough

Walkthrough

Adds a --watchdog-soak mode that triggers deliberateHang, waits for RP2040 CDC recovery, reconnects to the new port, and runs RPC smoke tests. The mode is propagated through run configuration and integrated with transport, schema, pin, and GPIO setup decisions.

Changes

Watchdog soak workflow

Layer / File(s) Summary
Watchdog soak configuration
ci/autoresearch/args.py, ci/autoresearch/context.py, ci/autoresearch/phases.py
Adds the CLI flag and propagates its value into RunContext, including GPIO-only mode handling.
Port and preflight integration
ci/autoresearch/phases.py
Extends RP2040 transport selection, CDC port rescanning, schema skipping, pin discovery, and GPIO pre-test behavior for watchdog soak runs.
Watchdog recovery and RPC smoke
ci/autoresearch/phases.py
Runs ping, deliberateHang, CDC disconnect/re-enumeration detection, reconnect validation, and post-reset RPC smoke tests through the mode dispatcher.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Runner
  participant WatchdogSoak
  participant RPCClient
  participant RP2040
  participant RPCSmoke
  Runner->>WatchdogSoak: start watchdog soak
  WatchdogSoak->>RPCClient: connect and ping
  WatchdogSoak->>RPCClient: call deliberateHang
  RPCClient->>RP2040: trigger watchdog reset
  WatchdogSoak->>RP2040: wait for CDC disconnect and re-enumeration
  WatchdogSoak->>RPCClient: reconnect to recovered port
  RPCClient->>RP2040: ping recovered endpoint
  WatchdogSoak->>RPCSmoke: run post-reset RPC smoke
Loading

Possibly related issues

  • FastLED/FastLED issue 3630: Directly covers watchdog recovery and post-reset RPC smoke implemented by this change.
  • FastLED/FastLED issue 3628: Relates to autoresearch mode orchestration and reuse of the existing RPC smoke path.

Possibly related PRs

  • FastLED/FastLED#3633: Introduces related autoresearch mode-dispatch and RPC smoke handling reused by this watchdog soak workflow.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rp2040-rpc-smoke-no-port

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

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant