Skip to content

fix(net): stabilize RP2350W peer lifecycle - #3954

Merged
zackees merged 2 commits into
masterfrom
fix/3832-esp-http-route-capacity
Aug 21, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/3832-esp-http-route-capacity

Conversation

@zackees

@zackees zackees commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • size the ESP-IDF HTTP URI-handler table from the registered FastLED routes and roll back cleanly on start/registration failure
  • give device-side network client checks a bounded 30-second RPC allowance and retry RP2350W listener startup until it is actually open
  • treat an empty FBUILD_DEPLOY_PORT= marker as no port instead of parsing the following semicolon

Closes #3953
Progresses #3832

Validation

  • bash lint
  • bash lint ci/util/fbuild_runner.py ci/tests/test_fbuild_deploy_streaming.py
  • bash lint ci/tests/test_rp2350w_board_config.py
  • focused Python AutoResearch network/RP2350W board tests
  • focused empty-marker RED -> debug RED -> GREEN tests, including COM and POSIX port markers
  • bash test fl_stl_asio_http_server
  • bash compile esp32c6 --examples AutoResearch
  • bash compile rp2350w --examples AutoResearch
  • delegated pre-push review: clean

Hardware evidence and caveat

Before the final RP listener retry, the two-board HIL completed one full RP2350W <-> ESP32-C6 HTTP/RPC/4KiB/serial-health cycle; the next cycle exposed Arduino-Pico WiFiServer::begin() silently failing to listen, which this patch now detects and retries.

The next PICOBOOT deployment flashed successfully but the RP2350W runtime CDC endpoint did not return. COM18 is now an exact-serial phantom and Windows reports code 43 at the same direct root port, so final ten-cycle HIL is physically blocked pending recovery. That fbuild regression is recorded and deferred with restart criteria at FastLED/fbuild#1331; no raw flasher, ambiguous PnP reset, or hub/controller reset was attempted.

Summary by CodeRabbit

  • Bug Fixes
    • Improved network testing reliability by allowing longer per-request wait times.
    • Enhanced deployment output parsing across Windows and Unix serial-port formats.
    • Empty port markers are now handled safely without losing diagnostic information.
    • Improved HTTP server startup and route-registration failure handling, including clearer error reporting.
    • RP2350W server startup now retries briefly, feeds the watchdog, and reports failures cleanly.
  • Tests
    • Added coverage for extended network timeouts, port parsing, and RP2350W server behavior.

@zackees
zackees merged commit 8029c53 into master Aug 21, 2026
15 of 24 checks passed
@zackees
zackees deleted the fix/3832-esp-http-route-capacity branch August 21, 2026 00:38
@coderabbitai

coderabbitai Bot commented Aug 21, 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: 6f543be3-4f98-46fb-b26d-c83918aa3b03

📥 Commits

Reviewing files that changed from the base of the PR and between be689c1 and f6f1b52.

📒 Files selected for processing (7)
  • ci/autoresearch/net.py
  • ci/tests/test_autoresearch_net.py
  • ci/tests/test_fbuild_deploy_streaming.py
  • ci/tests/test_rp2350w_board_config.py
  • ci/util/fbuild_runner.py
  • examples/AutoResearch/AutoResearchNet.cpp
  • src/fl/stl/asio/http/server.cpp.hpp

📝 Walkthrough

Walkthrough

The changes improve autoresearch network execution and deployment handling. They add configurable RPC wait limits, correct empty deploy-port parsing, add RP2350W listen retries, and improve ESP32 HTTP server startup cleanup.

Changes

Autoresearch reliability

Layer / File(s) Summary
Deploy port parsing and validation
ci/util/fbuild_runner.py, ci/tests/test_fbuild_deploy_streaming.py
Deploy output parsing stops port extraction at semicolon metadata. Tests cover COM42, /dev/ttyACM0, and empty markers with diagnostic output.
Per-call RPC timeout handling
ci/autoresearch/net.py, ci/tests/test_autoresearch_net.py
RPC helpers accept per-call maximum waits while preserving the overall deadline. Peer HTTP tests use 30-second waits, and tests validate all recorded timeouts.
HTTP server startup and cleanup
examples/AutoResearch/AutoResearchNet.cpp, ci/tests/test_rp2350w_board_config.py, src/fl/stl/asio/http/server.cpp.hpp
RP2350W startup retries listening with watchdog servicing. ESP32 startup validates route capacity, adjusts handler limits, and cleans up failed startup and route registration.

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

✨ 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/3832-esp-http-route-capacity

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.

fix(autoresearch): do not parse empty fbuild deploy port as semicolon

1 participant