fix(appcontent): track temporary storage mounts #1320

Merged
TibixDev merged 1 commit from upstream-pr/1320 into main 2026-10-08 11:31:45 +00:00
TibixDev commented 2026-10-07 23:32:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-07T23:32:16Z.


What

Track the /temp0 mount. Reject a second mount, preserve files on unmount, block new path lookups while unmounted, and restore access on remount. Initialization also blocks files left by a previous run. Format and space queries require an active mount.

Supersedes the sceAppContentTemporaryDataUnmount stubs in #407/#545 for this function. It does not replace the other work in those PRs.

Tested

Fedora 44, Release: app-content, working-directory, and directory tests. Covers remount, formatting, invalid arguments, unchanged output on failure, and neighboring paths. Contribution checks pass.

Open file handles remain usable after unmount. Console behavior for that case is unverified and documented in TechnicalDebt. Windows was not tested.

Checklist

  • Current main; related stubs and implementations checked.
  • One topic.
  • No new code comments.
  • Unsupported paths still throw; UI stubs are documented.
  • No notes, logs, or images in the repository.
  • No new third-party code.
  • General behavior.
  • Depends on: none.
  • AI-assisted: yes.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4779745869 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1320). Originally posted by [TibixDev](https://github.com/TibixDev) on 2026-10-07T23:32:16Z. --- ### What Track the `/temp0` mount. Reject a second mount, preserve files on unmount, block new path lookups while unmounted, and restore access on remount. Initialization also blocks files left by a previous run. Format and space queries require an active mount. Supersedes the `sceAppContentTemporaryDataUnmount` stubs in #407/#545 for this function. It does not replace the other work in those PRs. ### Tested Fedora 44, Release: app-content, working-directory, and directory tests. Covers remount, formatting, invalid arguments, unchanged output on failure, and neighboring paths. Contribution checks pass. Open file handles remain usable after unmount. Console behavior for that case is unverified and documented in TechnicalDebt. Windows was not tested. ### Checklist - [x] Current `main`; related stubs and implementations checked. - [x] One topic. - [x] No new code comments. - [x] Unsupported paths still throw; UI stubs are documented. - [x] No notes, logs, or images in the repository. - [x] No new third-party code. - [x] General behavior. - [x] Depends on: none. - [x] AI-assisted: yes.
TibixDev commented 2026-10-08 03:56:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T03:56:33Z.


Reproduced with Skyrim, PPSA03747, content version 01.001.010, on upstream a9ba39c927713cf294b8e1b7877ddb365d3a1d6f. Linux, GCC 16, Release build in Fedora 44.

A fresh relink with the default eager binding exits with code 127 before guest startup:

undefined symbol: bcolXMmp6qQ

This is the NID for sceAppContentTemporaryDataUnmount, imported by Skyrim. The function is absent from upstream. Applying only this PR clears that loader failure; startup then stops on the reachability-unregister import addressed by #1322. guest_appcontent passes on this upstream-based test branch.

This proves a missing-import startup blocker. It does not prove that Skyrim executes the unmount body before startup or establish console-equivalent mount semantics. This supplies the title evidence requested in #1299.

AI-assisted investigation and reply.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6051862920 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1320#issuecomment-6051862920). Originally posted by [TibixDev](https://github.com/TibixDev) on 2026-10-08T03:56:33Z. --- Reproduced with Skyrim, **PPSA03747**, content version **01.001.010**, on upstream `a9ba39c927713cf294b8e1b7877ddb365d3a1d6f`. Linux, GCC 16, Release build in Fedora 44. A fresh relink with the default eager binding exits with code 127 before guest startup: ```text undefined symbol: bcolXMmp6qQ ``` This is the NID for `sceAppContentTemporaryDataUnmount`, imported by Skyrim. The function is absent from upstream. Applying only this PR clears that loader failure; startup then stops on the reachability-unregister import addressed by #1322. `guest_appcontent` passes on this upstream-based test branch. This proves a missing-import startup blocker. It does not prove that Skyrim executes the unmount body before startup or establish console-equivalent mount semantics. This supplies the title evidence requested in #1299. AI-assisted investigation and reply.
github-actions[bot] commented 2026-10-08 05:11:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T05:11:08Z.


Progress report (b1c5f10 → 3355524)

➖ System libraries: 85.41% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceAppContent sceAppContentTemporaryDataUnmount
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6052779092 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1320#issuecomment-6052779092). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T05:11:08Z. --- <!-- progress-report --> ### Progress report (b1c5f10 → 3355524) ➖ **System libraries**: 85.41% (+0.0%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceAppContent | `sceAppContentTemporaryDataUnmount` | </details>
TibixDev commented 2026-10-08 05:23:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T05:23:16Z.


Rebased on 5850a6cd and resolved the documentation conflict. App-content, working-directory and directory tests pass on Fedora 44 Release. The implementation is unchanged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6052954516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1320#issuecomment-6052954516). Originally posted by [TibixDev](https://github.com/TibixDev) on 2026-10-08T05:23:16Z. --- Rebased on `5850a6cd` and resolved the documentation conflict. App-content, working-directory and directory tests pass on Fedora 44 Release. The implementation is unchanged.
TibixDev commented 2026-10-08 07:03:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T07:03:21Z.


Rebased on bc1fbe81. Preserved upstream app-content and filesystem changes; mount behavior is unchanged.

Fedora 44 Release: guest_appcontent_tests, guest_working_directory_tests, guest_directory_tests build; the targeted tests and contribution checks pass. Windows CI is pending.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6054450564 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1320#issuecomment-6054450564). Originally posted by [TibixDev](https://github.com/TibixDev) on 2026-10-08T07:03:21Z. --- Rebased on `bc1fbe81`. Preserved upstream app-content and filesystem changes; mount behavior is unchanged. Fedora 44 Release: `guest_appcontent_tests`, `guest_working_directory_tests`, `guest_directory_tests` build; the targeted tests and contribution checks pass. Windows CI is pending.
adriadam10 commented 2026-10-08 11:13:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T11:13:25Z.


Checked the error codes and the mount/unmount/format/space-query state machine against fpPS4 sys_path.pas (BUSY on a second mount, NOT_MOUNTED for format/space/unmount without a mount, PARAMETER for an unknown option): they match. guest_app_content fails without the change and the full ctest passes (442/442) on the rebase.

It conflicted with main only by adjacency (RecordWrittenPath/SyncWrittenPaths next to BlockPathAlias in General.hpp/.cpp, and Mount2 in Export.cpp). I rebased and kept both, including the RecordWrittenPath on directory creation. Merging once CI is green on the rebased head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6058617684 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1320#issuecomment-6058617684). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T11:13:25Z. --- Checked the error codes and the mount/unmount/format/space-query state machine against fpPS4 `sys_path.pas` (BUSY on a second mount, NOT_MOUNTED for format/space/unmount without a mount, PARAMETER for an unknown option): they match. `guest_app_content` fails without the change and the full ctest passes (442/442) on the rebase. It conflicted with main only by adjacency (`RecordWrittenPath`/`SyncWrittenPaths` next to `BlockPathAlias` in `General.hpp/.cpp`, and Mount2 in `Export.cpp`). I rebased and kept both, including the `RecordWrittenPath` on directory creation. Merging once CI is green on the rebased head.
github-actions[bot] commented 2026-10-08 11:29:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T11:29:29Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1524 docs/dev/TechnicalDebt.md L322
#1526 docs/dev/TechnicalDebt.md L322
#1535 docs/dev/TechnicalDebt.md L322
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6058872982 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1320#issuecomment-6058872982). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T11:29:29Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1524 | `docs/dev/TechnicalDebt.md` [L322](https://github.com/boykopovar/AnyPS5/blob/a983fb5df595b6e1e6c0a66751d76b1046fab174/docs/dev/TechnicalDebt.md#L322) | | | | #1526 | `docs/dev/TechnicalDebt.md` [L322](https://github.com/boykopovar/AnyPS5/blob/a983fb5df595b6e1e6c0a66751d76b1046fab174/docs/dev/TechnicalDebt.md#L322) | | | | #1535 | `docs/dev/TechnicalDebt.md` [L322](https://github.com/boykopovar/AnyPS5/blob/a983fb5df595b6e1e6c0a66751d76b1046fab174/docs/dev/TechnicalDebt.md#L322) | | |
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
boykopovar/AnyPS5!1320
No description provided.