The mocha test "stores intent before dispatch, preserves pending failures
and suppresses deferred or disabled capture" failed about one run in four
with "notification hook did not settle". Traced with in-memory lease,
recovery and gate events: the two activities' insert hooks dispatch
concurrently, and when the second activity reached the subscriber first,
intentIds[0] held ITS intent - the one the test makes fail on purpose. The
test then waited for that intent to complete, which never happens, while
the one-second recovery scan kept retrying it. The application behaved as
designed; the test assumed an order the hooks never promised.
Intents are now recorded against their activity. The checks that counted
subscriber calls also allowed for the recovery scan, which legitimately
retries a pending intent on its own: the recipient is denied before the
replacement subscriber is installed, calls are compared with a snapshot,
the final retry waits out a scan that holds the lease at that instant, and
exactly one delivery is required whichever of the two made it.
The test passed 12 of 12 runs in isolation afterwards; it failed 1 of 4
before.
Thanks to xet7 !
Remove rendered payloads immediately after matching intent completion and in bounded background sweeps. Require valid checksums and dispatch identity, retain pending or damaged plans, and use atomic in-place replacement with readback for uncertain acknowledgements.
Validated with 20 Node/MongoDB cases, three additional Node suites, four Meteor cases and thirteen Chromium delivery and cleanup scenarios. Operator handling and unresolved-payload retention remain open.
Thanks to xet7.
Scan bounded pending-intent batches after startup, advance past failed and busy rows, and coordinate immediate delivery and recovery through renewable per-intent reservations. Resume saved plans or prepare the first plan from an unchanged persisted activity; retain unresolved orphans without recreating activities.
Validated with 14 Node/MongoDB cases, three additional Node suites, four full-app Meteor cases and twelve Chromium scenarios including scheduled local SMTP recovery. Operator controls and payload retention remain open.
Thanks to xet7.
Save a checksummed plan before delivery, bind the original activity and dispatch actor, and reuse tray receipts and email job identities on retry. Recheck current recipient scope and channel preferences without rebuilding saved content.
Validated with ten MongoDB cases, three Node suites, three Meteor cases and ten Chromium notification scenarios. Background replay, ownership and plan retention remain open.
Thanks to xet7.
Await private intent persistence before the activity insert, preserve scoped Sync deferral, and retain pending evidence until all recipient subscribers acknowledge local writes. Compact successful intents while preserving dispatch identity; keep webhook delivery independent.
Validated with six MongoDB cases, three Node suites, three full-app Meteor cases and ten Chromium email delivery and private-storage scenarios. Automatic pending-intent recovery remains unfinished.
Thanks to xet7.