@adonis-agora/durable 1.0.0-rc.2 → 1.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/assets/spa/assets/index-DSdVNM0u.js +16 -0
  3. package/dist/assets/spa/assets/index-DSdVNM0u.js.map +1 -0
  4. package/dist/assets/spa/index.html +1 -1
  5. package/dist/commands/runs.d.ts.map +1 -1
  6. package/dist/commands/runs.js +4 -2
  7. package/dist/commands/runs.js.map +1 -1
  8. package/dist/src/commands/runs.js +1 -1
  9. package/dist/src/commands/runs.js.map +1 -1
  10. package/dist/src/concurrency.d.ts.map +1 -1
  11. package/dist/src/concurrency.js +1 -0
  12. package/dist/src/concurrency.js.map +1 -1
  13. package/dist/src/dashboard/index.d.ts +1 -1
  14. package/dist/src/dashboard/index.js +1 -1
  15. package/dist/src/dashboard/openapi.d.ts.map +1 -1
  16. package/dist/src/dashboard/openapi.js +11 -1
  17. package/dist/src/dashboard/openapi.js.map +1 -1
  18. package/dist/src/dashboard/run-filter.d.ts.map +1 -1
  19. package/dist/src/dashboard/run-filter.js +1 -0
  20. package/dist/src/dashboard/run-filter.js.map +1 -1
  21. package/dist/src/engine.d.ts +13 -8
  22. package/dist/src/engine.d.ts.map +1 -1
  23. package/dist/src/engine.js +136 -51
  24. package/dist/src/engine.js.map +1 -1
  25. package/dist/src/index.d.ts +1 -1
  26. package/dist/src/index.js +1 -1
  27. package/dist/src/interfaces.d.ts +17 -3
  28. package/dist/src/interfaces.d.ts.map +1 -1
  29. package/dist/src/interfaces.js +8 -0
  30. package/dist/src/interfaces.js.map +1 -1
  31. package/dist/src/scheduler.d.ts.map +1 -1
  32. package/dist/src/scheduler.js +2 -1
  33. package/dist/src/scheduler.js.map +1 -1
  34. package/dist/src/singleton-admission.d.ts.map +1 -1
  35. package/dist/src/singleton-admission.js +2 -0
  36. package/dist/src/singleton-admission.js.map +1 -1
  37. package/dist/src/singleton-gate.d.ts +1 -1
  38. package/dist/src/singleton-gate.d.ts.map +1 -1
  39. package/dist/src/singleton-gate.js +4 -3
  40. package/dist/src/singleton-gate.js.map +1 -1
  41. package/dist/src/stores/lucid.d.ts.map +1 -1
  42. package/dist/src/stores/lucid.js +5 -3
  43. package/dist/src/stores/lucid.js.map +1 -1
  44. package/dist/src/testing/in-memory-state-store.js +3 -3
  45. package/dist/src/testing/in-memory-state-store.js.map +1 -1
  46. package/dist/src/testing-kit/state-store-conformance.d.ts.map +1 -1
  47. package/dist/src/testing-kit/state-store-conformance.js +13 -0
  48. package/dist/src/testing-kit/state-store-conformance.js.map +1 -1
  49. package/dist/src/testing-kit/transport-conformance.d.ts.map +1 -1
  50. package/dist/src/testing-kit/transport-conformance.js +5 -1
  51. package/dist/src/testing-kit/transport-conformance.js.map +1 -1
  52. package/dist/src/transports/db.d.ts.map +1 -1
  53. package/dist/src/transports/db.js +20 -2
  54. package/dist/src/transports/db.js.map +1 -1
  55. package/package.json +2 -2
  56. package/skills/durable-reliability/SKILL.md +2 -2
  57. package/dist/assets/spa/assets/index-CJjMAUau.js +0 -16
  58. package/dist/assets/spa/assets/index-CJjMAUau.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @adonis-agora/durable
2
2
 
3
+ ## 1.0.0-rc.4
4
+
5
+ ### Major Changes
6
+
7
+ - [#490](https://github.com/DavideCarvalho/adonis-agora-durable/pull/490) [`89e0305`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/89e030531c92be31657ba10519ff033b330bcbbe) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - A compensating cancel no longer writes or reads a buffered `cancel:<runId>` marker. The persisted `cancelling` status is the durable intent: a turn picks it up at start, and a turn already running on another pod when the cancel lands finds it at its settle (the status check no longer matches) and runs the saga undo there, on every exit (return, throw, continue-as-new, suspend). Every turn exit saves a buffered-signal read and re-write.
8
+
9
+ Upgrade note: stop pre-1.0 engines before or while deploying 1.0. They rely on the marker 1.0 no longer writes, so while one of them still executes a run, a compensating cancel issued from a 1.0 pod can wait for crash recovery before its undo runs.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#493](https://github.com/DavideCarvalho/adonis-agora-durable/pull/493) [`267b719`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/267b7199d2e07a5e720d4d2de91b235f736056dc) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - The db transport's run queue no longer takes runs after its consumer's `stop()` resolved. A poll that was already in flight when `stop()` was called (waiting on the claim's read) could claim runs dispatched afterwards and hand them to the handler. `stop()` now waits for that poll, and a poll that finds the consumer stopping gives back what it claimed.
14
+
15
+ ## 1.0.0-rc.3
16
+
17
+ ### Major Changes
18
+
19
+ - [#486](https://github.com/DavideCarvalho/adonis-agora-durable/pull/486) [`ab26861`](https://github.com/DavideCarvalho/adonis-agora-durable/commit/ab26861edb93aefad8aa949f32913b6d3681c519) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - A compensating cancel now persists a new run status, `cancelling`.
20
+
21
+ `engine.cancel(runId, { compensate: true })` marks the run `cancelling` before it returns, and returns that status. The run keeps it while the saga's compensations run, then becomes `cancelled`. While it is `cancelling`:
22
+
23
+ - A repeat `cancel()`, with or without `compensate`, returns `cancelling` and leaves the undo alone. Before, a second cancel without `compensate` marked the run `cancelled` and skipped the compensations still running.
24
+ - Crash recovery re-drives it on any instance, so an undo whose pod died is finished elsewhere.
25
+ - It keeps its singleton and concurrency slot, `waitForRun` keeps waiting, `engine.requeue()` returns it unchanged, and an `overlap: 'skip'` schedule doesn't fire over it.
26
+ - The dashboard and the API show it as its own status, with a filter chip.
27
+
28
+ A failed write of the cancel request now fails `cancel()` instead of being ignored, and leaves the run as it was.
29
+
30
+ **Breaking:** `RunStatus` has a new member, `cancelling`. Exhaustive `switch`es over `RunStatus` need a case for it. A custom `StateStore` must return `cancelling` runs from `listIncompleteRuns` and `listOrphanedRuns` (the new `RECOVERABLE_RUN_STATUSES` lists them, and the state-store conformance suite checks it), or recovery won't finish a crashed compensating cancel.
31
+
3
32
  ## 1.0.0-rc.2
4
33
 
5
34
  ### Patch Changes