Skip to content

fix(autoresearch): prove RP watchdog reset - #3846

Merged
zackees merged 1 commit into
masterfrom
fix/rp2350w-watchdog-soak-proof
Aug 6, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/rp2350w-watchdog-soak-proof

Conversation

@zackees

@zackees zackees commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

Require watchdog reset proof after AutoResearch deliberateHang; clean up host watchdog lifecycle; cover RP2350W filter and false-positive recovery. Validation: bash compile rp2350w --examples AutoResearch; bash lint; targeted pytest.

Summary by CodeRabbit

  • New Features

    • The AutoResearch ping response now includes the device’s last reset cause and whether the reset was watchdog-triggered, alongside existing status information.
  • Bug Fixes

    • Watchdog monitoring now shuts down reliably after AutoResearch runs complete.
    • Recovery validation more accurately detects unsuccessful watchdog resets before continuing diagnostics.
  • Tests

    • Expanded coverage for watchdog shutdown, recovery validation, and RP2350/RP2350W board filtering.

@zackees
zackees merged commit 2992532 into master Aug 6, 2026
15 of 17 checks passed
@zackees
zackees deleted the fix/rp2350w-watchdog-soak-proof branch August 6, 2026 01:17
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 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 Plus

Run ID: 3e55bada-9e47-4353-820b-1682161652d9

📥 Commits

Reviewing files that changed from the base of the PR and between 449ea8d and 6cebcc9.

📒 Files selected for processing (6)
  • ci/autoresearch/phases.py
  • ci/autoresearch/runner.py
  • ci/tests/test_autoresearch_phases.py
  • ci/tests/test_sketch_filter.py
  • examples/AutoResearch/AutoResearchRemotePinMethods.cpp
  • examples/AutoResearch/AutoResearchRemoteSystemMethods.cpp

📝 Walkthrough

Walkthrough

The AutoResearch runner now stops its watchdog after every run. Device ping responses report reset telemetry. Watchdog-soak recovery requires both watchdog-reset and reduced-uptime evidence after CDC re-enumeration.

Changes

AutoResearch watchdog handling

Layer / File(s) Summary
Ping reset telemetry contract
examples/AutoResearch/AutoResearchRemoteSystemMethods.cpp, examples/AutoResearch/AutoResearchRemotePinMethods.cpp, ci/tests/test_sketch_filter.py
The ping RPC reports reset cause and watchdog-reset status. AutoResearch board expectations include rp2350 and rp2350w.
Run-level watchdog shutdown
ci/autoresearch/runner.py, ci/autoresearch/phases.py, ci/tests/test_autoresearch_phases.py
The runner stops the watchdog in finally after phase execution and cleanup. Tests cover cancellation, handle clearing, and disabled watchdog startup in direct phase tests.
Watchdog recovery validation
ci/autoresearch/phases.py, ci/tests/test_autoresearch_phases.py
Recovery succeeds only when re-enumeration shows a watchdog reset and reduced uptime. Missing watchdog-reset evidence prevents RPC smoke tests.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AutoResearchRunner
  participant RunContext
  participant HostWatchdogTask
  AutoResearchRunner->>RunContext: execute AutoResearch phases
  RunContext->>HostWatchdogTask: run during the complete AutoResearch run
  AutoResearchRunner->>AutoResearchRunner: enter finally cleanup
  AutoResearchRunner->>HostWatchdogTask: signal cancellation
  AutoResearchRunner->>RunContext: clear watchdog task handle
Loading
sequenceDiagram
  participant WatchdogSoak
  participant Device
  participant RPCSmokeTests
  WatchdogSoak->>Device: wait for CDC re-enumeration
  WatchdogSoak->>Device: call ping
  Device-->>WatchdogSoak: return uptime and watchdog reset fields
  alt recovery evidence is complete
    WatchdogSoak->>RPCSmokeTests: run RPC smoke tests
  else recovery evidence is incomplete
    WatchdogSoak-->>RPCSmokeTests: skip RPC smoke tests
  end
Loading

Possibly related PRs

✨ 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 fix/rp2350w-watchdog-soak-proof

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