Skip to content

docs: autoresearch JSON-RPC reference is stale (runTest/setDrivers/getState not bound; ping & testGpioConnection shapes wrong) #2520

Closed

Description

@zackees

Problem

agents/docs/hardware-autoresearch.md documents a JSON-RPC command surface that no longer matches the firmware in examples/AutoResearch/AutoResearchRemote.cpp. Agents/tools following the docs hit -32601 Method not found and -32602 argument count mismatch. Found while driving the ESP32-P4 board over RPC (refs #2510, #2518).

Concrete mismatches (docs → actual mRemote->bind(...))

Documented but NOT bound (do not exist):

  • runTest (docs call it the "NEW recommended" consolidated method) — actual: runSingleTest and runParallelTest
  • setDrivers, setLaneRange, setStripSizes (docs "legacy")
  • configure, setLaneSizes, setLedCount, setPattern, setShortStripSize, setLongStripSize, setStripSizeValues
  • getState (likely replaced by status), reset

Wrong shapes/arities:

  • ping — docs: returns {timestamp, uptimeMs, frameCounter}. Actual: {success, message:"pong", uptimeMs, timestamp} (and now free_sram/free_psram).
  • testGpioConnection — docs example passes 2 args ([1, 2]); actual handler expects 1.
  • help — expects 1 arg (docs imply none).

Bound but undocumented: status, debugTest, runSingleTest, setDebug, testGpioConnection, getPins, setTxPin, setRxPin, setPins, findConnectedPins, help, testSimd, testSimdBenchmark, testAsync, plus net/OTA/BLE (startNetServer, runNetLoopback, startOta, startBle, bleStatus, …) and the testCoroutine* suite.

The Python examples in the same doc (ci/autoresearch_agent.py configure(TestConfig) / run_test() / get_state()) should be checked against the same source of truth — several map to methods that aren't bound.

Suggested fix

  1. Regenerate the "JSON-RPC Commands" section of agents/docs/hardware-autoresearch.md from the actual bind("...") registrations (or from the device's help manifest), and fix the ping/testGpioConnection/help signatures.
  2. Reconcile ci/autoresearch_agent.py with the bound methods (or add the missing handlers if the agent is the intended API).
  3. Add a lightweight CI/host check that diffs the documented method names against the bind(...) list (or the help manifest) so the doc can't drift again.

Source of truth

examples/AutoResearch/AutoResearchRemote.cpp mRemote->bind(...) calls (≈L985–L2592).

Activity

  1. added a commit that references this issue on May 31, 2026
    d2a63e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions