@rotorsoft/act 1.29.2 → 1.30.0

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.
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  sleep,
23
23
  store,
24
24
  validate
25
- } from "./chunk-PX3IBVLW.js";
25
+ } from "./chunk-H2IDTW6B.js";
26
26
  import {
27
27
  ActorSchema,
28
28
  CausationEventSchema,
@@ -4622,6 +4622,22 @@ var Act = class {
4622
4622
  }
4623
4623
  return this._correlate.checkpoint;
4624
4624
  }
4625
+ /**
4626
+ * Drop retired streams from correlate's in-process "already subscribed"
4627
+ * set, so a later scan re-issues `subscribe()` for them.
4628
+ *
4629
+ * A tombstone seed means the stream was retired; a snapshot seed means it
4630
+ * was restarted and is still consuming.
4631
+ *
4632
+ * `truncate` no longer removes the subscription row (#1527), so this is no
4633
+ * longer repairing damage the close itself did. It still matters, because
4634
+ * the row can disappear later: reclaiming retired subscriptions is an
4635
+ * operator job now, and that `DELETE` can land while this process is
4636
+ * running. Forgetting here keeps the in-process view from outliving a row
4637
+ * an operator removed, which is the same silent-no-delivery failure #1398
4638
+ * described — a reaction whose target is named after the stream would never
4639
+ * be re-registered.
4640
+ */
4625
4641
  _forget_closed_subscriptions(result) {
4626
4642
  const retired = [...result.truncated.entries()].filter(([, r]) => r.committed.name === TOMBSTONE_EVENT).map(([stream]) => stream);
4627
4643
  if (retired.length) this._correlate.forget_subscribed(retired);