feat: align CPU providers with the WheelNext reference plugins - #10
Merged
Conversation
aarch64: replace the hardcoded arch=v8 property with real detection — the Armv8.x/v9.x version ladder is computed from HWCAP flags (golang.org/x/sys/cpu), emitted as version = 9.0a/8.5a/…/8a following the WheelNext provider-variant-aarch64 value scheme. Both CPU providers additionally emit one property per supported CPU flag (feature = "on"), with the feature vocabulary taken verbatim from the WheelNext reference plugins' all_features lists and detected by parsing /proc/cpuinfo (Linux; omitted elsewhere). Upstream's "btiecv" and "asimdrdmatomics" entries are concatenation typos and are carried as their separated archspec features. Breaking: the aarch64 namespace no longer emits arch=v8; images labeled with the old schema will not match. Claude-Session: https://claude.ai/code/session_01EPVqgoDSoJ5Xx3jZ6d1AbX
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.
Summary
Aligns the two CPU detection providers with the WheelNext / PEP 817 reference implementations (
wheelnext/provider-variant-x86-64,wheelnext/provider-variant-aarch64) so the emitted feature vocabulary matches them as closely as possible.arch = v8property with an Armv8.x/v9.x version ladder computed from HWCAP flags viagolang.org/x/sys/cpu, emitted asversion = 9.0a/8.5a/8.4a/…/8afollowing the WheelNext value scheme (v8.1 FEAT_LSE/RDM/CRC32, v8.2 FEAT_DPB, v8.3 FEAT_JSCVT/FCMA/LRCPC, v8.4 FEAT_DIT/FHM, v9.0 FEAT_SVE2; Armv9.0 compliance implies Armv8.5, so8.5ais emitted alongside9.0a).on(x86_64 :: sha_ni :: on,aarch64 :: sve2 :: on, …). The feature lists are taken verbatim from the reference plugins'all_features(56 x86 features, 43 aarch64 features), and detection parses/proc/cpuinfo(flags/Features) via a new shared helper inpkg/providers/cpuinfo.go. Host flags outside the reference list are ignored so the vocabulary stays identical to upstream. On non-Linux hosts only thelevel/versionladder is emitted, matching archspec's Linux-only feature detection."btiecv"and"asimdrdmatomics"entries are concatenation typos (dead entries that can never match); they are carried as their separated archspec featuresbti/ecvandasimdrdm/atomics.Breaking change
The
aarch64namespace no longer emitsarch = v8; images labeled with the old schema will not match. No in-repo fixtures, demo profiles, or e2e flows used the old schema.Test plan
go test ./...— new table-driven tests:TestSupportedVersions(version ladder incl. missing-prerequisite downgrade),TestParseCPUFlags(canned x86/arm64 cpuinfo,bugsline not misparsed),TestOnFeatures(reference-list intersection).go vet ./..., amd64 build + arm64 cross-build.variant detecton an amd64 host: emitslevel :: v4,v3,v2,v1plus 56 reference flags ason.https://claude.ai/code/session_01EPVqgoDSoJ5Xx3jZ6d1AbX