Skip to content

feat: board add accepts probe-rs selector strings - #10

Merged
felipebalbi merged 16 commits into
mainfrom
feat/probe-selector-parsing
Jun 29, 2026
Merged

felipebalbi merged 16 commits into
mainfrom
feat/probe-selector-parsing

Conversation

@felipebalbi

Copy link
Copy Markdown
Owner

Summary

paavo-cli board add --probe now accepts probe-rs selector strings directly — either a bare token (1fc9:0143-0:SERIAL) or a full pasted probe-rs list line — instead of the brittle split(':') that mis-parsed probe-rs's -IFACE suffix and truncated colon-bearing serials. Selectors are parsed and validated at registration (fail fast, not hours later at probe_attach) via a canonical ProbeSelector::parse in paavo-proto; the USB interface index is preserved and threaded to probe-rs at attach; and VID/PID are stored canonicalized (lowercase 4-hex) by both ingestion paths.

Feature

  • paavo-proto: optional ProbeSelector.interface; ProbeSelector::parse (token or list line, probe-rs grammar incl. colon-serials), validate, canonicalize; typed ProbeSelectorParseError.
  • paavo-cli: board add parses via proto and fails locally before any network call; reworded --probe help.
  • paavod: POST /boards canonicalizes + validates (400 on bad hex); boards.toml seeds canonicalized + validated at startup.
  • paavo-probe: honors interface at probe attach (e.g. FTDI multi-interface).

Deployment fixes (contrib)

Real landmines hit bringing up a fresh lab box:

  • paavod.service: set CARGO_HOME/RUSTUP_HOME/PATH to the state dir so the sandboxed daemon (ProtectHome=true) can actually build test crates.
  • 99-probes.rules: add NXP MCU-Link (1fc9); group probes to the paavo service user; document an all-USB catch-all.
  • contrib/README.md: install the toolchain into the state dir.
  • docs: corrected the boards.toml description; added an AGENTS.md landmine.

Design docs

  • Spec: docs/superpowers/specs/2026-06-29-probe-selector-parsing-design.md
  • Plan: docs/superpowers/plans/2026-06-29-probe-selector-parsing.md

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace — new proto parse/canonicalize unit tests, CLI fail-fast + end-to-end pasted-list-line round-trip, daemon 400 + normalize-on-store tests, boards.toml startup validate/canonicalize tests
  • Hardware (PAAVO_HW=1): interface threading on a real MCX-A266 probe

@felipebalbi
felipebalbi merged commit 82937f7 into main Jun 29, 2026
3 checks passed
@felipebalbi
felipebalbi deleted the feat/probe-selector-parsing branch June 29, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant