167 Commits
Author SHA1 Message Date
Mikhail ChusavitinandClaude Sonnet 5 3311bafd8e feat(inspur_legacy): new parser for pre-Kaytus Inspur onekeylog
Older AMI-BMC Inspur onekeylog archives (NF5466M5 / NF5280M5 generation)
opened to an empty result: they carry none of the files the inspur parser
keys on (no asset.json, devicefrusdr.log, selelist.csv or component.log).

New package internal/parser/vendors/inspur_legacy (vendor id inspur_legacy),
separate from inspur:
- binary IPMI FRU decode (FRU.bin) -> board identity
- Inspur_AssetInfoInventory.log -> CPU / memory / PCIe / PSU inventory
- events from Inspur_<model>_<serial>_IDL, sel.log, blackbox.log,
  MegaRAID raid0.log, and the flat AMI <severity>.log files
- no live sensors in this archive class -> recorded as a collection error
- BMC clock timestamps before 2010 dropped as un-set (1970 / ~2005 RTC)

Registry: add optional PrioritizedParser { DetectPriority() int } so a
confidence tie is broken by specificity. inspur_legacy returns 10 and also
declines (Detect 0) when modern Kaytus markers are present, so the two
Inspur parsers never fight over a newer dump.

Docs: ADL-065, 06-parsers.md, releases/v1.32.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VL8wLGD6Lnp6hZCpqT6cZ
2026-09-02 12:51:53 +03:00
Mikhail ChusavitinandClaude Sonnet 5 8278c77d98 fix(inspur): strip iBMC firmware build-timestamp suffix
A second NF5280M6 BMC-dump/live-CD pair showed RESTful version info
firmware versions carrying a build stamp ("08.05.01 (02/21/2024
16:51:27)") the live-CD does not, which churns a FIRMWARE_CHANGED event
on every source switch. cleanFirmwareVersion strips a trailing " (...)"
so BIOS/BMC match the bare live-CD version. See ADL-064 amendment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011LffAvostt3uMkiUbVUiyM
2026-09-01 12:02:19 +03:00
Mikhail ChusavitinandClaude Sonnet 5 2fa0f78f94 fix(inspur): read RESTful FRU info and float fans_power from component.log
Diffing an NF5280M6 BMC dump against its BEE-SP live-CD bundle found two
blind spots in the combined-component.log onekeylog layout (no
devicefrusdr.log / asset.json):

- board manufacturer/product/part/uuid empty and stats.fru 0: the
  "RESTful FRU info:" JSON block was never parsed. New component_fru.go
  (ParseComponentLogFRU) flattens it to []models.FRUInfo, prefers the
  product-area system serial over the board PCB serial, and sets
  BoardInfo.UUID from system_uuid. Wired as a fallback only when
  result.FRU is still empty.
- zero fan sensors: FanRESTInfo.FansPower was int but this firmware
  writes "fans_power": 12.000000, so json.Unmarshal of the whole fan
  block failed. Changed to float64.

Also included: SOL smartd SCSI/SAS device-line parsing and diagnose.go
gofmt from concurrent work on the same live-CD-diff task. See ADL-064.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011LffAvostt3uMkiUbVUiyM
2026-09-01 11:58:55 +03:00
Mikhail ChusavitinandClaude Sonnet 5 ab8636da04 fix(xfusion): parse disk_info Capacity in TB/binary units for size_gb
parseDiskInfo read capacity with Sscanf(cap, "%f GB"), so every iBMC
"Capacity : 6.986 TB" NVMe line failed to match and size_gb stayed 0
while the BEE-SP live-CD export of the same drive had the real size.
The iBMC number is also binary (GiB/TiB) despite the GB/TB label.

parseDiskCapacityGB parses number + unit (TB/GB/MB), treats it as
binary, and emits decimal GB, matching the drive's marketed capacity
and the live-CD inventory. Found by diffing a G5500 V7 BMC dump against
its live-CD bundle. See ADL-063.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011LffAvostt3uMkiUbVUiyM
2026-09-01 11:58:46 +03:00
Mikhail ChusavitinandClaude Sonnet 5 8e7f22077d fix(xfusion): emit OCP NIC ports with no serial so reanimator keys them by MAC
Verified against reanimator/core: it keys a NIC component on serial → MAC →
synthetic(slot). A BMC dump carrying the card serial collapses both ports into
one serial-keyed component, while a live-CD bundle (no serial) keeps two
MAC-keyed components, so alternating the two sources produced a spurious
COMPONENT_REMOVED + 2x COMPONENT_INSTALLED every time. Emitting the per-port
NetworkAdapter entries with an empty serial makes both sources key on the port
MAC and yield the same two components. The card serial still reaches the export
via the FRU record and the legacy NIC entry.

Also records ADL-062 findings from reading the ingesting audit tool: it persists
only vendor/model/serial per component (no size/speed/link/clock/wattage), so the
remaining one-sided field diffs between the two bundles cannot generate change
events.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFy4m7cVv4cqp25jJh2gSB
2026-08-31 22:55:45 +03:00
Mikhail ChusavitinandClaude Sonnet 5 9b2c654182 fix(parser,exporter): reconcile BMC-dump and live-CD exports of the same server
The audit tool that ingests Reanimator exports treats any per-component field
change between imports as a component replacement. Importing an xFusion BMC dump
and an easy_bee BEE-SP bundle for one server produced large spurious diffs.

xfusion:
- parseMemInfo tolerates a stray 0x0A inside the binary SPD "bom number" column
  (it was splitting a DIMM record in two and emitting a phantom "slot s" module)
- DIMM slot from the "dimm name" column ("DIMM071"), mainboard "location" dropped
- GPU slot = BDF (Reanimator contract)
- NIC emitted per PCI function from netcard_info.txt (BDF + per-port MAC, shared
  card serial) instead of one card-level adapter with the wrong BDF, which had
  been colliding with a GPU and vanishing in dedup
- NIC manufacturer left blank when it is the system OEM so the exporter resolves
  the silicon vendor from pci.ids
- "(U6216)" chip designator stripped from firmware versions

easy_bee:
- PSU bay numbers rebased 0-indexed -> 1-indexed; bare single-letter PSU
  "firmware" (a leaked FRU version) cleared
- board.part_number taken from the bundle's ipmitool-fru.txt chassis
  "Product Part Number" to match the BMC value

exporter (cross-vendor):
- canonicalMemorySlot: drop dmidecode "(J)" channel tag, Memory111 -> DIMM111
- canonicalGPUModel: NVIDIA DC GPUs reduce to the bare chip token
- canonicalStorageMediaAndInterface: NVMe is a bus not a medium
- manufacturerFromStorageModel: fill blank drive vendor from the model prefix
- isRemovableUSBStorageDevice: drop live-CD boot sticks
- isOnboardControllerPCIeDevice: drop SATA/NVMe/MegaRAID/PCIe-switch controller
  functions that only an lspci scan reports (keep add-in cards with an identity)

For the reference server every physical component now appears in both exports
keyed identically; residual diffs are one-sided enrichment only.

Refs ADL-061, ADL-062.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFy4m7cVv4cqp25jJh2gSB
2026-08-31 22:50:07 +03:00
Mikhail ChusavitinandClaude Sonnet 5 5b65c99b0e fix(server): build ping address with net.JoinHostPort for IPv6 hosts
fmt.Sprintf("%s:%d", host, port) produces a malformed address for IPv6
literal hosts (go vet: "address format does not work with IPv6").

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 17:08:51 +03:00
Mikhail ChusavitinandClaude Sonnet 5 a430a8c46f feat(nvidia_bug_report): extract Xid/SXid GPU error events
Parse Xid and SXid entries from the kernel log into GPU error events with
severity and the decoded failure reason.

See ADL-055.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 17:05:52 +03:00
Mikhail ChusavitinandClaude Sonnet 5 e7b8a8badc feat(inspur): source-PRI timezone timeline, PPIN serial, NVMe fault storage status
Event ingestion now uses the source syslog PRI and an explicit-offset
timezone timeline instead of assuming host-local time. CPU PPIN is
exported as the source-backed CPU serial, and an active NVMe fault SEL
event promotes the matching drive's storage status.

See ADL-056, ADL-057.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 17:05:45 +03:00
Mikhail ChusavitinandClaude Sonnet 5 07c270cda2 feat(models): resolve CPU serial from source PPIN as common fallback
Centralize CPU identity in models.ResolveCPUSerialNumber: an explicit
source serial wins, otherwise a valid source PPIN is used, placeholders
rejected. Dell, H3C and Redfish apply it while parsing; canonical-device
and Reanimator conversion apply it again at the output boundary. No
identity is synthesized from socket/model/board serial.

See ADL-058.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 17:05:40 +03:00
Mikhail ChusavitinandClaude Sonnet 5 9d701885da feat(parser): bound single-file gzip by ratio guard instead of fixed byte cap
Plain gzipped logs (nvidia-bug-report-*.log.gz) routinely exceed the old
50MB decompression cap, which silently dropped the tail. Replace it with a
decompression-ratio bomb guard plus a 1GB absolute memory ceiling.

