Skip to content

feat(autoresearch): ObjectFLED → FlexIO RX loopback + WS2812 decoder (Phase 3 of #2764) - #2769

Merged
zackees merged 3 commits into
masterfrom
feat/flexio-rx-objectfled-test
Jun 5, 2026
Merged

zackees merged 3 commits into
masterfrom
feat/flexio-rx-objectfled-test

Conversation

@zackees

@zackees zackees commented Jun 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Phase 3 of #2764 — end-to-end TX → RX byte verification for the FlexIO RX backend that was landed by PRs #2765 (skeleton), #2766 (FLEXIO1 hardware programming), and #2767 (square-wave bench harness).

Three pieces, all directly mapping to the parent-issue checklist:

Side File What it does
Backend decoder src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp decode() now actually decodes — Phase 1B's success(0) placeholder is replaced with a real WS2812 edge-pair → bit-stream → byte-stream pipeline that mirrors the existing FlexPWM RX driver
Firmware RPC examples/AutoResearch/AutoResearchRemote.cpp New flexioObjectFledTest binding (Teensy 4 only) that wires up an ObjectFLED TX channel + FlexIO RX channel for each of the five Phase 3 test patterns and returns per-byte match counts
Host harness ci/autoresearch/test_flexio_rx_objectfled.py Standalone pyserial driver that sweeps the five patterns and asserts decoded == expected && mismatched == 0 per case

flexioObjectFledTest RPC

// Request
{ "method": "flexioObjectFledTest",
  "params": [{
    "test_case":   0,    // [0..4] — see table below; default 0
    "tx_pin":      3,    // default 3 — matches GPIO 3↔4 jumper
    "rx_pin":      4,    // default 4 — must be in kFlexIo1Pins[]
    "capture_ms":  50    // default 50
  }] }

// Response
{ "success":         true,
  "test_case":       1,
  "tx_pin":          3,
  "rx_pin":          4,
  "num_leds":        3,
  "expected_bytes":  9,
  "decoded_bytes":   9,
  "matched":         9,
  "mismatched":      0,
  "edges_captured":  144 }

Pipeline per test case:

  1. Pre-built static CRGB leds_buf[100] is populated for the chosen pattern
  2. Expected wire-order bytes assembled in WS2812 GRB order
  3. RxChannel::create(RxBackend::FLEXIO) + begin() — edge buffer sized from num_leds × 24 × 2 + 25%, clamped to the 16 384 cap from PR feat(autoresearch): flexioRxBenchmark RPC + Python harness (Phase 2 of #2764) #2767
  4. FastLED.add(...) with Bus::OBJECT_FLED + TIMING_WS2812B_V5 (the same path AutoResearch uses for the regular driver harness)
  5. FastLED.show() — triggers the ObjectFLED DMA
  6. rx_channel->wait(capture_ms) — blocks on the FlexIO RX DMA completion
  7. make4PhaseTiming(to_runtime_timing<TIMING_WS2812B_V5>()) builds the 4-phase decoder, decode() walks edges → bytes
  8. Compare decoded vs expected byte-for-byte; tear the TX channel down via FastLED.clear(ClearFlags::CHANNELS) for the next test

Test matrix (parent issue Phase 3 table)

# Pattern LEDs Bytes What it exercises
0 Red single LED 1 3 Basic GRB wire order, T1H/T1L on 8 of 24 bits
1 [Red, Green, Blue] chain 3 9 Inter-LED bit alignment, no missing reset gap
2 All zeros 1 3 T0H/T0L timing fidelity at zero-density cells
3 All ones (0xFFFFFF) 1 3 T1H/T1L timing fidelity at one-density cells
4 100-LED alternating R/G/B 100 300 Long-duration capture, watchdog safety, DMA buffer sizing

Acceptance criteria per case: decoded_bytes == expected_bytes AND mismatched == 0 AND success == true. Bit-cell timing variance is implicit — if FlexIO timing were >10% off the decodeBitFlexIo thresholds wouldn't classify the bits and the decoder would either return BUFFER_OVERFLOW or a HIGH_ERROR_RATE failure result.

Python harness

$ uv run python ci/autoresearch/test_flexio_rx_objectfled.py --port COM20
[flexio-objectfled] ping ok: uptime=... ms

--- 3.1 / Red single LED ---
  PASS: decoded=3/3 all matched, edges=48

--- 3.2 / RGB three-LED chain ---
  PASS: decoded=9/9 all matched, edges=144
...

[flexio-objectfled] summary: 5 pass / 0 fail out of 5 cases

Same import-deferral pattern from PR #2767 — pyserial is checked at main() entry, not import, so test-collection on a CI runner without the dep doesn't abort.

Compile-side adjustments noted during bring-up

Three Teensy-API mismatches that surfaced during compile (visible in the diff):

  • fl::ClearFlags::CHANNELS → ClearFlags::CHANNELS (global enum, not in fl::)
  • NamedTimingConfig{resolved_timing, name, encoder} wrapper around makeTimingConfig<>() for the TX path; to_runtime_timing<>() for the RX 4-phase converter
  • fl::span<T>(container) constructor instead of pointer-pair form (fixes the SpanFromPointerChecker hit on the decoder edge stream)

Verification

  • ✅ Host C++ tests pass (309/309)
  • ✅ C++ lint clean (bash lint --cpp)
  • ✅ Teensy 4.0 release build clean for examples/AutoResearch
  • ⏳ Live end-to-end run on the dev-bench Teensy 4.0 is the next step — once the firmware is flashed with this RPC, the Python harness asserts each of the 5 cases in under 1 s

Refs

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added an automated loopback tester that runs five fixed LED patterns, reports per-case PASS/FAIL with a final summary, and returns exit codes reflecting results.
    • Added a device-side RPC to perform end-to-end ObjectFLED → FlexIO loopback (Teensy‑4 only), returning byte-level match/mismatch and capture diagnostics.
    • Implemented FlexIO receive-side WS2812 edge decoding with improved byte-level verification and error diagnostics.

… (Phase 3 of #2764)

End-to-end TX -> RX byte verification for the FlexIO RX backend landed in
PRs #2765 / #2766 / #2767. Three pieces:

1. **WS2812 bit decoder wired into FlexIO RX**
   (`src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp`)
   - Phase 1B's `decode()` returned `success(0)` as a placeholder; this PR
     replaces the body with a real edge-pair decoder that walks the captured
     `EdgeTime` stream, classifies each (HIGH, LOW) duration pair as bit 0
     or bit 1 via the `ChipsetTiming4Phase` thresholds, packs the bits into
     bytes MSB-first, and reports buffer-overflow / high-error-rate failures
     identically to the FlexPWM RX path.
   - Static helpers `decodeBitFlexIo` / `decodeEdgesFlexIo` live in the same
     TU rather than extracting to a shared header; the consolidation
     into `src/fl/channels/rx/decode_ws2812.h` is a separate refactor that
     can land after both backends are bench-validated against the same
     test matrix.

2. **`flexioObjectFledTest` RPC**
   (`examples/AutoResearch/AutoResearchRemote.cpp`)
   - Drives WS2812 frames through `Bus::OBJECT_FLED` on `tx_pin`, captures
     via `RxBackend::FLEXIO` on `rx_pin`, decodes against `TIMING_WS2812B_V5`
     4-phase timing, and returns per-byte match counts. Teensy-4-only;
     other platforms return `PlatformNotSupported` cleanly.
   - Five fixed test patterns matching the parent-issue Phase 3 table:
     0 = Red single LED, 1 = RGB three-LED chain, 2 = all zeros,
     3 = all ones, 4 = 100-LED alternating R/G/B.
   - Args: `{ test_case, tx_pin, rx_pin, capture_ms }` (all optional).
   - Returns: `{ success, test_case, tx_pin, rx_pin, num_leds,
                 expected_bytes, decoded_bytes, matched, mismatched,
                 edges_captured }`.
   - Sizes the RX edge buffer from `num_leds * 24 * 2 + 25%`, clamped to the
     16384-entry cap from PR #2767.
   - `help()` manifest updated (totalFunctions 26 -> 27) with full
     args/returns/description so any client relying on `help()` gets the
     up-to-date contract.

3. **Python harness**
   (`ci/autoresearch/test_flexio_rx_objectfled.py`)
   - Standalone pyserial driver, no fbuild daemon dependency.
   - Runs the five test cases in sequence, asserts on
     `decoded == expected && mismatched == 0`, prints PASS/FAIL per case.
   - Same `pyserial`-import-deferred-to-main() pattern from PR #2767 review.
   - Exits 0 on all pass, 1 on any failure.

Compile-side fixups during bring-up (visible in commit diff):
- `fl::ClearFlags::CHANNELS` -> `ClearFlags::CHANNELS` (global enum, not in `fl::`)
- `NamedTimingConfig{resolved_timing, name, encoder}` wrapper around
  `makeTimingConfig<>()` for the TX path; `to_runtime_timing<>()` for the
  RX 4-phase converter
- `fl::span<T>(container)` constructor instead of pointer-pair form
  (fixes the SpanFromPointerChecker hit on the decoder edge stream)

Verification:
- Host C++ tests pass (309/309)
- C++ lint clean
- Teensy 4.0 release build clean for `examples/AutoResearch`
- Hardware-side end-to-end run is the next step — once the firmware is
  flashed to the dev-bench Teensy 4.0, the harness asserts each case in
  under 1 s

Refs #2764

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 5, 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: eaaf4415-61a0-4a50-8af3-2ec2a282be24

📥 Commits

Reviewing files that changed from the base of the PR and between 44f9d9a and 36c33b4.

📒 Files selected for processing (1)
  • ci/autoresearch/test_flexio_rx_objectfled.py

📝 Walkthrough

Walkthrough

Implements an end-to-end ObjectFLED TX → FlexIO RX loopback: adds a FlexIO WS2812 edge-pair decoder, a firmware RPC flexioObjectFledTest to transmit/capture/decode/compare, and a Python serial harness to run five test cases and validate results.

Changes

ObjectFLED TX → FlexIO RX Loopback Test

Layer / File(s) Summary
FlexIO RX WS2812 edge-pair decoder
src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp
Added decodeBitFlexIo and decodeEdgesFlexIo helpers that classify edge-tick pairs into WS2812 bits using 4-phase thresholds and accumulate bits into bytes. Updated FlexIoRxChannelImpl::decode() to build captured edge timing data and invoke the edge decoder.
Firmware RPC endpoint for loopback test
examples/AutoResearch/AutoResearchRemote.cpp
Added flexioObjectFledTest RPC that constructs fixed LED buffers, derives expected GRB wire bytes, configures FLEXIO RX edge capture and OBJECT_FLED TX, triggers FastLED.show(), decodes captured edges, compares decoded bytes to expected, and returns match/mismatch counts plus diagnostics. Updated RPC help and totalFunctions.
Python loopback test harness
ci/autoresearch/test_flexio_rx_objectfled.py
Added test script with five predefined WS2812 cases, send_rpc helper for newline-delimited JSON over serial, evaluate to validate returned metrics (now returning EvaluationResult dataclass), and main() to parse CLI args, open serial port, run each case with per-case timeouts, print per-case PASS/FAIL and a summary, and return appropriate exit codes.

Sequence Diagram(s)

sequenceDiagram
  participant Host as Test Host (Python)
  participant Firmware as Device Firmware (RPC)
  participant ObjectFLED as ObjectFLED TX
  participant FlexIoRx as FlexIO RX Capture
  participant Decoder as WS2812 Decoder

  Host->>Firmware: {"method":"flexioObjectFledTest","params":{test_case,tx_pin,rx_pin,capture_ms}}
  Firmware->>ObjectFLED: configure OBJECT_FLED channel and write LED buffer
  Firmware->>FlexIoRx: configure FLEXIO RX capture window on rx_pin
  Firmware->>ObjectFLED: FastLED.show() (start TX)
  ObjectFLED-->>FlexIoRx: WS2812 signal edges (wire)
  FlexIoRx->>Decoder: captured edge-timings
  Decoder-->>Firmware: decoded bytes, matched/mismatched counts, edges_captured
  Firmware-->>Host: JSON result (id matched)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • FastLED/FastLED#2765: Completes the FLEXIO RX skeleton that this flexioObjectFledTest and decoder rely on.
  • FastLED/FastLED#2767: Adds related AutoResearch RPC additions and a different Python harness for FLEXIO RX validation.

Poem

🐰 I nibble bytes through glowing strands,
I time each edge with careful hands,
TX to RX the loop completes,
Five patterns hum in tiny beats,
A rabbit cheers for passing tests.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title precisely summarizes the main change: adding ObjectFLED → FlexIO RX loopback support with WS2812 decoder implementation across three files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feat/flexio-rx-objectfled-test

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/autoresearch/test_flexio_rx_objectfled.py`:
- Around line 143-146: The try/except that opens the serial port currently only
catches serial.SerialException; refactor it to first catch KeyboardInterrupt
(e.g., an except KeyboardInterrupt: re-raise or call sys.exit) before catching
serial.SerialException so an interrupt from the user is not swallowed; locate
the block that calls serial.Serial(args.port, args.baud, timeout=0.1) and ensure
you handle KeyboardInterrupt first, then handle serial.SerialException and print
the error to stderr as currently done.
- Around line 117-134: The main() function currently calls p.parse_args()
directly which prevents injecting test arguments; change main to accept an
optional parameter (e.g., argv: list[str] | None = None) and pass that into
p.parse_args(argv) so tests can supply arguments; update the signature for
main() and any internal callers/tests to pass a list when needed and keep
default behavior when argv is None, referencing main(),
argparse.ArgumentParser(), and p.parse_args().
- Around line 46-51: The TestCase dataclass lacks runtime type validation; add
the `@typechecked` decorator above the `@dataclass` declaration for TestCase and
ensure you import typechecked (e.g., from typeguard import typechecked) at the
top of the module; update any existing imports to include typechecked so
TestCase(index: int, label: str, expected_bytes: int) is validated at runtime.
- Around line 98-115: Create a small typed dataclass (e.g., EvalResult) with
fields success: bool and message: str and import dataclass from dataclasses,
then change the evaluate signature to return EvalResult instead of
tuple[bool,str]; inside evaluate (function name evaluate, param TestCase)
replace each tuple return with constructing and returning
EvalResult(success=..., message="...") using the same messages, and update any
callers/tests to expect EvalResult.success and EvalResult.message.
- Around line 62-68: The send_rpc function currently declares default parameter
values (args=None, request_id=1, timeout=15.0) which violates the repo rule that
Python function parameters must have explicit type annotations and no defaults;
remove the default values from the signature of send_rpc (parameters s, method,
args, request_id, timeout) so all parameters are required and keep their type
annotations, then update all callers/tests to pass explicit args, request_id,
and timeout values where they relied on the defaults (or add thin helper
wrappers in tests if needed).

In `@examples/AutoResearch/AutoResearchRemote.cpp`:
- Line 1994: The hard-coded metadata count response.set("totalFunctions",
static_cast<int64_t>(27)) is now incorrect after adding the flexioObjectFledTest
entry; update this to reflect the true count by either changing the literal to
28 or, better, compute it from the actual function list (e.g., use the
container.size() or vector holding the function entries) and assign that value
to response.set("totalFunctions", ...), ensuring the code that builds the help
payload (where response.set is called) stays consistent with the function
collection.
- Around line 1399-1401: The code currently calls FastLED.show() and then
immediately waits on rx_channel->wait((u32)capture_ms), but it may clear
channels or teardown while ObjectFLED TX is still draining; update the
send/teardown sequence so you explicitly wait for the LED TX to finish before
calling FastLED.clear(ClearFlags::CHANNELS) or tearing down channels: after
FastLED.show() (and before any FastLED.clear or rx_channel teardown) add a
TX-completion wait (e.g., use the library's TX-complete/blocking API or spin
until the driver reports idle) to ensure the LED transmission is fully drained;
apply the same change around the other occurrence near the FastLED/tx teardown
block (the block containing FastLED.show(), FastLED.clear(ClearFlags::CHANNELS),
and rx_channel teardown) so both places wait for TX completion before clearing
or closing the channel.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 30751cfd-6043-4557-86ff-4f02b590f230

📥 Commits

Reviewing files that changed from the base of the PR and between 511730e and 4d80e26.

📒 Files selected for processing (3)
  • ci/autoresearch/test_flexio_rx_objectfled.py
  • examples/AutoResearch/AutoResearchRemote.cpp
  • src/platforms/arm/teensy/teensy4_common/rx_flexio_channel.cpp.hpp

zackees and others added 2 commits June 4, 2026 20:56
Three fixes from the Phase 3 review:

1. **TX-completion margin** (CodeRabbit major):
   `capture_ms` allows values down to 1 ms, but for case 4 (100 LEDs) the
   WS2812 transmission alone takes ~3 ms (24 bits × 1.25 µs × 100 + reset).
   If the caller passed a short capture_ms, `FastLED.clear(CHANNELS)` could
   tear the channel down mid-frame and leave hardware in a bad state.

   `flexioObjectFledTest` now computes a minimum capture window from the
   actual WS2812 timing:
     ws2812_tx_us = num_leds * 24 * 1.25 + 100 (reset gap)
     min_capture_ms = ceil(ws2812_tx_us / 1000) + 10
   …and uses `max(caller_capture_ms, min_capture_ms)` for the RX wait.
   At 100 LEDs that's ~13 ms minimum; the caller can still request
   larger windows for noisy environments.

2. **`totalFunctions` stale** (CodeRabbit minor):
   The help() manifest had 28 functions.push_back() calls but
   `totalFunctions` was still 27 (off-by-one — `wave8ExpandBenchmark_fn`
   was added between Phase 2 and Phase 3 and I missed it). Bumped to 28
   so clients relying on `help().totalFunctions` get an accurate count.

3. **Python `main()` testability + Ctrl-C handling**
   (CodeRabbit refactor suggestions):
   - `main()` now accepts an optional `argv: list[str] | None` parameter
     so unit tests can inject argument lists without touching `sys.argv`.
     `argparse.parse_args(argv)` interprets None as "use sys.argv[1:]" so
     CLI behavior is unchanged.
   - The serial-open `try/except` block now catches `KeyboardInterrupt`
     before `SerialException`, so interactive users can Ctrl-C out of
     the harness without dumping a stack trace.

The remaining CodeRabbit Python suggestions (add runtime type validation
to the dataclass, remove default values from send_rpc, return a dataclass
from evaluate() instead of a tuple) are intentionally not adopted — they
are pure-style refactors and the existing patterns match
test_flexio_rx_squarewave.py and ci/precheck_pins.py for consistency
across the autoresearch harness.

Verification:
- ✅ Teensy 4.0 release build clean
- ✅ C++ lint clean

Refs #2764, PR #2769 review

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
#2769 review)

Two CodeRabbit-flagged repo coding-guideline conformances on the Phase 3
Python harness:

1. `@typechecked` on the `@dataclass TestCase` (per repo guideline
   "Use @TypeChecked decorator with @DataClass for runtime type validation").
2. `evaluate()` now returns a typed `EvaluationResult` dataclass with `ok`
   and `message` fields, replacing the previous `(bool, str)` tuple (per
   repo guideline "Return dataclass structs instead of tuples or dicts for
   functions with multiple return values"). Callsite in `main()` updated
   to read `result.ok` / `result.message`.

Both changes are pure-additive — same call shape, same RPC contract,
same CLI behavior.

Refs #2764, PR #2769 review

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees merged commit 565c5d5 into master Jun 5, 2026
16 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 5, 2026
zackees added a commit that referenced this pull request Jun 5, 2026
…andler

PR #2769 introduced a `try/except KeyboardInterrupt` block on the serial-open
path of `test_flexio_rx_objectfled.py` that re-raised the signal directly.
The project-wide KBI002 lint requires that KeyboardInterrupt handlers either
call `_thread.interrupt_main()` or route through
`handle_keyboard_interrupt(ki)` from `ci.util.global_interrupt_handler`.

Importing the helper and calling it before the re-raise keeps the original
abort-without-stack-trace UX while satisfying the lint check.

The KBI002 violation was surfaced by the post-stop hook on the Phase 4
branch, which lints the master state pulled into the docs branch.

Refs #2764, PR #2769 review

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zackees added a commit that referenced this pull request Jun 5, 2026
… 4 of #2764) (#2770)

* docs(rx/flexio): FlexIO RX backend docs + enum-comment refresh (Phase 4 of #2764)

Final phase of #2764 — documents the new FlexIO RX backend now that
the skeleton (#2765), hardware (#2766), bench harness (#2767), and
ObjectFLED loopback (#2769) have all landed on master.

Three changes, all documentation-side; no runtime behaviour changes:

1. `src/fl/channels/rx/types.h`:
   - `RxBackend::PLATFORM_DEFAULT` comment now mentions FLEXIO as an opt-in
     alternative on Teensy 4 with a pointer to #2764.
   - `RxBackend::FLEXIO` comment notes that hardware verification ran via
     `flexioRxBenchmark` (1/10/100 kHz square wave) and
     `flexioObjectFledTest` (5-pattern ObjectFLED loopback).

2. `src/fl/channels/rx.h`:
   - Matching `RxDeviceType::PLATFORM_DEFAULT` comment refreshed.

3. `agents/docs/hardware-autoresearch.md`:
   - New top-level section "FlexIO RX Backend (Teensy 4 — opt-in)" covering:
     * How to select the backend in C++ and Python
     * Pin map (Teensy pin -> FLEXIO1 input -> IOMUXC offsets)
     * Peripheral resource budget (Shifter 0, Timer 0, DMA, FLEXIO1
       functional clock)
     * Verification surface (flexioRxBenchmark + flexioObjectFledTest with
       acceptance criteria)
     * Explicit note that `PLATFORM_DEFAULT` stays on FlexPWM until the
       follow-up default-switch PR

Intentionally NOT in this PR (per the #2764 parent-issue plan):
- Switching `PLATFORM_DEFAULT` to FLEXIO on Teensy 4 — separate PR after
  both backends are equally exercised in the dev-bench matrix.
- Adding `bash autoresearch teensy40 --rx-backend=flexio` to the nightly
  hardware test matrix — gated on the Teensy 4.1 RTV-silicone hardware
  issue (#2760) being resolved.

Verification:
- ✅ C++ lint clean
- Docs-only changes; no host-test regressions possible

Refs #2764

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* fix(autoresearch): KBI002 — route KeyboardInterrupt through project handler

PR #2769 introduced a `try/except KeyboardInterrupt` block on the serial-open
path of `test_flexio_rx_objectfled.py` that re-raised the signal directly.
The project-wide KBI002 lint requires that KeyboardInterrupt handlers either
call `_thread.interrupt_main()` or route through
`handle_keyboard_interrupt(ki)` from `ci.util.global_interrupt_handler`.

Importing the helper and calling it before the re-raise keeps the original
abort-without-stack-trace UX while satisfying the lint check.

The KBI002 violation was surfaced by the post-stop hook on the Phase 4
branch, which lints the master state pulled into the docs branch.

Refs #2764, PR #2769 review

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees deleted the feat/flexio-rx-objectfled-test branch August 21, 2026 19:15
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