Repository navigation
fix(autoresearch): report a declined driver as declined, not as zero capture (#3899) - #4310
Conversation
…capture
GPIO0 -> GPIO1 on the Pico 2 W is UART0 TX/RX, so the UART route is
physically wired. The RP UART backend still refuses WS2812B-V5, because
the bit period needs a baud above its maximum, and it says exactly that:
RP UART: attempted=False started=False encodedBytes=0 actualBaud=0
lastError='RP UART: chipset timing needs a baud above the UART backend maximum'
The harness classified that as:
TEST UART0 lanes=1 leds=100 FAIL 2017ms class=zero_capture
Detail: RX produced no raw edges or decodable bytes
which is true and useless. The driver never transmitted, so RX seeing
nothing is the consequence; the cause was already in the response and
got dropped. Read from the summary line, a declined capability is
indistinguishable from a broken jumper or a dead capture path -- and
#3899 asks for every unreachable path to be listed with its exact
constraint.
`_classify_test_failure` now checks `rpUartStartAttempted is False`
before any capture evidence, since a driver that never transmitted makes
that evidence meaningless, and surfaces the driver's own words:
TEST UART0 lanes=1 leds=100 FAIL 2017ms class=driver_declined
Detail: RP UART: chipset timing needs a baud above the UART backend maximum
The class is display-only -- nothing switches on it -- so adding one
changes no control flow. The exit status is unchanged: the criterion is
still unmet and the run still fails.
Verified on the attached RP2350. Three tests cover it: the decline, a
decline with the reason missing, and `rpUartStartAttempted=True` still
classifying on capture so the new branch cannot swallow a real capture
failure. The first and second were confirmed to fail with the branch
removed.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe RP UART failure classifier now distinguishes driver-declined transmission from zero capture. Acceptance tests cover preserved error details, missing reasons, and drivers that attempted transmission. ChangesRP UART classification
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to RP UART driver declines now show the correct classification and available reason, while attempted transmissions retain zero-capture behavior. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
GPIO0 → GPIO1 on the Pico 2 W is UART0 TX/RX, so the UART route is physically wired. The RP UART backend still refuses
WS2812B-V5— the bit period needs a baud above its maximum — and it says so plainly in the response:The harness reported that as:
True, and useless. The driver never transmitted, so RX seeing nothing is the consequence; the cause was already sitting in the response and got dropped on the floor. Read from the summary line — which is what a bench operator or an agent actually reads — a declined capability is indistinguishable from a broken jumper or a dead capture path. I went looking for a wiring fault before noticing the driver had already explained itself.
#3899 requires every unreachable path to be listed with its exact wiring or peripheral constraint. The driver supplied that constraint; the harness discarded it.
Change
_classify_test_failurechecksrpUartStartAttempted is Falsebefore any capture evidence — a driver that never transmitted makes that evidence meaningless — and surfaces the driver's own words rather than a paraphrase:Scope
ci/switches on it — so adding a value changes no control flow. Verified by grepping every use.Verification
Run on the attached RP2350 (
2DCB876B587EA334), before and after, quoted above.Three tests, using the verbatim response shape from that run:
test_driver_that_declined_is_not_a_capture_failuredriver_declined, and the driver's own text reaches the operatortest_driver_decline_without_a_reason_still_says_it_declinedrpUartLastErrorstill reports the decline — falling back tozero_capturewould be a wrong finding, not merely a vaguer onetest_driver_that_did_transmit_still_classifies_on_capturerpUartStartAttempted=Truestill classifies on capture, so the new branch cannot swallow a genuine capture failureThe first two were confirmed to fail with the new branch removed, so neither passes for the wrong reason.
21 passedin the module;bash lintclean.Context
Found during a live HIL sweep of #3899, reported there along with the confirmed GPIO0 → GPIO1 bridge, PIO0/PIO1/PIO2 all passing, and a separate finding that
Bus::BIT_BANGis never registered on RP — which I deliberately did not fix, because registering it exposes a ~4× timing shortfall and would turn a clearUnknownDrivererror into silently wrong LED output.🤖 Generated with Claude Code
https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51
Summary by CodeRabbit
Bug Fixes
Tests