Commit Graph
2 Commits
Author SHA1 Message Date
Lauri Ojansivu d82a54944a Finish a durable Sync run whose rule moved or archived the card it synced.
A Sync step's rules run after its card write, and since rules may move a
card to another list or archive it, the card can afterwards match
neither the step's before-state nor its after-state. Two things then
failed:

- An interrupted run never recovered. The replay retried the step's
  write, which could not be confirmed, so the run failed on every replay.
  The journal now treats a stored planned activity as proof that the
  write happened (activities are stored only after it is confirmed) and
  finishes the effects, which are idempotent.
- Even an uninterrupted run failed whenever a durable rule moved the card
  out of the list. The activity's notification and webhook stages ran
  after the rule and refused a card that was no longer in the activity's
  list. They now also accept the card where a saved move of that
  activity's own rules put it, and nowhere else.

A failed replay now logs why. The durable Sync server test runs a rule
that moves each new card out of the synced list, crashes after the move,
and checks that the replay completes the run with one move.

Thanks to xet7 !
2026-10-02 18:19:02 +03:00
Lauri Ojansivu 7bf5c63d0a Require separate effect completion for durable Sync card steps 2026-09-28 02:18:15 +03:00