Skip to content

Keep each local user’s game saves separate - #945

Closed
thehobbit85 wants to merge 3 commits into
seedds:mainfrom
thehobbit85:codex/local-user-saves
Closed

thehobbit85 wants to merge 3 commits into
seedds:mainfrom
thehobbit85:codex/local-user-saves

Conversation

@thehobbit85

@thehobbit85 thehobbit85 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Stable local users, per-account transactional saves and configurable save libraries remain distinct from main. The game's requested UID selects each account save. The original account and shared device data retain cloud synchronization; other account saves remain local.

Conflict refresh — 2026-11-14 UTC

Rebased 492d05adbdfc556d54fd50431cf97e501f59ca6a onto de2018e0100e75e782464a830250800bdfebb219 as 9b7626a56f35caefccfc3a1c0db7daaccb3c764d, preserving both existing feature commits and adding focused rename coverage. Main now rejects renames across mount names with Horizon's ResultRenameToOtherFileSystem, including names that alias one transaction. Its complete rename implementation and metadata-failure poisoning are retained byte-for-byte, superseding the feature's older narrower transaction check. The new account fixture verifies the exact refusal result for different accounts and same-account aliases, unchanged file contents, and a successful rename within one mount. Main's new Mii system-data fixture links the local-user dependency it now needs through the combined filesystem.

The read-only account identity/name-release fix, existing open-handle validity, account isolation, shared device saves, interrupted-pull recovery/unsafe-mount stop and successful-reconciliation receipt remain intact. Main's directory-read error handling, SDK filesystem routing, Mii archive handling and newer packing inputs are retained. The selected save folder is still prepared before the Mac/iOS cloud comparison, including the Mac hidden-window path. Generated docs and full remaining/range diffs were reviewed; no agent artifacts or run journals were added to repository documentation. Original commit context and historical limits are preserved below.

Fresh validation

On 9b7626a56f35caefccfc3a1c0db7daaccb3c764d, Apple Silicon with Xcode 27.2 / Apple clang 21.0.0, all 101 focused Python checks passed: local users/save roots, Mac packaging, the shared Swift launcher storage/model, docs and environment switches. Pinned Ruff 0.17.2 and Pyright 1.1.414 passed at 321/321 findings with zero new/stale rows. LLVM 23.1.4 checked nine affected production/fixture translation units, including the new Mii fixture: five baseline findings and zero new/stale pairs. Seven affected C/Objective-C sources compiled for arm64 iPhone; all seven production iOS Swift sources passed type-checking. Local accounts and saves also passed ASan/UBSan with leak detection disabled.

The native campaign and Mac host build began on 687e159bda4f31fea35847ab90973b841445f9e1; 9b7626a56f35caefccfc3a1c0db7daaccb3c764d has its identical tree, with only a commit-body spelling correction. make -C dm/host -j2 GAME=010015100B514000 passed. Ten native fixtures passed: account/save hooks, 195 filesystem checks, 35 directory checks, 58 case checks, 98 commit-list checks both normally and with TSan, 112 sync checks, 209 metadata checks and nine Mii system-data checks. Main ancestry, exact source/tree identities, regenerated docs and git diff --check passed. Remote CI on this replacement head is pending verification.

Priority regression targets remain Hades (filesystem), Breath of the Wild and Tears of the Kingdom (account/filesystem), Pokémon Scarlet (filesystem startup), and Animal Crossing: New Horizons (shared device-only saves). Read-only harness discovery found no runnable Mac builds under either Games root, so no five-game comparison ran. No gameplay, physical save-picker, real-save migration, live iCloud, full graphics suite, device, signing or installation result is claimed. No extraction or game shader rebuild was performed. The feature changes no production graphics or shader-chain code.

Historical proposal, validation and original commit context

The previous description follows in full. Its results apply to the revisions it records.

Stable local users, per-account transactional saves and configurable save libraries remain distinct from main. The game-supplied UID determines each account store; the original account and shared device data retain the cloud archive, and other account stores remain local.

Conflict refresh — 2026-11-13 UTC

Rebased 563ecd7eee92a0433f1c2f052e38717505aab8eb onto 90b7cefd1d572ab05859c73930b436c4040cd25c as 492d05adbdfc556d54fd50431cf97e501f59ca6a on the existing branch. The combined implementation retains main's same-application read-only save support, SDK filesystem routing, interrupted-cloud-pull journal and unsafe-mount stop, cloud report and choice validation, no-overwrite sender, and isolated report fetches. The launcher's reconciliation receipt is still emitted only after successful reconciliation. Main's serialized first-mount result replaces the older equivalent once-only implementation so every later mount also receives an unsafe result.

The requested UID also selects read-only account saves. Integration review exposed that treating them as ordinary mounts could silently reuse another user's active mount name. They now have a distinct read-only save kind, retaining account identity and configured-user name release without cloning a transaction. A regression first reproduced that alias, then verified wrong-account active-name rejection, unmount/rebind to the other account, different file contents, rejected writes and continued validity of the first account's already-open file handle. The developer and frontend contracts describe this behavior.

Both launchers prepare the selected save library before main's cloud comparison; this includes the Mac's saved hidden-window path. A default DM_SAVE is not prematurely assigned before the folder picker. Current main's launcher report, all Swift sources, shared save model and new native test targets remain included. The original feature commit and corrective commit retain their rationale; the complete older description and original commit context follow below. Range-diff and the full remaining diff were reviewed, and the symptom index was regenerated.

Validation

