Skip to content

fix(autoresearch): handle control RPC success - #3354

Merged
zackees merged 1 commit into
masterfrom
codex/autoresearch-control-rpc
Jun 24, 2026
Merged

zackees merged 1 commit into
masterfrom
codex/autoresearch-control-rpc

Conversation

@zackees

@zackees zackees commented Jun 24, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Treat successful control RPC responses without a passed field as command success instead of failed driver tests.
  • Add a regression test for setPins followed by a passing driver RPC.

Context

During #3353 Teensy bring-up, GPIO-only passed on GPIO 8 -> GPIO 9, but the ObjectFLED run printed TEST setPins ... FAIL before the real driver result. The device response was actually successful:

Response: {'rxPin': 9, 'txPin': 8, 'success': True, ...}

The wrapper was classifying any success: true response without passed: true as a failed test. Control RPCs such as setPins are not driver tests and do not return passed.

Test

uv run --no-sync pytest ci/tests/test_autoresearch_phases.py::TestRunTestsOrSpecialMode::test_rpc_control_success_without_passed_field ci/tests/test_autoresearch_phases.py::TestRunTestsOrSpecialMode::test_rpc_test_failure ci/tests/test_autoresearch_phases.py::TestRunTestsOrSpecialMode::test_rpc_test_all_pass

Result: 3 passed.

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of successful test responses when an optional result field is missing, preventing valid runs from being marked as failures.
    • Fixed control-test reporting so successful runs now complete as expected even when that field is not returned.
  • Tests
    • Added coverage for the success case without the optional result field to guard against regressions.

@zackees
zackees merged commit bb2e544 into master Jun 24, 2026
7 of 10 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jun 24, 2026
@zackees
zackees deleted the codex/autoresearch-control-rpc branch June 24, 2026 17:21
@coderabbitai

coderabbitai Bot commented Jun 24, 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

Run ID: 249ecd0e-8053-44ab-b329-3500933fb5d7

📥 Commits

Reviewing files that changed from the base of the PR and between 68ba0cd and a45a928.

📒 Files selected for processing (2)
  • ci/autoresearch/phases.py
  • ci/tests/test_autoresearch_phases.py

📝 Walkthrough

Walkthrough

In _run_rpc_tests, the failure branch is tightened to require that the response explicitly contains a "passed" key before treating success=True with a falsy "passed" as a failure. Previously, an absent "passed" field was incorrectly routed into the failure path. A new unit test covers this corrected behavior.

Changes

RPC passed-field failure routing fix

Layer / File(s) Summary
RPC failure condition fix and unit test
ci/autoresearch/phases.py, ci/tests/test_autoresearch_phases.py
The failure branch in _run_rpc_tests now checks "passed" in test_data before evaluating its falsy value, so responses without a "passed" field no longer trigger failure. test_rpc_control_success_without_passed_field mocks a setPins RPC followed by a control-test response lacking "passed" and asserts the return code is 0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • FastLED/FastLED#3064: Modifies the same _run_rpc_tests result-handling logic in ci/autoresearch/phases.py, introducing synthetic PASS results via __skip_with_pass that flow through the same passed/failure routing this PR adjusts.

Poem

🐇 A field that was missing once caused quite a fright,
"passed" not present meant failure—that wasn't right!
Now we check if the key exists before we despair,
No more false alarms floating up in the air.
The tests run green, and the rabbit hops with delight! 🌿

✨ 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 codex/autoresearch-control-rpc

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.

@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 24, 2026
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