Skip to content

packing/nup: preserve numeric version labels without control data - #3070

Closed
thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/nup-version-label
Closed

thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/nup-version-label

Conversation

@thehobbit85

Copy link
Copy Markdown
Contributor

What and why

Fixes #2902.

A NUP with no NACP and an unregistered main build discarded its numeric version label, leaving the derived build row and GetDisplayVersion as ?. Preserve the selected package's numeric label and use it after control metadata and an exact registered build version. The survey and app version use the same fallback.

The label must contain one to three ASCII numeric components, with an optional v, and fit the console's 15-byte version payload. Arbitrary text and invalid labels are ignored, stale sidecars are removed, and an update never inherits the base package's label. No game-specific patch is added.

This adapts Saqib Razaq's diagnosis and proposal in the issue, with bounded parsing and selected-package isolation. The durable finding is in the packing reference; the corresponding Mario Kart World note links it.

Checked

On Apple M2 Max, macOS 26.6 (25G5028f), arm64 Python 3.14.6:

  • Before the implementation, the new real-NUP extraction/derived-profile tests fail with four missing-sidecar errors and one incorrect ? result. Afterward, python3 -m unittest dm.tools.tests.test_nsp_nup dm.tools.tests.test_nsp_alias: 58 tests pass.
  • python3 -m unittest discover -s dm/tools/tests -p 'test_nsp_*.py': 444 tests pass, including survey, extraction reuse, derived profiles and Mac-app packing.
  • test_docs: 6 pass; test_lint_python passes. Symptom index regenerated; git diff --check clean.
  • Python lint is not globally green: unchanged main and this branch produce the identical 322 findings, including 22 beyond the committed baseline, all in existing boot_mac subprocess option typing. Comparison normalized line numbers; this change adds no finding.
  • The required full synthetic graphics run built and ran tests until the unchanged t_gl_imports test_lod_bias assertion at line 466 failed. No graphics implementation or test input used by that target differs from base d43d4355; this is an incomplete graphics-suite result, not a pass.
  • scripts/regress.py check --baseline d43d4355 --games 0400C3F00006E000,010015100B514000 cannot run: no configured regression root or local game builds. Mario Kart World exercises the reported unregistered NUP path; Wonder exercises the existing exact-build fallback. No gameplay, game shader rebuild, iOS runtime, or other-game regression is claimed.

Before publication I rechecked current main, all 2,064 open/draft/closed/merged PRs, and the issue timeline. Open #2879 corrects NUP metadata type numbering but does not preserve version labels; its changes are not included here. No existing PR was modified.

Docs

  • Updated the packing reference, Mario Kart World's “Found on this game” list, developer guide and script description.
  • No shader-chain change.
  • No game files, keys, extracted game data, plans or execution journals are included.

Fixes seedds#2902.

Co-authored-by: Saqib Razaq <232577050+saqibrazaq-dt@users.noreply.github.com>
@github-actions github-actions Bot added packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts) docs Documentation game: 0400C3F00006E000 A game profile labels Nov 20, 2026
seedds added a commit that referenced this pull request Nov 20, 2026
A NUP can carry a display version without carrying control data. Use
its selected package's numeric label in the survey, the derived profile,
and the app after the applicable control data and registered version.
Read the base NACP for the app even when only the update is extracted.
Keep Ocarina of Time's registered runtime row as it is.

Checked the real Mario Kart World 1.8.0 NUP and both version fields in
signed Mac app fixtures. Focused packing, unsigned IPA, and docs tests
passed. Python lint matches the findings on main.

Combines PR #2822 and PR #3070 and addresses issue #2902.

Co-authored-by: UserDerezzed <25561419+UserDerezzed@users.noreply.github.com>
Co-authored-by: Eliran Zach <4012041+thehobbit85@users.noreply.github.com>
Co-authored-by: Saqib Razaq <232577050+saqibrazaq-dt@users.noreply.github.com>
@seedds

seedds commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thanks for implementing and testing numeric label validation. The coordinated fix landed with #2822 in f3f73320. The survey, derived profile, and app now share one parser for the selected package’s label. I verified 1.8.0 from the local Mario Kart World NUP in the derived profile and in a signed Mac bundle fixture. No new gameplay run was needed for these checks.

@seedds seedds closed this Nov 20, 2026
@thehobbit85
thehobbit85 deleted the codex/nup-version-label branch November 25, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400C3F00006E000 A game profile packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NUP without a NACP: the game shows "version: ?" for a build the profile does not register (Mario Kart World 1.8.0)

2 participants