Repository navigation
test(parlio): #2548 convert PARLIO streaming validation from boot-time to RPC - #2562
Conversation
…e to RPC Removes the `FL_PARLIO_STREAM_VALIDATE_AT_BOOT` boot-time hook landed in #2561 and re-exposes the same functional test as a JSON-RPC handler `parlioStreamValidate`, matching the convention of the other autoresearch utility benches (`wave8ExpandBenchmark` #2539, `parlioEncodeBenchmark` #2547). ### Changes - `AutoResearchParlioStream.h`: - `validateAtBoot()` (esp_rom_printf-based) → `validateParlioStreaming()` returning a `ValidateResult` struct (channels_ok, completed, per_iter_us[], steady_avg_us, failed_iter, etc.). - Caller-supplied `num_lanes`, `num_leds`, `iterations`, `timeout_ms` so the RPC can drive different workloads. - Static LED buffer sized for the canonical worst case (16 × 256) to avoid repeated allocation across RPC calls. - `AutoResearch.ino`: - Drop the `#ifdef FL_PARLIO_STREAM_VALIDATE_AT_BOOT` boot-time hook. - Keep the header include for the RPC handler in AutoResearchRemote.cpp. - `AutoResearchRemote.cpp`: - Add `parlioStreamValidate` bind: parses optional `numLanes`/`numLeds`/ `iterations`/`timeoutMs` from args, calls `validateParlioStreaming()`, returns full result as JSON (`channelsOk`, `completed`, `lanes`, `ledsPerLane`, `iterations`, `perIterUs:[…]`, `steadyAvgUs`, `failedIter`, `timeoutMs`). - Register in `discoverFunctions` metadata (totalFunctions 24 → 25, Phase 4 Utility, full args + returns docstring). ### Validation - `bash lint --cpp` clean - Build + flash on ESP32-P4 v1.3 (`bash autoresearch esp32p4 --simd --no-fbuild`) succeeds; handler is registered. - On-device RPC invocation is blocked on P4 by the pre-existing #2541 (testSimd RPC over UART0 fails because the host connects via COM25 USB-Serial-JTAG, different physical path). Same blocker that already affects `testSimd`, `wave8ExpandBenchmark`, and `parlioEncodeBenchmark`. The handler will be invokable from CI / other platforms once that infra issue is resolved. - Functional correctness was previously demonstrated end-to-end via the boot-time variant in #2561: 5 back-to-back show()+wait() iterations, 16-lane × 256-LED WS2812B, all completed within timeout (steady-state ~17 ms/frame, 0 hangs). Refs #2548, #2541. Supersedes the boot-time hook from #2561. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR migrates PARLIO streaming validation from boot-time to RPC-driven by introducing a parameterized ChangesPARLIO Validation RPC Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary
Removes the
FL_PARLIO_STREAM_VALIDATE_AT_BOOTboot-time hook landed in #2561 and re-exposes the same functional test as a JSON-RPC handlerparlioStreamValidate, matching the convention of the other autoresearch utility benches (wave8ExpandBenchmark#2539,parlioEncodeBenchmark#2547).Why
User requested: "we don't want this test at boot, we want it rpc selectable". The boot-time hook in #2561 was an interim path that worked around the broken testSimd RPC routing (#2541) on P4. RPC is the canonical pattern for autoresearch test invocation.
API
Changes
AutoResearchParlioStream.h:validateAtBoot()(esp_rom_printf-based) →validateParlioStreaming()returning aValidateResultstruct. Caller-supplied workload parameters. Static LED buffer to avoid repeated allocation across RPC calls.AutoResearch.ino: drop the#ifdef FL_PARLIO_STREAM_VALIDATE_AT_BOOTboot-time hook (keep the header include for the RPC binding).AutoResearchRemote.cpp: addparlioStreamValidatebind +discoverFunctionsmetadata entry (totalFunctions 24 → 25).Test plan
bash lint --cppcleantestSimd,wave8ExpandBenchmark, andparlioEncodeBenchmark. The handler will be invokable from CI / other platforms once that infra issue is resolved.show()+wait()iterations, 16-lane × 256-LED WS2812B, all completed within timeout (steady-state ~17 ms/frame, 0 hangs / stalls).Files
Refs #2548, #2541. Supersedes the boot-time hook from #2561.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Refactor