Skip to content

fix(windows): make recovery decisions observable and CLI guidance visible#1158

Merged
zackees merged 1 commit into
mainfrom
fix/1152-recovery-observability
Jul 23, 2026
Merged

fix(windows): make recovery decisions observable and CLI guidance visible#1158
zackees merged 1 commit into
mainfrom
fix/1152-recovery-observability

Conversation

@zackees

@zackees zackees commented Jul 23, 2026

Copy link
Copy Markdown
Member

Refs #1152 / meta #1149. Two gaps found during live hardware closeout on the wedged board (serial 5303284720C4641C): the daemon composed the typed recovery request silently (no audit trail), and the CLI guidance was emitted at tracing WARN, which the default filter suppresses — the user saw no diagnosis and no --admin hint. Daemon now logs composed/none-composed decisions; CLI recovery messaging moved to output::diagnostic. Live-verified: default-policy deploy prints the exact devnode (problem 28) + guidance without elevating.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved USB recovery messaging during deployment by presenting diagnostic guidance at appropriate severity levels.
    • Added clearer recovery status details when a Windows device requires recovery, recovery is declined or cancelled, recovery fails, or no healthy connection is detected.
  • Diagnostics

    • Improved deployment logging for RP2040 USB recovery decisions, including when recovery requests are created or unavailable.

…ible

- daemon: log the composed typed recovery request (instance, problem
  code, flash_completed) or the none-composed summary (device counts) —
  recovery decisions drive the CLI --admin flow and must be auditable
  after the fact
- cli: recovery guidance printed through output::warn rode the tracing
  WARN channel, which the default filter suppresses — the user saw no
  known-unhealthy diagnosis and no --admin hint. Route all recovery
  messaging through output::diagnostic, whose contract is exactly
  final operation diagnostics that must stay visible

Live-verified on the wedged board: default-policy deploy now prints the
exact devnode + problem code and the --admin/manual-BOOTSEL guidance
without elevating.

Refs #1152 #1149

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@zackees
zackees merged commit 4ef1b34 into main Jul 23, 2026
@zackees
zackees deleted the fix/1152-recovery-observability branch July 23, 2026 14:15
@coderabbitai

coderabbitai Bot commented Jul 23, 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 Plus

Run ID: 06b4d0a1-3b73-4d54-bc71-5c4601da92ea

📥 Commits

Reviewing files that changed from the base of the PR and between d0255fe and 69b9315.

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

📝 Walkthrough

Walkthrough

The deploy recovery flow changes several CLI messages from warnings to diagnostics and adds structured logging around RP2040 recovery-request composition. Recovery and retry behavior remain unchanged.

Changes

USB recovery observability

Layer / File(s) Summary
CLI recovery diagnostic output
crates/fbuild-cli/src/cli/deploy.rs
Known-unhealthy device, incomplete recovery, helper failure, and missing CDC endpoint messages now use diagnostic output while preserving existing branch behavior.
RP2040 recovery request logging
crates/fbuild-daemon/src/handlers/operations/deploy.rs
The composed RP2040 recovery request is stored locally, logged with its fields when present, or accompanied by fresh-scan counts when no eligible target is found. The request is then returned unchanged.

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

Possibly related issues

  • FastLED/fbuild issue 1152: The daemon recovery-request composition and recovery outcome handling align with the issue’s RP2040 recovery orchestration.

Possibly related PRs

  • FastLED/fbuild#1153: Overlaps directly in the RP2040 deploy recovery and port reacquisition path.
  • FastLED/fbuild#1157: Updates the device enumeration used by the fresh scan that feeds recovery-request eligibility.
  • FastLED/fbuild#1068: Uses diagnostic output for recovery-related CLI messaging in the same deploy output path.
✨ 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 fix/1152-recovery-observability

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.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant