@optimystic/db-core 1.22.0 → 1.23.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.
Files changed (176) hide show
  1. package/README.md +8 -4
  2. package/dist/src/collection/action.d.ts +7 -4
  3. package/dist/src/collection/action.d.ts.map +1 -1
  4. package/dist/src/collection/action.js +13 -5
  5. package/dist/src/collection/action.js.map +1 -1
  6. package/dist/src/collection/collection.d.ts +134 -46
  7. package/dist/src/collection/collection.d.ts.map +1 -1
  8. package/dist/src/collection/collection.js +207 -70
  9. package/dist/src/collection/collection.js.map +1 -1
  10. package/dist/src/collection/struct.d.ts +38 -8
  11. package/dist/src/collection/struct.d.ts.map +1 -1
  12. package/dist/src/collection/struct.js.map +1 -1
  13. package/dist/src/collection/write-attempts.d.ts +138 -34
  14. package/dist/src/collection/write-attempts.d.ts.map +1 -1
  15. package/dist/src/collection/write-attempts.js +168 -101
  16. package/dist/src/collection/write-attempts.js.map +1 -1
  17. package/dist/src/collections/diary/diary.d.ts.map +1 -1
  18. package/dist/src/collections/diary/diary.js +5 -1
  19. package/dist/src/collections/diary/diary.js.map +1 -1
  20. package/dist/src/collections/tree/tree.d.ts +15 -9
  21. package/dist/src/collections/tree/tree.d.ts.map +1 -1
  22. package/dist/src/collections/tree/tree.js +6 -4
  23. package/dist/src/collections/tree/tree.js.map +1 -1
  24. package/dist/src/hlc/clock-store.d.ts +63 -0
  25. package/dist/src/hlc/clock-store.d.ts.map +1 -0
  26. package/dist/src/hlc/clock-store.js +49 -0
  27. package/dist/src/hlc/clock-store.js.map +1 -0
  28. package/dist/src/hlc/clock.d.ts +64 -0
  29. package/dist/src/hlc/clock.d.ts.map +1 -0
  30. package/dist/src/hlc/clock.js +171 -0
  31. package/dist/src/hlc/clock.js.map +1 -0
  32. package/dist/src/hlc/hlc.d.ts +38 -0
  33. package/dist/src/hlc/hlc.d.ts.map +1 -0
  34. package/dist/src/hlc/hlc.js +41 -0
  35. package/dist/src/hlc/hlc.js.map +1 -0
  36. package/dist/src/hlc/index.d.ts +5 -0
  37. package/dist/src/hlc/index.d.ts.map +1 -0
  38. package/dist/src/hlc/index.js +5 -0
  39. package/dist/src/hlc/index.js.map +1 -0
  40. package/dist/src/hlc/skew.d.ts +35 -0
  41. package/dist/src/hlc/skew.d.ts.map +1 -0
  42. package/dist/src/hlc/skew.js +35 -0
  43. package/dist/src/hlc/skew.js.map +1 -0
  44. package/dist/src/index.d.ts +2 -0
  45. package/dist/src/index.d.ts.map +1 -1
  46. package/dist/src/index.js +2 -0
  47. package/dist/src/index.js.map +1 -1
  48. package/dist/src/lane/index.d.ts +2 -0
  49. package/dist/src/lane/index.d.ts.map +1 -0
  50. package/dist/src/lane/index.js +2 -0
  51. package/dist/src/lane/index.js.map +1 -0
  52. package/dist/src/lane/lane.d.ts +46 -0
  53. package/dist/src/lane/lane.d.ts.map +1 -0
  54. package/dist/src/lane/lane.js +26 -0
  55. package/dist/src/lane/lane.js.map +1 -0
  56. package/dist/src/log/log.d.ts +50 -22
  57. package/dist/src/log/log.d.ts.map +1 -1
  58. package/dist/src/log/log.js +21 -13
  59. package/dist/src/log/log.js.map +1 -1
  60. package/dist/src/log/struct.d.ts +61 -1
  61. package/dist/src/log/struct.d.ts.map +1 -1
  62. package/dist/src/log/struct.js +24 -0
  63. package/dist/src/log/struct.js.map +1 -1
  64. package/dist/src/network/i-repo.d.ts +10 -0
  65. package/dist/src/network/i-repo.d.ts.map +1 -1
  66. package/dist/src/network/stale-failure.d.ts +20 -7
  67. package/dist/src/network/stale-failure.d.ts.map +1 -1
  68. package/dist/src/network/stale-failure.js +29 -7
  69. package/dist/src/network/stale-failure.js.map +1 -1
  70. package/dist/src/network/struct.d.ts +35 -0
  71. package/dist/src/network/struct.d.ts.map +1 -1
  72. package/dist/src/network/struct.js.map +1 -1
  73. package/dist/src/offline/entry.d.ts +14 -0
  74. package/dist/src/offline/entry.d.ts.map +1 -1
  75. package/dist/src/offline/entry.js +2 -0
  76. package/dist/src/offline/entry.js.map +1 -1
  77. package/dist/src/offline/journal.d.ts +10 -0
  78. package/dist/src/offline/journal.d.ts.map +1 -1
  79. package/dist/src/offline/queue.d.ts +10 -0
  80. package/dist/src/offline/queue.d.ts.map +1 -1
  81. package/dist/src/offline/queue.js +29 -3
  82. package/dist/src/offline/queue.js.map +1 -1
  83. package/dist/src/offline/status.d.ts +7 -0
  84. package/dist/src/offline/status.d.ts.map +1 -1
  85. package/dist/src/offline/status.js.map +1 -1
  86. package/dist/src/testing/test-transactor.d.ts +9 -1
  87. package/dist/src/testing/test-transactor.d.ts.map +1 -1
  88. package/dist/src/testing/test-transactor.js +6 -1
  89. package/dist/src/testing/test-transactor.js.map +1 -1
  90. package/dist/src/transaction/actions-engine.d.ts +3 -0
  91. package/dist/src/transaction/actions-engine.d.ts.map +1 -1
  92. package/dist/src/transaction/actions-engine.js +3 -0
  93. package/dist/src/transaction/actions-engine.js.map +1 -1
  94. package/dist/src/transaction/coordinator.d.ts +10 -5
  95. package/dist/src/transaction/coordinator.d.ts.map +1 -1
  96. package/dist/src/transaction/coordinator.js +197 -48
  97. package/dist/src/transaction/coordinator.js.map +1 -1
  98. package/dist/src/transaction/entry-commit.d.ts +45 -10
  99. package/dist/src/transaction/entry-commit.d.ts.map +1 -1
  100. package/dist/src/transaction/entry-commit.js +20 -7
  101. package/dist/src/transaction/entry-commit.js.map +1 -1
  102. package/dist/src/transaction/errors.d.ts +69 -1
  103. package/dist/src/transaction/errors.d.ts.map +1 -1
  104. package/dist/src/transaction/errors.js +70 -1
  105. package/dist/src/transaction/errors.js.map +1 -1
  106. package/dist/src/transaction/index.d.ts +1 -1
  107. package/dist/src/transaction/index.d.ts.map +1 -1
  108. package/dist/src/transaction/index.js +1 -1
  109. package/dist/src/transaction/index.js.map +1 -1
  110. package/dist/src/transaction/session.d.ts.map +1 -1
  111. package/dist/src/transaction/session.js +18 -5
  112. package/dist/src/transaction/session.js.map +1 -1
  113. package/dist/src/transaction/transaction.d.ts +74 -15
  114. package/dist/src/transaction/transaction.d.ts.map +1 -1
  115. package/dist/src/transaction/transaction.js +35 -15
  116. package/dist/src/transaction/transaction.js.map +1 -1
  117. package/dist/src/transaction/validator.d.ts +25 -4
  118. package/dist/src/transaction/validator.d.ts.map +1 -1
  119. package/dist/src/transaction/validator.js +45 -5
  120. package/dist/src/transaction/validator.js.map +1 -1
  121. package/dist/src/transactor/block-floors.d.ts +12 -1
  122. package/dist/src/transactor/block-floors.d.ts.map +1 -1
  123. package/dist/src/transactor/block-floors.js +14 -1
  124. package/dist/src/transactor/block-floors.js.map +1 -1
  125. package/dist/src/transactor/network-transactor.d.ts +8 -0
  126. package/dist/src/transactor/network-transactor.d.ts.map +1 -1
  127. package/dist/src/transactor/network-transactor.js +8 -4
  128. package/dist/src/transactor/network-transactor.js.map +1 -1
  129. package/dist/src/transactor/transactor-source.d.ts +11 -0
  130. package/dist/src/transactor/transactor-source.d.ts.map +1 -1
  131. package/dist/src/transactor/transactor-source.js +5 -1
  132. package/dist/src/transactor/transactor-source.js.map +1 -1
  133. package/dist/src/transactor/transactor.d.ts +8 -0
  134. package/dist/src/transactor/transactor.d.ts.map +1 -1
  135. package/dist/src/transform/cache-source.d.ts +7 -0
  136. package/dist/src/transform/cache-source.d.ts.map +1 -1
  137. package/dist/src/transform/cache-source.js +14 -18
  138. package/dist/src/transform/cache-source.js.map +1 -1
  139. package/package.json +1 -1
  140. package/src/collection/action.ts +13 -5
  141. package/src/collection/collection.ts +250 -76
  142. package/src/collection/struct.ts +38 -8
  143. package/src/collection/write-attempts.ts +213 -109
  144. package/src/collections/diary/diary.ts +5 -1
  145. package/src/collections/tree/tree.ts +18 -11
  146. package/src/hlc/clock-store.ts +68 -0
  147. package/src/hlc/clock.ts +196 -0
  148. package/src/hlc/hlc.ts +56 -0
  149. package/src/hlc/index.ts +4 -0
  150. package/src/hlc/skew.ts +55 -0
  151. package/src/index.ts +2 -0
  152. package/src/lane/index.ts +1 -0
  153. package/src/lane/lane.ts +54 -0
  154. package/src/log/log.ts +341 -310
  155. package/src/log/struct.ts +62 -1
  156. package/src/network/i-repo.ts +11 -1
  157. package/src/network/stale-failure.ts +31 -7
  158. package/src/network/struct.ts +805 -770
  159. package/src/offline/entry.ts +16 -0
  160. package/src/offline/journal.ts +10 -0
  161. package/src/offline/queue.ts +38 -4
  162. package/src/offline/status.ts +7 -0
  163. package/src/testing/test-transactor.ts +1065 -1053
  164. package/src/transaction/actions-engine.ts +3 -0
  165. package/src/transaction/coordinator.ts +229 -54
  166. package/src/transaction/entry-commit.ts +56 -14
  167. package/src/transaction/errors.ts +60 -0
  168. package/src/transaction/index.ts +1 -1
  169. package/src/transaction/session.ts +18 -5
  170. package/src/transaction/transaction.ts +90 -17
  171. package/src/transaction/validator.ts +46 -5
  172. package/src/transactor/block-floors.ts +15 -1
  173. package/src/transactor/network-transactor.ts +15 -4
  174. package/src/transactor/transactor-source.ts +15 -1
  175. package/src/transactor/transactor.ts +9 -0
  176. package/src/transform/cache-source.ts +15 -17
