startup-runtime: first-run setup state is not persisted between runs #1200

Open
opened 2026-11-26 22:48:09 +00:00 by github-bot · 3 comments
Owner

@⁠denn0x on GitHub · 2026-11-24 03:29 UTC · original

Each startup run of a console executable repeats its first-run setup: five setup pages, a legal notices page and a terms page that needs two checkboxes and a confirmation. That adds about two minutes of input to every test run.

Observed (local build of the #1135 stand-ins, -StoragePath on a separate volume):

  • The executable writes its system settings file under the storage path's settings folder, and that file survives between runs.
  • The game-save service is created ("SGameSaveImpl Created" in the debug output), but the cloud-save folders under the storage path (cloudpers, cloudcache) stay empty. One NtCreateFile on the cloudpers folder fails with STATUS_OBJECT_NAME_COLLISION (0xc0000035).
  • So the first-run state (setup completed, terms accepted) most likely goes through the game-save API (XGameSave), and the stand-in does not keep what is written there.

Proposed: make the XGameSave stand-in persist containers and blobs under the storage path (one directory per container, one file per blob), and treat an existing directory as success when it is opened again.

Done when a source-built fixture writes a blob through the XGameSave stand-in, a second process reads the same bytes back, and a startup run started twice in a row skips first-run setup the second time.

AI-assisted (Claude Code).

**@⁠denn0x** on GitHub · 2026-11-24 03:29 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/1200) Each startup run of a console executable repeats its first-run setup: five setup pages, a legal notices page and a terms page that needs two checkboxes and a confirmation. That adds about two minutes of input to every test run. **Observed** (local build of the #1135 stand-ins, `-StoragePath` on a separate volume): - The executable writes its system settings file under the storage path's `settings` folder, and that file survives between runs. - The game-save service is created ("SGameSaveImpl Created" in the debug output), but the cloud-save folders under the storage path (`cloudpers`, `cloudcache`) stay empty. One `NtCreateFile` on the `cloudpers` folder fails with `STATUS_OBJECT_NAME_COLLISION` (0xc0000035). - So the first-run state (setup completed, terms accepted) most likely goes through the game-save API (XGameSave), and the stand-in does not keep what is written there. **Proposed:** make the XGameSave stand-in persist containers and blobs under the storage path (one directory per container, one file per blob), and treat an existing directory as success when it is opened again. **Done when** a source-built fixture writes a blob through the XGameSave stand-in, a second process reads the same bytes back, and a startup run started twice in a row skips first-run setup the second time. AI-assisted (Claude Code).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:48:09 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-24 05:06 UTC · original

Claiming this: I will make the XGameSave stand-in in src/startup_stubs/runtime_proxy.cpp keep containers and blobs under the storage path (one directory per container, one file per blob), with a source-built fixture that writes in one process and reads back in a second. I will not claim that this alone makes a startup run skip first-run setup: that is only checked if a fixture can show it. Draft PR to follow.

**@⁠tedin7** on GitHub · 2026-11-24 05:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/1200#issuecomment-7122624807) Claiming this: I will make the XGameSave stand-in in `src/startup_stubs/runtime_proxy.cpp` keep containers and blobs under the storage path (one directory per container, one file per blob), with a source-built fixture that writes in one process and reads back in a second. I will not claim that this alone makes a startup run skip first-run setup: that is only checked if a fixture can show it. Draft PR to follow.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-24 22:43 UTC · original

#1976 is on main at 454af100. Windows Release passed both the synthetic persistence and enumeration checks. Closing the final container handle now rejects a new update even while an earlier update pins the name. That earlier update still resolves its original container. Keep this issue open for the independent second-start result. Please record whether persisted setup is actually loaded and the first screen reached on the second run.

**@⁠R0Y00** on GitHub · 2026-11-24 22:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/1200#issuecomment-7146561798) #1976 is on main at 454af100. Windows Release passed both the synthetic persistence and enumeration checks. Closing the final container handle now rejects a new update even while an earlier update pins the name. That earlier update still resolves its original container. Keep this issue open for the independent second-start result. Please record whether persisted setup is actually loaded and the first screen reached on the second run.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-25 02:22 UTC · original

Synchronous discovery and readback landed in #2159 (815877da). Local Windows Release passed the two-process restart after both synchronous and async submit, and the locked publication case kept a coherent generation. The deliberately unlocked control caught a mixed generation. Keep this open for the actual second-start observation: whether persisted setup is consumed and which screen responds first.

ctest --preset release --no-tests=error -R '^startup_gamesave_read($|_after_async_submit$|_publish_(locked|unlocked)$)' --output-on-failure

**@⁠R0Y00** on GitHub · 2026-11-25 02:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/1200#issuecomment-7150640326) Synchronous discovery and readback landed in #2159 (815877da). Local Windows Release passed the two-process restart after both synchronous and async submit, and the locked publication case kept a coherent generation. The deliberately unlocked control caught a mixed generation. Keep this open for the actual second-start observation: whether persisted setup is consumed and which screen responds first. `ctest --preset release --no-tests=error -R '^startup_gamesave_read($|_after_async_submit$|_publish_(locked|unlocked)$)' --output-on-failure`
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#1200
No description provided.