Home

dev / openkara

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

fix(remote): reset terminal ops on re-publish, reject missing CAS token, cancel stale batch rows

2 months ago

d08212d
Authored
Davy7/20/2026, 8:17:11 PM
- commit_via_executor now resets terminal (Completed/Failed/Conflicted/
  Cancelled) operation rows to Pending before executing, so re-publishing
  a song or retrying a failed publish actually runs the protocol instead
  of silently short-circuiting.
- run_publish_protocol now fails closed when a manifest exists but the
  provider returns no revision (CAS token). Without a revision,
  conditional_replace becomes a conditional-create, violating the CAS
  guarantee and risking lost updates on providers that omit ETags.
- commit_via_executor cancels stale publish-batch-* prepared rows for
  the same library when a per-song publish starts, so recovery does not
  later retry superseded placeholder operations.
- retry_pending_operations now persists newly generated repository_id
  and writer_id before publishing, so the stable identity does not change
  across generations.

Parentd8371ec

3 files changed
  • src-tauri/src/remote/executor.rs+13−0
  • src-tauri/src/remote/recovery.rs+12−0
  • src-tauri/src/remote/sync/publish.rs+82−3