Repository navigation
spec: hardware preflight, so a route refuses a machine it would brick - #46
Conversation
…brick Before the first hop, `wend preflight ROUTE` checks the machine can land on every release the route boots it into: the CPU's x86-64 level (from CPUID), firmware, memory, free disk, and whether each release's kernel drives the disk controllers and network cards in use. It names the furthest release the machine can land on, says how to raise a VM's CPU model, and touches nothing. Adapters get a required [hardware] table. Each booted release pins a driver table built by tools/hwdata.py from the release's own kernel package (19 tables). The checker rules are in tools/check.py and the client, and client/parity.py holds them to the same verdicts. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016DvvXoaaXH9jh74yrx4Nbb Signed-off-by: Peter Permenter <[email protected]>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc9db7186e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…eneric IDE aliases don't count (review) - Fibre Channel (0x0c04) and I2O (0x0e) controllers hold disks and InfiniBand (0x0c06) carries the network: a SAN-booted EL7 box with an Emulex card EL9 dropped now stops at centos7 instead of passing. - A facts file must carry every field `wend facts` writes; a missing one is refused, never judged ok (Codex). - ata_generic's, ide_pci_generic's and pata_acpi's class-wide IDE aliases count only for a device they drive now. - MemTotal gets 10% slack: a 2 GiB VM shows ~1987 MiB. - hwdata keeps built-in drivers by name (modules.builtin.modinfo has no device tables) and only lists built-in aliases of drivers under the storage and network directories. - check.py: a non-table hardware or a non-list ladder is an error, not a traceback. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016DvvXoaaXH9jh74yrx4Nbb Signed-off-by: Peter Permenter <[email protected]>
… by ID; facts name the module (review) - Linux 6.12+ (resolute, alma10) records built-in drivers' device tables; matching ata_piix by name there let an ID the kernel dropped through. By-name now applies only when the table holds no pattern for that module. - Facts record the device's module (driver/module) as well as its driver: lenny's ide_pci_generic registers as PCI_IDE, megaraid_mbox as megaraid. - A hand-written uppercase class is lowercased before it's judged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016DvvXoaaXH9jh74yrx4Nbb Signed-off-by: Peter Permenter <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d965a0fd4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…`wend facts` writes (Codex) A class like 0xGGGGGG passed the shape check and was then skipped as an unrelated device; now it, and any modalias not in the kernel's pci:v..d..sv..sd..bc..sc..i.. form, makes the facts file refused. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016DvvXoaaXH9jh74yrx4Nbb Signed-off-by: Peter Permenter <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016DvvXoaaXH9jh74yrx4Nbb Signed-off-by: Peter Permenter <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 912aaf96b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016DvvXoaaXH9jh74yrx4Nbb Signed-off-by: Peter Permenter <[email protected]>
…rt and refuses it trusty-web, trusty-db and trusty-web-updated passed trusty -> resolute on OVMF without Secure Boot (tools/vm.py --uefi), rebooting onto UEFI at every hop with network and checks kept. adapters/ubuntu.toml's [hardware].boot is now ["bios", "uefi"]; Debian and EL stay BIOS (etch and CentOS 5 can't install or boot on x86-64 UEFI; the CentOS 7 route waits on #75). Facts (schema wend.hardware/3) report boot as bios, uefi, or uefi-secureboot when the firmware's SecureBoot variable says on or can't be read (efivarfs or the older sysfs vars): a Secure Boot chain is its own claim, so no adapter names it and preflight refuses it on every route. Both checkers accept the three values. On UEFI, vm.py records each hop's boot chain (efibootmgr -v and the hash of every .efi on the system partition). Refs #13, #46 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Peter Permenter <[email protected]>
Requested by Peter · project thread
What this adds
Spec change, not a route. Before: a route that passed on CI boxes would start walking any machine. A Core 2 box would get to hop 3 of CentOS 5 → Alma 10, boot EL9, and die on
Fatal glibc error: CPU does not support x86-64-v2. A box whose disk sits on a controller the new kernel dropped would come up with no root.After:
wend preflight ROUTEchecks the machine against every release the route boots it into. It names the furthest release the machine can land on, exits 1 if that isn't the end, and touches nothing. On a VM it says how to raise the CPU model.wend factsgathers the same data on one machine so it can be judged somewhere else (--facts FILE).How it works:
[hardware]adapter table.bootlists the firmware modes that have been proven. It is["bios"]everywhere, because the VM tier only boots guests by BIOS. Each release a route boots into getscpu,ram_mib(optional),disk_mibanddrivers.adapters/drivers/<family>/<release>.txt, 19 of them, each pinned by sha256 in its adapter.tools/hwdata.pybuilds each one from the release's own kernel package. The download is checked against the index, and thealias=pci:lines are read from every storage and network module's.modinfo. Vendor deprecation lists aren't used because they're wrong for rebuilds: AlmaLinux 9's kernel still drives the PERC 6 (SAS1078) and the SAS2008 HBAs that RHEL dropped in 8. The tables also found that RHEL 7 droppedsym53c8xx, the QEMU LSI disk the VM tier gives etch./proc/cpuinfo, because 2.6.18 doesn't name avx2. The check takes the XSAVE bit, not OSXSAVE, because the new kernel turns XSAVE on.tools/check.pyandclient/src/check.rs.client/parity.pyhas 15 new adapter cases and reports both checkers identical.tools/test_check.pyhas 4 new refusals.Numbers and sources:
x86_64_v2build is mentioned inhardware.alma10.note. No route uses that build yet, so a v2 machine lands on alma9.ram_mibis absent.disk_mibis an estimate (2 GiB, or 4 GiB for alma9/10), and the adapter comments say so./bootsize, out-of-tree drivers (ELRepo kmods, DKMS), and kernel flavour.Model
anthropic:claude-opus-5-5. The code and spec were written by hand. The tables are generated by
tools/hwdata.py.Evidence
python3 -B wend check:54 fixes, 3 routes, 6 boxes, 25 runs: okpython3 -B tools/test_check.py: exit 0, with every new hardware case refusedcargo fmt --check,cargo clippy --all-targets -D warningsandcargo test: 21 passed. Six of those are new preflight tests against the real atlas: a 2008 PowerEdge 2950 lands on centos7, qemu64 gets the VM hint, the LSI disk stops EL at centos6 but walks Debian to trixie, and UEFI, i686 and low RAM are refused.client/parity.py:132 checker cases (57 refused) ... identicalplanreplays nothing. The schema job judges with base tools and adapters, as for any spec PR.Self-review (AGENTS.md step 5)
🤖 Generated with Claude Code
https://claude.ai/code/session_016DvvXoaaXH9jh74yrx4Nbb
Generated by Claude Code