Skip to content

WIP: feat(packaging): ARM64 package classification batch — classifier + index snapshot (Refs #1127) - #1464

Merged
caomengxuan666 merged 1 commit into
mainfrom
fix/1127-p5a-arm64
Oct 31, 2026
Merged

caomengxuan666 merged 1 commit into
mainfrom
fix/1127-p5a-arm64

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Refs #1127 (P5, ARM64 package classification batch). Data/packaging only — no C++ changes, nothing user-visible, no i18n surface.

What this is

The P5 cascade (native → wpm-artifacts → x64-emulation marking) spans three repos; until now only tier 1 existed (wpm-source add-arm64.py fills windows-arm64 from upstream releases). This PR is the WinuxCmd-side half: the complete classification as data + the batch that applies it.

  • scripts/classify-arm64.py — classifies every package of a wpm-source index.json; default read-only (summary + classification JSON). --apply stamps the package-level marker arm64_emulation: true on x64-only packages and removes stale markers from packages that gained a native artifact. Write conventions mirror wpm-source's add-arm64.py (indent 2, LF, trailing blank line); idempotent.
  • packaging/arm64-classification.json — the batch's output on the live index (official-2026.10.28, 282 packages), byte-identical to a fresh run.

Classification result

  • native: 116 (115 with a windows-arm64 artifact incl. winuxcmd itself; git via alias_of: niugit)
  • x64-emulation: 166 — route wpm-artifacts: 26 (5 already self-hosted: awk/gawk/ncat/openssl/rust + 21 non-GitHub-release sources the fill pass cannot resolve); route upstream: 140 (pinned release ships no Windows arm64 asset)
  • index-only: 0

Marker rationale: arm64_emulation is the one fact not derivable from artifacts (an x64-only entry may be sanctioned-emulated or merely unclassified), so it is the only thing stamped. Client contract: ARM64 host + no windows-arm64 + marker → install x64 artifact and report it as emulated; no marker → today's metadata-only behaviour.

Key finding for the follow-up

The client currently has no fallback: artifact_for_current_arch (src/commands/wpm.cpp:2404) returns nothing for x64-only packages on ARM64 hosts, so 166 packages are uninstallable there today. Consuming the marker in wpm.cpp (fallback + emulated reporting in install/list/--json, i18n companion) is the specified follow-up — it needs the MSVC build + Windows ARM64 verification, so it is deliberately not in this PR.

Verification (local, Python-only)

py_compile clean; counts cross-checked against an independent pass over the same index; --apply on a scratch index changed exactly 166 packages, every diff the single added key, top level untouched, 0 CR; second --apply no-op; planted stale marker on a native package removed; classification output byte-deterministic.

Full analysis + the precise remaining work for wpm-source (schema doc + apply), wpm-artifacts (26-package route queue, -win-arm64.zip convention) and the client follow-up: cluster REPORT.md (workdir, available on request) — happy to paste it into the issue if preferred.

@caomengxuan666
caomengxuan666 marked this pull request as ready for review October 31, 2026 18:44
@caomengxuan666
caomengxuan666 merged commit 4728cfc into main Oct 31, 2026
8 of 9 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/1127-p5a-arm64 branch November 2, 2026 01:12
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.

1 participant