The following fresh checks ran on 42dce2aac on main 48dca7a4ad146afc05a01cbd200387d8854ebea7, using Apple Silicon, Xcode 27.2 and its iPhone SDK. Final 492d05adbdfc556d54fd50431cf97e501f59ca6a is a patch-identical replay of both commits after main's shader-split/tool/docs update. All host, Mac, iOS source and native fixture blobs are identical; the shader-split change was checked separately on the final head.

  • make -C dm/host -j2 GAME=010015100B514000 linked the Mac host. Nine focused native account/save/filesystem targets passed: local accounts and saves, 164 filesystem checks, 19 directory checks, 58 case checks, 98 commit-list checks both plain and TSan, 112 save-sync checks and 209 metadata checks. Local accounts and saves also passed ASan/UBSan with leak detection disabled.
  • Seven affected C/Objective-C sources compiled for arm64 iPhone, and all seven production iOS Swift sources passed type-checking together. These are compile checks, without an installed app.
  • 137 focused Python checks passed across local users/save roots, Mac packaging, shared Swift launcher storage, docs/environment and chain/stamp/library inputs. Pinned Ruff 0.17.2 and Pyright 1.1.414 passed at 321 findings against 321 recorded. LLVM 23.1.4 checked nine affected translation units: 15 baseline findings, zero new or stale pairs. No suppression or increased baseline was added.

On final 492d05adbdfc556d54fd50431cf97e501f59ca6a, all 86 documentation, shared-DLC shader credit and incremental packaging checks passed. Ancestry, source identity, range-diff and git diff --check passed. Remote CI on this replacement head is pending verification.

Priority games remain Hades for filesystem calls, Breath of the Wild and Tears of the Kingdom for accounts/filesystem, Pokémon Scarlet for filesystem startup, and Animal Crossing: New Horizons for shared device-only saves. Earlier build discovery found no runnable builds of these titles. This refresh adds no gameplay, physical save-picker, real-save migration, live iCloud, signing, installation or device result. Historical campaigns below belong to their stated revisions. This feature changes no production graphics or shader-chain source.

Historical proposal, validation and original commit context

The previous description follows in full. Its results apply to the revisions it records.

Stable local accounts and configurable save libraries remain distinct from main. The game still chooses the UID for each account save mount, and the original account and shared device data retain their cloud archive.

Conflict refresh — 2026-11-10 UTC

Rebased 717285c4e6c42395abb8d423382d5a21a9c6bd41 onto bbea4c90f136f478e25228bc3d4ab33c77420f2e as 563ecd7eee92a0433f1c2f052e38717505aab8eb. The environment table retains main's NDVE and texture-copy settings alongside the local-user nickname rule. The cloud sender is byte-identical to main. Main's choice, archive hash, backup and overwrite rules are unchanged, with the launcher receipt added only after successful reconciliation. The save-sync source is byte-identical to the previous published feature. The symptom index was checked against the combined references.

Validation

  • make -C dm/host GAME=010015100B514000 linked the Mac host on Apple Silicon with Xcode 27.2. The iPhone SDK compiled 264 C, Objective-C and assembly files with zero failures. All production iOS Swift files passed arm64 type-checking. These were compile checks without an installed app.
  • Nine focused native targets passed. Local accounts and saves also passed ASan/UBSan. Filesystem coverage included 146 core, 19 directory and 51 case checks. Commit-list passed 98 both normally and under TSan. Cloud sync passed 84 checks and its metadata passed 41 using synthetic save trees.
  • All 94 focused Python tests passed, covering local users and save roots, Mac packaging, the iOS launcher model, docs and environment switches. LLVM 23.1.4 checked nine affected translation units with 14 baseline findings and zero new findings. Pinned Ruff 0.17.2 and Pyright 1.1.414 reported 339 findings against 336 recorded. The three excess diagnostics in dmsh_build.py match the exact-main result byte-for-byte. Ancestry, range-diff and git diff --check passed. Remote CI on this replacement head is pending verification.

Impact analysis identifies Hades for filesystem calls, Breath of the Wild and Tears of the Kingdom for account and filesystem calls, and Pokémon Scarlet for filesystem startup. Animal Crossing: New Horizons represents the device-save-only case. Neither configured Games root had a runnable Mac build, so gameplay, the physical save picker and live iCloud behavior remain unverified. The PR changes no production graphics or shader-chain code.

Historical proposal, validation and original commit context

The previous description follows in full. Its results apply to the revisions it records.

Stable local accounts and configurable save libraries remain distinct from main. The selected user and the UID passed by the game retain their separate roles, and each additional user's personal saves remain local.

Conflict refresh — 2026-11-09 UTC

Rebased 7282235bb9e1880af08d4122a64893ba6bd18ce2 onto main f7a545251ff67e1c05b62a585563298453d69ddb as 717285c4e6c42395abb8d423382d5a21a9c6bd41. The first conflict resolution on 413e8808e0799eab8730688f082835aeeaca84c5 was replayed unchanged when main advanced with two shader-chain fixes. The full feature diff is byte-identical across the two bases. Main's sender and its startup decisions for DM_SAVE_SYNC_CHOICE remain intact, including validation of the selected cloud hash, the no-overwrite check for a changed cloud archive this session has yet to reconcile and the default newer-save policy. The Mac launcher can recover pending commits after a crash only when the host reconciled the legacy or shared device archive and issued its receipt. An additional user's personal save mount, an unresolved conflict or an offline start does not issue that receipt. The host and native test Makefiles retain main's Bluetooth sources, frameworks, clock wait and pause targets alongside the local-account and save-library targets. The cloud-save settings explain the combined behavior.

Validation

On 717285c4e6c42395abb8d423382d5a21a9c6bd41, make -C dm/host GAME=010015100B514000 linked the Apple Silicon Mac host with the updated shader-chain header and 58 compiler warnings. The iPhone SDK compiled 264 C, Objective-C and assembly sources with zero failures. The regenerated documentation passed 11 checks. These runs used Xcode 27.2. Pinned Ruff 0.17.2 and Pyright 1.1.414 reported 339 findings against 336 recorded. The three unity_bucket.py diagnostics match the earlier exact-main result byte-for-byte, and that file and its lint baseline are unchanged by the two upstream commits. Ancestry, range-diff, byte-identical feature patch and git diff --check were verified. Remote CI on this replacement head is pending verification.

The focused tests below ran on 69c34b0b294bf4b5605cca5de8e9c75d462eb2a5 on the previous base. The first reviewed commit 32419597bb2afa4706d8442cddbd3f79dd5d8fc1 had that identical file tree and added the front-end contract line to the commit message. All host, launcher, save fixtures and selected clang-tidy inputs for these checks remain identical in the final integration.

  • Nine focused native targets passed. Local accounts and saves passed again with ASan/UBSan. Filesystem coverage included 146 core, 19 directory and 51 path-case checks. Commit-list passed 98 checks in both plain and TSan runs. Cloud-save sync passed 84 checks and metadata passed 41. The fixtures use synthetic save trees for local identities, the original archive, crash recovery, stale choices, offline reads and no-overwrite behavior.
  • 99 focused Python tests passed, covering local users and save roots, Mac packaging, the shared iOS launcher model, documentation and environment switches. The production iOS Swift source passed swiftc -typecheck for the arm64 iPhone SDK. LLVM 23.1.4 checked nine affected source and fixture units with 14 baseline findings and zero new findings.

Impact analysis identified Hades for filesystem save paths, Breath of the Wild and Tears of the Kingdom for account/FS calls and cache cohabitation, and Pokémon Scarlet for filesystem startup. Animal Crossing: New Horizons is the device-save-only case whose shared island layout must stay stable. Neither local Games root exposed a runnable Mac build to the regression harness. Gameplay, physical save-picker and live iCloud validation remain open. The PR changes no shader-chain or production graphics source.

Historical proposal, validation and original commit context

The previous description follows in full. Its results apply to the revisions it records.

Local-user rosters, account-specific transactional saves and configurable save libraries remain absent from main.

Conflict refresh — 2026-11-07

Rebased 387435aa769b74b83895ee155a405a48d950a78f onto main 01abf27977aa4a7366c4a14bc58d9eae75f1d8e6 as 7282235bb9e1880af08d4122a64893ba6bd18ce2. The host build keeps main's controller prompt header and this feature's local-user dependency. The filesystem uses one protected lookup to release add-on names and configured save names while retaining the image or transaction slot for open handles. Ordinary mounts remain permanent and the SDK still handles its own mounts outside the host locks. The reference documents both release paths.

Native checks on source-identical e7faa6d22796d5728734791eec10f6be9dd874d6 passed, including local accounts/saves, 146 filesystem checks covering add-on name reuse and SDK unmount, 19 directory checks, 98 TSan commit-list checks, 54 save-sync and 41 metadata checks. ASan/UBSan passed for the local-user and filesystem fixtures with leak detection disabled. All 106 focused Python packaging, Swift storage/model, docs and settings tests passed. Pinned Python lint matched 371 baseline findings with zero new or stale findings. The final documentation-only amendment passed the documentation suite and git diff --check. Historical LLVM and platform build evidence below belongs to the recorded revisions.

The affected paths are shared account selection and save transactions. Wonder, Breath of the Wild and Tears of the Kingdom represent NVN, Hades Vulkan and Balatro OpenGL. This refresh adds no game run, device or physical folder-picker result, or real-save migration result. Additional accounts remain local-only. The original account and shared device data retain their cloud behavior.

Historical proposal, validation and original commit context

The complete previous description follows with the validation and limitations of those revisions.

Stable local-user rosters, account-specific transactional saves and configurable save libraries remain absent from main.

Current conflict refresh — 2026-11-06

Rebased 73d3efced4881236a4f8b7261d6e6982d97bd73d onto pinned main b2d46b86d03f4b03afe11ea61c67cdf00d7a5345, producing 387435aa769b74b83895ee155a405a48d950a78f on the same canonical branch and existing PR destination. The sole conflict was the native test Makefile: main’s new event-descriptor target and this feature’s account/save dependencies are both retained. Range-diff changes are that dependency-list context only. Nine account/save/launcher/storage/fixture source blobs match the previous tested head, including the reduced Errno baseline and existing lint workflow integration.

Fresh checks on this exact head: native local-account/save fixtures, directory/cloud-sync checks (54 sync and 41 metadata checks), commit-list TSan (98 checks), local-user ASan/UBSan (ASAN_OPTIONS=detect_leaks=0) and main’s event-descriptor fixture passed. The focused Python packaging/storage/docs/settings suite ran 107 tests: 106 passed and one inherited shader-watch test errored. Current main’s SeenShaders.test_shader_watch_counts_the_list still calls the former multi-argument constructor, while its unchanged production script now uses ShaderWatch(path). Running the exact test source from pinned main against its identical script reproduced that error. This is not an all-pass result; no unrelated repair or weakened assertion is included. The pinned Python ratchet passes: 371 findings against 371 recorded, zero new or stale findings. git diff --check passes. Remote CI on this replacement head is pending verification.

No fresh gameplay, physical picker/device run, real-save migration, full host/iOS build, LLVM clang-tidy or shader/game regression campaign was performed. Historical compile/lint/runtime evidence below belongs to its recorded revisions; unchanged feature-source identities support reuse, rather than a new run claim. The changes can reach every game’s account/save paths: Wonder, Breath of the Wild and Tears of the Kingdom represent NVN, Hades Vulkan and Balatro OpenGL; none received a fresh game run in this scoped refresh. Additional users’ saves remain local-only and outside the original-account/shared-device cloud archive. Original commit context and unresolved limits remain below.

Historical proposal, validation and original commit context

The full previous description follows. Its earlier “current” sections are historical and do not replace the fresh results or limitations above.

Stable local-user rosters, account-specific transactional saves and configurable save libraries remain absent from main.

Current conflict refresh — 2026-11-05

Rebased released CI head 27539e1c6830333ae06aa1834695c3baa291cfde onto pinned main 865cc35fad7034d17c2190f8ce349f61f5bcaba1, producing 73d3efced4881236a4f8b7261d6e6982d97bd73d. The existing feature and its one-finding Errno baseline correction are retained. The sole conflict in docs/env_switches.tsv keeps main’s packed shader-library (.img) path semantics together with the local-user nickname contract. Auto-merged iOS startup retains DM_GUEST_FILE_DIR alongside local-save configuration. Range-diff changes are main context; no feature behavior or assertions were weakened.

Fresh local validation on this exact head: 107 focused local-user/save-root, native synthetic Mac packaging, Swift storage/model, docs/usage/settings tests passed. Native account/save, directory, cloud-sync/metadata and commit-list TSan checks passed; local-user ASan/UBSan checks passed. The scoped LLVM 23.1.4 check on eight account/save/launcher/fixture sources matched the reduced baseline, with zero new or stale file/check pairs. git diff --check passed.

The shared Python ratchet has an inherited failure: pinned main independently reproduces 390 findings versus 387 baseline, three excess reportIndexIssue findings in byte-identical dm/tools/tests/test_nso_match.py. This is not a lint pass; no unrelated source/baseline repair is included. Remote CI on this replacement head is pending verification.

No fresh gameplay, physical folder-picker/device run, real-save migration, full host/iOS build or shader/game regression campaign was performed. Prior compile and runtime evidence below belongs to its recorded revisions. Additional users’ personal saves remain outside the existing cloud archive; all existing limits remain open. Original commit context and prior body are preserved below as historical.

Historical proposal, validation and commit context

CI lint correction (2026-11-05): the save-mount changes remove one clang-analyzer-unix.Errno finding from dm/host/hle_fs.c, so the lint baseline now records one instead of two. The full LLVM 23.1.4 / Xcode 27.2 run checked 238 sources and matched the CI report exactly: 239 findings, zero counts above or below the reduced baseline, and no baseline growth over main f8a5618d. All 19 lint-tool tests passed. This correction changes only the baseline count; runtime code is unchanged, so no additional game regression run was needed. The feature validation and unresolved limitations below remain applicable. CI on the replacement commit is pending.

Main still lacks stable local-user rosters, account-specific save routing and configurable save libraries. The original account/device saves, explicit overrides, cloud exclusions and non-overwrite rules remain intact.

Current rebase — 2026-11-05

Rebased b8c870d3618de7c429412a8c607a34cf236fe265 onto fixed current main f8a5618d5f505a4c0a0bcac7c413872d3a53c009, producing f92c481c523eff5aaba2e31924950f5eeb0cdcd7 on the same existing canonical and PR branches. Main is an ancestor. This replays the existing feature commit; no new squash or unrelated prerequisite is included.

The sole conflict was the test Makefile’s dependency list. Both local-user linkage/prerequisites and current main’s OutputStream target were retained. Production account, filesystem, save-sync, migration and launcher source identities match the earlier tested feature; no behavior or assertion was weakened.

Fresh validation and limits

34 focused user/save-root/docs/Makefile tests passed. Fresh native local-account and local-save fixtures, filesystem, directory allocation, cloud sync/metadata, case lookup and commit-list checks passed; the commit-list target also passed TSan. Main’s newly added OutputStream test passed. Scoped LLVM 23.1.4 checked eight account/save/launcher/test sources against the current baseline with zero new or stale file/check pairs. Prior ASan/UBSan and complete host/iOS compile results remain historical, applicable only to their stated revisions and unchanged source identities.

The workflow-pinned Python ratchet (Ruff 0.17.2 / Pyright 1.1.414) passes: 389 findings against 389 recorded, zero new or stale findings. The former shared-main B023 issue is fixed on this base; references to it below are historical. No baseline was loosened. Generated documentation and git diff --check were reviewed. New remote CI is pending publication and is not claimed green.

No gameplay, real save migration, physical folder-picker or device validation was performed. Additional users’ account saves remain local-only; the cloud archive covers the original account and shared device data. Existing gameplay/runtime and platform limitations below remain open.

Historical proposal, validation and original commit context

The description below predates this rebase. Its commit identities, timing tables, tool environments and validation limits remain historical; they are not a current all-pass or fresh gameplay claim.

Two players starting the same title can use stable local identities and separate transactional saves. The Mac and iOS launchers can create, rename and select users and choose a save library. Existing original-account and console saves are carried forward; populated library destinations are not overwritten. Additional users' personal saves remain outside the existing cloud archive.

Current integration and checks

b8c870d3618de7c429412a8c607a34cf236fe265 is exactly one commit directly atop freshly fetched main 975bb4c14456d145eb3d969814534eecdd996ce9. The final tree equals the validated pre-squash tree 5df8e4bbcf563c0cd8df2b8d8ad31771882ef11f. The same existing PR remote and retained canonical branch are used.

Conflict resolution retains main's multi-program launch and settings selection, web-applet/notification dependencies, NULL-safe overlay reads, old save-name migration under its locks, and SDK-owned unmount delegation while preserving local-user isolation and save-library migration. A compile check caught the old dm_main_imports name; the integration now uses main's dm_game_imports, including NRO imports, and adapts the existing fixture. Independent source review found no remaining integration issue.

