@lmzhen/dsh-evolution-core 0.31.0 → 0.31.1

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
@@ -5905,9 +5905,10 @@ function buildLearnPrompt(userRequest) {
5905
5905
  /**
5906
5906
  * A process-local serial task queue: each task starts only after the previous
5907
5907
  * one settles (success or failure), so read-modify-write sequences that share
5908
- * one file never interleave inside this process. The durable cross-process
5909
- * serialization layer is the IO backend's transact lock; this chain is the
5910
- * second layer (0.3.17 S2.8, T-1: the shape was duplicated in state-json and
5908
+ * one file never interleave inside this process. When the IO backend provides
5909
+ * a cross-process transact lock, that is the first layer; the node backend does
5910
+ * not, so this chain is its only serialization. (0.3.17 S2.8, T-1: the shape was
5911
+ * duplicated in state-json and
5911
5912
  * memory-files — one factory now).
5912
5913
  */
5913
5914
  function makeSerialQueue() {
@@ -9247,8 +9248,9 @@ function absentHostServices(has) {
9247
9248
  * B3 / G4 (0.3.78): the family's single-instance contract, made explicit.
9248
9249
  *
9249
9250
  * Every persisted sidecar is written under TWO assumptions: the IO backend's
9250
- * cross-process write lock serializes different processes, and exactly ONE
9251
- * instance of each writer service exists per evolution home. The second half
9251
+ * transact serializes different processes when the provider guarantees it (the
9252
+ * node backend is process-local only), and exactly ONE instance of each writer
9253
+ * service exists per evolution home. The second half
9252
9254
  * was implicit — `makeSerialQueue()` and the module-scope stores are
9253
9255
  * per-instance, so two rows writing one home interleave inside one file (the
9254
9256
  * "two instances, one file" class). This module makes that half enforceable: a
@@ -9265,8 +9267,9 @@ function absentHostServices(has) {
9265
9267
  * `claims` below is a module-scope Map: two ROWS over one home in ONE process
9266
9268
  * contend, while the SAME home in another process gets its own Map and is
9267
9269
  * granted the key. That is by construction, not a gap to close here — the
9268
- * cross-process half of the contract is the IO backend's write lock
9269
- * (`transactIo`, core/io.ts), which serializes a per-target read-modify-write.
9270
+ * cross-process half of the contract is the IO backend's transact
9271
+ * (`transactIo`, core/io.ts) when the provider guarantees it; the node backend
9272
+ * is process-local, so a shared home across processes is not protected by it alone.
9270
9273
  * The FLOW2-1 finding was three call sites reading a GRANTED claim as "no other
9271
9274
  * process can be doing this work", so the caller contract is stated here:
9272
9275
  * - granted means "no other row OF THIS PROCESS owns the key";
@@ -2,8 +2,9 @@
2
2
  * B3 / G4 (0.3.78): the family's single-instance contract, made explicit.
3
3
  *
4
4
  * Every persisted sidecar is written under TWO assumptions: the IO backend's
5
- * cross-process write lock serializes different processes, and exactly ONE
6
- * instance of each writer service exists per evolution home. The second half
5
+ * transact serializes different processes when the provider guarantees it (the
6
+ * node backend is process-local only), and exactly ONE instance of each writer
7
+ * service exists per evolution home. The second half
7
8
  * was implicit — `makeSerialQueue()` and the module-scope stores are
8
9
  * per-instance, so two rows writing one home interleave inside one file (the
9
10
  * "two instances, one file" class). This module makes that half enforceable: a
@@ -20,8 +21,9 @@
20
21
  * `claims` below is a module-scope Map: two ROWS over one home in ONE process
21
22
  * contend, while the SAME home in another process gets its own Map and is
22
23
  * granted the key. That is by construction, not a gap to close here — the
23
- * cross-process half of the contract is the IO backend's write lock
24
- * (`transactIo`, core/io.ts), which serializes a per-target read-modify-write.
24
+ * cross-process half of the contract is the IO backend's transact
25
+ * (`transactIo`, core/io.ts) when the provider guarantees it; the node backend
26
+ * is process-local, so a shared home across processes is not protected by it alone.
25
27
  * The FLOW2-1 finding was three call sites reading a GRANTED claim as "no other
26
28
  * process can be doing this work", so the caller contract is stated here:
27
29
  * - granted means "no other row OF THIS PROCESS owns the key";
@@ -2,8 +2,9 @@
2
2
  * B3 / G4 (0.3.78): the family's single-instance contract, made explicit.
3
3
  *
4
4
  * Every persisted sidecar is written under TWO assumptions: the IO backend's
5
- * cross-process write lock serializes different processes, and exactly ONE
6
- * instance of each writer service exists per evolution home. The second half
5
+ * transact serializes different processes when the provider guarantees it (the
6
+ * node backend is process-local only), and exactly ONE instance of each writer
7
+ * service exists per evolution home. The second half
7
8
  * was implicit — `makeSerialQueue()` and the module-scope stores are
8
9
  * per-instance, so two rows writing one home interleave inside one file (the
9
10
  * "two instances, one file" class). This module makes that half enforceable: a
@@ -20,8 +21,9 @@
20
21
  * `claims` below is a module-scope Map: two ROWS over one home in ONE process
21
22
  * contend, while the SAME home in another process gets its own Map and is
22
23
  * granted the key. That is by construction, not a gap to close here — the
23
- * cross-process half of the contract is the IO backend's write lock
24
- * (`transactIo`, core/io.ts), which serializes a per-target read-modify-write.
24
+ * cross-process half of the contract is the IO backend's transact
25
+ * (`transactIo`, core/io.ts) when the provider guarantees it; the node backend
26
+ * is process-local, so a shared home across processes is not protected by it alone.
25
27
  * The FLOW2-1 finding was three call sites reading a GRANTED claim as "no other
26
28
  * process can be doing this work", so the caller contract is stated here:
27
29
  * - granted means "no other row OF THIS PROCESS owns the key";
@@ -185,7 +185,8 @@ export function newRunRegistry(options) {
185
185
  };
186
186
  const persist = async () => {
187
187
  try {
188
- // Read-modify-write under the io backend's cross-process lock. The file is the
188
+ // Read-modify-write under io.transact when the backend provides it; the node
189
+ // backend serializes in-process only. The file is the
189
190
  // BASE and only THIS process's rows are laid over it ("one writer per row"); the
190
191
  // single write a non-owner may make is the orphan verdict for a row whose owner is
191
192
  // gone. The row read inside this transaction IS the compare-and-swap: if its owner
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * A process-local serial task queue: each task starts only after the previous
3
3
  * one settles (success or failure), so read-modify-write sequences that share
4
- * one file never interleave inside this process. The durable cross-process
5
- * serialization layer is the IO backend's transact lock; this chain is the
6
- * second layer (0.3.17 S2.8, T-1: the shape was duplicated in state-json and
4
+ * one file never interleave inside this process. When the IO backend provides
5
+ * a cross-process transact lock, that is the first layer; the node backend does
6
+ * not, so this chain is its only serialization. (0.3.17 S2.8, T-1: the shape was
7
+ * duplicated in state-json and
7
8
  * memory-files — one factory now).
8
9
  */
9
10
  export declare function makeSerialQueue(): <T>(task: () => Promise<T>) => Promise<T>;
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * A process-local serial task queue: each task starts only after the previous
3
3
  * one settles (success or failure), so read-modify-write sequences that share
4
- * one file never interleave inside this process. The durable cross-process
5
- * serialization layer is the IO backend's transact lock; this chain is the
6
- * second layer (0.3.17 S2.8, T-1: the shape was duplicated in state-json and
4
+ * one file never interleave inside this process. When the IO backend provides
5
+ * a cross-process transact lock, that is the first layer; the node backend does
6
+ * not, so this chain is its only serialization. (0.3.17 S2.8, T-1: the shape was
7
+ * duplicated in state-json and
7
8
  * memory-files — one factory now).
8
9
  */
9
10
  export function makeSerialQueue() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-core",
3
3
  "description": "Shared stores, prompts, signals and lifecycle logic for the dsh-evolution plugin family (community build)",
4
- "version": "0.31.0",
4
+ "version": "0.31.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },