Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(remote): atomic library outbox with song mutation transaction (#151)

2 months ago

0d52263
Authored
Davy7/21/2026, 7:12:10 AM
Mutation wrappers open the library DB, begin one SQLite transaction, run the
caller mutation on that connection, write remote_publish_outbox with full
song_ids on the same transaction, then commit. Songs and change set are
atomic; rollback clears both.

Control projection is fail-closed and only deletes the library outbox after
Pending+Dirty succeeds. Candidate freeze clears outbox so machine-local
metadata never ships with a generation database.

Command call sites now receive the transaction connection instead of opening
a separate library handle.

Parent9e51a36

7 files changed
  • src-tauri/migrations/013_remote_publish_outbox.sql+4−3
  • src-tauri/src/app_runtime.rs+66−21
  • src-tauri/src/commands/import/mod.rs+9−16
  • src-tauri/src/commands/lyrics.rs+15−32
  • src-tauri/src/remote/executor.rs+6−0
  • src-tauri/src/remote/library_outbox.rs+169−24
  • src-tauri/src/remote/mutation.rs+285−175