[GH-ISSUE #5515] [Bug] decode_signal_recording: a misspelled decoder or annotation class returns execution_failure with "Run rea doctor", which has no sigrok check #3355

Closed
opened 2026-10-31 00:39:29 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @Rinkia on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5515

Before submitting

  • I searched the open and closed issues for a related report (sigrok execution_failure, decode_signal_recording invalid decoder, signal recording doctor). None found. #3517 was the same pattern for JADX heap failures and was fixed in 3fa972af7.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Provider or capability discovery

Observed behavior

SigrokRecordingProvider (src/signals/SigrokRecordingProvider.ts, unchanged on main 074768901) turns any non-zero sigrok-cli exit into a generic ProviderAdapterError. So a typo in the caller's selectors comes back as:

{"code":"execution_failure","category":"execution_failure",
 "message":"Analysis could not complete. Run `rea doctor` and review the reported details; repeating the unchanged request is not expected to succeed.",
 "details":{"provider_id":"sigrok-recording","operation":"decode_signal_recording",
  "diagnostics":{"exit_code":1,"stdout":"",
   "stderr":"srd: ModuleNotFoundError: Failed to load decoder nosuchdecoder: import by name failed: No module named 'nosuchdecoder'\nFailed to load protocol decoder nosuchdecoder.\n"}}}
Input sigrok stderr REA result
--decoders nosuchdecoder Failed to load protocol decoder nosuchdecoder. execution_failure, "Run rea doctor…"
--annotations uart=nosuchclass Annotation 'nosuchclass' not found for protocol decoder 'uart'. same

Following the remediation leads nowhere:

  • rea doctor --provider sigrok-recording is rejected: Invalid option: expected one of "hopper"|"ghidra"|"ida"|"jadx"|"kuna".
  • Plain rea doctor --format json has no check whose name mentions sigrok, signal or prlimit.

The decoder catalog the user needs is one call away (inspect_signal_decoders returned all 111 installed decoders), but the error doesn't point there. "Repeating the unchanged request is not expected to succeed" is true; the fix is to correct the selector, not the installation.

Reproduction

Linux, rea-agents@6.7.0, Ubuntu 24.04 sigrok-cli 0.7.2 (libsigrokdecode 0.5.3), REA_SIGROK_COMMAND=/usr/bin/sigrok-cli. Recording from sigrok-dumps at 0ad13477abc959d37fc9a5acbd23901c371c9c76: uart/counter/uart_count_19200_8n1.sr (2,798 bytes, sha256 eed35af5db85e1667818423d42c7bbac9bdd606166cb348eb926ba496c56d9e3, git blob verified).

rea decode-signal-recording uart_count_19200_8n1.sr --decoders nosuchdecoder --format json
rea decode-signal-recording uart_count_19200_8n1.sr --decoders uart:rx=tx:baudrate=19200 --annotations uart=nosuchclass --format json
rea doctor --provider sigrok-recording --format json

Expected behavior

When sigrok rejects a caller-supplied selector, report an input error (invalid_request, for example) that names the decoders or annotations argument, keeps the stderr, and points to inspect_signal_decoders for valid decoder IDs and annotation classes. Keep execution_failure plus doctor for failures the installation can explain, or add a sigrok readiness check to rea doctor so the advice has something to run.

Impact and scope

This affects every caller who mistypes a decoder ID, decoder option or annotation class, which is the most common mistake with sigrok selectors. Agents are told not to retry and to run a diagnostic that can't see the problem.

The rest of the tool held up. On the same build, all three decodes I tried (UART counter, with and without annotation filtering, and the I2C→EDID stack on i2c/edid/samsung_syncmaster203b.sr) were byte-identical to sigrok-cli --protocol-decoder-samplenum. 100-line pages reassembled exactly to the full output; an offset past the end and an idle channel returned empty windows; the 32 MiB input bound was refused before reading; and decoder help for uart matched sigrok-cli -P uart --show.

Originally created by @Rinkia on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5515 ### Before submitting - [x] I searched the open and closed issues for a related report (sigrok execution_failure, decode_signal_recording invalid decoder, signal recording doctor). None found. #3517 was the same pattern for JADX heap failures and was fixed in 3fa972af7. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Provider or capability discovery ### Observed behavior `SigrokRecordingProvider` (`src/signals/SigrokRecordingProvider.ts`, unchanged on `main` `074768901`) turns any non-zero sigrok-cli exit into a generic `ProviderAdapterError`. So a typo in the caller's selectors comes back as: ```json {"code":"execution_failure","category":"execution_failure", "message":"Analysis could not complete. Run `rea doctor` and review the reported details; repeating the unchanged request is not expected to succeed.", "details":{"provider_id":"sigrok-recording","operation":"decode_signal_recording", "diagnostics":{"exit_code":1,"stdout":"", "stderr":"srd: ModuleNotFoundError: Failed to load decoder nosuchdecoder: import by name failed: No module named 'nosuchdecoder'\nFailed to load protocol decoder nosuchdecoder.\n"}}} ``` | Input | sigrok stderr | REA result | |---|---|---| | `--decoders nosuchdecoder` | `Failed to load protocol decoder nosuchdecoder.` | `execution_failure`, "Run `rea doctor`…" | | `--annotations uart=nosuchclass` | `Annotation 'nosuchclass' not found for protocol decoder 'uart'.` | same | Following the remediation leads nowhere: - `rea doctor --provider sigrok-recording` is rejected: `Invalid option: expected one of "hopper"|"ghidra"|"ida"|"jadx"|"kuna"`. - Plain `rea doctor --format json` has no check whose name mentions sigrok, signal or prlimit. The decoder catalog the user needs is one call away (`inspect_signal_decoders` returned all 111 installed decoders), but the error doesn't point there. "Repeating the unchanged request is not expected to succeed" is true; the fix is to correct the selector, not the installation. ### Reproduction Linux, `rea-agents@6.7.0`, Ubuntu 24.04 `sigrok-cli` 0.7.2 (libsigrokdecode 0.5.3), `REA_SIGROK_COMMAND=/usr/bin/sigrok-cli`. Recording from sigrok-dumps at `0ad13477abc959d37fc9a5acbd23901c371c9c76`: `uart/counter/uart_count_19200_8n1.sr` (2,798 bytes, sha256 `eed35af5db85e1667818423d42c7bbac9bdd606166cb348eb926ba496c56d9e3`, git blob verified). ```sh rea decode-signal-recording uart_count_19200_8n1.sr --decoders nosuchdecoder --format json rea decode-signal-recording uart_count_19200_8n1.sr --decoders uart:rx=tx:baudrate=19200 --annotations uart=nosuchclass --format json rea doctor --provider sigrok-recording --format json ``` ### Expected behavior When sigrok rejects a caller-supplied selector, report an input error (`invalid_request`, for example) that names the `decoders` or `annotations` argument, keeps the stderr, and points to `inspect_signal_decoders` for valid decoder IDs and annotation classes. Keep `execution_failure` plus doctor for failures the installation can explain, or add a sigrok readiness check to `rea doctor` so the advice has something to run. ### Impact and scope This affects every caller who mistypes a decoder ID, decoder option or annotation class, which is the most common mistake with sigrok selectors. Agents are told not to retry and to run a diagnostic that can't see the problem. The rest of the tool held up. On the same build, all three decodes I tried (UART counter, with and without annotation filtering, and the I2C→EDID stack on `i2c/edid/samsung_syncmaster203b.sr`) were byte-identical to `sigrok-cli --protocol-decoder-samplenum`. 100-line pages reassembled exactly to the full output; an offset past the end and an idle channel returned empty windows; the 32 MiB input bound was refused before reading; and decoder help for `uart` matched `sigrok-cli -P uart --show`.
Author
Owner

@matbrgz commented on GitHub (Oct 20, 2026):

Cross-referencing with canonical issue #5455 and siblings #5457, #5458, and #5513. Covers misclassification of user-supplied selector/syntax errors as generic directing callers to run (which does not check sigrok). Cataloged under Cluster AL in consolidation tracker #4330.

<!-- gh-comment-id:6292618641 --> @matbrgz commented on GitHub (Oct 20, 2026): Cross-referencing with canonical issue #5455 and siblings #5457, #5458, and #5513. Covers misclassification of user-supplied selector/syntax errors as generic directing callers to run (which does not check sigrok). Cataloged under Cluster AL in consolidation tracker #4330.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3355
No description provided.