Instrument detection (instlist) #18

Open
opened 2026-09-08 17:41:57 +01:00 by gronod · 0 comments
Owner

Summary

Spawn instlist with empty argv, id instlist, cwd inherited.

Spec refs

docs/15-stage3-chartread.md, 05-argyll-fork.md §4, 04-argyll-binaries.md §4. #111 #116 #134.

Scope

In: spawn, JSON-first parse, regex fallback, XY marker, Auto option.
Out: chartread session.

Implementation notes

Accumulate stdout. Parse pretty JSON {event:"instruments",devices:[{port,name,type}]}.
Regex fallback /^(\d+)[\s:=]+'?([^'\n]+)'?…/ requiring known-instrument tokens (i1|ColorMunki|Spyder|spectro|Display|Huey|DTP|SpectroScan|Smile|Klein).
port is the comm-port for chartread -c. Port 1 / Auto → empty option → omit -c. NEVER pass array index.
XY flag when name/type matches /spectro\s?scan|i1io/i · XY Table.
Duplicate Detect while running → exclusive-id error.

Rewrite invariants

#111 port ≠ index. #134 JSON-first. #116 exclusive id instlist.

Dependencies

Blocks-on: 2, 3.
Unblocks: 19.

Test

  • CI/mock: JSON + regex fixtures; empty list; duplicate Detect.
  • Hardware: Detect finds a real device.

Acceptance criteria

  • Auto omits -c in the chartread builder (tested with issue 19 goldens).
## Summary Spawn `instlist` with empty argv, id `instlist`, cwd inherited. ## Spec refs docs/15-stage3-chartread.md, 05-argyll-fork.md §4, 04-argyll-binaries.md §4. #111 #116 #134. ## Scope In: spawn, JSON-first parse, regex fallback, XY marker, Auto option. Out: chartread session. ## Implementation notes Accumulate stdout. Parse pretty JSON `{event:"instruments",devices:[{port,name,type}]}`. Regex fallback `/^(\d+)[\s:=]+'?([^'\n]+)'?…/` requiring known-instrument tokens (`i1|ColorMunki|Spyder|spectro|Display|Huey|DTP|SpectroScan|Smile|Klein`). `port` is the comm-port for `chartread -c`. Port `1` / Auto → empty option → omit `-c`. NEVER pass array index. XY flag when name/type matches `/spectro\s?scan|i1io/i` → ` · XY Table`. Duplicate Detect while running → exclusive-id error. ## Rewrite invariants #111 port ≠ index. #134 JSON-first. #116 exclusive id `instlist`. ## Dependencies Blocks-on: 2, 3. Unblocks: 19. ## Test - CI/mock: JSON + regex fixtures; empty list; duplicate Detect. - Hardware: Detect finds a real device. ## Acceptance criteria - [ ] Auto omits `-c` in the chartread builder (tested with issue 19 goldens).
gronod added this to the M4 — Measurement milestone 2026-09-08 17:41:57 +01:00
gronod added the
Priority
Critical
1
Project/ICCery-v2Feature/Backend
labels 2026-09-08 17:41:57 +01:00
gronod added a new dependency 2026-09-09 10:22:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: gronod/iccery-v2-mac#18