Review of f28d02a: rows were accepted by minimum length, so a row missing
its diagonal X could map GPU0->GPU1 as NV12 and satisfy --require-link
nvlink while the reciprocal row said PHB. parse_topology now requires
exactly one complete row per header GPU, an X diagonal, known link tokens
(NV#, PIX, PXB, PHB, NODE, SYS) and symmetric links, and raises
otherwise so diagnostics record an error instead of a false pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nvidia-smi topo -m underlines its header with ANSI SGR escapes even when
piped (\x1b[4mGPU0 ...\x1b[0m). parse_topology matched cells[0] against
GPU\d+, never found the header and silently returned {}, so every link was
"unknown" and --require-link nvlink failed on a real NV12 pair (2x A100).
Strip ANSI CSI sequences before parsing, and raise on nonempty output with
no recognizable header so smi_diagnostics records an error instead of an
empty topology.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
parse_gpu_inventory fed raw.splitlines() to csv.reader, which splits
inside quoted fields, so a quoted UUID with an embedded newline lost it
and could pass validation with no inventory diagnostic. Parse from
io.StringIO so the newline is preserved and normalize_uuid rejects it.
Diagnostics-only: torch UUID validation still gates allocation.
Found in review of #367; pre-existing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up to #366 review items: bytes input, embedded whitespace,
newline plus trailing junk, and that malformed UUIDs surface as
diagnostics or failed evidence/worker reports (smi_diagnostics,
supervise, edit/reload workers) rather than exceptions. Tests only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 260674a found normalize_uuid did no syntax validation, so
malformed identities such as "not-a-uuid" passed evidence validation
that base rejected. Require an 8-4-4-4-12 hex body for GPU UUIDs and
accept MIG only as MIG-<uuid> or legacy MIG-GPU-<uuid>/<gi>/<ci>; raise
otherwise. Compare canonical UUIDs in inventory duplicate detection.
Replace malformed placeholder UUIDs in test fixtures and add negative
normalization, duplicate-inventory and evidence regressions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
torch reports device UUIDs without the "GPU-" prefix that nvidia-smi,
CUDA_VISIBLE_DEVICES and schedulers use. The driver (#356) compared raw
strings, so on real NVIDIA hardware:
- model workers were masked with the bare UUID, which CUDA does not
accept ("No CUDA GPUs are available");
- select_uuids rejected nvidia-smi-form --uuids;
- visible_device_records could not join the nvidia-smi inventory, leaving
pci_bus_id, physical_ordinal and topology empty.
Add normalize_uuid (bare or GPU- prefixed, case-insensitive, to
GPU-<lowercase>; MIG identifiers left distinct) and use it at discovery,
selection, inventory join, worker UUID checks and evidence validation.
Found on an A100 run of module-placement-gpu at 7fee696.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>