@lmzhen/dsh-evolution-state-storage 0.3.62 → 0.3.63

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/lib/index.js CHANGED
@@ -50,6 +50,13 @@ const canResolvePending = (status) => status === "pending" || status === "execut
50
50
  /** Releasing a claim on an executing record rolls it back to pending (a
51
51
  * runner FAILURE is retryable); other statuses pass through unchanged. */
52
52
  const releasedStatus = (status) => status === "executing" ? "pending" : status;
53
+ /** P2-4 (v15): the live pending map/table is BOUNDED — both providers keep at
54
+ * most this many resolved (approved/rejected) records, dropping the oldest by
55
+ * `resolvedAt`. Single source (the v15 audit found the bound was json-only,
56
+ * so domain deployments grew the table without bound). The audit ARCHIVE
57
+ * sidecar that json maintains beyond the cap stays json-specific (domain has
58
+ * no sidecar facility) — declared in both READMEs. */
59
+ const PENDING_RESOLVED_CAP = 200;
53
60
  var EvolutionStateStorageRegistry = class extends Service {
54
61
  providers = /* @__PURE__ */ new Map();
55
62
  constructor(ctx) {
@@ -81,4 +88,4 @@ var EvolutionStateStorageRegistry = class extends Service {
81
88
  }
82
89
  };
83
90
  //#endregion
84
- export { CURATOR_STATE_FILE, CURATOR_STATE_KEY, CURATOR_STATE_TABLE, EvolutionStateStorageRegistry, EvolutionStateStorageRegistry as default, PENDING_ARCHIVE_BAK_FILE, PENDING_ARCHIVE_FILE, PENDING_LEGACY_FILE, PENDING_STATE_FILE, PENDING_TABLE, PROVIDER_DOMAIN, PROVIDER_JSON, REVIEW_STATE_FILE, REVIEW_STATE_TABLE, canClaimPending, canResolvePending, releasedStatus };
91
+ export { CURATOR_STATE_FILE, CURATOR_STATE_KEY, CURATOR_STATE_TABLE, EvolutionStateStorageRegistry, EvolutionStateStorageRegistry as default, PENDING_ARCHIVE_BAK_FILE, PENDING_ARCHIVE_FILE, PENDING_LEGACY_FILE, PENDING_RESOLVED_CAP, PENDING_STATE_FILE, PENDING_TABLE, PROVIDER_DOMAIN, PROVIDER_JSON, REVIEW_STATE_FILE, REVIEW_STATE_TABLE, canClaimPending, canResolvePending, releasedStatus };
@@ -24,6 +24,13 @@ export declare const canResolvePending: (status: PendingStatus) => boolean;
24
24
  /** Releasing a claim on an executing record rolls it back to pending (a
25
25
  * runner FAILURE is retryable); other statuses pass through unchanged. */
26
26
  export declare const releasedStatus: (status: PendingStatus) => PendingStatus;
27
+ /** P2-4 (v15): the live pending map/table is BOUNDED — both providers keep at
28
+ * most this many resolved (approved/rejected) records, dropping the oldest by
29
+ * `resolvedAt`. Single source (the v15 audit found the bound was json-only,
30
+ * so domain deployments grew the table without bound). The audit ARCHIVE
31
+ * sidecar that json maintains beyond the cap stays json-specific (domain has
32
+ * no sidecar facility) — declared in both READMEs. */
33
+ export declare const PENDING_RESOLVED_CAP = 200;
27
34
  /**
28
35
  * Claim lifecycle (S3.3): pending →(claim)→ executing →(resolve)→ approved/rejected.
29
36
  * release() rolls executing back to pending (failure path). A crash between
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-state-storage",
3
3
  "description": "Provider registry seam for durable evolution state (community build)",
4
- "version": "0.3.62",
4
+ "version": "0.3.63",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },