fix(serial): preserve Windows port health through probing#1150
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
📝 WalkthroughWalkthroughSerial enumeration now returns ChangesSerial port health model
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant WindowsPnP
participant available_ports
participant CLI
participant DeviceManager
participant DeploymentDiscovery
WindowsPnP->>available_ports: provide port observations and identities
available_ports->>CLI: return DetectedPort records
available_ports->>DeviceManager: return DetectedPort records
available_ports->>DeploymentDiscovery: return DetectedPort records
CLI->>CLI: render health or reject unhealthy selection
DeviceManager->>DeviceManager: cache health and identities
DeploymentDiscovery->>DeploymentDiscovery: filter unhealthy candidates
Possibly related issues
Possibly related PRs
✨ 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 |
14 tasks
zackees
added a commit
that referenced
this pull request
Jul 23, 2026
… gate The Formatting and Check workflows have been red on main since #1145: - four files (two from this branch, two pre-existing: board/loaders.rs, ch32v_core.rs) carry diffs under the pinned 1.94.1 formatter. Local cargo-fmt --all silently skips the daemon handler files on this checkout, so they were formatted with direct invocations. - the #1150 health-classification helpers in fbuild-serial have no non-Windows, non-test caller, which RUSTFLAGS=-D warnings promotes to a hard error on the ubuntu/macos Check jobs. Annotate them cfg_attr(not(windows), allow(dead_code)) — they are fed by the Windows PnP enumeration and unit-tested cross-platform. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
zackees
added a commit
that referenced
this pull request
Jul 23, 2026
…quisition (#1153) * fix(rp2040): consume Windows port health in deploy selection and reacquisition A retained CM_PROB_PHANTOM devnode whose serial still matches the board could be selected pre-flash, touched at 1200 baud, and returned as the post-flash deploy port. Health from #1146/#1150 now gates every step: - rp2040_target: select_cdc_candidate returns a health-eligible PicoCdcPort (phantom/present-problem records are never selected); resolve_requested_runtime_target fails an explicit selector that matches a known-unhealthy record, with health/problem/instance detail - rp2040: the post-flash wait adds a bounded openability probe seam; timeout diagnostics carry the last open error and phantom-aware BOOT/RESET recovery guidance; Deployer::owns_post_flash_port_discovery marks the RP2040 port as authoritative - daemon: recovery/monitor port resolution no longer substitutes the requested pre-flash name when the deployer owns port discovery (deploy_port_str.or(result.port) inverted the trust order); flash success with an unrecovered CDC now surfaces the deployer's recovery diagnostic instead of discarding it; choose_deploy_port partitions known-unhealthy RP2040 records out of auto-selection with a diagnostic warning Closes #1147 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): satisfy pinned formatter tree-wide and non-Windows dead-code gate The Formatting and Check workflows have been red on main since #1145: - four files (two from this branch, two pre-existing: board/loaders.rs, ch32v_core.rs) carry diffs under the pinned 1.94.1 formatter. Local cargo-fmt --all silently skips the daemon handler files on this checkout, so they were formatted with direct invocations. - the #1150 health-classification helpers in fbuild-serial have no non-Windows, non-test caller, which RUSTFLAGS=-D warnings promotes to a hard error on the ubuntu/macos Check jobs. Annotate them cfg_attr(not(windows), allow(dead_code)) — they are fed by the Windows PnP enumeration and unit-tested cross-platform. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): mark registry-backed boards doctests no_run board_hint, vcom_for_env, and family_for_vid_pid resolve through the FastLED/boards registry at runtime; on doctest hosts (local and CI) that cache is absent, so the three examples panicked on every Check job since the vendored-table migration. no_run keeps them compile-checked without requiring a populated registry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): annotate riscv multilib GCC probe for the direct-spawn lint ci/find_direct_subprocess.py --fail has flagged the ch32v multilib probe since it landed, keeping the Check jobs red. The spawn is a short synchronous -print-multi-directory capability probe; mark it allow-direct-spawn rather than routing a one-flag probe through the subprocess facade. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): drop embedded WCH ISP VID/PID from the wchisp failure message The USB VID/PID catalogue-literal guard has flagged this user-facing string since the wchisp deployer landed, keeping Check (ubuntu) red. Identity data belongs to the FastLED/boards registry; point the user at 'fbuild port scan' instead of embedding 4348/1a86 literals. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): apply nightly import ordering in ban_raw_subprocess dylint The Dylint crate-formatting gate (nightly style edition) has wanted these two use-statement reorders since the lint landed; apply them so the gate goes green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): apply nightly import ordering in ban_raw_path_prefix_compare dylint Same nightly-2026-03-26 style-edition reorders as ban_raw_subprocess; verified with the crate-pinned formatter that both format-checked dylint crates are now clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): allowlist riscv toolchain GCC probe in ban_raw_subprocess dylint Companion to the Python-lint marker: the workspace dylint pass wants its own allowlist.txt entry for the same short synchronous -print-multi-directory capability probe. ci/check_dylint_allowlists.py passes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): allowlist esp32 framework-library cache in ban_raw_path_prefix_compare WalkDir-derived paths are stripped against the exact root spelling they were enumerated from (same-normalized by construction) and feed a content hash, not a path-keyed cache lookup — the lint's own stated exemption. Pre-existing debt unmasked once the earlier Dylint gate failures were fixed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): force rebuild of ban_raw_path_prefix_compare after allowlist edit The previous round still flagged the freshly-allowlisted esp32 framework-library cache: the workspace dylint step served a compiled lint from the restored build cache, ignoring the allowlist-only edit. Touch the lint source (documenting the trap) so the fingerprint moves. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(ci): refresh stale dylint @toolchain aliases after rebuilds cargo-dylint loads the <name>@<toolchain> library copy, but the alias loop only created it when absent. With target caching, a restored stale alias therefore pinned every lint to its first-ever compiled allowlist: rebuilt bare libraries (allowlist/source edits) were never loaded, which is why ban_raw_path_prefix_compare kept flagging the freshly-allowlisted esp32 framework-library cache. Overwrite the alias when the bare library is newer. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1146
What changed
DetectedPort, preserving Windows PnP health, canonical instance ID, and parent identity.selectable=noinfbuild port scan.Caller inventory
Migrated all user-device selection paths. Remaining raw
serialport::available_ports()callers are tool-specific probes inprobe_rs, LPC, and ESP32-native code; they do not use the blessed CDC selection path and remain outside this serial health model.Validation
soldr cargo test -p fbuild-serial --lib(153 passed, 1 documented ignore)soldr cargo test -p fbuild-serial health_tests(2 passed)soldr cargo test -p fbuild-deploy rp2040(80 passed)soldr cargo test -p fbuild-deploy teensy(34 passed)soldr cargo test -p fbuild-cli port_scan(19 passed)soldr cargo test -p fbuild-cli monitor_selection_never_chooses_a_known_unhealthy_endpoint(1 passed)soldr cargo test -p fbuild-daemon device_manager(23 passed)soldr cargo clippy -p fbuild-serial -p fbuild-deploy -p fbuild-cli -p fbuild-daemon --all-targets -- -D warningssoldr cargo test -p fbuild-serialadditionally runs three existingboards.rsdoctests against the non-test online USB-profile registry. They fail in this local worktree because no profile artifact is installed; the unchanged doctest bodies and all 153 library tests demonstrate this is unrelated to this change.Summary by CodeRabbit
New Features
Bug Fixes