fix(builder): reject mixed runtime declarations in Windows packages #690
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!690
Loading…
Reference in a new issue
No description provided.
Delete branch "NitnekLeBorgne/Longshot-contributions:fix/windows-package-frameworks-e090-20261115"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: fix · Risk: low · Tested on: Linux full source-only parent/head runner; real native Windows release-layout package with real LLVM readers · Needs: normal end-user Windows startup acceptance
Why
The release ZIP checker can accept contradictory .NET metadata: both an included runtime and a shared-framework dependency, despite requiring a self-contained package. The existing portable-startup test checks publishing output, not rejection of malformed ZIP metadata.
Reference: dotnet/runtime v8.0.0
runtime_config_t::parse_opts. Presence offramework/frameworksconflicts withincludedFrameworks; empty arrays and null do not form a valid self-contained configuration. No .NET source copied.How to reproduce
Seen on: historical Linux/Python 3.12.3; no GPU/game.
Settings and switches: existing
--objdump/--readobjpath; LLVM output explicitly mocked in unit tests.Steps: run the new deterministic ZIP tests on original main
53f96d780588832401eadfc27c9cb41b2c2ae25c: required authored members,tfm: net8.0, included Microsoft.NETCore.App 8, plusframeworkorframeworks(including empty/null properties).Expected: reject mixed runtime declarations.
Actual: original checker returns 0. This is a historical synthetic reproduction, not a real Windows package.
What changed
Reject shared-framework properties in self-contained package metadata without changing valid packages or other checks.
scripts/check_windows_files.py: two-line property-presence rule before existing included-runtime checks; .NET version, WPF, target, version-copy, ZIP/PE checks unchanged.tests/test_windows_package_frameworks.py: nine standard-library methods, five mixed cases and four controls; real Python traversal with only external metadata-reader output mocked.Measurements
Verdict: No new failed check or lost pass in the exact parent/head source-only comparison; failure signatures and skip reasons match.
Hardware: recorded Linux x86-64 host, 6 logical CPUs, 8074 MiB RAM, GCC 13.3; no GPU/driver used.
Scene: game-free public fixtures, isolated HOME/XDG/TMP; no game or human saves.
Method: one full normal default runner per exact commit, comparing check identities/statuses, skips and failure signatures; not timing, repeated runs or a performance median.
How to reproduce:
python -I -B tests/run_all.py --jobs 3on the pinned parent and head in the table with the same recorded environment and public prerequisites; the omitted instruction file is addressed by the source-only supplement below.bbe6fdf231ef6bab2764Both full-runner exits are 1, not a fully green suite or hosted-CI result.
Existing main failures:
tests/test_appimage_player_build.py,tests/test_bake_portability.py,tests/test_crash_dialog.py,tests/test_env_on.py,tests/test_lift_cleanup_error.py,tests/test_make_game_cache.py,tests/test_missing_nup.py,tests/test_mods_size_table.py,tests/test_options_budget_once.py,tests/test_pipeline_tour.py,tests/test_readback_late.py,tests/test_vk_occlusion_queries.py,tests/test_vk_pgo.py,tests/test_walk_key.py.AGENTS.mdwas never materialized. Its public blob was supplied read-only in memory for two unchangedSwitchesRemovedmethods, passing on each commit. This is full-runner source-only qualification with that declared omission, not literal exact-tree/checkout or CI equivalence. The receipts retain complete stdout/stderr, unchanged source bytes/modes and empty owned process groups. None of these Linux checks was rerun for this description cleanup; the additional native Windows qualification is separate below.Historical focused regression evidence
Original executed baseline
53f96d780588832401eadfc27c9cb41b2c2ae25c; historical publication rebuilt one090cc48b63e2fb4e655133807903ac59149b723, with old published head81c2a6a969f964bde1b2ed71b3ac64a04e8e6e5a. Those original labels are preserved, not substituted for the current parent/head. The old baseline-to-rebuild delta was confined toassets/saves; ten inspected code/test/workflow/documentation inputs retained bytes/modes. That was bounded source-provenance carryover, not a native replay one090...; unrelated save objects were not test fixtures.Initial RED/GREEN and an independent historical Linux/Python 3.12.3 replay retain identical ZIP bytes: baseline five failed assertions + four passing controls in nine methods; candidate nine passes, no failures/errors. Existing
tests/test_windows_on_linux.py(six methods) andtests/test_recomplauncher_json.py(four) pass unchanged on both sides. Seventy-one source-read module checks pass per side, jobs=1, a selected partition rather than the full suite.Only external reader
run()is mocked; real Pythonmain()/files()/pe()traversal runs. ZIP executable members are non-executable authored placeholders and LLVM metadata is fixture text: this is admission-rule proof, not real PE, LLVM, .NET or Windows validation. Source/test/ZIP hashes and complete commands/streams are retained.New native Windows package qualification
Exact head:
ef6bab2764f293c9377675f85608c599c645fb7d. Windows 11 build 26300, x64; private .NET SDK 8.0.428. One native build of the real setup executable and self-containedwin-x64Builder, followed by the unchangedbuilder_package.py package/ziprelease-layout steps. Qualification package version:0.0.0; this is a private qualification build, not an official release or hosted-CI artifact. Optional third-party object acceleration was omitted.The unmodified checker ran against those actual PE/.NET ZIP members with real
llvm-objdump.exeandllvm-readobj.exe, not reader fixtures, and exited 0. Path-abbreviated command:8d3250e20c891fc39fe409b186d61704c277cffd4c5dd6e41e9adb6fc8b96e1d.462d706b864e69da17af3ff234bcd60870099bb5a92fada533d8c6d176d3f6b4.AGENTS.mdand used head/tree-only Git objects; this is not a complete-checkout or full-Windows-CI claim. Binaries and private build outputs are not committed or uploaded.This supplies the requested real-package/real-reader metadata evidence, separately from the still-unqualified end-user startup path. It is not a game, GPU, Vulkan, Wine or clean-machine runtime test.
Flags and settings
None
Testing
Tested: the full exact Linux parent/head runner in Measurements: 507 → 508 passes, 14 unchanged failures and 85 skips, both exits 1, no new failed check or lost pass, equal failure signatures and declared source-only supplement. Additionally, the exact head's real private native Windows release-layout package passed the unmodified checker with real LLVM readers, exit 0; its package hash and the enclosing controller's later failure are separated above. Historical synthetic/selected-partition receipts remain distinct.
Not tested: successful normal end-user Builder startup/install/build flow, a clean Windows machine without shared runtimes, a valid no-download Builder smoke, Wine, game/GPU behavior, complete Windows CI or later main. The real-package metadata pass does not establish those results.
Must be tested:
Review and overlap
HumanBean's review is
COMMENT, not approval: "Code review only; nothing was run." The new native qualification above supplies the requested checker run on this branch's real release-layout package with real LLVM readers, privately rather than as a hosted build-job result. It does not turn that review into approval or supply the remaining startup acceptance.#98 adds optional Authenticode handling in the same file but leaves this runtimeOptions block unchanged in the inspected diff. Combined Authenticode behavior is untested; no signing key or native signing tool was used.
Risks
What could break: contradictory shared-framework metadata now fails admission even if an included runtime is present; not general runtimeconfig schema validation.
Turning it off: revert.
Compatibility: no Builder/runtime, saves/options/caches, Vulkan ABI, release layout or external invocation changes; only public code/authored fixtures, no real package or binary committed.
Readiness provenance
Captured state: non-WIP / author-ready, not approved or merged. The real-package metadata check now has native evidence; normal Windows startup acceptance remains outstanding pre-merge evidence.
Head
ef6bab2764f293c9377675f85608c599c645fb7d; actual pinned parent/basebbe6fdf23170310117c714958248e60ec0686a62. The later input-snapshot main30cedbc5203bf5c6f79fbb58394d8d5634881e8fis distinct and is not qualified by these receipts. This update adds the native package qualification without a new rebase or Linux-suite rerun.Rebase credit: HumanBean: "No tests were run here; the test boxes stay yours." Rebase and subsequent author test evidence are separate. The rebase box records the main used then; a ticked full-runner box uses the template's named-baseline-failure allowance, not an all-green claim.
Checklist
Everyone
type(scope): description) of the status line's type.main. Pinned maintainer rebase only; actual parent and later unqualified main are distinguished under Readiness provenance.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.81c2a6a969ef6bab2764Rebased onto
main@bbe6fdf: no conflicts. No tests were run here; the test boxes stay yours.WIP: fix(builder): reject mixed runtime declarations in Windows packagesto fix(builder): reject mixed runtime declarations in Windows packagesCode review only; nothing was run.
The two-line rule in
scripts/check_windows_files.pyis correct."framework" in rc or "frameworks" in rcalso catches the empty-array and null cases the description names. A real self-contained publish writesincludedFrameworksand noframework, so valid packages are unaffected. The new check sits before the existing included-runtime checks, so a mixed config reports both problems and the existing diagnostics still fire.The tests are sound. Only
run()is mocked andmain(),files()andpe()really run. The five mixed cases and four controls match the description. Each assertion checks the exact problem count, so a message change can't pass by accident.problemsis module-level, butsetUploads a fresh module per test, so there is no leakage.Remaining points, neither blocking:
81c2a6a, and say the PR is blocked. The head is nowef6bab2, rebased on mainbbe6fdf. Please trim them sopr readysees one consistent state.Overlap: the description mentions an Authenticode PR (#98) touching the same file, but it leaves this block unchanged, so the order doesn't matter.
Real-package follow-up to the metadata-check request, at unchanged head
ef6bab2764f293c9377675f85608c599c645fb7d:On native Windows 11 build 26300/x64, private .NET SDK 8.0.428, I built the real setup executable and self-contained
win-x64Builder, then used the unchangedbuilder_package.py package/ziplayout steps. This is a private qualification package (version0.0.0, optional third-party object acceleration omitted), not an official release or hosted-CI artifact.The unmodified
scripts/check_windows_files.pyran on the actual ZIP's PE/.NET members with realllvm-objdump.exeandllvm-readobj.exe, and exited 0.8d3250e20c891fc39fe409b186d61704c277cffd4c5dd6e41e9adb6fc8b96e1d.462d706b864e69da17af3ff234bcd60870099bb5a92fada533d8c6d176d3f6b4.AGENTS.mdwas omitted; head/tree-only Git objects were used. No literal complete-checkout or Windows-CI equivalence is claimed, and private binaries remain private.Important boundary: the later native Builder CLI probe failed, so the enclosing controller exited 1, despite the earlier build/package/checker success. An empty built-game directory was correctly rejected by the native setup, but successful normal startup and a no-download Builder smoke are not established; the separately retained follow-up does not turn that controller into a pass.
The description now reports the real-package/real-reader evidence and that limitation directly, preserving the existing Linux baseline failures and leaving normal end-user startup acceptance as separate pre-merge evidence. This is not game/GPU, Vulkan, Wine or clean-machine runtime validation.
Code-only review of
ef6bab2764; informational findings, with final approval left to another reviewer.No new defect found in the checker change or its nine regression tests. The presence check rejects both shared-framework properties even when null or empty, and leaves the existing included-runtime checks intact. Removing that guard would make the five mixed-configuration tests fail; the valid-package control guards against rejecting all packages. I found no unexplained external effects in the new test.
The native Windows follow-up now reports the real-package/real-LLVM-reader pass requested in the earlier review, at this exact head. That addresses the earlier missing metadata-check evidence. It is distinct from the later failed CLI probe: the description still explicitly requires normal self-contained Builder startup acceptance on Windows before merge. This is the remaining declared validation gap, not an additional game/GPU test request or a demonstrated regression from these two lines.
I also checked the Authenticode PR overlap: its checker changes leave this runtime-options block untouched, so I found no source-level ordering dependency. Combined signing behavior was not validated here.
Read the complete diff, surrounding checker, tests, prior review and current evidence. No tests, builds, package launches or PR code were run.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.