feat(sync): sync every minute, settable, and when an agent asks for changes (#115) #117

Merged
jfro merged 1 commit from feat/115-faster-sync-pickup into main 2026-11-28 03:18:49 +00:00
Owner

What changed

PR #117 makes the scheduled sync every 60 s (RM_SYNC_INTERVAL overrides, 0/empty off), and list_changes plus reading or subscribing to rm-analyzer://changes start one debounced sync when the last is over 30 s old. Post-sync scans run only on changes or every 15 min. Red-then-green tests, full mix precommit (1636 tests) and CI pass.

Fixes #115

Red, then green

  • Sync interval defaults to 60 s and RM_SYNC_INTERVAL overrides it (seconds, 0/empty off, bad values rejected); list_changes and reading or subscribing to rm-analyzer://changes start one debounced sync when the last is over 30 s old.: bash -c 'source ~/.rmenv && MIX_ENV=test mix test test/rm_analyzer/remarkable/sync_server_test.exs'
    • fails on the base (1e4a9b0): exit 1
    • passes on the branch (f85f91a): exit 0

Checks

  • I read the full diff against main and re-ran the sync_server tests (10 pass). I checked that RM_SYNC_INTERVAL accepts 0 or empty as off and rejects bad values, and that the stale-sync debounce skips running syncs. The shipping answers hold: only v* tags build images, and a revert undoes it. Nothing was tried against the real reMarkable cloud, so load at one sync a minute is unmeasured. (Prover): bash -c 'source ~/.rmenv && MIX_ENV=test mix test test/rm_analyzer/remarkable/sync_server_test.exs', exit 0

Shipping it

  • Goes live when it merges: no. Merging to main deploys nothing; release.yml builds images only from v* tags, which Jeremy makes with mise run release.
  • Undo: a revert puts it back.
  • Not tried on the real thing: Not run against the real reMarkable cloud; syncs were tested against the stubbed cloud. Real-world load of a sync per minute per account (one GET /sync/v4/root when unchanged) wasn't measured.
  • For later: Deploys that set no RM_SYNC_INTERVAL go from 15 min to 1 min syncs on upgrade; set it to 900 to keep the old pace. The tablet's own upload delay still adds to the wait.

Prover

Passed (Sonnet): I read the full diff against main and re-ran the sync_server tests (10 pass). I checked that RM_SYNC_INTERVAL accepts 0 or empty as off and rejects bad values, and that the stale-sync debounce skips running syncs. The shipping answers hold: only v* tags build images, and a revert undoes it. Nothing was tried against the real reMarkable cloud, so load at one sync a minute is unmeasured.

Every command above was run by Fortysix's Basecamp itself, on the branch named.

## What changed PR #117 makes the scheduled sync every 60 s (RM_SYNC_INTERVAL overrides, 0/empty off), and list_changes plus reading or subscribing to rm-analyzer://changes start one debounced sync when the last is over 30 s old. Post-sync scans run only on changes or every 15 min. Red-then-green tests, full mix precommit (1636 tests) and CI pass. Fixes #115 ## Red, then green - Sync interval defaults to 60 s and RM_SYNC_INTERVAL overrides it (seconds, 0/empty off, bad values rejected); list_changes and reading or subscribing to rm-analyzer://changes start one debounced sync when the last is over 30 s old.: `bash -c 'source ~/.rmenv && MIX_ENV=test mix test test/rm_analyzer/remarkable/sync_server_test.exs'` - fails on the base (1e4a9b0): exit 1 - passes on the branch (f85f91a): exit 0 ## Checks - I read the full diff against main and re-ran the sync_server tests (10 pass). I checked that RM_SYNC_INTERVAL accepts 0 or empty as off and rejects bad values, and that the stale-sync debounce skips running syncs. The shipping answers hold: only v* tags build images, and a revert undoes it. Nothing was tried against the real reMarkable cloud, so load at one sync a minute is unmeasured. (Prover): `bash -c 'source ~/.rmenv && MIX_ENV=test mix test test/rm_analyzer/remarkable/sync_server_test.exs'`, exit 0 ## Shipping it - Goes live when it merges: no. Merging to main deploys nothing; release.yml builds images only from v* tags, which Jeremy makes with mise run release. - Undo: a revert puts it back. - Not tried on the real thing: Not run against the real reMarkable cloud; syncs were tested against the stubbed cloud. Real-world load of a sync per minute per account (one GET /sync/v4/root when unchanged) wasn't measured. - For later: Deploys that set no RM_SYNC_INTERVAL go from 15 min to 1 min syncs on upgrade; set it to 900 to keep the old pace. The tablet's own upload delay still adds to the wait. ## Prover Passed (Sonnet): I read the full diff against main and re-ran the sync_server tests (10 pass). I checked that RM_SYNC_INTERVAL accepts 0 or empty as off and rejects bad values, and that the stale-sync debounce skips running syncs. The shipping answers hold: only v* tags build images, and a revert undoes it. Nothing was tried against the real reMarkable cloud, so load at one sync a minute is unmeasured. Every command above was run by Fortysix's Basecamp itself, on the branch named.
feat(sync): sync every minute, settable, and when an agent asks for changes (#115)
All checks were successful
CI / test (pull_request) Successful in 1m53s
f85f91a94d
The scheduled sync defaults to a minute; RM_SYNC_INTERVAL sets it in
seconds (0 or empty turns it off). list_changes and reading or subscribing
to rm-analyzer://changes start a sync when the last is over 30 s old,
debounced per user. The post-sync scans run when a sync found changes, or
at most every 15 minutes, so an unchanged root stays a single request.
jfro merged commit 9a9ed246c7 into main 2026-11-28 03:18:49 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/rm-analyzer!117
No description provided.