Fix save mount result on failed mounts #2079

Manually merged
github merged 1 commit from gh-pr/2079/head into gh-pr/2079/base 2026-11-26 10:13:37 +00:00
Owner

@⁠Phr3d13 on GitHub · 2026-11-02 19:01 UTC · original
Phr3d13:fix/animal-well-save-mount-result-clean → main · +22 −2 · 2 files · 1 commits · merged 2026-11-02 23:34 UTC

Preserve the caller's existing mount result when a duplicate save mount returns BUSY, and cover the behavior with a regression test.

**@⁠Phr3d13** on GitHub · 2026-11-02 19:01 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2079) `Phr3d13:fix/animal-well-save-mount-result-clean` → `main` · +22 −2 · 2 files · 1 commits · merged 2026-11-02 23:34 UTC Preserve the caller's existing mount result when a duplicate save mount returns BUSY, and cover the behavior with a regression test.
Preserve the caller's existing mount result when a duplicate save mount returns BUSY, and cover the behavior with a regression test.\n\nCo-authored-by: Copilot <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:13:36 +00:00
github manually merged commit 30866a8b42 into gh-pr/2079/base 2026-11-26 10:13:37 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-02 19:07 UTC · original

Review in Change Stack →

Walkthrough

SaveDataMount3 now clears mount_result after save-directory creation and immediately before mounting. A new test checks that a mode-32 mount attempt returns SAVE_DATA_ERROR_BUSY without changing the existing mount point or its mounted-directory mapping. The test is added to the test sequence.

Suggested reviewers: nmzik

Change: Bug fix

Merge Risk: Low · up to 30866

The PR fixes result preservation for a busy SaveDataMount3 call. The transferring-mount entrypoint still erases a caller's existing result on failure, which could leave the caller unable to unmount. It is a separate entrypoint and the expected behavior is unconfirmed, so this is a bounded follow-up rather than a merge blocker.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly describes the main change: preserving the save mount result when a mount fails, including duplicate mounts that return BUSY.
Description check Passed The description directly matches the code changes and states both the behavior change and the regression test.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
**@⁠coderabbitai[bot]** on GitHub · 2026-11-02 19:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2079#issuecomment-6585946229) <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/2079?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> SaveDataMount3 now clears `mount_result` after save-directory creation and immediately before mounting. A new test checks that a mode-32 mount attempt returns `SAVE_DATA_ERROR_BUSY` without changing the existing mount point or its mounted-directory mapping. The test is added to the test sequence. **Suggested reviewers:** `nmzik` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"30866a8b42950f4a8dd6868a82c05c16d9ff308c" --> <!-- change_assessment_priority:{"version":1,"urgency":"p3","manual":false} --> **Change:** Bug fix <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-low-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Low</strong> · up to <code>30866</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **🔵 Low** · up to `30866` --> <!-- final_review_risk_coverage:{"sourceCommitId":"30866a8b42950f4a8dd6868a82c05c16d9ff308c","coveredCommitId":"30866a8b42950f4a8dd6868a82c05c16d9ff308c","kind":"reviewed"} --> The PR fixes result preservation for a busy SaveDataMount3 call. The transferring-mount entrypoint still erases a caller's existing result on failure, which could leave the caller unable to unmount. It is a separate entrypoint and the expected behavior is unconfirmed, so this is a bounded follow-up rather than a merge blocker. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> 1</strong></summary> <dl> <dd> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 warning</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :----------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Warning](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-warning.svg) | Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> Passed checks: 4 passed</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly describes the main change: preserving the save mount result when a mount fails, including duplicate mounts that return BUSY. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description directly matches the code changes and states both the behavior change and the regression test. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | </dd> </dl> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> **Explanation** Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files. **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=2079)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <!-- tips_end -->
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-11-02 19:07 UTC · original · reviewed

Follow-up Comments

Outside diff Preserve the result for busy transferring mounts.

952-952: Major · Functional Correctness · Quick win

Preserve the result for busy transferring mounts.

SaveDataTransferringMount still clears the result before checking for a duplicate mount. If a caller reuses its existing result, a BUSY response erases the mount point, so the caller cannot use it to unmount the save. Move the reset after the failure checks here too, and cover this entrypoint in the regression test.

Open the source location


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 4a305a95eb and 30866a8b42.

Files selected for processing: 2
  • src/libs/libSaveData.cpp
  • tests/SaveDataMemoryTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-11-02 19:07 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/2079#pullrequestreview-5741886753) · **reviewed** <!-- coderabbit-ai-generated:v1 --> ## Follow-up Comments <details> <summary><sub><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-finding-badges-v1/contrast-v2/outside-diff-dark.svg" /><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-finding-badges-v1/outside-diff.svg" /><img width="120" height="16" alt="Outside diff" src="https://storage.googleapis.com/coderabbit_public_assets/review-finding-badges-v1/outside-diff.svg" /></picture></sub> Preserve the result for busy transferring mounts.</summary><blockquote> <dl> <dd> `952-952`: **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/major-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Major** · **Functional Correctness** · **Quick win** **Preserve the result for busy transferring mounts.** `SaveDataTransferringMount` still clears the result before checking for a duplicate mount. If a caller reuses its existing result, a `BUSY` response erases the mount point, so the caller cannot use it to unmount the save. Move the reset after the failure checks here too, and cover this entrypoint in the regression test. <!-- cr-comment:v1:19c2b9b723d355cab1145b03 --> [Open the source location](https://github.com/KytyPS5/KytyPS5/blob/30866a8b42950f4a8dd6868a82c05c16d9ff308c/src/libs/libSaveData.cpp#L952) </dd> </dl> </blockquote></details> --- <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/4a305a95ebba2318950ec73f3a841ba26729483d/.coderabbit.yaml>) - **Commit**: [4a305a9](<https://github.com/KytyPS5/KytyPS5/commit/4a305a95ebba2318950ec73f3a841ba26729483d>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `be3bca94-5477-401a-beed-c9a874d8c585` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 4a305a95ebba2318950ec73f3a841ba26729483d and 30866a8b42950f4a8dd6868a82c05c16d9ff308c. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 2</summary> <dl> <dd> * `src/libs/libSaveData.cpp` * `tests/SaveDataMemoryTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. </dd> </dl> </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=ffe76f4e-56a7-4b16-876e-fc6bc36d88bc attempt=f3a6e32c-bad2-49cc-af8c-55e5ccea0501 batch=1/1 -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.