See ADL-054.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 17:05:33 +03:00
Mikhail ChusavitinandClaude Sonnet 5 632067fef5 fix(parser): dedupe HPE AHS DIMM inventory per slot, newest snapshot wins
The AHS blackbox stores a DIMM inventory snapshot per POST cycle and
parseDIMMs flattens all of them. dedupeMemory keyed on serial, so a slot
whose module was swapped between captures survived once per historical
occupant — a 24-slot board reported 26 modules and "same P/N" vs
"mixed P/N" configs looked identical.

dedupeMemory now collapses to one entry per non-empty slot with the last
(most recent, since token order follows chronological blackbox-record
order) occurrence winning. Slotless entries keep the serial/part fallback.

See ADL-060.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-27 16:49:12 +03:00
Mikhail ChusavitinandClaude Sonnet 5 99d8f098ac fix(parser): match easy_bee bee-audit.json/runtime-health.json outside export/
bee-support v12.x bundles place bee-audit.json under tasks/_state/ and
runtime-health.json under status/, not export/. Detection was path-locked
to export/, dropping confidence to 50 and relying on a coincidental
export/reanimator.json duplicate to find the snapshot at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 17:22:24 +03:00
Mikhail ChusavitinandClaude Sonnet 5 6599ab49c2 fix(collector): surface RAID/HBA controller cards from Storage.StorageControllers[]
The RAID controller (XFusion XC170-M-8i / Broadcom SAS3808) never appeared
in inventory at all: it isn't listed in any Chassis/Systems PCIeDevices
collection on this BMC, and its dedicated Board resource link 404s (id
contains parentheses, same class of bug as the OCP NIC fixed earlier). Its
full identity -- model, firmware, BDF, vendor/device IDs -- was sitting
unread in the Storage resource's embedded StorageControllers[] array the
whole time.

Added parseStorageControllerPCIeDevice + collectStorageControllers to read
that array and surface the controller as a PCIeDevice entry, merged into
the existing pcie_devices list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 14:30:56 +03:00
Mikhail ChusavitinandClaude Sonnet 5 1e4ec513e1 fix(collector): dedup GPUs and resolve model text on xFusion boards without PCI identity
A re-run against the G5500 V7 (previous fix commit a3567dd) surfaced two
follow-on bugs once the GPUs started being classified correctly:

- gpuDocDedupKey fell straight through to the full @odata.id path when a
  GPU had neither SerialNumber nor BDF, so the same physical H100 exposed
  under both Systems/1/PCIeDevices and Chassis/1/PCIeDevices (identical
  resource Id, different collection root) was kept twice, doubling the
  reported GPU count. Added an Id + resolved VendorID/DeviceID fallback
  tier that collapses same-Id duplicates without collapsing genuinely
  distinct GPUs that happen to share a vendor/device pair.

- isMissingOrRawPCIModel/isGenericRedfishInventoryName didn't recognize
  xFusion's generic "PCIeCardN"/"OCPCardN" slot labels, so when the doc's
  actual Model field was empty and GPU.Model fell back to the slot-like
  Name field, the pci.ids VendorId/DeviceId resolution never fired and the
  GPU surfaced with a meaningless model like "PCIeCard1" instead of the
  real chip name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 14:24:49 +03:00
Mikhail ChusavitinandClaude Sonnet 5 a3567dd5f6 fix(collector): recover GPUs/NICs dropped on xFusion G5500 Redfish exports
looksLikeGPU now falls back to resolving VendorId/DeviceId through the
pci.ids database when the BMC leaves Name/Model/Manufacturer/ClassCode
empty, so GPUs identifiable only by raw PCI IDs (e.g. NVIDIA H100 SXM5
0x10de/0x2330) are no longer misclassified as generic PCIe devices.

The replay pipeline's "backed by canonical NIC" dedup used to trust a
PCIeDevice's Links.NetworkDeviceFunctions reference at face value and
drop the device, assuming a NetworkAdapters record existed elsewhere.
On BMCs that expose resource IDs with characters (parentheses) that
404 on fetch, that canonical NIC never gets captured, so the device
carrying its actual hardware identity vanished from the export
entirely. hasResolvableLinkedMember now verifies the linked resource
is actually present in the snapshot before treating it as authoritative.

Also normalize PartNumber through normalizeRedfishIdentityField in the
GPU/PCIe parsers so a BMC-supplied literal "null" string doesn't leak
into exports verbatim.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 14:17:25 +03:00
Mikhail ChusavitinandClaude Sonnet 5 2c3072cf10 fix(exporter): fix memory dedup collapsing distinct DIMMs, disambiguate slots
dedupeMemory keyed on slot before serial, unlike dedupeStorage/dedupePSUs
which both prefer serial. Some collectors (observed on MSI CG480-S6053 with
older BEE-SP versions — confirmed reproducible across multiple servers,
fixed in newer BEE-SP versions) report every memory module at the same slot
label ("DIMM 0") even though each has a distinct real serial. Slot-first
keying collapsed all of them into a single record on export — 16 real 32GB
DIMMs (512GB) reduced to 1, discarding 15 physical modules' worth of data.

Serial now takes priority, matching storage/PSU. Also add
disambiguateMemorySlots (same pattern as the existing PSU slot fix): when
multiple already-distinct DIMMs still share a slot label, renumber them to
"DIMM {n}" by ascending serial order so Reanimator can track them by
position and results are deterministic across re-imports.

Updated the existing dedup test (was asserting the old collapse-by-slot
behavior on a same-slot/different-serial case, which was exactly the bug)
and added a dedicated regression test for the collision case.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 11:05:19 +03:00
Mikhail ChusavitinandClaude Sonnet 5 6827c1fe20 fix(exporter): assign PSU slot positions by serial order, not encounter order
disambiguatePSUSlots previously renumbered colliding PSU slots in whatever
order the devices happened to appear in after parsing/dedup, which isn't
guaranteed stable across runs. Sort each colliding group by serial number
ascending before assigning 0-based positions, so the same PSU always lands
in the same slot on re-conversion regardless of incidental ordering upstream.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 09:56:13 +03:00
Mikhail ChusavitinandClaude Sonnet 5 a590242382 fix(exporter): disambiguate PSU slot collisions to avoid Reanimator "other"
Some collectors (BEE-SP observed so far) report every PSU at slot "0". The
export itself already keeps every PSU as a separate record (dedupePSUs keys
on serial first), but Reanimator relies on slot to track installed position,
so PSUs sharing a slot value land in "other components" instead of being
tracked as PSU installations.

Renumber colliding slots to stable 0-based positions by encounter order.
This doesn't invent a serial or other identity — the PSUs are already
distinguished by serial — it only assigns the position field Reanimator
needs when the source failed to. Files where every PSU already has a
unique slot are unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 09:52:33 +03:00
Mikhail ChusavitinandClaude Sonnet 5 48baae41f4 fix(exporter): key PCIe canonical dedup by BDF before serial
canonicalKey used serial_number as the primary merge key for pcie-class
devices (PCIe/GPU/Network), falling back to BDF only when serial was empty.
Multi-port NICs commonly report one serial for the whole physical card
across all of its ports/BDFs (e.g. a dual-port ConnectX-5: same serial,
distinct BDFs 0000:65:00.0/.1, distinct MACs). Keying on serial first
collapsed every port sharing that serial into a single canonical device,
silently dropping all but one port from the export.

BDF now takes priority for pcie-class devices, since it uniquely identifies
one physical PCI function; other device kinds (storage, memory, PSU, etc.)
keep the existing serial-first behavior, which is correct there since a
serial genuinely maps 1:1 to a physical unit for those.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 09:42:34 +03:00
Mikhail ChusavitinandClaude Sonnet 5 8665f79fd6 fix(parser,exporter): fix large tar.gz truncation and empty device_class defaulting
- archive.go: extractTarGzFromReader truncated decompressed tar.gz content
  at a hard 50MB byte boundary before checking whether it was a tar archive,
  corrupting the tar structure mid-entry for any legitimately large archive
  (e.g. a 200MB decompressed NVIDIA bug-report bundle) and causing the whole
  file to fail with "tar read: unexpected EOF" instead of extracting what's
  there. Now peeks the first 512-byte tar block to detect tar vs. single
  gzipped file without consuming the stream, and streams tar entries with a
  cumulative (not raw-byte) size limit that only ever stops at an entry
  boundary. The byte-level cap still applies to the single-gzipped-file case,
  where it's safe since there's no container structure to corrupt.

- reanimator_converter.go: normalizeLegacyPCIeDeviceClass mapped an empty
  device_class to "NetworkController" by accident (grouped into the same
  case as "network"/"ethernet" aliases). Sources that never populate a class
  at all (e.g. Dell's DCIM_PCIDeviceView) got every such device — including
  NVMe drives and SATA controllers — mislabeled as network controllers.
  Empty now stays empty instead of being guessed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 14:00:55 +03:00
Mikhail Chusavitin 4fa16c78a5 perf(convert): parallelize batch conversion across worker pool
Batch convert processed files strictly sequentially. Parsing/converting
is CPU-bound and stateless per file, so run it across a GOMAXPROCS-sized
worker pool; zip writing and progress updates stay serialized in
original file order.
2026-08-15 12:43:21 +03:00
Mikhail ChusavitinandClaude Sonnet 5 42cfa3aa94 fix(exporter): drop dead bmc_event_summary field, fix status loss for inspur CPU/GPU
bmc_event_summary was a derived Assert/Deassert summary added in 4409594
alongside real fixes for GPU fault handling. It's not part of the Reanimator
hardware-ingest contract (event_logs is the only accepted log channel) and
was silently dropped on import — pure dead weight, removed.

Three related status bugs surfaced while auditing converted exports against
the contract, all specific to Inspur/onekeylog dumps:
- CPU status from RESTful CPU info was parsed but never assigned to
  models.CPU, and was skipped entirely whenever asset.json already supplied
  a CPU list (its own inventory has no status field) — CPUs always exported
  as Unknown even when the source reported OK.
- PCIe device status (RESTful "status": 1) was parsed but never mapped onto
  models.PCIeDevice, so RESTful-only devices always lost status.
- For GPUs specifically, asset.go emits two device records per physical GPU
  (a generic pcie_devices entry enriched with real status, and a separate
  gpus entry with a resolved model name but no status). dedupePCIe picks a
  single winner by quality score, and a better model name outweighed having
  a real status — the winner kept "Unknown" even when a losing duplicate had
  the real value. dedupePCIe now backfills status onto the winner from a
  losing duplicate when the winner's is Unknown.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 12:11:16 +03:00
Mikhail ChusavitinandClaude Sonnet 5 0867123a91 feat(exporter): flag PCIe/GPU/NIC devices with degraded link width as Warning
Applies a single universal check (negotiated LinkWidth < MaxLinkWidth) in
convertPCIeFromDevices, the shared conversion path all vendor parsers feed
into, so a narrower-than-supported link (bad seat, bent connector, wrong
riser) surfaces as a Warning status regardless of which parser produced the
reading — instead of the previous OtrdDiagnoseComponent.json-only check that
only covered the newer HGX dump layout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 18:15:08 +03:00
Mikhail ChusavitinandClaude Sonnet 5 93f0897b81 fix(exporter): dedup NICs by normalized MAC, fix garbage redis serial fallback
MAC-format mismatches between collector sources (dash vs colon separators)
were preventing duplicate NIC/PCIe entries from merging in the canonical
device dedup pass. Add MAC address normalization and merge devices that
share a normalized MAC before the existing serial/BDF-based dedup runs.

Also fix a bug in the Inspur redis-dump serial fallback parser: when a
field's inline value was the placeholder "N/A", the code incorrectly fell
through to a window-scan fallback that could pick up an unrelated adjacent
Redis key name (e.g. "AssetInfoPCIEMMIOSpace") as a fake serial number.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 18:09:49 +03:00
Mikhail ChusavitinandClaude Sonnet 5 399eca5f49 feat(exporter): collect and export storage.vendor_id/device_id (contract v2.13)
Add PCI Vendor ID / Device ID to hardware.storage[] per the updated Reanimator
ingest contract, mirroring the existing pcie_devices[] fields. Populated for
Redfish-collected NVMe drives (live + TSR replay, via linked PCIeFunctions)
and for Inspur (from asset.json's own PcieInfo[], joined by PcieSlot). Also
fixes canonicalDevicesForExport dropping the fields when converting Storage
into the canonical HardwareDevice list used by the actual export path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 16:04:54 +03:00
Mikhail Chusavitin 063587958e Merge remote-tracking branch 'origin/main'
# Conflicts:
#	bible-local/10-decisions.md
#	internal/chart
#	internal/models/models.go
2026-08-11 12:12:03 +03:00
Mikhail ChusavitinandClaude Sonnet 5 3ab6f28323 chore(chart): bump submodule to licenses section commit
Points internal/chart at reanimator/chart@ba751c8, which adds the
hardware.licenses[] section (preferred order/title/columns) to the
viewer, matching the reanimator export from the previous commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 11:58:19 +03:00
Mikhail ChusavitinandClaude Sonnet 5 eaaf5c09d3 feat(hardware): collect and export licenses via Dell iDRAC10 Redfish walk
Implements the hardware.licenses[] contract section (v2.12, refreshed from
reanimator/core's hardware-ingest-contract.md — was v2.11 locally).

- models.License / HardwareConfig.Licenses mirror the contract field set.
- collector.collectLicenses() reads the standard DMTF
  /redfish/v1/LicenseService/Licenses collection during Redfish-walk replay;
  it's a generic DMTF resource, not Dell-specific, so any future vendor's
  Redfish walk gets license collection for free through
  ReplayRedfishFromRawPayloads.
- vendors/dell merges replayed Licenses like every other category.
- exporter.convertLicenses/dedupeLicenses wire hw.Licenses into the
  reanimator export directly (no canonical-devices merge — licenses have no
  physical identity to merge on), setting Present on every record from the
  start (per the ADL-049 round-trip lesson).
- chart viewer renders a licenses section in /chart/current.

Verified end-to-end on the PowerEdge R7715 (1TVFYL4) TSR: 3 system-level
licenses extracted and correctly exported/rendered.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 11:48:21 +03:00
Mikhail ChusavitinandClaude Sonnet 5 eb6cc207ce fix(exporter): populate Present on exported Memory/PSU so reanimator re-import keeps them
ReanimatorMemory.Present and ReanimatorPSU.Present were already declared as
*bool fields (matching ReanimatorStorage.Present), but convertMemoryFromDevices
and convertPSUsFromDevices never set them, unlike convertStorageFromDevices.
Exported JSON therefore had "present" for storage but not for memory/PSU
items. Re-importing a previously exported reanimator.json via
parseUploadedSnapshot (a direct json.Unmarshal into models.AnalysisResult)
left Present=false on those two categories, and the existing
IsInstalledInventory()/present-required filters then dropped them on the next
/chart/current render — reproduced live: fresh TSR upload showed Memory and
Power Supplies correctly, re-uploading the exported reanimator.json for the
same result did not.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 11:11:39 +03:00
Mikhail ChusavitinandClaude Sonnet 5 f599215760 fix(parser): parse Dell iDRAC10 TSR inventory from captured Redfish walk
iDRAC10-generation TSR bundles no longer ship sysinfo_dcim_view.xml /
sysinfo_dcim_softwareidentity.xml, so the dell parser produced events but
no hardware inventory for them. These bundles instead carry
redfishidracwalk.tar.gz, a captured dump of the iDRAC's own Redfish tree.

Add vendors/redfishtree, a shared helper that reconstructs a path->document
map from a tar.gz/zip-packaged Redfish walk (vendor-independent detection:
path hint + /redfish/v1 service-root/Systems/Chassis structural check) and
replays it through the existing collector.ReplayRedfishFromRawPayloads.
vendors/dell uses it to enrich DCIM-XML-derived data (append-only, existing
dedupe passes resolve overlaps). Also register vendors/redfishwalk, a
low-confidence fallback VendorParser using the same helpers, so any other
vendor that starts shipping this kind of raw Redfish walk is picked up
automatically without a dedicated parser.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 10:49:32 +03:00
mchusandClaude Sonnet 5 586ac782b2 fix(parser): expose NVIDIA HGX tray/baseboard identity separately from vendor carrier FRU
Inspur/Kaytus onekeylog dumps only exposed the mechanical carrier FRU serial
(component/fru.txt Board Product) as board identity. That serial doesn't
change when the actual NVIDIA HGX baseboard (SXM+NVSwitch "delta board") is
swapped, causing false "board unchanged" conclusions. Parse the real HGX
tray/baseboard Model/PartNumber/SerialNumber triples from
HGX_HWInfo_FWVersion.log into a new HardwareConfig.HGX field, and normalize
Redfish's NA/N-A placeholders to empty across HGX identity parsing.

Closes #21

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 10:30:54 +03:00
mchusandClaude Sonnet 5 f9d328b5cf chore: update chart and pciids submodules
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 10:17:53 +03:00
mchusandClaude Sonnet 5 74e6bf0578 fix(parser): support Inspur HGX dump_<serial>_<timestamp>/ onekeylog layout
Fixes #20. This onekeylog variant has no devicefrusdr.log at all: FRU/sensors
come from raw ipmitool text output, PCIe/GPU presence has a dedicated
structural snapshot, SEL lives at a different path, and BMC component
failures are logged separately from SEL/IDL.

- Fall back to component/fru.txt (same FRU block format as devicefrusdr.log)
  and component/sensor.txt / sdr.txt (ipmitool sensor list / sdr elist)
  when devicefrusdr.log is absent.
- Parse log/bmc/diagnose/OtrdDiagnoseComponent.json's PCIe Device Info array
  for GPU/PCIe presence and link state, independent of SEL/IDL alarm
  history; flag devices running below their negotiated max link
  speed/width as degraded with a Warning event.
- Fall back to log/sel.csv (same format as selelist.csv) when selelist.csv
  is absent.
- Parse log/bmc/commer-comp/{commerslot,commerhmc,commerswvr,commerswcpld}
  logs (including rotated *.tar.gz.N parts) into failure events, filtering
  known-noisy lines.
- Collapse SEL events duplicated across sources by
  (timestamp, event_type, description).
- Surface a CollectionError when FRU/sensors are still empty after all
  fallbacks, instead of silently returning an empty inventory.
- Fix ParseFRU: a later placeholder "Product Serial : 0" / "Product Part
  Number : NULL" line in the same FRU block (e.g. SCM_FRU) was overwriting
  an already-parsed real Board Serial/Part Number.

Verified against dump_23DB01633_20260727-1359.tar.gz (HGX B200, KR9288-X3):
fru 0→21, sensors 0→303, 8 GPUs present at Gen5 x16 in slots 100-107.

Deferred (not covered by this change): BIOS-change-settings context and
BIOS POST codes from the same layout — see bible-local/10-decisions.md
ADL-048.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 10:05:58 +03:00
Mikhail Chusavitin 6e1a8232ec fix(parser): dedup IDL events by timestamp to stop dropping recurring alarms
ParseIDLLog deduped by eventID|eventType|description, which is identical
across every occurrence of a recurring alarm (e.g. the flapping PCIe
presence check on Inspur HGX boards). That collapsed every later
occurrence into the first one, so applyGPUStatusFromEvents computed GPU
health from a stale, truncated event list and marked failed GPUs as OK.
2026-07-28 19:38:36 +03:00
Mikhail ChusavitinandClaude Sonnet 5 5677c49998 fix(parser): support Inspur onekeylog per-file component/*.txt D-Bus layout
Some onekeylog BMC firmware variants split the combined component.log
into per-file D-Bus GetAll transcripts under component/ (e.g.
PowerSupplyInfo.txt, FanInfo.txt), which the inspur parser did not
read, leaving PSU and fan data empty. Add a GETALL block parser and
wire it as a fallback for PSU and fan telemetry when component.log is
absent; document the layout and known gaps in bible-local.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 12:24:17 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 e2c81758b5 fix(parser): raise file size limit for .ahs to 1 GB
AHS files can exceed 100 MB; the previous 10 MB universal cap silently
truncated them and caused incomplete event parsing. Per-extension limits
are now used: .ahs gets 1 GB, all other single-file types keep 10 MB.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 15:20:57 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 3e3c48bc08 feat(hpe-ilo): parse AHS files, fix event logs export, add logs CSV export
- HPE iLO AHS parser: handle truncated last entry gracefully, recognize
  Alletra product line, expand event type/severity inference, trim iLO
  frame separators from event messages
- Fix event_logs always 0 in Reanimator export: normalizeEventLogSource
  now maps "HPE iLO" → "bmc"
- Fix chart JS not loading in LOGPile: rewriteChartStaticPaths now also
  rewrites src="/static/view.js" → /chart/static/view.js
- Add "Logs Export" button (CSV, semicolon-delimited, UTF-8 BOM) and
  remove PDF button
- Fix collector test broken by pciids rename of Intel VMD device
- Update submodules: chart v2.7, pciids, bible

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-19 15:11:46 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 5128ac5303 fix(server): remove PrintMode from RenderOptions after chart submodule update
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 17:53:55 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 53cda82c79 chore: update submodules (bible, chart, pciids)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 17:52:51 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 a18d8fe648 feat(inspur): enrich storage serials from SOLHostCapture.log smartd output
When the BMC HDD API returns an empty array (RAID controller attached via
PCIe, e.g. PM8204-2GB), disk serial numbers are now recovered from smartd
startup messages in SOLHostCapture.log.

Enrichment runs in three passes: model-match on existing slots, positional
fill of empty backplane placeholders, then new entries for any remainder.
Both log/ and runningdata/var/ copies are merged with serial deduplication.

Parser version bumped to 2.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 17:52:07 +03:00
mchusandClaude Sonnet 4.6 57de3ba6eb chore: align codebase with bible engineering contracts
- identifier-normalization: use strings.EqualFold in h3c/parser.go
- import-export: CSV now uses UTF-8 BOM and semicolon delimiter
- go-code-style: translate all Russian source strings to English (ADL-007)
- go-background-tasks: add Type, Message, Result fields to Job struct
- go-api: wrap list endpoints in {items, total_count, page, per_page, total_pages}
- module-structure: rename helpers.go → context_sleep.go
- build-version-display: htmlError renders version footer on error pages
- go-logging: migrate all log.Printf calls to log/slog with structured attrs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 14:35:39 +03:00
mchusandClaude Sonnet 4.6 47ff1c3796 fix(inspur): detect standard Inspur servers via SystemManufacturer
NF-series storage servers (e.g. NF5280M6) have no GPU/outboard-PCIe
topology, so the previous score gate (topologyScore==0 || boardScore==0
→ return 0) always produced score=0 despite SystemManufacturer="Inspur"
being available. These servers fell into mode=fallback, activating the
AMI profile and probing /Oem/Ami paths that don't exist on the BMC.

Add manufacturer-based detection: SystemManufacturer or
ChassisManufacturer containing "inspur" contributes 60 points —
enough to enter matched mode on its own. GPU servers with full
topology+board signals still score higher as before.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 03:58:55 +03:00
mchusandClaude Sonnet 4.6 1c4a3b0c09 feat(ui): add PDF export via browser print
Adds a PDF button to the report header. Clicking it opens
/chart/current?print=true in a new tab, which auto-triggers
window.print() so the user can save to PDF via the browser dialog.

- chart submodule bumped: PrintMode support (no filter JS, auto-print,
  @media print CSS)
- handlers.go: passes PrintMode=true when ?print=true query param is set
- index.html: PDF button alongside Raw Data / Reanimator
- app.js: printReport() helper; button shown/hidden with other exports

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 12:24:01 +03:00
mchusandClaude Sonnet 4.6 10c381c8ec chore: update bible and pci.ids submodules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 03:40:15 +03:00
mchusandClaude Sonnet 4.6 440959483e fix(inspur): correctly handle PCIe Assert/Deassert GPU fault events
Three related fixes for IDL event processing:

1. idl.go: include EventType in dedup key so Deassert events are no
   longer silently dropped as duplicates of their Assert counterparts.

2. gpu_status.go: treat Deassert events as clearing all GPU faults —
   previously the code re-applied the same faulty GPU set from the
   description, leaving GPUs stuck in Critical even after alarm cleared.

3. reanimator_models/converter: add bmc_event_summary section to the
   Reanimator export — a deduplicated Critical/Warning event table with
   Active/Resolved status derived from Assert/Deassert pairs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 03:38:04 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 f3836a34cc chore: update chart submodule to v2.0 and refresh pci.ids (2026-05-21)
chart: feat(viewer): replace severity dropdown with per-column header filters
pci.ids: 2026-02-17 → 2026-05-21

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 14:37:26 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 27373aa104 feat: surface BMC collection errors in parse-errors panel and event log
When Inspur component.log sections return {"error":"...","code":N} instead
of hardware data, the parser now:
- stores them in AnalysisResult.CollectionErrors (new model field)
- mirrors each one into result.Events with Source="BMC/<section>"
  so the chart viewer event table shows the specific BMC module
- feeds them into /api/parse-errors as bmc_collection_error entries

UI adds a collapsible "Collection diagnostics" panel below the chart
iframe (outside /chart) that appears when /api/parse-errors returns
any items; resets on data clear.

Affected sections in this dump: HDD (1458), PCIe Devices (1458),
Network Adapters (1458), Disk Backplane.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 14:30:01 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 4f7b5b826a fix(inspur): fix PSU section regex when PCIE section precedes Network
The PSU regex used "RESTful Network" as its end anchor, but in standard
Inspur component.log layout the PCIE Device section sits between PSU and
Network Adapter. The lazy [\s\S]*? captured across the PCIE error block,
producing invalid JSON and silently dropping all PSU data.

Changed anchor to RESTful (?:PCIE|Network) — matches whichever section
immediately follows PSU in a given archive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 14:21:13 +03:00
Mikhail ChusavitinandClaude Sonnet 4.6 dfd64550cf fix(inspur): infer DIMM size from part number when BMC reports size=0
When BMC firmware fails to read capacity for a present DIMM, size_mb stays
0. If another DIMM with the same part number in the same batch has a known
size, use it to fill the gap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 14:18:15 +03:00