Repository navigation
fix(autoresearch): report the real platform from getPins - #4210
Conversation
`getPins` hand-rolled an ESP32-only preprocessor chain and fell through to
"unknown" for every other target, so on an RP2350W the same firmware
disagreed with itself:
getPins -> {'platform': 'unknown', ...}
status -> {'platform': 'Raspberry Pi Pico 2 W (RP2350)', ...}
`status` already uses the shared `autoresearch::chipName()`, which covers
stub, the ESP32 family, Teensy 4.x and both RP2350 variants. Use it here too
and drop the duplicated chain -- this also fixes Teensy and LPC, which were
equally reporting "unknown".
Verified on hardware after the change:
getPins -> {'txPin': 1, 'rxPin': 0, 'success': True,
'defaults': {'txPin': 1, 'rxPin': 0},
'platform': 'Raspberry Pi Pico 2 W (RP2350)'}
Found while evidencing the pin-discovery/testGpioConnection criterion on
#3899, whose closeout requires exact recorded identities -- two RPCs
disagreeing about the platform is the kind of thing that gets mis-transcribed
into a closeout.
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: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe ChangesPlatform identity reporting
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to getPins now returns the shared platform identity used by status, correcting platform reporting on supported non-ESP32 targets. The change is ready to merge with no identified current risk. 🚥 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 |
getPinshand-rolled an ESP32-only preprocessor chain and fell through to"unknown"for every other target, so the same firmware disagreed with itselfon an RP2350W:
statusalready uses the sharedautoresearch::chipName(), which covers stub,the ESP32 family, Teensy 4.x and both RP2350 variants. This uses it in
getPinstoo and drops the duplicated chain — so Teensy and LPC, which wereequally reporting
"unknown", are fixed as a side effect.Verified on hardware
Matches
statuson the same firmware. Full--rpc-smokestill passes:RESULT: RPC smoke PASS (discovery, help, ping, payload, status, drivers, testNoSerial, RP concurrency, error handling).Why it matters beyond tidiness
Found while evidencing the pin-discovery /
testGpioConnectioncriterion on#3899, whose closeout explicitly requires recording "the exact commands,
commits, wiring, ports, VID:PIDs/serials". Two RPCs on one board reporting
different platform identities is exactly the kind of discrepancy that gets
mis-transcribed into a closeout record, and
"unknown"is the more plausibleone to copy since it looks like a deliberate value rather than a gap.
bash lintclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51
Summary by CodeRabbit