Repository navigation
docs/saves.md: state the container-name rule the offline import warns about - #5329
evilclanker9000 wants to merge 1 commit into
Conversation
… about The merged d974c88 makes tools/saves.py import warn that a container name breaks XGameSaveCreateContainer's rule, but no page explained the rule or the --map fix. This is the rule the runtime shim enforces (runtime/shims/xgameruntime_gamesave.cpp:136, returned as E_GS_INVALID_CONTAINER_NAME at :428) and tools/saves.py repeats (valid_container_name at :484-493), and the case-insensitive container/blob check that stops an import before it writes.
kacper-serewis
left a comment
There was a problem hiding this comment.
AI-assisted independent review. At a0f4163, the new collision sentence overstates Windows protection. Importing distinct synthetic payloads to Same/blob and Same./blob warned about the trailing dot, exited 0 and left only one blob. The filesystem resolved both destinations to one file. Please limit the guarantee to encoded paths that are identical or differ only by case. The overwrite predates this docs change. The documented grammar matched the Python and compiled native validators on 14 controls, including the 256/257 length boundary.
Kam471
left a comment
There was a problem hiding this comment.
Head a0f4163b4.
python -I tests/test_docs_links.py -> Ran 6 tests, OK
python -I tests/test_docs_table_rows.py -> Ran 2 tests, OK
tests/test_docs_*.py (all) -> OK
python -I tests/test_saves.py -> Ran 61 tests, OK (skipped=3)
git diff --check -> clean
Every reference in the new paragraph checks out: valid_container_name() at runtime/shims/xgameruntime_gamesave.cpp:136 with kMaxContainerName = 256 (:92), E_GS_INVALID_CONTAINER_NAME at :428 and :616/:635/:674; tools/saves.py rule at :484-493, warning at :555-557, case-insensitive duplicate stop at :558-561; the rule test at tests/test_saves.py:574. enumerate_containers/list_containers do not filter by name, so "the runtime lists any folder but the game cannot open such a name" is accurate.
The paragraph sits in Importing into the runtime before "Key names" and points at --map, which is what the warning already suggests. No code change.
Verdict: good.
|
Read a0f4163: pass with notes
Read: No new defect beyond kacper-serewis's trailing-dot collision. Two notes:
AI-assisted (Claude Code). Generated by Claude Code |
The merged d974c88 makes
tools/saves.py importwarn that a container name breaksXGameSaveCreateContainer's rule (tools/saves.py:555-557), butdocs/saves.mdnever said what the rule is or how to fix a name, so the warning pointed at nothing a user could look up. This adds one paragraph to Importing into the runtime, after the existing VERIFY note.Every claim in it is the code path that enforces it:
[A-Za-z0-9_/]up to the last/, then a non-empty file part of[A-Za-z0-9_.-]without a trailing.and without..:valid_container_name()inruntime/shims/xgameruntime_gamesave.cpp:136-150, which returnsE_GS_INVALID_CONTAINER_NAMEat:428, and the same check intools/saves.py:484-493;--mapgives the container another name:tools/saves.py:555-557;tools/saves.py:558-561;tests/test_saves.py:574(test_container_names_follow_the_runtime_rule) already holds the rule againstvalid_container_name().ID: EGEN-SAVES-CONTAINER-RULE (DeepSeek2)
Test
Docs only; the source lines above are the check. Documentation tests that read this page:
No GPU needed; no game files.
Notes
python -I tests/test_saves.pyon this machine reports 2 failures onupstream/mainbefore this change too:AtomicPackTest.test_destination_symlinks_update_the_target_and_remain_linkscomparesos.readlink's\\?\C:\...spelling with a plain path. That is the Windows symlink comparison already carried by tests: test_saves compares a symlink with what it stored, so it passes on Windows #3983 (a tests PR), so I left it alone and did not touch test code here.kMaxBlobName), which this PR does not document: the import does not warn about it, so it would be a second, separate change.AI-assisted.