Upgrade from 1.0.10: test gaps in the first import over a legacy library
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- database, mobile-dev, testing
Research direction
Start with TaglibMediaProvider.remapLegacySongs, which the existing LegacySafSongsImportTest bypasses by calling LegacySafSongs.remaps directly, and with SavedQueue.kt line 150 for the unguarded toLong. Read LegacyReleaseUpgradeTest for the migration fixtures and DeleteGuard for the mass-delete protection. Done means one test per numbered gap, with item 4 pinning the current delete behavior. Item 1 first needs a maintainer answer on whether declined-permission SAF songs are kept or deleted.
Written by the indexing model from the issue text.
Description
Found while auditing the upgrade from 1.0.10 (Play production) to the rewrite. The database migrations (schema 40 → 57) are covered by LegacyReleaseUpgradeTest, and the SAF path remap by LegacySafSongsImportTest. These parts of the first import after the upgrade are not tested:
- The real
TaglibMediaProvider.remapLegacySongs. The test's fake callsLegacySafSongs.remapsdirectly, so the production path is untested for: the folder filter, the include trees, and the case whereREAD_MEDIA_AUDIO/READ_EXTERNAL_STORAGEisn't granted (1.0.10 SAF users never granted it; the rewrite asks once on first launch, #379). What happens to legacy SAF songs if the user declines: kept for the next import, or deleted with their playlist entries? - Remote reimport over legacy rows. No test imports Jellyfin/Emby/Plex over songs saved by 1.0.10 (
jellyfin://item/…,emby://item/…,plex://…paths) to show they keep their ids, play counts and playlist entries. - Saved queue.
SavedQueuerestoresqueue_idsby song id with an unguardedtoLong(SavedQueue.kt:150); the restore after the first import over a 1.0.10 queue is untested. - By design, worth a test that pins it: a legacy SAF song the remap can't match is deleted with its playlist entries on the first import; only
DeleteGuardprotects the library from a mass delete.
The play-history orphaning from the same remap is #1023.
- Dominant language
- Kotlin
- Stars
- 231
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from timusus/Shuttle2
-
support/scripts/asc: S2 bundle id resolves to the Podcasts app (bundleId filter is a prefix match)Openbug next-release
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug design impact:U1 later P3 reach:R2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement impact:U1 later P3 reach:R2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
impact:U1 owner reach:R1 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
idea
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in timusus/Shuttle2
Similar issues
-
cr:missing-repro cr:platform:android missing-repro platform:android
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
software-mansion/react-native-screens#4950 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
software-mansion/enriched-markdown#1033 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day