Fresh local validation on Apple silicon, macOS 26.6, Xcode 27.2 (27B52), iPhoneOS 27.2 SDK and native Python 3.14.6:

  • 107 Python tests pass across local users, save-root migration, native synthetic Mac app packaging, docs/usage/settings and production Swift storage/model behavior.
  • Native local-account and local-save fixtures pass; filesystem 138, case 51, commit-list 98, save-sync 54 and metadata 41 assertions pass. Local accounts/saves also pass ASan/UBSan. No timeout, assertion or baseline was weakened.
  • The arm64 TotK-profile host compiles/links with the combined source and frameworks (56 existing compiler warnings). All production iOS Swift sources compile into one unsigned arm64 iOS 26 object; changed Objective-C startup/front-end files compile with three existing UIScreen deprecation warnings. No device signing or installation. An initial partial Swift invocation omitted GameMenu/DmHostingController; the successful invocation used the complete source set.
  • LLVM 23.1.4 analysis of the eight changed account/filesystem/user/save/launcher sources and fixtures reports four existing findings, zero new or stale file/check pairs. Pinned Python lint still fails the unchanged main settings.py B023 loop-capture finding: 390 findings, 389 baseline, one new, zero stale. This is an unresolved shared-main limitation, not a passing full lint result.
  • git diff --check, one-parent/count/tree verification and documentation/artifact review pass. Original commit rationale and correction details are preserved below.

Commands: python3 -m unittest dm.tools.tests.test_local_users dm.tools.tests.test_local_save_root dm.tools.tests.test_nsp_mac_app dm.tools.tests.test_docs dm.tools.tests.test_usage dm.tools.tests.test_settings dm.ios.tests.test_launcher_storage; native targets local-users, save-sync, t_fs, t_fs_case, t_fs_commit_list with GAME=0100F2C0115B6000, plus SAN=-fsanitize=address,undefined -fno-omit-frame-pointer for local users/saves; lint_c.py compdb --game 0100F2C0115B6000 and scoped tidy.

Impact targets remain Hades, Breath of the Wild, Pokémon Scarlet and TotK for account/save/filesystem consumers, plus Paper Mario: The Thousand-Year Door for SDK-owned unmount. Fresh read-only discovery through the current regression harness found no usable Mac builds under the local Games directory, so no game/static comparison was run. Gameplay, physical picker/bookmark persistence, cloud-service interaction, production iOS runtime, and the existing SDK file-access limitation remain unverified/open. Earlier strict generic-filesystem leak findings below remain historical unresolved limitations.

Remote CI for this replacement head is pending Agent 3 verification; earlier checks do not validate it.

Prior proposal, integration and validation — historical

What and why

Two players starting the same title previously saw the same local account and wrote to the same save. The host now gives each account a stable ID and mounts the personal save for the ID the game requests. Console-wide data remains shared, including a device-only title's existing save.

The built Mac and iOS launchers can create, rename and select up to eight local users. A rename changes only the nickname. Rebuilding an app with the same title and data directory continues to use the original account ID and the existing save/ and, where present, save_device/. Additional accounts use separate sibling directories. Additional accounts' personal saves are outside the existing cloud archive.

Players can also pick one top-level save folder. A fresh per-title destination copies committed saves, including those of users no longer listed, and preserves guest filename metadata. Reopening a populated destination keeps its progress. Returning to the app default reopens the original files. An iOS reinstall that receives a new app container still requires restoring the old data or reselecting its external library.

External frontends can query, create and rename users through the packed Mac launcher's JSON commands, preselect an ID with DM_USER_ID, or request a save library with DM_SAVE_ROOT. Embedded launchers have the same operations through the C interface. Explicit DM_SAVE continues to take precedence.

The first three commits implement the feature in order. The first adds the account and save model and launcher selection. The second adds editing and management commands. The third adds save-folder selection and migration. During the original feature validation, each of those intermediate commits built the Mac host and passed its focused tests.

Current integration and validation

Revision 7704bd8222304c8d3e84bea8aa4456b0ecfe75f6 rebases published 12ca012b63aeced9f5ab2fe227473bca777dd300 onto fixed main bd98317eecfe832b40d401219c15207a398e78dd without conflicts. All seven commits remain, including local-user identity/save isolation, roster editing, save-library migration, SDK-owned unmount coverage, production-backed Duo harness dependencies and the event-base lint workflow fix. That workflow correction remains absent from main. Range-diff changes are upstream context around the new profile JPEG and screen-aspect documentation; the remaining patches are identical.

The new upstream account profile-image behavior and taller-picture layout are preserved. The local-user/save implementations and launcher settings/storage sources are byte-identical to the previously published head; current account/save fixtures, packaged apps and the newly built iOS harness exercise their integration with the new main.

Fresh validation on arm64 macOS 26.6, Xcode 27.2 and native Python 3.14.6:

  • All eight native account/save/filesystem/cloud fixtures passed with GAME=010015100B514000: local accounts and local saves, fs 120 checks, directory 19, case 51, commit-list 98, save-sync 54 and metadata 41. Local saves also passed strict leak-enabled ASan/UBSan; fs passed under the repository ASan/UBSan environment. The earlier stricter generic fs leak failure remains recorded below with its exact tested baseline; no new leak-clean result is claimed for fs.
  • All 99 focused documentation/local-user/save-root/settings/environment/packaged-Mac-launcher/Swift-storage/orientation tests passed. Shared-model cases retain live-setting persistence/default cleanup while the running user's save identity stays fixed.
  • The unsigned Duo harness build-for-testing succeeded for arm64 iOS Simulator with the new upstream layout code and production local-user/save-folder sources. No simulator test was executed. Physical Files-picker/bookmark behavior remains unverified.
  • The arm64 Tears of the Kingdom Mac host linked from the combined sources. libvpx/dav1d archives were reused only after complete source-tree identity with tested revision 6d3a068f was proved. The normal host build uses source-only shader libraries because the default Metal compiler is unavailable; this does not establish supported-compiler or GPU correctness.
  • Generated symptom documentation and git diff --check passed. Canonical player, frontend, settings, developer and services documentation remains with the behavior. Current shared-main lint and remote CI results are not claimed here; earlier results below retain their tested revisions.

