Skip to content

fix: scope named sound restore ledger to the app container - #214

Merged
huami1314 merged 1 commit into
huami1314:mainfrom
Afloat16:r2/fix/app-sound-ledger-scope-20261129
Dec 3, 2026
Merged

huami1314 merged 1 commit into
huami1314:mainfrom
Afloat16:r2/fix/app-sound-ledger-scope-20261129

Conversation

@Afloat16

Copy link
Copy Markdown
Contributor

Problem

The named-override ledger records paths created in an application's data container. An App Group can contain a different sound at the same relative path, but selection and restore currently consult the app-data ledger for both containers. With no group backup, restore can consequently delete an original App Group sound. Restoring a valid group backup also clears the unrelated app-data entry, removing its documented fallback when the sibling marker is later lost.

Change

Restrict ledger-based restore availability, the absent-original fallback, and ledger removal to entries whose group is nil. App Group sounds continue to restore from their own verified sibling backups. Add seven regression and control cases using real WAV files, separate app/group directories, and the production store and codec.

Validation

  • On the untouched base, three new cases fail and four controls pass. On this head, all seven pass: group restore does not delete an unowned original, restoring a group backup preserves the app-data fallback, and existing main-container and verified-backup restore paths work.
  • Native validation used Xcode 27.1 / Swift 6.4 with the production Swift files copied unchanged into the test executable. Exact-head evidence.
  • The app and embedded share extension build successfully for the supported arm64 iOS Simulator configuration. Build.
  • The existing AppSoundTests suite fails on both the untouched base and this head with Unsafe operation succeeded. A separate native diagnostic located this at tests/AppSoundTests.swift:88, where selecting a sound with an unrelated .bak is expected to throw; select currently swallows that backup-validation error with try?. That pre-existing behavior is outside this patch. The validation job retains the failure; this is not a claim that the complete suite is green.
  • An initial generic simulator build selected x86_64, which the repository's device-console framework does not provide. The subsequent build explicitly uses the arm64 simulator architecture supported by Native/DeviceConsole/build-xcframework.sh.

@huami1314
huami1314 merged commit ba2385a into huami1314:main Dec 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants