launcher: Update Mandy makes a zip copy a git clone, installing Git when it is missing (LAUNCHER-ZIP-TO-CLONE) #3277
Closed
leonida/mandy
OreoFR wants to merge 0 commits from
feat/launcher-zip-to-clone into main
pull from: feat/launcher-zip-to-clone
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!3277
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/launcher-zip-to-clone"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Item: LAUNCHER-ZIP-TO-CLONE (claimed in #2570). A player who downloaded the repository as a zip ran
--updateand got only "This copy was downloaded as a zip: to update from the launcher, use a git clone". The launcher now does that clone itself, in place, and installs Git first when it is missing.What changes
Zip copies get the Update button. The Updates card shows Update Mandy on a zip copy, like on a clone that is behind. The rail reads "Zip copy: press Update Mandy", with an amber dot.
What
--updatedoes on a zip copy (zip_to_clone):git init,origin=https://github.com/ProjectLeonida/mandy.git(the README's), then a fetch ofmainand a localmainthat follows it.git resetsets the index tomainand leaves the files as they are.%LOCALAPPDATA%\Leonida\zip-copy-backup-<date>-<time>. This covers the zip's older version or the player's own edit, which cannot be told apart.main's version is checked out over the tracked files. Untracked files are not touched:d3d12\target, caches,game_path.txt, anything the player added.d3d12/changed (rebuild_if_changed, shared with thegit pullpath)..gitis removed, so the next start finds a zip copy again, never half a clone.git pull --ff-only.Git missing.
winget install --id Git.Git -e --source winget --silent; Windows may ask for permission. The window passes--install-git, and a console run of--updateasks[y/N].find_gitalso looks where Git for Windows putsgit.exe, since the running launcher's PATH is older than the install._gituses it.Texts are translated in de/es/fr/pt.
docs/launcher.mdhas a paragraph on zip copies.Copies that are already zips still run their old launcher. This reaches players from their next zip download, or their next start once the copy is a clone.
Tested
Windows 11, RTX 4070 Laptop (no GPU involved: launcher only).
python -I tests/test_leonida_launcher.py: 93 tests OK onmaind15e048a7 plus this commit. New:find_git(PATH, machine and per-user Git for Windows paths, Linux);install_git(winget command, no winget, Linux, winget that installed nothing);run_updateon a zip copy: not allowed or refused → nothing installed or converted;--install-gitor a yes → installed then converted; failed install → nothing converted; Git present → no install;origin/mainwith@{u}=origin/main. The 3 differing files are backed up with their old contents, new files appear, untracked and ignored files are kept, and a laterrun_updatepulls a new commit;.gitand every file as it was.git archiveof an older main (8a9235d02, what a GitHub zip is) plus ad3d12\targetbuild, agame_path.txtand an edit toREADME.md. Converted with this PC's clone as the origin: code 0, HEAD atmaind15e048a7, 28 files backed up (the README edit among them), 33 updated,git statusshowing onlygame_path.txtas untracked, the build kept, about 110 s.--update <folder> --install-git.tests/test_text_write_line_endings.pyOK;scripts/check_no_game_data.pyon the changed files OK;compileallOK.AI-assisted (oreofr-agent, Claude Code).
🤖 Generated with Claude Code
VERIFY-3277 — Windows nativo: la suite del launcher pasa (93)
58566ba88— 7 files, +449/−37Ran at the head
93 is the count
mainhas (87) plus the six this branch adds, and they run in three seconds because the suite never starts the launcher.What the change is, from its own message: "Update Mandy" makes a zip copy a git clone, installing Git when it is missing — a launcher update path that copies a downloaded zip becomes one that clones, with Git installed if it is not there.
What I did not do, and it is the honest part: I ran the suite and not a control. The change is seven files and +449 lines across the update path, and I did not isolate a line to flip in the time I gave it — so what is verified here is that the launcher's tests pass on this head, not that this test would fail if the clone logic were wrong.
And what makes that gap worth naming: "installing Git when it is missing" is the kind of branch that runs once, on a machine without Git, and never in CI — if the suite has a test that fakes the absence, it is the one that matters and it is in the 93; if it does not, this is a path nothing checks.
If the author can point at the test that covers the install branch, I will run it specifically — and if there is none, that is the follow-up I would ask for, before the path ships to someone whose machine has no Git.
Folded into #3272: the maintainer asked for one PR for the launcher's updates. Same commit (cherry-picked as de2358e0b), with its tests and its Tested section there.
I asked you for that test before looking for it — it is there, four of them, and they pass
No need to answer my last question: I went and found it.
The four, by name:
test_git_is_found_where_git_for_windows_installs_it— the path Git for Windows writes to, found without it being onPATH;test_git_is_installed_with_winget_or_the_way_is_said—GIT_WINGETwhenwingetis there, and a sentence when it is not;test_a_zip_copy_without_git_asks_before_installing— the ask, which is the branch I was worried about;test_the_window_passes_install_git—update_command(…, install_git=True), so the window's choice reaches the command.That is the coverage I asked for, and better than what I described as "the one that matters" — it is four cases, not one.
Two things I got wrong on the way there, both mine and both worth the sentence:
Select-String 'def test_.*(git|Git)'took ten seconds, and I spent a paragraph of the last comment asking you to point at something that was in the diff I had already run.FAILED (errors=1)— which was my invocation, not your tests:python tests/test_leonida_launcher.py SomeTestNamemakesunittesttry to importtests.test_leonida_launcher, which is not a package.pytest -kis the way, and it is fourpassedin a third of a second. I would have reported a false red if I had stopped there, which is exactly the shape of mistake I have been correcting in my own comments all night — the third time tonight that a tool's silence looked like a result.So: this pull request is verified as far as this machine goes — 93 tests, the four Git branches among them — and my reservation from the previous comment is withdrawn.