Impact targets are Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom for recorded account/save/filesystem consumers, plus Paper Mario: The Thousand-Year Door for the SDK-owned unmount path. The explicit five-game static regress.py check --no-smoke stopped at discovery with exit 2: none of these Mac builds is present (only Z-A was found). This is incomplete game/static comparison coverage, not a pass. No gameplay, cloud-service operation, production iOS app/device validation or new shader comparison was performed. Secondary accounts' personal saves remain outside the legacy cloud archive, and the SDK file-access limitation stays open.

Earlier integration and validation — historical

Revision be5c179411306a85a5e52f40d76c70bd506157c0 rebases published head 635280c43203db9b0bcd3a9665e9fad2b6a69374 onto fixed main ad7af9cb34f5728bb0704c619ed12ebad9e6cf9a. The existing five commits are retained, followed by a focused iOS harness integration commit.

Four confirmed Git conflicts were resolved while preserving both features: the host Makefile retains upstream Home-button quit dependencies alongside local_users.h; the iOS bridge includes the in-game menu and local-user APIs; the launcher retains DmHostingController and gives the in-game menu the same settings model before the DM_LAUNCHER=0 path; the environment reference keeps DM_UPSCALER and the local-user switches. Save isolation, folder migration, cloud behavior and guarded SDK-owned unmount delegation remain intact. Range-diff changes in the original commits are this integration and upstream context; the SDK-unmount regression patch is identical.

The upstream Duo harness now compiles the shared settings model and root view controller. Its first link failed on the new local-user functions and dm_local_save_apply. The project now links their production implementations (local_users.m, local_save_root.m, LocalSaveFolder.swift), without replacement stubs. A shared-model regression checks that an in-game choice after guest start is applied and saved, returning to the default clears it, and the running user's save identity stays fixed. The harness README states its production-source dependencies.

Fresh local validation on arm64 macOS 26.6, Xcode 27.2 (iOS/Simulator SDK 27.2), Apple clang 21.0.0 and native Python 3.14.6:

  • make -C dm/host GAME=0100F43008C44000 -j3 built and linked the complete Mac host on the tested head using the supplemental Metal 32023.921.6 compiler. The project lock retains 32023.922.4.
  • make -C dm/host/tests -j2 GAME=010015100B514000 local-users build/t_fs build/t_fs_directory build/t_fs_case build/t_fs_commit_list build/t_save_sync build/t_save_sync_metadata, followed by the six built fixtures: all eight fixtures passed. Counts include fs 120, directory 19, case 51, commit-list 98, save-sync 54 and metadata 41; both local-account/save fixtures passed.
  • The focused Python command selecting docs, local users, local save roots, settings, launcher settings, environment switches, packed Mac apps, launcher storage and orientation policy passed 98 tests. After adding the cross-feature check, launcher/docs/orientation passed 13 tests; the final optional-safe assertion passed its launcher-storage rerun.
  • All production iOS Swift sources typechecked for arm64 iOS 26.0. xcodebuild build-for-testing -scheme DuoHarness -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO succeeded after the source-list fix, including its configured simulator architectures. This is an unsigned synthetic build, not simulator test execution or a production game app build. The initial Swift sandbox/plugin errors cleared when the same checks ran with compiler subprocess permissions; they were not source changes.
  • Local saves passed ASan/UBSan with detect_leaks=1 and halt-on-error. The generic filesystem fixture passed the repository's ASan/UBSan environment. An additional strict leak-enabled fs run failed on 668 bytes in eight img_open allocations; an independently compiled exact-main fixture failed with the same allocation sizes/counts, and romfs_image.h is byte-identical. That inherited stricter leak check remains a failure; no suppression or unrelated image-lifetime change was added.
  • Pinned LLVM 23.1.4 lint on account, fs, local-user/save-root, cloud sync and their two fixtures passed: four existing findings, zero new or stale file/check pairs against baseline 266. Python lint/type ratchet passed: 391 baseline findings, zero new or stale findings. git diff --check passed. No agent planning artifacts are added; canonical player, frontend, settings, service and developer documentation accompanies the behavior.

Runtime targets: fresh impact analysis names Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom for recorded account/save/filesystem consumers; Paper Mario: The Thousand-Year Door additionally covers the SDK-owned unmount path. regress.py check explicitly selecting these five stopped before translation with no Mac build of any selected title under the local games folder (only Z-A was discovered). Its exit 2 is incomplete runtime validation, not a pass. No new shader comparison, full graphics suite, gameplay, cloud-service result, physical folder-picker/device result or current-head CI result is claimed. Simulator execution is also unverified; this host reported an outdated CoreSimulator service during build discovery. Earlier validation below applies only to its named revisions.

Earlier integration and validation — historical

Revision 635280c43203db9b0bcd3a9665e9fad2b6a69374 rebases the four local-user/save feature commits onto main 73f4a48b3bb7422670e798ce3e55c649f952dc76.

The real conflict in hle_fs.c preserves both behaviors: configured users can release a save mount name without losing open-handle or alias ownership, while SDK-owned mounts retain upstream's guarded SDK IsMounted/Unmount delegation. Other host mounts remain permanent. SDK calls happen after the host path lock is released. The canonical services reference now describes the distinction, retaining the unresolved SDK file-access limitation. Existing user/frontend/developer documentation stays with the feature.