package/README.md CHANGED
@@ -272,10 +272,14 @@ class CounterCollection {
272
272
  // Custom increment logic
273
273
  }
274
274
  },
275
- filterConflict: (local, remote) => {
276
- // Merge conflicting increments
277
- const remoteSum = remote.reduce((sum, r) => sum + r.data.value, 0);
278
- return { ...local, data: { ...local.data, value: local.data.value + remoteSum }};
275
+ // Increments merge, so the collection declares them convergent and says how to rebase one
276
+ merge: {
277
+ laneOf: () => 'convergent',
278
+ filterConflict: (local, remote) => {
279
+ // Merge conflicting increments
280
+ const remoteSum = remote.reduce((sum, r) => sum + r.data.value, 0);
281
+ return { ...local, data: { ...local.data, value: local.data.value + remoteSum }};
282
+ }
279
283
  }
280
284
  };
281
285
 
@@ -75,9 +75,12 @@ export type ActionContext = {
75
75
  * a log reaches (`Log.getActionContext`, `Log.getFrom`); or the context was never built from a
76
76
  * log at all. A caller printing this must carry a placeholder rather than invent an id.
77
77
  *
78
- * NOTE: linear in `committed`, which grows one entry per commit between context reads; fine now —
79
- * every caller is a `debug`-gated diagnostic, so this does not run on a normal path at all. If a
80
- * non-diagnostic caller ever appears, index the lookup or search from the end (the entry at the
81
- * context's own `rev` is normally the last one). */
78
+ * Searches from the end: `Collection.judgeAdoption` asks for the entry at the held context's own
79
+ * `rev` on every refresh that walks the log, and that entry is normally the last one.
80
+ *
81
+ * NOTE: still linear in `committed` for a revision near the front, and the list grows one entry per
82
+ * commit and truncates only at a checkpoint — which nothing writes today
83
+ * (tickets/backlog/debt-the-collection-log-never-writes-a-checkpoint). If a caller ever looks up old
84
+ * revisions on a hot path, index the list by revision. */
82
85
  export declare function actionIdAt(context: ActionContext, rev: number): ActionId | undefined;
83
86
  //# sourceMappingURL=action.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../src/collection/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;IACvB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,CAAC,CAAC;IACR,kEAAkE;IAClE,WAAW,CAAC,EAAE,cAAc,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAElH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,CAAC,cAAc,EAAE,MA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,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAElH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,SAAS,EAAE,mBAAsE,CAAC;AAE/F,+BAA+B;AAC/B,wBAAgB,UAAU,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,mBAAmB,GAAG,mBAAmB,CAE9F;AAED,MAAM,MAAM,SAAS,GAAG;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,gDAAgD;AAChD,MAAM,MAAM,aAAa,GAAG;IAC3B,kDAAkD;IAClD,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,uCAAuC;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ;;;;;;;;;;;;;;gCAc4B;IAC5B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;0DAe0D;AAC1D,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAOpF"}
@@ -13,11 +13,19 @@ export function addTallies(a, b) {
13
13
  * a log reaches (`Log.getActionContext`, `Log.getFrom`); or the context was never built from a
14
14
  * log at all. A caller printing this must carry a placeholder rather than invent an id.
15
15
  *
16
- * NOTE: linear in `committed`, which grows one entry per commit between context reads; fine now —
17
- * every caller is a `debug`-gated diagnostic, so this does not run on a normal path at all. If a
18
- * non-diagnostic caller ever appears, index the lookup or search from the end (the entry at the
19
- * context's own `rev` is normally the last one). */
16
+ * Searches from the end: `Collection.judgeAdoption` asks for the entry at the held context's own
17
+ * `rev` on every refresh that walks the log, and that entry is normally the last one.
18
+ *
19
+ * NOTE: still linear in `committed` for a revision near the front, and the list grows one entry per
20
+ * commit and truncates only at a checkpoint — which nothing writes today
21
+ * (tickets/backlog/debt-the-collection-log-never-writes-a-checkpoint). If a caller ever looks up old
22
+ * revisions on a hot path, index the list by revision. */
20
23
  export function actionIdAt(context, rev) {
21
- return context.committed.find(entry => entry.rev === rev)?.actionId;
24
+ for (let i = context.committed.length - 1; i >= 0; i--) {
25
+ if (context.committed[i].rev === rev) {
26
+ return context.committed[i].actionId;
27
+ }
28
+ }
29
+ return undefined;
22
30
  }
23
31
  //# sourceMappingURL=action.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"action.js","sourceRoot":"","sources":["../../../src/collection/action.ts"],"names":[],"mappings":"AA2CA,mDAAmD;AACnD,MAAM,CAAC,MAAM,SAAS,GAAwB,MAAM,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAE/F,+BAA+B;AAC/B,MAAM,UAAU,UAAU,CAAC,CAAsB,EAAE,CAAsB;IACxE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;AAChG,CAAC;AA+BD;;;;;;;;;;;;oDAYoD;AACpD,MAAM,UAAU,UAAU,CAAC,OAAsB,EAAE,GAAW;IAC7D,OAAO,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,QAAQ,CAAC;AACrE,CAAC"}
1
+ {"version":3,"file":"action.js","sourceRoot":"","sources":["../../../src/collection/action.ts"],"names":[],"mappings":"AA2CA,mDAAmD;AACnD,MAAM,CAAC,MAAM,SAAS,GAAwB,MAAM,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAE/F,+BAA+B;AAC/B,MAAM,UAAU,UAAU,CAAC,CAAsB,EAAE,CAAsB;IACxE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc,GAAG,CAAC,CAAC,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;AAChG,CAAC;AA+BD;;;;;;;;;;;;;;;0DAe0D;AAC1D,MAAM,UAAU,UAAU,CAAC,OAAsB,EAAE,GAAW;IAC7D,KAAK,IAAI,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QACxD,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC,CAAE,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC;YACvC,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC,CAAE,CAAC,QAAQ,CAAC;QACvC,CAAC;IACF,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC"}
@@ -12,6 +12,7 @@ import type { ActionContext, ActionRev, AlreadyAppliedTally } from "./action.js"
12
12
  import type { WriteIdentity } from "./write-attempts.js";
13
13
  import type { HeadCommitHandle } from "./head-commit.js";
14
14
  import type { ReadDependency } from "../transaction/transaction.js";
15
+ import { type Lane } from "../lane/lane.js";
15
16
  /** What one refresh ({@link Collection.refreshInFlight}, and the refresh inside a sync) found out
16
17
  * about the write in flight on the instance's behalf. The caller hands in an empty report and the
17
18
  * refresh fills it in AS IT GOES, rather than returning it at the end, so a refresh that throws
@@ -33,20 +34,41 @@ export type RefreshReport = {
33
34
  durability?: WriteDurability;
34
35
  };
35
36
  };
37
+ /**
38
+ * The convergent lane's conflict rule for a collection (`Lane` in `packages/db-core/src/lane/lane.ts`):
39
+ * which of its actions may be committed by one machine without first agreeing with the others and
40
+ * merged into their concurrent writes later, and how such an action is rebased over a stranger's
41
+ * committed ones. A collection with NO declaration is strong: every action is `serializable`, the
42
+ * revision order decides every conflict, and nothing merges — today's behaviour, and `Tree`'s. The
43
+ * declaration is the opt-in; db-core has no notion of a table's profile beyond it.
44
+ *
45
+ * Convergence is a property of the OPERATION, never of the collection as a whole (idempotence is not
46
+ * the criterion — see `Lane`), which is why the declaration classifies per action.
47
+ */
48
+ export type ConvergentMerge<TAction> = {
49
+ /** The lane of one of this collection's actions when no engine has classified it: a bare
50
+ * `Collection.sync` with no `SyncOptions.lane`, or an offline-queue entry sealed without a
51
+ * classification (`OfflineQueue.enqueue`). The stricter answer over several actions is the write's
52
+ * (`Collection.laneOf`). */
53
+ laneOf(action: Action<TAction>): Lane;
54
+ /** Rebase one of this collection's CONVERGENT actions over a stranger's committed actions, which a
55
+ * refresh found in the log after the action was staged. Offered only an action whose
56
+ * {@link laneOf} is `convergent`: a serializable action is kept as-is, since its guards decide on
57
+ * replay. Return the same instance to keep the action unchanged, a new instance to apply in its
58
+ * place (re-staged by the conflict replay), or `undefined` to drop it. Optional, since a convergent
59
+ * action that touches no shared block (a diary append) has nothing to rebase. */
60
+ filterConflict?(action: Action<TAction>, committed: Action<TAction>[]): Action<TAction> | undefined;
61
+ };
36
62
  export type CollectionInitOptions<TAction> = {
37
63
  /** One handler per action type. A handler may answer what the action accepted as already applied
38
64
  * ({@link AlreadyAppliedTally}); one that answers nothing counts as the zero tally, so a collection
39
65
  * type with no such notion returns nothing. */
40
66
  modules: Record<ActionType, ActionHandler<TAction, AlreadyAppliedTally | void>>;
41
67
  createHeaderBlock: (id: BlockId, store: BlockStore<IBlock>) => IBlock;
42
- /** Called for each local action that is potentially in conflict with a remote action.
43
- * @param action - The local action to check
44
- * @param potential - The remote actions that are potentially in conflict
45
- * @returns The original action (return the same instance to keep it as-is), a replacement
46
- * action (return a new instance to apply instead of the original — it is re-staged via
47
- * the conflict replay), or undefined to discard this action
48
- */
49
- filterConflict?: (action: Action<TAction>, potential: Action<TAction>[]) => Action<TAction> | undefined;
68
+ /** The convergent lane's conflict rule for this collection ({@link ConvergentMerge}): which of its
69
+ * actions are convergent, and how one is rebased over a stranger's committed actions. Omit for a
70
+ * strong collection, whose every action is `serializable` and is kept as-is through a refresh. */
71
+ merge?: ConvergentMerge<TAction>;
50
72
  /** Called once per refusal of a SEALED segment discovered by a replay (see
51
73
  * {@link Collection.replayActions}): the segment's entry id and the handler's refusal. Called
52
74
  * synchronously from inside the replay, under the collection latch, so it MUST NOT call a
@@ -129,7 +151,8 @@ export declare class Collection<TAction> implements ICollection<TAction> {
129
151
  * {@link updateInternal}, and shared with every read source this handle builds (see
130
152
  * {@link BlockFloors}). */
131
153
  private readonly floors;
132
- private readonly filterConflict?;
154
+ /** See {@link CollectionInitOptions.merge}. */
155
+ private readonly merge?;
133
156
  /** See {@link CollectionInitOptions.onSealedRefused}. */
134
157
  private readonly onSealedRefused?;
135
158
  /** See {@link CollectionInitOptions.onViewChanged}. */
@@ -248,7 +271,9 @@ export declare class Collection<TAction> implements ICollection<TAction> {
248
271
  /** What each block named by a walked log entry must be at least as new as — raised by
249
272
  * {@link updateInternal}, and shared with every read source this handle builds (see
250
273
  * {@link BlockFloors}). */
251
- floors: BlockFloors, filterConflict?: ((action: Action<TAction>, potential: Action<TAction>[]) => Action<TAction> | undefined) | undefined,
274
+ floors: BlockFloors,
275
+ /** See {@link CollectionInitOptions.merge}. */
276
+ merge?: ConvergentMerge<TAction> | undefined,
252
277
  /** See {@link CollectionInitOptions.onSealedRefused}. */
253
278
  onSealedRefused?: ((entryId: EntryId, error: ActionRefusedError) => void) | undefined,
254
279
  /** See {@link CollectionInitOptions.onViewChanged}. */
@@ -359,6 +384,14 @@ export declare class Collection<TAction> implements ICollection<TAction> {
359
384
  * Only the tail block's entries: they are what the open read, and they hold the newest commits —
360
385
  * the ones a durability window can tear. Invalidation entries set no floor, as on a refresh. */
361
386
  private static floorTailEntries;
387
+ /** Have `clock` observe the highest HLC among the opened log's tail block entries, which the open
388
+ * has read but does not walk — the open's half of what a refresh's walk feeds the clock
389
+ * ({@link forgetAndAdopt}), so a write through this handle never mints below a write it has seen.
390
+ * Only the tail block, which the open read anyway; an older log block would cost a read for entries
391
+ * committed earlier. Their HLCs are usually lower, but not always — an offline entry keeps the HLC
392
+ * minted at enqueue and a retry its first attempt's (the `NOTE:` at `WriteIdentity.hlc`) — so
393
+ * a write may mint below an entry in an older block, one this handle never read. */
394
+ private static observeTailEntries;
362
395
  /** Adopt a freshly-read action context WITHOUT ever lowering the revision already held.
363
396
  *
364
397
  * The revision a collection last committed at is knowledge it earned; a read that found
@@ -385,23 +418,20 @@ export declare class Collection<TAction> implements ICollection<TAction> {
385
418
  * tag, two handles' lines interleave into what reads like one handle contradicting itself.
386
419
  *
387
420
  * Logs, does not throw — same reasoning as {@link reportShortfall}: `update()` runs
388
- * blanket-style over every registered collection between commit retries, and aborting here
389
- * would promote a diagnosis to production behaviour before the line has ever been seen to
390
- * fire in the wild. Adoption then proceeds unchanged, which means the line is a PER-DISCOVERY
391
- * report, not a per-refresh one: adopting `next` overwrites the held lineage marker with the
392
- * log's, so the next refresh of this instance compares log-to-log and stays silent — even
393
- * though block content materialized under the old lineage may still be in caches. The line
394
- * marks the refresh that first observed the disagreement.
395
- *
396
- * NOTE: adoption resolves the CONTEXT disagreement, not the content one — the read caches on
397
- * this instance still hold blocks materialized under the old lineage, and since the revision
398
- * did not change nothing re-reads them. Conditional today: no fork has been reproduced (see
399
- * the still-open upstream reproducer), so this instrument exists to find out whether one
400
- * happens at all. If the line is ever seen firing in the field, decide then whether a
401
- * divergence should also drop the read cache (and whether to keep re-reporting per refresh)
402
- * — that is a behaviour change, and this seam deliberately makes none.
403
- *
404
- * The comparison is {@link earliestFork}, not a single lookup at the current revision: the
421
+ * blanket-style over every registered collection between commit retries. Whether the read is
422
+ * adopted, and whether it is another lineage, is {@link judgeAdoption}'s call, made before this
423
+ * runs so a refresh can act on it first: a refresh that ADOPTS another lineage drops its whole
424
+ * read cache and its floors and re-stages every staged action ({@link forgetAndAdopt},
425
+ * {@link mustReplay}), since everything it cached and computed was computed against a history the
426
+ * network does not hold; an open has no cache to drop and nothing staged. The line is therefore a
427
+ * PER-DISCOVERY report: adopting `next` overwrites the held lineage marker with the log's, the
428
+ * drop leaves the handle consistent with the log, and the next refresh compares log to log and
429
+ * has nothing to report. A REFUSED read leaves the held marker in place, so a fork sealed by a
430
+ * `collection:context-not-lowered` refusal is reported on every refresh, beside that line, with
431
+ * nothing dropped — bringing such a handle onto the network's lineage is reconciliation, backlog
432
+ * `feat-replay-mode-collections-merge-divergent-histories`.
433
+ *
434
+ * The comparison printed is {@link earliestFork}, not a single lookup at the current revision: the
405
435
  * two `committed` lists overlap across several revisions, and the LOWEST one they disagree at
406
436
  * is where the lineages actually parted — a fork below the current revision was previously
407
437
  * silent. `forkRev=` names it, `heldAction=`/`readAction=` are the two ids AT it, and
@@ -418,14 +448,37 @@ export declare class Collection<TAction> implements ICollection<TAction> {
418
448
  * the NOTE in {@link bootstrapContext}), which is exactly the case {@link earliestFork} has no
419
449
  * shared revision to report on.
420
450
  *
421
- * Gated on `log.enabled`, like every {@link actionIdAt} caller: the comparison buys nothing
422
- * when the line has no sink, and the lists — one entry per commit between context reads,
423
- * truncated at each checkpoint — are only walked on a run that has the namespace turned on.
451
+ * The two printed comparisons are gated on `log.enabled`: they buy nothing when the line has no
452
+ * sink. Nothing the handle DOES is: the adoption and the lineage verdict behind it
453
+ * ({@link judgeAdoption}) run whatever the logging.
424
454
  * Silence proves nothing either way, because a revision is only comparable when BOTH sides
425
455
  * name an action for it: an invented collection has no context at all, a revision slot the log
426
456
  * gave to a checkpoint or invalidation entry names none, and a revision older than the read
427
- * log's most recent checkpoint has already fallen off the read side's list. */
457
+ * log's most recent checkpoint has already fallen off the read side's list.
458
+ *
459
+ * @param adoption what adopting `next` does, as {@link judgeAdoption} answers it for the context
460
+ * `source` holds now — passed in by a caller that had to act on it before calling. */
428
461
  private static advanceContext;
462
+ /** Whether a read context `next` is adopted over the `held` one, and whether it is another
463
+ * lineage ({@link Adoption}). Runs whatever the logging, because the answer is behaviour.
464
+ *
465
+ * Another lineage means the two name different actions at the HELD revision. One comparison is
466
+ * enough because an action id is unique per commit: two lineages that parted at or below the held
467
+ * revision name different actions at every revision both have reached since, the held one
468
+ * included. The exception, one action landing on both sides (a writer's torn retry), is the same
469
+ * lineage at that revision, which is the right answer. A side naming no action there is missing
470
+ * evidence, not disagreement, as in {@link earliestFork} — the held revision's slot went to an
471
+ * invalidation or checkpoint entry, or it predates the read side's most recent checkpoint — so a
472
+ * fork visible only below such a slot is not acted on (the line may still report it). A refused
473
+ * read names no action at the held revision, being below it, so `adopt-divergent` never comes
474
+ * with a refusal.
475
+ *
476
+ * NOTE: two {@link actionIdAt} scans per refresh that walks the log, never per read. Each searches
477
+ * from the end: the held side's entry is normally its last, and the read side's is as far back as
478
+ * the entries the walk found. Both lists truncate only at a checkpoint, which nothing writes yet
479
+ * (tickets/backlog/debt-the-collection-log-never-writes-a-checkpoint); if they grow long enough
480
+ * for that to show, index them by revision. */
481
+ private static judgeAdoption;
429
482
  /** The EARLIEST revision the two contexts provably disagree about: the lowest revision both
430
483
  * `committed` lists name an action for, where the two ids differ.
431
484
  *
@@ -503,10 +556,8 @@ export declare class Collection<TAction> implements ICollection<TAction> {
503
556
  * ask for another (see {@link completeOwnEntry}).
504
557
  *
505
558
  * `tailFloor` is optional: a revision a responder confirmed is taken, when the caller has one (see
506
- * {@link updateInternal}). `TransactionCoordinator.commit` has none to pass today — its commit loop
507
- * does not see the confirmed revision (backlog:
508
- * debt-multi-collection-retry-cannot-see-the-taken-revision) — and this is the parameter it will
509
- * pass it through. */
559
+ * {@link updateInternal}). `TransactionCoordinator.commit` passes the highest one its refusals of
560
+ * THIS collection carried (`RetryBudget.tailFloor`), and nothing for a collection none did. */
510
561
  refreshInFlight(report: RefreshReport, lastChance: boolean, tailFloor?: number): Promise<void>;
511
562
  /** Finishes a half-landed write BEFORE its own log entry is consumed, so that consuming never
512
563
  * reports a write as saved on the strength of its log entry alone.
@@ -642,8 +693,11 @@ export declare class Collection<TAction> implements ICollection<TAction> {
642
693
  * replace => new instance.
643
694
  *
644
695
  * A SEALED segment's action list is the queue entry's own and is never rewritten (invariant 3
645
- * of docs/offline-sync.md §The segment model), so the hook is not offered them. `Tree` and
646
- * `Diary` install no hook, so nothing observable changes for them either way.
696
+ * of docs/offline-sync.md §The segment model), so the hook is not offered them. The hook is the
697
+ * convergent lane's rule ({@link ConvergentMerge.filterConflict}): {@link doFilterConflict} offers
698
+ * it only an action the declaration classifies `convergent`, and keeps a serializable one as-is.
699
+ * `Tree` declares nothing and `Diary` declares no hook, so nothing observable changes for them
700
+ * either way.
647
701
  *
648
702
  * NOTE: a filterConflict hook that always allocates a fresh (but equal) instance instead of
649
703
  * returning the same one forces a replay on every update — if that ever shows up as a hot path,
@@ -696,7 +750,25 @@ export declare class Collection<TAction> implements ICollection<TAction> {
696
750
  * context at all, and a log read that lags what this handle already committed yields an older
697
751
  * one; neither is grounds for forgetting the revision held. It also has to precede
698
752
  * {@link replayActions}, which re-reads blocks through `this.source` at whatever revision the
699
- * context names — replaying first would refill the cache at the revision being left. */
753
+ * context names — replaying first would refill the cache at the revision being left.
754
+ *
755
+ * **An adopted divergence forgets everything first** ({@link judgeAdoption}): the whole read cache
756
+ * and every floor, ahead of the per-entry loop so this walk's floors — the new lineage's — are the
757
+ * ones left standing. Not just the blocks the walked entries name: the walk covers only entries
758
+ * above the held revision, so the blocks the old lineage built at and below it are named by
759
+ * entries this handle will never walk, the cache has no expiry, and an idle refresh stops after
760
+ * one request while the log does not move — nothing would ever clear them. And not the floors
761
+ * kept: a floor raised under the old lineage is no bound on the new one, where the block may
762
+ * legitimately sit below it, and would make every read of it a below-floor answer for the life of
763
+ * the handle. The header and tail {@link keepLogEnds} offers came from the new lineage and may be
764
+ * kept. The staged actions were computed against the old content, so the verdict is returned for
765
+ * {@link mustReplay}.
766
+ *
767
+ * The handle's clock observes the highest HLC the walk read (`GetFromResult.hlcHighWater`), so a
768
+ * write through it never mints below an entry it has seen — whatever the verdict, since a clock
769
+ * only rises and the entries were read either way.
770
+ *
771
+ * @returns what the adoption did, as {@link judgeAdoption} answered it before anything changed. */
700
772
  private forgetAndAdopt;
701
773
  /** Put the header and log tail block {@link readLogEnds} already fetched into a handle's own
702
774
  * cache, so the next read of either is a hit rather than a second fetch of a block just
@@ -803,7 +875,8 @@ export declare class Collection<TAction> implements ICollection<TAction> {
803
875
  * claim (`collection:context-short-of-tail`, or `collection:context-not-lowered` for a handle
804
876
  * pinned by an over-claiming tail), or an invalidation or checkpoint took the newest slot;
805
877
  * - any action entry in the tail block naming a different action than `held` names at the same
806
- * revision (`collection:lineage-divergence`, and the walk's adoption of the log's list).
878
+ * revision (`collection:lineage-divergence`, and the walk's adoption of the log's list, which
879
+ * drops the read cache when it adopts another lineage — see {@link forgetAndAdopt}).
807
880
  *
808
881
  * NOTE: the lineage comparison sees only the entries the tail block holds. A fork below them, on
809
882
  * a log that has not moved, is not looked at again until a refresh finds something new — that
@@ -847,7 +920,9 @@ export declare class Collection<TAction> implements ICollection<TAction> {
847
920
  * (`index-backfill-cost.spec.ts`, `cold-apply-cost.spec.ts`), because the replay's reads are
848
921
  * served from `sourceCache`. If a long transaction's reads ever show up as slow, narrow the
849
922
  * replay to the actions whose reads the adopted entries actually invalidated — NOT back to
850
- * conflicts alone, which is the defect above. */
923
+ * conflicts alone, which is the defect above.
924
+ *
925
+ * @param adoption what the refresh's adoption did ({@link forgetAndAdopt}). */
851
926
  private mustReplay;
852
927
  /** Re-judge every staged update's pinned base against the read cache and re-stage the pending
853
928
  * queue if any has moved. Runs immediately before each pend attempt — {@link syncAttempts} and
@@ -1264,7 +1339,7 @@ export declare class Collection<TAction> implements ICollection<TAction> {
1264
1339
  *
1265
1340
  * `cycle` is what every send of the cycle carries ({@link InFlightCycle}); a re-mark replaces it,
1266
1341
  * which is harmless because every caller re-marks with what it marked. */
1267
- beginInFlightAction(actionId: ActionId, cycle?: InFlightCycle): () => void;
1342
+ beginInFlightAction(actionId: ActionId, cycle: InFlightCycle): () => void;
1268
1343
  /** Keep what a FAILED attempt under `actionId` sent, so that if the refresh before its retry
1269
1344
  * finds that attempt's own log entry it can finish the action rather than assume it finished
1270
1345
  * (see {@link inFlightAttempt} and {@link completeOwnEntry}). Every write path that marks an
@@ -1378,9 +1453,9 @@ export declare class Collection<TAction> implements ICollection<TAction> {
1378
1453
  * segment; and seeds the retained attempt with `options.resume` when one is given, so that the
1379
1454
  * opening refresh can finish an earlier cycle's torn attempt from it ({@link completeOwnEntry}) —
1380
1455
  * and `stage()` re-sends it verbatim while the next attempt would request its revision
1381
- * ({@link resumedAttempt}). The rest of `options` is the cycle's ({@link InFlightCycle}), recorded
1382
- * with the in-flight mark, so the handle's `send()` and a refresh's re-send of a torn attempt both
1383
- * carry it.
1456
+ * ({@link resumedAttempt}). The rest of `options` is the cycle's ({@link InFlightCycle}, its lane
1457
+ * taken from `identity`), recorded with the in-flight mark, so the handle's `send()` and a
1458
+ * refresh's re-send of a torn attempt both carry it.
1384
1459
  *
1385
1460
  * **The target.** The live tracker holds every sealed segment and the open one, cumulatively, so
1386
1461
  * an attempt cannot run on a copy of it the way a sync's does. It runs on a HEAD TRACKER instead
@@ -1439,8 +1514,12 @@ export declare class Collection<TAction> implements ICollection<TAction> {
1439
1514
  /** The tracker a head attempt is built from (see {@link commitHead}): `current`, while it was
1440
1515
  * built for the revision the next attempt requests and no base under it has moved; otherwise a
1441
1516
  * fresh one ({@link buildHeadTracker}). A revision that moved is a write that is genuinely
1442
- * different. A base that moved at the same revision is re-judged exactly as
1443
- * {@link restageIfBasesMoved} re-judges the live queue before an attempt, and rebuilds.
1517
+ * different, and so is one whose held lineage moved at the same revision: a refresh between
1518
+ * attempts that adopted another lineage ({@link judgeAdoption}) dropped the read cache the
1519
+ * tracker was staged over, and an action that inserted a block computed from that content pinned
1520
+ * no base the re-judge below would see as moved. A base that moved at the same revision is
1521
+ * re-judged exactly as {@link restageIfBasesMoved} re-judges the live queue before an attempt,
1522
+ * and rebuilds.
1444
1523
  * NOTE: that rebuild is the same exception to the byte-identical retry that {@link syncAttempts}
1445
1524
  * records at its `restageIfBasesMoved` call — fresh ids for the blocks the actions insert under
1446
1525
  * an unchanged `(action id, revision)` — reached the same narrow way and refused by storage's
@@ -1520,7 +1599,16 @@ export declare class Collection<TAction> implements ICollection<TAction> {
1520
1599
  private recordSealedRefusal;
1521
1600
  getReadDependencies(): ReadDependency[];
1522
1601
  clearReadDependencies(): void;
1602
+ /** The lane of a write made of `actions` under this collection's merge declaration
1603
+ * ({@link CollectionInitOptions.merge}): the stricter lane over the declaration's answer for each
1604
+ * (`stricterLane`), `serializable` without a declaration and for an empty list. Pure. The source
1605
+ * of a sync's lane when its caller gave none (`SyncOptions.lane`), and of a queued entry's
1606
+ * (`OfflineQueue.enqueue`). */
1607
+ laneOf(actions: readonly Action<TAction>[]): Lane;
1523
1608
  /** Called for each local action that may be in conflict with a remote action (always called under latch).
1609
+ * The merge declaration's hook ({@link ConvergentMerge.filterConflict}) decides only for an action the
1610
+ * declaration classifies `convergent`; a serializable action is kept as-is, since its guards decide
1611
+ * on replay, and so is every action of a collection with no declaration or no hook.
1524
1612
  * @param action - The local action to check
1525
1613
  * @param potential - The remote actions that are potentially in conflict
1526
1614
  * @returns The effective action to keep: the original (unchanged), a replacement
@@ -1 +1 @@
1
- {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../../src/collection/collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAA+C,MAAM,aAAa,CAAC;AAKlL,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,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