Skip to content

fix(deploy): name the mismatched RP identity and -p remedy when no port auto-selects (#1430) - #1601

Merged
zackees merged 2 commits into
mainfrom
fix/1430-rp-identity-mismatch-diagnostic
Sep 30, 2026
Merged

zackees merged 2 commits into
mainfrom
fix/1430-rp-identity-mismatch-diagnostic

Conversation

@zackees

@zackees zackees commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

When an RP board is attached but running firmware of the other variant, deploy still refuses to auto-select (existing W/non-W rule), but the warning now names the port and its identity and says to pass -p; the port warning is also surfaced on deploy failure. Does not auto-bind to the sole RP board. Refs #1430.

Summary by CodeRabbit

  • Bug Fixes
    • Deployment failure messages now include relevant deploy-port warnings.
    • Raspberry Pi deployments now warn when connected devices match the expected USB generation but not the selected board’s runtime identity. The warning identifies the affected port and explains how to specify a port manually; these devices are not selected automatically.

@zackees zackees added the ci-full Run the complete release-equivalent CI matrix on this PR SHA label Sep 30, 2026
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: FastLED/fbuild/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 0c0009ed-42f3-486c-a1b6-9f2d23f36290

📥 Commits

Reviewing files that changed from the base of the PR and between 74ad2d8 and f95a341.

📒 Files selected for processing (2)
  • crates/fbuild-daemon/src/handlers/operations/deploy.rs
  • crates/fbuild-daemon/src/handlers/operations/deploy_port.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Raspberry Pi deploy-port selection now reports certain runtime identity mismatches when no exact board profile matches. Deploy failure responses include deploy-port warnings in stderr.

Changes

Raspberry Pi deploy identity warnings

Layer / File(s) Summary
Identify and describe profile mismatches
crates/fbuild-daemon/src/handlers/operations/deploy_port.rs
The selection logic identifies connected devices that match the expected Raspberry Pi generation but not the requested board profile. When no exact match exists, it adds a diagnostic with device ports, VID:PID values, and the explicit-port override. A test checks the mismatch list and diagnostic.
Include deploy warnings in failure responses
crates/fbuild-daemon/src/handlers/operations/deploy.rs
Unsuccessful deployment results and deploy errors append the deploy-port warning to stderr before returning the failure response.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f95a3

The change improves Raspberry Pi mismatch diagnostics without changing automatic port selection. No actionable merge-blocking issue is identified; merge after normal checks.

Architecture Summary

Architecture risk: 🟡 Medium · up to f95a3

The change affects 1 system.

Changed systems: crates

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in crates/fbuild-daemon/src/handlers/operations/deploy.rs: For an unsuccessful deployment result, the handler now stores stderr in a mutable option and appends the deploy-port warning before constructing the failure response.
  • observed — Modified behavior in crates/fbuild-daemon/src/handlers/operations/deploy.rs: The unsuccessful-result response now uses the warning-augmented stderr instead of Some(r.stderr). The deploy-error response also appends the deploy-port warning to its stderr before returning.
  • observed — Modified behavior in crates/fbuild-daemon/src/handlers/operations/deploy_port.rs: For Raspberry Pi deploys, the code now gathers generation-matching identity mismatches when a board profile is available. After partitioning exact candidates, it adds a diagnostic only if there are no exact matches and at least one mismatch; it appends that diagnostic to any existing selection warning before returning the choice.
  • observed — Modified behavior in crates/fbuild-daemon/src/handlers/operations/deploy_port.rs: Added rp_generation_mates to collect connected, not-known-unhealthy devices whose catalogued profiles match the expected RP generation, formatting each with its port and VID:PID. Added identity_mismatch_note to explain that the running firmware’s USB identity may differ from the target board and to provide the explicit-port override.

Reliability and maintainability

  • inferred — Risk-relevant change factors for crates: blast_radius_1; blast_radius_2; blast_radius_3; direct_dependents_1; direct_dependents_2
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. 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 clearly summarizes the main change: deploy diagnostics now identify mismatched RP identities and provide the -p remedy when no port is auto-selected.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@zackees
zackees force-pushed the fix/1430-rp-identity-mismatch-diagnostic branch 2 times, most recently from 8caac09 to d3a99f9 Compare September 30, 2026 09:13
@zackees
zackees force-pushed the fix/1430-rp-identity-mismatch-diagnostic branch from d3a99f9 to f95a341 Compare September 30, 2026 10:33
@zackees
zackees merged commit c6d50b9 into main Sep 30, 2026
126 checks passed
@zackees
zackees deleted the fix/1430-rp-identity-mismatch-diagnostic branch September 30, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run the complete release-equivalent CI matrix on this PR SHA

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant