SAVE-DATA-BLOB: import save payloads under the title's blob name #446
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!446
Loading…
Reference in a new issue
No description provided.
Delete branch "saves-blob-name"
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 successfully merged and closed
Claimed in the coordination issue as: SAVE-DATA-BLOB
What and why
saves.py importwrote the payload under the payload file name on a guess that the docs marked VERIFY. The executable settles the data-blob name statically:XGameSaveSubmitBlobWriteis called with"Save Game Header"first and"Save Game Data"with the payload, and the read path matches the same two names. A payload imported under any other name is never read back.This writes imported payloads as
Save Game Data(still %-encoded on disk by the existing layout) and updatesdocs/saves.mdto separate what was measured from what was not. Container names remain a guess because neitherCreateContainercall passes a literal;--mapstill overrides either name. No real save files, save contents, keys or game data are included.Tested
python -I tests/test_saves.py— 70 tests OK, 1 skippedpython -I tests/test_docs_links.py— 16 tests OKpython -I tests/test_docs_cli_flags.py— 4 tests OKpython -m compileall -q tools tests— OKgit diff --check— cleanGPUs tested: n/a (CPU-only tool and documentation change)
AI-assisted: yes
Checklist
mainand merges cleanly.tests/test_saves.pypasses with the PR on currentmain, and the existing same-container/blob check still catches two slots mapped to one container now that every payload is namedSave Game Data. I couldn't check the executable measurement itself. One thing to settle before merge: the two texts disagree on whether the title needs the header.docs/saves.mdsays the read path "keeps the header only if its size is0x128" (optional), while the new comment aboveSAVE_DATA_BLOBsays the read path "also requires the 296-byteSave Game Headerblob". If it is required, an import without the header won't load in the title, which the doc should say plainly. If it isn't, the comment should drop "requires". AI-assisted review.Rebased on current main. Verified: test_saves.py 70 tests (1 skipped), docs CLI-flag tests 4/4, no-game-data check and patch security sweep clean.
#446 | head 95db9aa1413d190bbf7eb7da1e3c7f54defcf466 (merged cleanly with main adfb3821a2) |
python -I tests/test_saves.py -v+python -I tests/test_saves_import_args.py+python -I tests/test_leonida_saves.py+python -I tests/test_docs_cli_flags.py| red on main:FAILED (errors=1, skipped=3)(FileNotFoundErrorforlocal-user\SLOT3\Save%20Game%20Databecausesaves.import_savesdefaultedblobto the source payload filename instead of"Save Game Data") | green on PR+main:70 ran, OK (skipped=3)(test_saves.py),1 ran, OK(test_saves_import_args.py),15 ran, OK(test_leonida_saves.py),37 ran, OK (skipped=1)(test_save_keys.py), and4 ran, OK(test_docs_cli_flags.py) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesAudited
95db9aa141(tools/saves.py,tests/test_saves.py, anddocs/saves.md) on Windows 11, confirmingSAVE_DATA_BLOB = 'Save Game Data'writeslocal-user/<container>/Save%20Game%20Datamatchingxgameruntime_gamesave.cpppercent-encoding, keeps--mapcontainer/blob overrides and same-container collision detection intact, and passestests/test_docs_links.py,tests/test_docs_repo_paths.py,tests/test_docs_encoding.py,tests/test_ci_registration.py, andscripts/check_no_game_data.py. (Echoing the earlier review note: aligning the wording on whetherSave Game Headeris optional vs required betweendocs/saves.mdand theSAVE_DATA_BLOBcomment intools/saves.pywould make the contract completely unambiguous.)Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 53b77df14 : red 1 error (
ImportTest.test_import_layout_and_manifest) / green 70 OK.python -I tests/test_saves.pyfrom the repository root.ImportTest.test_import_layout_and_manifest:FileNotFoundErroron a tempSLOT3/Save%20Game%20Datapath.git merge --no-ffof this PR, no conflict): 70 run, OK, 1 skip.AtomicPackTest.test_destination_through_directory_junction_updates_the_targeton both sides ("Windows directory junction"), still skipped on macOS.Red = main + only the test files from this PR (
git checkout pr-446 -- tests/test_saves.py); green = main + the merged PR. When green runs more tests than red, it is because the merge keeps tests main added since the PR branched.AI-assisted: Claude Code (Claude Opus 5.5).
Merged after OreoFR's red/green check (check) (macOS 27.2.1, Apple M5, Python 3.12) and a local re-check here. Merged after local re-verification: this PR merged onto
main0efc2bd43 without conflict, and its test file(s) (tests/test_saves.py) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.