Fix sync reliability and local workflows for #44–#50 #51

Merged
tophattedcat merged 1 commit from codex/issues-44-50 into main 2026-09-06 13:54:54 +00:00
Owner

Sync now retries transient database contention at recoverable operation boundaries and uses one pure plan for dry-run reporting and execution. Each playlist's memberships and unique resolution decisions commit together, while failures in independent stores still prevent global pruning.

  • #44: Three bounded attempts for SQLite busy/locked failures, with store/operation diagnostics and preserved causes. Retries retain beets dirty fields, recover failed beets commits, and reopen playlistmanager after failed writes so an active transaction cannot poison the next attempt. Permanent errors are attempted once.
  • #45: Save refreshed descriptors, duplicate-preserving memberships, and unique resolution decisions in one state transaction. Preserve skips and historical rows; avoid unchanged resolution updates.
  • #46: Reconcile reporting and interactive status with live associations, including deleted items and explicit displacement.
  • #47: Share case/hyphen ISRC canonicalization between matching and conflict reporting without rewriting local metadata.
  • #48: Fetch managed rows with one joined query and reuse/update the interactive association index instead of rescanning the library per track.
  • #49: Compute associations, item IDs, missing occurrences, counters, memberships, and pruning intent once; dry-run renders this plan and execution applies it.
  • #50: Add isolated real PlaylistStore integration tests and a pinned reproducible dependency. Cover WAL snapshots, order/duplicates, metadata, real constraint failures, commit contention, and recovery.

Validation: 149 tests pass, including the real playlistmanager integration suite; uv run python -m compileall -q beetsplug tests, git diff --check, and an isolated BEETSDIR command-help smoke test pass. New behavioral regressions were run failing before implementation. Gateway data is network-free and no global beets library was used.

The beets retry adapter necessarily accounts for its internal dirty-field and transaction-lock behavior; regression coverage exercises real beets 2.13.1 writes and commit failures. Playlistmanager is tested at revision 4726c63306d9da23bcc0ce0e6aada0629ba2ba97; installation instructions are in README and requirements-integration.txt. Cross-store updates remain intentionally non-atomic per SPEC.md.

Closes #44
Closes #45
Closes #46
Closes #47
Closes #48
Closes #49
Closes #50

#34 remains outside this PR's scope.

Sync now retries transient database contention at recoverable operation boundaries and uses one pure plan for dry-run reporting and execution. Each playlist's memberships and unique resolution decisions commit together, while failures in independent stores still prevent global pruning. - #44: Three bounded attempts for SQLite busy/locked failures, with store/operation diagnostics and preserved causes. Retries retain beets dirty fields, recover failed beets commits, and reopen playlistmanager after failed writes so an active transaction cannot poison the next attempt. Permanent errors are attempted once. - #45: Save refreshed descriptors, duplicate-preserving memberships, and unique resolution decisions in one state transaction. Preserve skips and historical rows; avoid unchanged resolution updates. - #46: Reconcile reporting and interactive status with live associations, including deleted items and explicit displacement. - #47: Share case/hyphen ISRC canonicalization between matching and conflict reporting without rewriting local metadata. - #48: Fetch managed rows with one joined query and reuse/update the interactive association index instead of rescanning the library per track. - #49: Compute associations, item IDs, missing occurrences, counters, memberships, and pruning intent once; dry-run renders this plan and execution applies it. - #50: Add isolated real PlaylistStore integration tests and a pinned reproducible dependency. Cover WAL snapshots, order/duplicates, metadata, real constraint failures, commit contention, and recovery. Validation: 149 tests pass, including the real playlistmanager integration suite; `uv run python -m compileall -q beetsplug tests`, `git diff --check`, and an isolated `BEETSDIR` command-help smoke test pass. New behavioral regressions were run failing before implementation. Gateway data is network-free and no global beets library was used. The beets retry adapter necessarily accounts for its internal dirty-field and transaction-lock behavior; regression coverage exercises real beets 2.13.1 writes and commit failures. Playlistmanager is tested at revision `4726c63306d9da23bcc0ce0e6aada0629ba2ba97`; installation instructions are in README and requirements-integration.txt. Cross-store updates remain intentionally non-atomic per SPEC.md. Closes #44 Closes #45 Closes #46 Closes #47 Closes #48 Closes #49 Closes #50 #34 remains outside this PR's scope.
Sign in to join this conversation.
No reviewers
No milestone
No project
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.

Dependencies

No dependencies set

Reference
coop/beets-appleplaylists!51
No description provided.