From 063be87405277aef3122c448b064241fd15f2a92 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 29 Aug 2026 11:30:08 +0200 Subject: fix: retry a sync that was skipped because another held the lock Item 125, the half that was genuinely missing. Most of this item was already built and the row was stale. The exit-75 branch in onSyncFinished() predates this session and does what the entry asks: the spinner clears, the skip is reported as neither success nor failure, m_lastSyncFailed stays put, the log pane is not raised, the lock latch is handed back to the external monitor, and the sync-on-exit case has its own dialog. Item 174 then added the external half, a `skipped` state a run the application did not start can be seen to have produced. What nothing covered was the RE-ARM, and it is the symptom the item was filed for. runAutoSync() re-arms when it declines to START, which is item 89 and covers a sync skipped before launching. A run that LAUNCHES, finds the lock held and exits 75 reaches onSyncFinished() instead, and that branch armed nothing: the edit stayed pending with nothing scheduled to carry it, waiting for a manual sync or the next cron tick. That is "a held edit waits for a completion that never comes". scheduleAutoSync() in the skip branch. It re-checks the delay, the sync command and the pending count on the way in, so it cannot arm a sync for nothing, and against a long external run it re-arms once per debounce interval until the lock clears. This is the half the status file could not reach, and the distinction is worth keeping: that file says what a run DID, this is what the application does NEXT. The test records a real pending edit first, since runAutoSync() correctly declines when there is nothing to carry and a fixture without one would arm nothing for a legitimate reason. It failed before the fix and is mutation-checked. Suite: 43 of 44, with undoMovesTheMessageBack failing as it does on master (item 136). --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 71a0333..2040fba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,11 @@ point at which they are stable. count for every account, including ones it never touched. Their edits were then reported as delivered while still sitting locally. A sync started from inside qtmaildir has always narrowed this correctly; the two paths now agree. +- **A change made when a sync is skipped is no longer left waiting.** When a + sync starts and finds another already running, it stops without carrying + anything; qtmaildir reported that correctly but scheduled nothing in its + place, so the change waited for a manual sync or the next scheduled one. It + now retries on its own. - **A skipped sync no longer looks like a successful one.** When a run exits because another sync already holds the lock, it carried nothing, and the pending count stays where it was. -- cgit v1.2.3