Repository navigation
machines: hardware inventory record — schema, template, collector, first record (amd) (#1094) - #2
Merged
Conversation
…rst record (amd) Implements developing-today/code#1094: a machines/ tree holding the inventory record JSON Schema (2020-12), the field template, a stdlib-only collector that fills a record end-to-end on the machine itself, and the first filled record (laptop amd, Framework Laptop 13) produced by running that collector. Unreadable fields are null with a named reason in the record unknowns array — no invented values. Validation: npx --yes ajv-cli validate --spec=draft2020 -s machines/inventory-record.schema.json -d machines/amd.json -> machines/amd.json valid
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed. Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements developing-today/code#1094 — the hardware inventory record (schema + template) for the basement-cluster program.
What
New top-level
machines/tree (placement rationale inmachines/README.md:devices/andcomponents/are per-device research dossiers and the rootVERIFICATION-*.mdfiles verify individual devices — a whole-machine inventory record is a different shape and gets its own tree):machines/inventory-record.schema.json— JSON Schema (2020-12) covering every field #1094 names: CPU, motherboard, RAM (slots/size/ECC + per-module detail), every drive (model, serial, capacity, SMART summary, firmware), NICs (model, speed, ports), GPU, BMC/KVM address, BIOS/BMC versions.machines/inventory-record-template.md— the human template: field checklist with sources, the JSON skeleton, and the one hard rule (never invent a value; unreadable ⇒null+ anunknownsentry with the reason).machines/collect-inventory.py— the collector: stdlib-only, run on the machine being inventoried; reads DMI sysfs,lscpu,/proc/meminfo,lsblk,ip link,lspci, and privileged sources viasudo -nonly (never prompts). Writes<hostname>.json+<hostname>.md.machines/amd.json/machines/amd.md— the filled example, produced by running the collector end-to-end on the laptopamd(Framework Laptop 13, Ryzen 7 7840U, Samsung 990 PRO 4TB — real read values).Honest unknowns in the example
The unprivileged run could not read: DMI machine serial (sysfs permission), memory slots/ECC/module detail and drive firmware/SMART (
dmidecode/smartctlneed root, no passwordless sudo), Wi-Fi link speed (not in sysfs), BMC (the machine has none). Each isnullwith its reason in the record'sunknownsarray; re-running the collector undersudofills the privileged ones in the same pass.Verification
amd— produced both example files (first run caught and fixed anlscpu -Jtraversal bug; CPU section fully populated on the re-run).npx --yes ajv-cli validate --spec=draft2020 -s machines/inventory-record.schema.json -d machines/amd.json→machines/amd.json validOut of scope per #1094: records for the basement core machines themselves (#1096/#1099, physical/KVM access) — they will land in this tree.
Refs developing-today/code#1094 (queue task 3002).
Need help on this PR? Tag
@codesmith-botwith what you need.