Commit Graph

17 Commits

Author SHA1 Message Date
Mikhail Chusavitin
aac3a69526 Add platform config ingest, storage, API, and UI tab
Auditors can now send BIOS/Redfish platform settings via
POST /ingest/hardware as hardware.platform_config (map[string]any).
Stored as latest-snapshot per machine with per-key change history.
Exposed via GET /api/assets/{id}/platform-config and .../history.
Asset page gets a third tab "Platform Config" with inline history expand.
Contract bumped to v2.9, migration 0024 adds two new tables.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 15:07:21 +03:00
Mikhail Chusavitin
f4cd15f0c4 Add asset host logs ingest and UI 2026-03-15 21:38:20 +03:00
Mikhail Chusavitin
04ad1f0568 Structured logging + request ID middleware — ingest v2.0, history v2.0, api v2.0
Migrate all log.Printf/log.Fatalf to log/slog with structured key-value
attributes per bible go-logging contract.

- Add withRequestID middleware: generates crypto/rand 8-byte hex ID per
  request, sets X-Request-ID response header, injects into context
- withErrorLogging uses slog with request_id from context
- writeError internal log calls migrated to slog.Error/slog.Warn
- All handler log calls in api, ingest, history packages use slog
- cmd/reanimator-api configures slog.NewTextHandler(os.Stdout) at startup
- cmd/reanimator-migrate, cmd/reanimator-reset migrated to slog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:03:22 +03:00
4c284505a8 Async ingest, deferred history, batch delete, vendor normalization, CI identifiers
- history/worker: fix deadlock by moving stale job requeue out of claimNextJob
  into dedicated staleJobRequeuer goroutine (runs every 2 min)
- history/service,tx_apply,cross_entity: add deferred=true mode — write events+
  snapshots but skip projection updates; queue recompute after commit
- ingest/service: IngestHardwareDeferred uses deferred mode; CSV workers up to 8
  (INGEST_CSV_WORKERS env); serial/prefetch lookups use normalize.SerialKey
- api/ingest: JSON /ingest/hardware now async (202 + job_id); new GET
  /ingest/hardware/jobs/{id} endpoint; CSV already async
- history/admin_cancel: replace per-event softDelete loop with batchSoftDeleteEvents
  using IN-clause chunks of 500 to prevent request timeout on large deletes
- normalize: new internal/normalize package with VendorKey, VendorDisplay,
  VendorDisplayPtr, SerialKey, FirmwareKey
- ingest/parser_hardware: vendor fields use normalize.VendorDisplayPtr
- migrations/0021_ci_identifiers: change identifier columns to utf8mb4_unicode_ci
  (case-insensitive) in parts, machines, observations, machine_firmware_states
- bible submodule: update to add identifier-normalization contract

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 22:23:17 +03:00
eba3b60b48 Add manual failures UI and global list filtering 2026-02-23 17:44:05 +03:00
8aa8b26184 Finalize history admin tools and semantic UI navigation 2026-02-23 16:59:09 +03:00
5a6a1c9d4d Redesign timeline cards and drilldown UX 2026-02-22 21:19:43 +03:00
ec54d3249e Add history-based state changes and recompute pipeline 2026-02-22 19:52:07 +03:00
c84102d2f1 Implement async manual CSV ingest, unified UI pagination/filters, and serial placeholder strategy 2026-02-21 22:14:04 +03:00
88503d2457 feat(timeline): fix chronology, status resolution, and component history UI 2026-02-16 23:17:22 +03:00
93c99b4506 refactor: remove legacy modules from API and UI 2026-02-15 22:20:50 +03:00
5518c3b405 feat: update ingest, registry, and UI flows 2026-02-15 21:50:35 +03:00
fd149c3d64 Add LOT model mapping management, UI, and first-seen tracking 2026-02-15 19:51:04 +03:00
ee46a093d3 Add UI console and spare forecast naming 2026-02-06 00:01:52 +03:00
5af1462645 Add analytics metrics and failure ingestion 2026-02-05 23:40:18 +03:00
fe9e08f1a6 Add registry, ingest, timeline, tickets features 2026-02-05 22:49:11 +03:00
1528fd654a Bootstrap milestone 0 and default API port 9999 2026-02-04 22:00:29 +03:00