@rotorsoft/act 1.33.1 → 1.33.2

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
@@ -40,7 +40,7 @@ import {
40
40
  sleep,
41
41
  store,
42
42
  validate
43
- } from "./chunk-NYH6FNTM.js";
43
+ } from "./chunk-NNTF627K.js";
44
44
  import {
45
45
  ActorSchema,
46
46
  CausationEventSchema,
@@ -70,7 +70,7 @@ import {
70
70
  pii_fields,
71
71
  pii_schemas,
72
72
  sensitive
73
- } from "./chunk-TJ4JRRUR.js";
73
+ } from "./chunk-KHFMCJDR.js";
74
74
 
75
75
  // src/signals.ts
76
76
  process.once("SIGINT", async (arg) => {
@@ -2848,7 +2848,7 @@ var SettleLoop = class {
2848
2848
  (async () => {
2849
2849
  await this._deps.init();
2850
2850
  let settled_drain;
2851
- for (let i = 0; i < maxPasses; i++) {
2851
+ for (let i = 0; i < maxPasses && !this._stopped; i++) {
2852
2852
  const after_before = this._deps.checkpoint();
2853
2853
  const { subscribed, last_id, scanned } = await this._deps.correlate({
2854
2854
  ...correlate_query,
@@ -3559,7 +3559,7 @@ var Act = class {
3559
3559
  /**
3560
3560
  * Starts a background poll that settles on a timer: each tick looks for
3561
3561
  * new events, subscribes the streams their reactions target, and drains
3562
- * them.
3562
+ * them, along with any stream whose lease a dead worker let expire.
3563
3563
  *
3564
3564
  * Use it when this process can miss commits — another process writes to a
3565
3565
  * store without `notify`, or a notification is lost. It is the safety net
@@ -3588,7 +3588,7 @@ var Act = class {
3588
3588
  if (this._poll) return false;
3589
3589
  this._poll_limit = query.limit || void 0;
3590
3590
  this._poll = setInterval(() => {
3591
- this._correlate.arm();
3591
+ this._arm_all();
3592
3592
  this._schedule();
3593
3593
  }, frequency);
3594
3594
  return true;
@@ -3892,7 +3892,8 @@ var Act = class {
3892
3892
  * `debounceMs` (default 10), `correlate.limit` (default 100, or the
3893
3893
  * poll's limit while `start_correlations` runs; `after` is always the
3894
3894
  * checkpoint),
3895
- * `maxPasses` (default `Infinity` — kill-switch for runaway loops),
3895
+ * `maxPasses` (default `Infinity`; caps this settle's passes, not the
3896
+ * passes a reaction chain's own commits schedule),
3896
3897
  * `streamLimit` (default 10), `eventLimit` (default 10),
3897
3898
  * `leaseMillis` (default 10000).
3898
3899
  *