Skip to content

fix(tri): identify boards by vendor, and stop letting the tree hide them (Closes #2521) - #2522

Merged
gHashTag merged 2 commits into
masterfrom
fix/fleet-detect-by-vendor
Aug 23, 2026
Merged

gHashTag merged 2 commits into
masterfrom
fix/fleet-detect-by-vendor

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

tri fleet scan reported an empty bus with three AX7203 boards plugged in. Two independent bugs, both failing in the direction that costs most for this particular command: it exists to say whether hardware is attached, and it said no.

1. It identified boards by their label

lower.contains("ft232") || lower.contains("ftdi")
    || lower.contains("usb serial") || lower.contains("jtag")

macOS calls these devices Digilent USB Device — none of those substrings. The board vendor brands the string; only idVendor says what the chip is. 1027 = 0x0403 = FTDI, which is the bridge every one of these carries.

A name is a label; a vendor ID is an identity. The same distinction this repository keeps rediscovering elsewhere.

2. Tree-drawing characters hid every nested node

ioreg draws its tree with pipes, so a nested device reads:

| | +-o Digilent USB Device@00110000  <class IOUSBHostDevice, ...>

The probe did line.trim() and then starts_with("+-o") — which matches only top-level nodes. Those are controllers and hubs. An FT232H on a hub port is always nested, so no board could ever match, whatever it was called.

Either bug alone produces an empty bus. Both were present.

Also fixed: one board counted three times

The probe now asks ioreg -r -c IOUSBHostDevice and only accepts nodes whose line carries class IOUSBHostDevice. A device's interfaces repeat its idVendor and serial, and an FT232H presents several — a whole-tree walk counted one board as three.

Verified against the live bench

USB JTAG/UART bridges: 3
  Digilent USB Device (serial 210512180081)
  Digilent USB Device (serial 210512180081)
  Digilent USB Device (serial 210512180081)

--expect 3 → exit 0
--expect 4 → exit 1

Three boards, all reporting the same serial — the documented FT232H serial collision on this bench, now visible rather than invisible.

🤖 Generated with Claude Code

…hem (Closes #2521)

tri fleet scan reported an empty bus with three AX7203 boards plugged in.
Two independent bugs, both failing in the direction that costs most for a
command whose whole job is to say whether hardware is attached.

First, it matched device NAMES against ft232 / ftdi / usb serial / jtag.
macOS calls these 'Digilent USB Device'. The board vendor brands the string;
only idVendor says what the chip is -- 1027 is 0x0403 is FTDI.

Second, ioreg draws its tree with pipes, so a nested node reads
'| | +-o Digilent USB Device@...'. The probe did line.trim() then
starts_with("+-o"), which matches only TOP-LEVEL nodes -- controllers and
hubs. An FT232H on a hub port is always nested, so no board could ever match,
whatever it was called. Either bug alone produces an empty bus.

Also fixed: a device's interfaces repeat its vendor and serial, so a
whole-tree walk counted one board as three. Now asks ioreg -r -c
IOUSBHostDevice and accepts only nodes whose line carries that class.

Verified against the live bench: 3 bridges, all reporting the documented
serial collision 210512180081; --expect 3 exits 0 and --expect 4 exits 1.
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-23 10:07:28 UTC

Summary

Status Count
Total Open PRs 6
PRs with Failing Checks 2
PRs with All Checks Green 4
READY 3
FAILING 2
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e905ba8eeb53 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

This was referenced Aug 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-23 15:28:59 UTC

Summary

Status Count
Total Open PRs 6
PRs with Failing Checks 2
PRs with All Checks Green 4
READY 3
FAILING 2
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e905ba8eeb53 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@gHashTag
gHashTag merged commit 92529f9 into master Aug 23, 2026
34 of 35 checks passed
@gHashTag
gHashTag deleted the fix/fleet-detect-by-vendor branch October 26, 2026 06:09
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