Tests for mutations that stayed green in the reviews of PRs #154 to #159,
all added at the top of the stack (decision of Max, 2026-10-24):
- route: a task sent to an archived regular list stays there; the most
recent active inbox wins the redirect; every POST cleans the
idempotency store (#145, #147)
- idempotency store: a refreshed key moves to the newest end (#147)
- syncRules: an unknown result status is neither marked nor counted; the
429 retry bound fails the test instead of hanging the suite (#151)
- smoke source check of syncClient.ts wiring: `since` forwarded by the
pull, kept rows re-queued then left untouched, local row passed to
pulled*Values, no local tag version in any form, SYNC_EPOCH stamped
before the full pull of initialMerge, successful batches marked even
after a failed one, widget refreshed after marking (#149, #150, #151)
Refs #151
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A refused operation replayed with the same idempotency key must come back
skipped with an error again (otherwise the app marks it synced and loses
it), and pushChanges must mark only the ids kept by classifyOutbox. Both
gaps were found by reviewer mutations on PR #159.
Refs #151
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Number(null) and Number('') are 0: a 429 without a Retry-After header
made initialMerge resend the same batch three times with no wait instead
of waiting 60 s. The header is now read by parseRetryAfter (syncRules.ts,
tested under node), and the smoke guard locks its use in postBatch.
Found by the autopilot self-review of PR #159.
Refs #151
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pushChanges marked the whole outbox as synced once every POST answered
200, so an operation the server refused (skipped with an error) was lost.
It now reads the results: applied and skipped-without-error entries are
marked, a refusal is replayed at every push for 30 days, among the 100
most recent, until a newer entry of the same entity goes through. A
failed batch no longer hides the results of the batches before it.
The batch loop moves to syncRules.ts (sendInBatches), tested under node:
pushChanges sends 8 batches at most and stops at a 429, initialMerge
sends every batch and waits for the Retry-After of a 429 (60 s at most,
3 resends), so a first sync no longer fails at its eleventh batch.
Server side, comments only, plus a test of the results contract.
Refs #151
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>