fix(tools): bind cached installation to extraction mapping #1311
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1311
Loading…
Reference in a new issue
No description provided.
Delete branch "NitnekLeBorgne/Longshot-contributions:fix/tools-stamp-mapping-20261117"
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 and native Windows, game-free contributor-tool fixtures; no GPU/driver exercised · Needs: none
Why
Changing where the same downloaded archive is unpacked can leave an old tool installed. A matching archive digest alone does not mean the installed directory matches the requested prefix and destination.
Tracker searched again on 2026-11-17: no matching issue found in the returned issue corpus for
stamp_of,extraction mappingorcache stamp; this is an observational search, not a claim about hidden/deleted issues. No issue closure is claimed.How to reproduce
Seen on: Linux and native Windows, offline fixtures; GPU and driver not involved.
Settings and switches: Private synthetic fixtures; no game settings or GAME_PATHS inputs.
Steps: Use tests/test_tools_stamp_mapping.py with a local cached tiny archive. Install it, keep its SHA unchanged, then change prefix or an already-existing destination in the fixture lock and install again. Run
python -I -B -m unittest discover -s tests -p test_tools_stamp_mapping.pyagainst baseline production plus the added tests, then the combined candidate.Expected: A changed extraction mapping causes reinstallation; an identical complete stamp remains a no-op.
Actual: The SHA-only reuse check keeps stale content even though both CLI invocations exit 0.
What changed
Compare the complete serialized (sha256, prefix, dest) stamp before reuse. Preserve SHA/None for existing two-argument stamp_of callers and retain the legacy behavior for absent/blank stamps. The patch is limited to the following production/test pair, both Git mode
100644.scripts/tools.py— stamp_of() and install().tests/test_tools_stamp_mapping.py— supported failure and neighboring controls.Rebased onto main
544229a260c5f5008f241b9cf48ae6b01c1602b9. Test-only commit:9755194deb04603727ff643145f961ae5796d75d. Final fix head:66f3797003c9d726e05d436f76e354a37892aca2. Both changed files and Git modes are identical to the previously SPEC/QUALITY-reviewed source. Full tree/delta/parent-chain replay was independently verified; fresh normal qualification now uses this actual HEAD.Measurements
Nothing to measure: this is an offline contributor-tool correctness fix, not a gameplay, rendering or performance change.
Flags and settings
None
Testing
Tested: The retained Linux focused closure passed 35 unique methods (6 new mapping, 15 lock and 14 Linux-caller methods); the six new methods make 20 CLI calls, not 20 extra tests. The native Windows focused run passed all 6 new methods and 20 internal CLI calls, native exit 0, complete raw streams and Job final 0. It uses authored local
linux-x64archive data on Windows, not an installed Windows SDK. That native receipt was acquired at the original headf674c0a3f17625365e32b84fd185e87abdc63caf; the production/test bytes, modes and dependency closure used there are unchanged by this rebase. It is retained evidence, not a new Windows run.The actual offline regression is behavioral: baseline reuse returns exit 0 but keeps the wrong prefix/destination payload; final source installs the requested payload. Baseline Windows completed 6 methods with 5 failures and one unsupported baseline
stamp_of(full=True)TypeError; this is not a missing-dependency/setup RED. The original observer-aborted attempts are not counted as product results.Fresh normal Linux qualification on the pinned current base and actual rebased candidate used
python -I -B tests/run_all.py --jobs 2 --junit ..., identical interpreter/environment policy and real Git HEAD/index:544229a260c5f5008f241b9cf48ae6b01c1602b9: 721 checks, 571 PASS / 42 FAIL / 108 SKIP, native exit 1.66f3797003c9d726e05d436f76e354a37892aca2: 722 checks, 572 PASS / 42 FAIL / 108 SKIP, native exit 1.tests/test_tools_stamp_mapping.py. All 721 common statuses, skip reasons and complete failure payloads agree after narrowly recorded diagnostic-noise handling: owned source/run paths, source-proven temporary file/directory suffixes, unittest elapsed times, one GCC intermediate object and one synthetic-fixture backup directory. Assertion values, failure identities, symbols, numeric offsets and statuses are not normalized. The GCC/linker error still nameschoose_face,hos_options_file,.text+0xa1aand exit 1; a separate retained compiler/assembler/linker trace proves this toolchain's temporary-object provenance. No universal no-regressions claim.The 42 normal failures also observed on this current-main qualification are named here, as the template permits; the normal suite is not green:
tests/test_bug_report.pytests/test_bug_report_defaults.pytests/test_cpu_report.pytests/test_crash_groups.pytests/test_crt_options.pytests/test_damage_debug_menu.pytests/test_discover.pytests/test_display_startup_failure.pytests/test_dlss_feature_size.pytests/test_failed_compile_keeps_objects.pytests/test_framegen_preset.pytests/test_guest_imported.pytests/test_hardware_report.pytests/test_hud_layout_row.pytests/test_invalidate_vcore.pytests/test_lift_lookups.pytests/test_link_skip.pytests/test_linux_pressure.pytests/test_linux_update.pytests/test_longshot_saves.pytests/test_mirror_budget.pytests/test_missing_nup.pytests/test_mods_size_table.pytests/test_pending_guest_import.pytests/test_pipeline_play_cache.pytests/test_present_thread.pytests/test_profiling_mode.pytests/test_readback_timeout_source.pytests/test_renderer_new_handler.pytests/test_rumble_menu.pytests/test_run_all_changed.pytests/test_slow_frames.pytests/test_switch_table.pytests/test_target_image_pool.pytests/test_tested_configurations.pytests/test_upscaler_round_trip.pytests/test_upscaler_rows.pytests/test_vcore_escape.pytests/test_vk_occlusion_queries.pytests/test_vk_swapchain_compat.pytests/test_walk.pytests/test_walk_key.pyNot tested: Full Windows suite, real SDK/release installation, gameplay/GPU and a hosted-CI-equivalent checkout. These are not claimed, and no game/runtime files are changed. Hosted checks on the final public head are tracked separately; readiness is not maintainer approval or merge eligibility.
Must be tested: None additional for this two-file contributor-tool change. The normal-runner exception is explicitly limited to the named current-main failures above, with source-only context disclosed; it is not a waiver for a new candidate failure or an unknown comparison.
Risks
What could break: Tool reinstall decisions. Non-empty incomplete/corrupt/extra-field stamps intentionally reinstall; absent/blank stamps retain legacy behavior. Linux runtime SHA-only policy and pre-existing fetch/concurrency risks remain unchanged.
Turning it off: Revert the fix and its associated test commit.
Compatibility: No game runtime, saves, options, shader/pipeline cache or vk ABI changes; only the stated contributor-tool behavior changes. No GAME_PATHS directory is touched and no in-game run is claimed.
Checklist
The normal runner remains native exit 1; its named current-main failures use the template's explicit exception, not a full-suite PASS claim. Tracker search and the GPL-3.0-or-later diff/provenance check are complete. No incompatible dependency, third-party code, dump or decompiled/generated game content is introduced.
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.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.The retained RED uses identical baseline production and regression-test bytes; the rebased normal run verifies the final source on the current-base context. No host C/C++, shader, game switch or visible-game change applies.
f674c0a3f166f3797003Rebased onto main
544229a260c5f5008f241b9cf48ae6b01c1602b9, preserving both reviewed file bytes and modes. The new head is66f3797003c9d726e05d436f76e354a37892aca2. Fresh source-only Linux normal qualification is 572 PASS / 42 named FAIL / 108 SKIP versus current main 571 / 42 / 108; both native exit 1. The added mapping check passes and the common diagnostics match after documented temporary-path/timing handling, without hiding assertion values or linker symbols. The description now records all 42 baseline failures and the qualification limits. The earlier native Windows six-method proof applies to the unchanged production/test closure; no new SDK/game/full-CI result is claimed.WIP: fix(tools): bind cached installation to extraction mappingto fix(tools): bind cached installation to extraction mappingBrought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.