Skip to content

feat(schema): complete hardware tables with GPU identity, lookups, and slot links - #45

Open
AlbinoGeek wants to merge 1 commit into
mainfrom
feat/hardware-schema-38
Open

AlbinoGeek wants to merge 1 commit into
mainfrom
feat/hardware-schema-38

Conversation

@AlbinoGeek

Copy link
Copy Markdown
Member

Implements the schema asked for in #38 (and #17–#22), for @gissf1's review before it lands, per the approval requirement on #38.

Design choices where the issues were unsettled (newer issue wins):

  1. vram_type is an FK to a seeded vram_types table (per Tables are not defined properly and missing many fields. #38 and the Hardware tables disk persistence — analysis and layout #22 comment).
  2. Per-format TFLOPS columns dropped in favour of gpu_tflops (GPU × compute_formats × tflops_sources).
  3. PCI/TDP names follow Tables are not defined properly and missing many fields. #38: pci_subsystem_device_id, tdp_w.
  4. lane_transfer_rate is a float (PCIe 1.0 is 2.5 GT/s).
  5. PCIe bandwidth uses published bidirectional figures (PCIe 4.0 x16 = 63.02 GB/s), per schema: implement interface_type lookup table with seed data #17's acceptance criteria.
  6. SXM/NVLink use per-GPU aggregate bandwidth (300/600/900 GB/s); Thunderbolt 10 GB/s; OCuLink carries PCIe 4.0 x4 values.
  7. USB4, eGPU and integrated seed rows dropped (not in schema: implement interface_type lookup table with seed data #17); an integrated GPU has a null native interface.
  8. New lookup tables use plural names, like model_architectures.
  9. schema_version_id on system_hardware left out, pending the UUID-migration design.

Validated by loading all of schema.sql in PGlite: seed counts correct, duplicate PCI identity and bad slot links rejected. gate green. No application code reads these tables yet (auto-detection per #18–#20 is not started).

Still open: the run_hardware_metrics fields at the end of #8 that #21 didn't cover.

Refs #38

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings September 23, 2026 07:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The unresolved critical GPU-history issue and two moderate compatibility/slot-link issues must be addressed.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

This pull request completes the hardware schema for GPU identity, lookup data, interconnects, TFLOPS provenance, and system-slot relationships.

Changes:

  • Adds lookup seed data for VRAM, architectures, compute formats, TFLOPS sources, and interfaces.
  • Expands hardware, GPU, system, slot-link, and run-metrics relationships.
  • Documents the schema additions in the changelog.
File Summary
schema/​seeds/​vram_types.json Seeds VRAM technologies.
schema/​seeds/​tflops_sources.json Seeds TFLOPS provenance sources.
schema/​seeds/​interface_types.json Seeds PCIe and interconnect types.
schema/​seeds/​gpu_architectures.json Seeds GPU architectures.
schema/​seeds/​compute_formats.json Seeds compute formats.
schema/​schema.sql Defines expanded hardware relationships. Findings: Moderate (3 votes): enforce paired nullability for slot-link identifiers. Critical (1 vote): preserve GPU identity for historical metrics. Moderate (2 votes): retain cpu_cores or update the collector and persistence contract.
CHANGELOG.md Documents the schema changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread schema/schema.sql
Comment on lines +617 to +618
FOREIGN KEY (system_hardware_id, slot_index)
REFERENCES system_gpu_link (system_hardware_id, slot_index)
Comment thread schema/schema.sql
Comment on lines +557 to +558
cpu_threads INT,
cpu_base_clock_mhz INT,
Comment thread schema/schema.sql
Comment on lines +611 to +612
system_hardware_id INT,
slot_index INT,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants