You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
@coji/durably
Events follow their state writes directly: run:fail and run:cancel are now emitted immediately after the status write, as run:complete already was. Before, code polling storage could see failed or cancelled a storage round trip before the event. run:fail now names the failed step from the failures recorded under the current lease instead of reading attempts back. The ordering is documented and tested on SQLite, PostgreSQL and the browser (#220).
Unregistered jobs: a run whose job is not registered in the worker now emits run:leased and run:fail (with failedStepName: 'unknown'), like any other failed run. It is also cleaned up like one: with preserveSteps: false its checkpoints and logs are deleted (#220).
cancel() cleanup: a failure to delete checkpoints after a committed cancellation is reported as worker:error (context: 'cancel-cleanup') instead of rejecting cancel() (#220).
onError isolation: an exception thrown by the onError handler, or a rejected promise from an async handler, is now ignored. Before, it escaped the emitting call (for example rejecting cancel() after a committed cancellation) and stopped delivery to the remaining listeners, and for an async listener it became an unhandled rejection (#220).
Stable run and log ordering: getRuns() and storage.getLogs() break creation-time ties by ID, so runs or logs written in the same millisecond keep a deterministic order and limit/offset pages no longer overlap or skip (#219).