markForStitching now only updates the ticket on conflict, leaving
next_stitch_at unchanged so an in-progress worker isn't interrupted.
markDeferredStitchCompleted bumps next_stitch_at to now() when the
ticket changed, so pending re-stitches happen immediately after the
current stitch finishes rather than waiting for the timeout.
performStitching no longer calls markDeferredStitchCompleted when
abandoned due to a stale ticket, since the queue entry belongs to
another worker.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>