64 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
9cb7626a01 Fix manual de-assert and group small vendors in chart
Allow COMPONENT_REMOVED patches to bypass server-only restriction on
/installation/* paths so manual de-assert works for user source type.

Group vendors with <1% share into "Others" in the Vendor Distribution
chart; cap total slices at 15.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 23:01:16 +03:00
Mikhail Chusavitin
40b5c06a52 Reduce recompute installation deadlocks 2026-03-16 16:22:14 +03:00
Mikhail Chusavitin
dfbd371f8e Update deploy flow and asset UI 2026-03-16 16:03:54 +03:00
Mikhail Chusavitin
d4f0175ce5 Document sensor location removal 2026-03-16 15:07:10 +03:00
Mikhail Chusavitin
09b4aaa479 Move firmware mismatch indicators to server card 2026-03-16 15:06:18 +03:00
Mikhail Chusavitin
373b02111a Clarify no-synthesis ingest contract 2026-03-15 22:24:41 +03:00
Mikhail Chusavitin
f4cd15f0c4 Add asset host logs ingest and UI 2026-03-15 21:38:20 +03:00
Mikhail Chusavitin
5370c1a698 Simplify component address contract 2026-03-15 21:11:52 +03:00
Mikhail Chusavitin
8ce4f28915 Remove stale project status docs 2026-03-15 17:10:23 +03:00
Mikhail Chusavitin
2844fc5c1d Expand hardware ingest telemetry contract 2026-03-15 17:09:39 +03:00
Mikhail Chusavitin
33b4b75578 Consolidate project documentation 2026-03-15 16:29:24 +03:00
Mikhail Chusavitin
96aefc0eb4 Hardware ingest contract v2.1: sensors, MAC addresses, device_class expansion
- Add HardwareSensors to JSON contract: fans, power, temperatures, other
- Add machine_sensor_readings table (migration 0022) with upsert in ingest service
- Add mac_addresses []string to HardwarePCIeDevice
- Expand device_class examples: VideoController, ProcessingAccelerator,
  EthernetController, FibreChannelController, StorageController
- Add distributable hardware-ingest-contract.md v2.1 with versioning,
  changelog, field tables, and canonical URL
- Add governance rule: contract doc must be updated with every parser change
- Update data-model.md to document machine_sensor_readings projection
- Update both import-example-full.json files with sensors and new PCIe entries

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 16:15:16 +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
Mikhail Chusavitin
824e377a17 Add module versioning, drop deferred tasks — ingest v1.0, history v1.0, api v1.0
Implement release note discipline per bible module-versioning contract:
- Add version.go with Version = "1.0" to ingest, history, api packages
- Drop CI task (no CI infrastructure planned)
- Drop Release note discipline task (now implemented)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:47:41 +03:00
Mikhail Chusavitin
61a4a5b31b Drop deferred non-starters: OpenAPI spec, entity renaming
- Remove OpenAPI spec from Cross-Cutting Tasks: no external consumers,
  API surface already documented in api-surface.md
- Remove Phase 3 (entity renaming assets->machines/components->parts):
  API surface keeps asset/component naming per architecture decision,
  DB rename has no user-visible value and high migration risk

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:37:48 +03:00
Mikhail Chusavitin
3dbd359d4e Canonical component types, Compare config UI
- Rename parser_hardware.go component type keys to canonical values:
  pcie -> pcie_device, psu -> power_supply
- Update normalizeComponentType to map legacy aliases (pci, psu, dimm,
  ram, processor, network_adapter, etc.) to canonical keys; treat
  "null"/"-" as unknown
- componentTypeTitle handles new canonical keys (pcie_device,
  power_supply)
- Assets list: add Compare config action — opens new window with
  slot-diff and model-count-diff tables for selected servers
- Archive Actions section spec in ui-information-architecture.md
- Add tests: normalizeComponentType aliases, componentTypeTitle aliases,
  FlattenHardwareComponents canonical type keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:34:22 +03:00
Mikhail Chusavitin
d5264dbf90 Block *.env from git, allow *.env.example
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 14:02:10 +03:00
Mikhail Chusavitin
0e72a1d284 Add production deployment: Dockerfile, docker-compose, deploy script
- Dockerfile: multi-stage build (golang:1.25-alpine → alpine:3.21), linux/amd64
- infra/mariadb: docker-compose + init SQL for reanimator DB/user
- infra/reanimator: docker-compose for reanimator-api (Gitea registry)
- deploy.sh: local build → push to git.mchus.pro → SSH deploy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 14:00:54 +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
abb3f10f3c Add UI enhancements: charts, firmware summary, uninstalled components, source chips
- Dashboard: line charts (assets over time, components total + uninstalled)
  with filled areas, shared x-axis (Mon YYYY), auto-formatted y-labels (1k/1M)
  and global start date derived from earliest FirstSeenAt across components
- /ui/ingest/history: source type chips (Ingest / CSV Import / Manual / System)
- /ui/component/models: firmware version count column, column filters,
  sortable headers, vendor distribution pie chart
- /ui/component/{vendor}/{model}: firmware version summary table with
  per-version healthy/unknown/failed counts, failed rows highlighted
- /ui/component/uninstalled: new page + nav item; components not installed
  on any server, two-level grouping by vendor then model (collapsed by default)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 21:41:48 +03:00
cad028efaf Update bible paths kit/ → rules/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:57:49 +03:00
c5d253a9df Add shared bible submodule, rename local bible to bible-local
- Add bible.git as submodule at bible/
- Rename bible/ → bible-local/ (project-specific architecture)
- Update CLAUDE.md to reference both bible/ and bible-local/
- Add AGENTS.md for Codex with same structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:37:10 +03:00
09593019b1 Fix recompute conflict and refine timeline event modal 2026-03-01 15:28:19 +03:00
32d6a6e2ad Revert "Integrate ui-design-code via submodule and runtime assets"
This reverts commit 4040333a19.
2026-03-01 10:38:14 +03:00
1be8ee26b3 Revert "chore: update ui-design-code submodule"
This reverts commit c805daabcf.
2026-03-01 10:38:14 +03:00
229db81229 feat: improve timeline/admin flows and ingest projection repairs 2026-03-01 00:22:22 +03:00
c805daabcf chore: update ui-design-code submodule 2026-02-28 18:44:43 +03:00
4040333a19 Integrate ui-design-code via submodule and runtime assets 2026-02-28 18:12: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
4e8554f5f0 Add UI search page template 2026-02-22 21:20:38 +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
ca762a658b docs: introduce architecture bible and migrate README/claude knowledge 2026-02-21 20:37:10 +03:00
88503d2457 feat(timeline): fix chronology, status resolution, and component history UI v0.1.1 2026-02-16 23:17:22 +03:00
b799228960 docs(release): add v0.1.0 release notes v0.1.0 2026-02-15 23:27:32 +03:00
f9ff0e10ff Improve UI views for assets/components/failures and timeline details 2026-02-15 23:26:12 +03:00
929bf9c524 ingest: add status history support and drop status_at_collection 2026-02-15 22:53:15 +03:00
2df69a114f fix(ui): restore original color palette and theme 2026-02-15 22:26:30 +03:00
3bb437a577 fix(migrations): make 0016 legacy removal idempotent 2026-02-15 22:23:34 +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
e6eca7cd50 Commit remaining workspace changes 2026-02-15 19:53:38 +03:00
fd149c3d64 Add LOT model mapping management, UI, and first-seen tracking 2026-02-15 19:51:04 +03:00
3ffdf9b0e1 Migrate ingest and API paths to string IDs 2026-02-14 20:10:23 +03:00
6df92b7a69 Update TODO.md with completed UI enhancements
- Add new section "Post-MVP UI Enhancements" with all completed tasks
- Update progress snapshot with current date and status
- Document date formatting, breadcrumbs, menu restructuring, and clickable rows

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14 08:47:03 +03:00
5f96ff2273 Add UI improvements: date formatting, breadcrumbs, clickable rows, and structured menu
- Format dates as YYYY-MM-DD with full timestamp on hover
- Add breadcrumb navigation with hospital icon (🏥) across all pages
- Restructure main menu with grouped dropdowns:
  * Hardware (Assets, Components)
  * Health (Tickets, Failures, Analytics)
  * Settings (Ingest)
- Make table rows clickable on Dashboard, Assets, and Components pages
- Add new Customers page with list view
- Improve dropdown menu stability with JS hover delay

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14 08:46:07 +03:00
849235be22 Add PCIe link width and speed fields to hardware ingest
Fixes 400 Bad Request error when ingesting hardware snapshots that include
PCIe link speed information (link_width, link_speed, max_link_width, max_link_speed).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-12 21:53:44 +03:00