Fresh validation of this candidate on arm64 macOS 26.6, Xcode 27.0, Apple clang 21.0.0 and Python 3.14.6:

  • Eight native synthetic account/save/filesystem/cloud fixtures passed: local accounts and local saves; fs 120 checks; directory 19; case 51; commit-list 98; save-sync 54; sync metadata 41. The new configured-user regression covers SDK cache unmount alongside save-name release, permanent non-save host mounts and unlocked SDK callbacks. Existing alias/open-handle and legacy behavior cases still pass.
  • The local-saves and fs fixtures also passed ASan/UBSan, including all 120 fs checks, with halt-on-error enabled.
  • DM_GAME=010015100B514000 python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_local_users dm.tools.tests.test_local_save_root dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings dm.ios.tests.test_launcher_storage: 46 tests passed.
  • Pinned LLVM 23.1.4 lint on hle_fs.c and t_local_saves.c passes: four existing findings, zero new or stale file/check pairs against baseline 269; no baseline changes. Documentation index, ancestry and diff checks pass. Range-diff preserves the other three feature patches unchanged and records only the necessary semantic first-patch adaptation, focused regression and documentation update.

Runtime impact: Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom have recorded account/save/filesystem consumers. Paper Mario: The Thousand-Year Door directly exercises the SDK-owned mount path from #1012. These five remain runtime targets; 128 other profiles have no usage manifest. No game was run in this scoped candidate pass. The local fixtures use synthetic APFS data and do not establish gameplay, cloud-service behavior, physical-device folder access or iOS-device correctness. No new shader build/comparison, full graphics suite, full host build or CI result is claimed.

Earlier local validation on 0342343baeb5. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_local_users dm.tools.tests.test_local_save_root dm.tools.tests.test_env_switches dm.tools.tests.test_nsp_mac_app dm.ios.tests.test_launcher_storage. All 80 tests passed. The native local-users target passed the account and save fixtures. The NVN table fixture passed all 227 checks, covering both cases that failed at the earlier base. This integration used synthetic and packaged-app fixtures. Physical iOS picker behavior, a full current game run and the supported Metal compiler remain separate validation.

Author validation on earlier revisions

All eight GitHub checks passed on 46af5af0. The follow-up commit fixed the clang-tidy diagnostics in the save path, cloud initialization and test helpers. The LLVM 23.1.4 baseline fell from 271 findings to 269. C analyzer run · Build and test run

  • Upgrade from the old engine. Built separate executables against upstream 68a0ac67 and the candidate using the real guest account and filesystem functions. The old executable committed identifiable account and device data on APFS. The candidate read back the same bytes with the default configuration and after renaming the original account. A second UID opened an empty personal save and read the shared device data. A second run exercised the original device-only layout.
  • Host. The complete make -C dm/host/tests GAME=010015100B514000 run suite passed. New cases exercise two mounted accounts, close/reopen, aliasing, failed commits, unknown IDs, and cloud recovery on launcher exit. A secondary-only session leaves the legacy cloud archive alone.
  • Launchers, storage and documentation. 79 tests passed across test_nsp_mac_app, test_local_users, test_local_save_root, test_docs and test_env_switches. The native and packaged paths cover first create, ID-preserving rename, concurrent edits, relative manifest paths, external selection, importing a fresh library and reopening an existing one. The packaged app's storage test also verified that a second library copied newer progress from the first library and left the original app save untouched. The pinned Python lint/type ratchet reported zero new findings.
  • iOS. All 42 iOS tests passed. The iOS compiler checked 188 sources with zero failures, and the production project linked an unsigned app with synthetic resources. The Files picker, bookmark persistence and gameplay have not been exercised on a physical iPhone or iPad.
  • Game regression. Ran scripts/regress.py impact 68a0ac67..956a19d6 and the full scripts/regress.py check --games 0100F43008C44000. Pokémon Legends Z-A 2.0.2 (v393216, NVN) was the only local Mac build recognized by the harness. It has no committed smoke route. The other affected titles were unavailable for a local comparison. On Apple M2 Max, macOS 26.6 and Xcode 27.0, the harness stopped during baseline shader preparation because this Mac has Metal 32023.921 and the repository pins 32023.922. No candidate gameplay, FPS or timing comparison was obtained. Real-game validation with the pinned toolchain remains outstanding.
  • Graphics suite. make -C dm/gfx/tests GAME=010015100B514000 run stopped at two NVN2 version assertions in t_nvn. The candidate and unmodified PR base both returned API 231.39 where the test expects 231.30, and both failed the GPU code-range assertion (2 of 225 checks).

Docs

  • Updated the player and settings guides, the external frontend contract, docs/development.md and the environment-switch reference.
  • No shader chain changes, game files, keys or extracted data.

Verification of the queued lint job

At be5c1794, the full clang-tidy scan matched all 266 baseline findings, with zero file/check pairs above or below their counts. The job then compared that snapshot against a later main revision and reported false growth in t_movie_vpx.c (1 to 2).

This branch carries only the workflow and developer-guide commit f07d8b24 from #1060. Both lint jobs fetch the base SHA in the PR event. In a temporary Git repository with two successive base commits, running each workflow’s fetch command selected the event SHA after the branch advanced. Locally, the C comparison reproduced the reported failure against fd14f3bc and passed against the tested base ad7af9cb. Both C and Python rejected deliberately increased counts. All 40 tests in python3 -m unittest dm.tools.tests.test_lint_c dm.tools.tests.test_lint_python dm.tools.tests.test_docs passed on 12ca012b. This repair changes CI inputs and developer documentation only.

Original commit context and integration correction preserved through squash

These are historical messages with original author credit; their validation claims retain their original revisions.

Original 4a82e73aa1990dcc2407087e5c05d982f55b3ac5 — seedds [email protected]

Keep each local user’s game saves separate

Give the account service a stable roster and let the game and its launcher select users by ID. Route each account mount to its own transaction while preserving the original player's files and the title's shared device save. Only a host that reconciled a cloud save may ask its launcher to publish on exit.

