fix(builder): fetch <tag> takes only the release it asked for #3034
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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!3034
Loading…
Reference in a new issue
No description provided.
Delete branch "PedroRossi/Longshot:fix/fetch-tag-is-the-one-asked"
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?
Summary
longshot-builder fetchof a tag, what the launcher runs to install a version, can install another release than theone asked for. When the tag isn't in the release list it read,
Forge::by_tag(builder/crates/release/src/forge.rs) asksthe forge for that tag by name and takes the answer as it comes: every later check, the release's signature and its
manifest, reads the answer's own tag. The signature says a release is Longshot's, not that it is the one asked for, so
an answer for v3.2.0 that carries the signed v3.1.0 installs v3.1.0 in v3.2.0's place, exit 0. Whatever answers in
the forge's place (a compromised account or server, or a proxy in front of it) could put players back on an older,
withdrawn or known-broken release without holding the signing key.
by_tagnow refuses an answer whose tag is not the one asked for (no_such_release, naming the tag that came back).How to see it on main: the new test's fake forge answers a tag with another signed release, and main installs it.
Read first:
Forge::by_tag.Testing
Tested: on this PC (Linux): the new test (
a_tag_asked_for_is_the_release_installed) fails on main, theother release installed, and passes here; the release crate's tests, clippy -D warnings, rustfmt. As
pr createasksfor a builder change: Debian 13, GeForce GTX 1660 SUPER, NVIDIA 550.163.01: the game built by a builder from main @
b40214d2with this change merged (with #3035), through the PC's job queue, played twice from the Market entrance repository save into play (after loading it shows a menu state first, as main @b40214d2does on this PC in 2 of 3 runs), then the control bridge's quit; exit 0. The release code this changes runs when a version is fetched, not in a build or the game.mise run test(--strict) on main @b40214d2, and on main with this change merged (with #3035, from the same audit), through the PC's job queue: 763 passed, 167 failed, 10 skipped both ways, so none fails only with it. The 167 are named at the end.Still to test:
None: no forge answers a tag with another release to try it on by hand; the test's fake one does.
Measurements
Nothing to measure: one comparison of two strings per fetch of a tag the release list lacks.
Risks
A forge answering a tag with the same release under another tag would now be refused; a fetch of a tag the release
list has never takes this path. A revert is enough.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.The 167 checks of
mise run testthat fail on main @b40214d2on this PC too, with or without this change99 need a tool this PC doesn't have on PATH (
--strictfails them):68 fail on main itself: test_astc_upload_chunking.py, test_async_astc_upload_chunks.py, test_bind_memo.py, test_blocks_at_start.py, test_bug_report.py, test_cloth_kernels.py, test_cloth_loops.py, test_cloth_sphere.py, test_cloth_step12.py, test_cloth_step8.py, test_cloth_step9.py, test_control_picture.py, test_crash_record.py, test_crt_options.py, test_dev_update.py, test_dlssg_pace.py, test_draw_stream_visibility.py, test_drawn_page_map.py, test_early_split_before_draw.py, test_flat_map.py, test_framegen_resources.py, test_fsr_image_retirement.py, test_fsr_uniform_ownership.py, test_game_boundary.py, test_guest_holes.py, test_image_reaper_threads.py, test_image_view_retry.py, test_import_reach.py, test_input_background.py, test_keyboard_option.py, test_late_fix_build.py, test_linux_pressure.py, test_loaded_modules_drop.py, test_log_levels.py, test_menu_keys.py, test_menu_save_atomic.py, test_mesh_first_types.py, test_mirror_bookkeeping.py, test_oot_occ_raster.py, test_option_ids.py, test_pass_barrier.py, test_perf_send.py, test_pipeline_tour.py, test_present_acquire_ahead.py, test_present_image_free.py, test_present_source_crop.py, test_program_cache_cleanup.py, test_program_cache_one_variant.py, test_readback_timeout_reuse.py, test_recorder_sync.py, test_recording_admission.py, test_report_words.py, test_screensaver.py, test_staging_burst.py, test_switch_table.py, test_target_retention.py, test_tex_desc_memo.py, test_thinlto_tls.py, test_ub_snapshot_default.py, test_ub_snapshot_gpu_writes.py, test_upscaler_round_trip.py, test_vk_wb_cpu_words_fast.py, test_vram_compact.py, test_wb_diff_stale_shadow.py, test_wb_pending_capture.py, test_windows_display_startup.py, test_windows_on_linux.py, test_wrote_regions.py
Found in an AI-assisted audit of the repository. The test, the fix, the runs and this description were made with Claude Code; I reviewed them.
Co-Authored-By: Claude Opus 5.5 [email protected]
🤖 Generated with Claude Code
Tested in game: Debian 13, GeForce GTX 1660 SUPER, NVIDIA 550.163.01: the game built by a builder from main @
b40214d2with this change merged, through the PC's job queue, played twice from the Market entrance repository save into play (after loading it shows a menu state first, as main @b40214d2does on this PC in 2 of 3 runs), then the control bridge's quit; exit 0. The release code this changes runs when a version is fetched, not in a build or the game.WIP: fix(builder): fetch <tag> takes only the release it asked forto fix(builder): fetch <tag> takes only the release it asked for@review
Recommendation: Approve. The tag check closes the reported substitution path, and the new test exercises it. CI is still running and must pass before merge. Nothing blocking is left. Recommend approval; not approved on the forge.
A fetch for a specific tag now refuses a forge response naming another release. The change adds one string comparison on the fallback lookup path.
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. The author reports that the fake-forge test installs the older signed release on base
b40214d2and returns no_such_release on this head.Other systems: The comparison is platform-independent and affects builder fetches on Windows and Linux. Release-list matches and channel fetches do not use the changed path; the signed manifest is still checked against the selected tag. The Rust CI check is pending.
Switches: None.
Reviewed:
acbbc4fcd6againstb40214d2bb: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, both changed files, and the relevant installation, manifest and version-selection paths. Skimmed the reported game and check runs. docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no commands from the project or tests were run. The author reports the release tests, clippy and rustfmt passed; CI remains in progress.
Overlaps and merge order: None identified from the supplied context; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.