Introduce canonical hardware.devices repository and align UI/Reanimator exports

This commit is contained in:
2026-02-17 19:07:18 +03:00
parent a82b55b144
commit de5521a4e5
11 changed files with 1944 additions and 319 deletions

View File

@@ -81,7 +81,7 @@ Filename pattern for all exports:
Notes:
- JSON export contains full `AnalysisResult`, including `raw_payloads`.
- **Reanimator export** (`/api/export/reanimator`):
- **Reanimator export** (`/api/export/reanimator`):
- Exports hardware data in Reanimator format for integration with asset tracking systems.
- Format specification: `example/docs/INTEGRATION_GUIDE.md`
- Requires `hardware.board.serial_number` to be present.
@@ -93,6 +93,26 @@ Notes:
- Includes GPUs and NetworkAdapters as PCIe devices.
- Filters out storage devices and PSUs without serial numbers.
## Canonical device repository (AI memory)
Single source of truth for hardware inventory is `hardware.devices`.
Rules:
- UI tabs must read hardware records from `hardware.devices`.
- Device Inventory tab includes kinds: `pcie`, `storage`, `gpu`, `network`.
- Reanimator export must use the same canonical repository (`hardware.devices`).
- Any UI vs Reanimator mismatch is a bug.
Canonical dedupe (applied once in repository builder):
1. usable `serial_number`,
2. fallback `bdf` (PCI ID in BDF format),
3. if both are absent, keep records distinct (no forced merge).
Implementation guidance:
- Keep `hardware.devices` schema as close as possible to Reanimator JSON fields.
- Exporter should mainly group/filter canonical records by section, not rebuild data from multiple sources.
- New hardware attributes must be added to canonical device schema first, then mapped to Reanimator/UI.
## CLI flags (`cmd/logpile/main.go`)
- `--port`