Original 6054bcfb7cf02cccd70db9f636f792c28316c225 — seedds [email protected]

Create and rename local users in the game launcher

Let players manage a roster on Mac and iOS before starting the game. Renaming keeps the account ID and save directory. Merge edits under a shared file lock so that two launchers can add players without losing either change. Expose the same operations and JSON result on the packaged Mac launcher for external frontends.

Original 48ba1deb63f8d0af7d9970036d3881e04b5338f2 — seedds [email protected]

Choose a top-level folder for local game saves

Let each built launcher select a save library, with one directory per title and separate account saves inside it. Copy committed saves to a fresh destination before publishing it, and reopen existing progress without overwriting it. Keep the original single-user location as the default and honor explicit frontend launch overrides.

Original c731c6e3042b8958a185e5060cfb80c44a38f555 — seedds [email protected]

Check save paths and initialize cloud sync once

Use the ROM overlay and title path components that were validated, and
require a returned guest handle before the save tests use it. Run the
first cloud reconciliation with dispatch_once so concurrent mounts
still wait for it without holding a separate mutex across file I/O.

The pinned analyzer passes with two fewer baseline findings. Local
account, save transaction, cloud sync and launcher checks pass.

Original c93b7643f583588e993bb4759749e5e3bb768318 — seedds [email protected]

Test SDK unmounts alongside per-user save mounts

Original 3e795da72ec3fc1bbdd759943b9adb33e0cbddaf — seedds [email protected]

Keep the iOS harness linked to local user and save models

Original 7704bd8222304c8d3e84bea8aa4456b0ecfe75f6 — seedds [email protected]

ci: pin lint ratchets to the pull request event base

(cherry picked from commit f07d8b24dc01f460d672ad99ebf0be4948aedf18)

Original 326a681a — seedds [email protected]

Use current game import discovery for local device saves

Main renamed the import query to dm_game_imports and includes registered NRO modules. Preserve that broader decision when choosing a separate console save beside local accounts. Adapt the existing save fixture to the current API; retain all account, transaction and device-save assertions.
Published commit context before this rebase

Historical message from b8c870d3618de7c429412a8c607a34cf236fe265; any validation statements belong to that revision.

Support stable local accounts and configurable save libraries

Give each local account a stable identity and its own transactional save while preserving the original account and console-wide data. Add roster creation, renaming and selection to the Mac and iOS launchers and expose the operations to external front ends. Migrate committed saves into a selected library without overwriting existing progress, retaining explicit launch overrides and legacy cloud behavior.

Keep SDK-owned unmount delegation, current multi-program settings, NRO-aware import discovery and web-applet/notification integration. The PR description retains the original commit rationale and detailed validation, including unavailable gameplay and physical picker coverage.

@thehobbit85
thehobbit85 marked this pull request as ready for review November 2, 2026 08:41
@thehobbit85
thehobbit85 force-pushed the codex/local-user-saves branch 5 times, most recently from 9cd3abc to 6d48a00 Compare November 2, 2026 17:42
@thehobbit85
thehobbit85 force-pushed the codex/local-user-saves branch 2 times, most recently from 5d016ad to 635280c Compare November 3, 2026 03:12
@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers ios The iPhone and iPad app (dm/ios) mac The Mac front end and app (dm/mac, front_mac.m) tools Tools and scripts (dm/tools, scripts) docs Documentation labels Nov 3, 2026
@thehobbit85
thehobbit85 force-pushed the codex/local-user-saves branch from 635280c to be5c179 Compare November 3, 2026 19:18
@github-actions github-actions Bot added the ci Continuous integration and repository settings (.github) label Nov 3, 2026
@thehobbit85
thehobbit85 force-pushed the codex/local-user-saves branch 5 times, most recently from 27539e1 to 73d3efc Compare November 5, 2026 18:03
@thehobbit85
thehobbit85 force-pushed the codex/local-user-saves branch 5 times, most recently from 563ecd7 to 492d05a Compare November 13, 2026 06:17
Give each local account a stable identity and its own transactional save while preserving the original account and console-wide data. Add roster creation, renaming and selection to the Mac and iOS launchers and expose the operations to external front ends. Migrate committed saves into a selected library without overwriting existing progress, retaining explicit launch overrides and legacy cloud behavior.

Keep SDK-owned unmount delegation, current multi-program settings, NRO-aware import discovery and web-applet/notification integration. The PR description retains the original commit rationale and detailed validation, including unavailable gameplay and physical picker coverage.

Front-ends: Pass stable local IDs through DM_USER_ID and keep additional personal saves separate from the legacy and shared-device cloud archive. The roster, launcher commands and save paths are documented in docs/frontends.md.
Classify committed read-only account stores separately from ordinary host mounts. This rejects an active mount name reused for another account and lets configured-user unmount release the name without starting a transaction. Preserve existing file handles across reuse. The regression reproduces the old cross-account alias and checks both the new contents and old open handle.
Keep main's Horizon cross-filesystem Result even for two names that share one account transaction. Cover distinct account stores, same-account aliases and a successful same-mount rename, preserving their file contents.
@thehobbit85
thehobbit85 force-pushed the codex/local-user-saves branch from 492d05a to 9b7626a Compare November 14, 2026 16:38
@seedds

seedds commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Thanks. 9e6acda lands the account core: users are kept across runs, each user's saves stay separate, and the user is picked explicitly. What's still missing is the external user picker and per-session selection. That's better done as a fresh, smaller change on top of main than as a rebase of this one. Closing.

@seedds seedds closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration and repository settings (.github) docs Documentation host The Horizon host: SVCs, services, threads, memory (dm/host) ios The iPhone and iPad app (dm/ios) mac The Mac front end and app (dm/mac, front_mac.m) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants