Skip to content

A Save no longer pairs old text with a Download's change number; a rename keeps one save - #44

Merged
tmoosting merged 4 commits into
mainfrom
fix/2443-timer-follows-note
Nov 28, 2026
Merged

tmoosting merged 4 commits into
mainfrom
fix/2443-timer-follows-note

Conversation

@tmoosting

Copy link
Copy Markdown
Member

Three races between a Save, auto-sync and a Download.

  • A Save read the note, then waited (the PIN prompt, the client), then read the change number it sends as If-Match. A Download that wrote the note in that wait recorded a newer number, so the older text passed the check and went over what the Download had brought. The numbers are now read before the text; such a Save is refused as stale and nothing is sent.
  • Auto-sync kept its waiting timers by path, so a note renamed while its timer waited was saved once under each name. They are kept by file.
  • Saves of one note wait for each other. That queue was by path too, so a note renamed while a slow Save ran could get a second Save beside it, refused as stale over your own edit. It is by file.

Each has a test that fails on 3.23.1.

Known limits, unchanged: a note with no recorded change number (a vault from before 3.8.1, a note never saved) is saved without the check once, as before.

🤖 Generated with Claude Code

tmoosting and others added 4 commits November 28, 2026 00:19
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A pull in that wait recorded a newer number the save would pair with older text. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…he re-read refusal

The refusal could stop a good Save when the editor's own autosave landed between the reads. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…uns a second beside it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tmoosting
tmoosting merged commit c9b80db into main Nov 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant