@optimystic/db-p2p 1.0.0-beta.3 → 1.1.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 (234) hide show
  1. package/dist/src/cluster/block-transfer-service.d.ts +73 -1
  2. package/dist/src/cluster/block-transfer-service.d.ts.map +1 -1
  3. package/dist/src/cluster/block-transfer-service.js +70 -3
  4. package/dist/src/cluster/block-transfer-service.js.map +1 -1
  5. package/dist/src/cluster/block-transfer.d.ts +16 -1
  6. package/dist/src/cluster/block-transfer.d.ts.map +1 -1
  7. package/dist/src/cluster/block-transfer.js +73 -72
  8. package/dist/src/cluster/block-transfer.js.map +1 -1
  9. package/dist/src/cluster/client.d.ts +4 -6
  10. package/dist/src/cluster/client.d.ts.map +1 -1
  11. package/dist/src/cluster/client.js +8 -13
  12. package/dist/src/cluster/client.js.map +1 -1
  13. package/dist/src/cluster/cluster-policy.d.ts +2 -1
  14. package/dist/src/cluster/cluster-policy.d.ts.map +1 -1
  15. package/dist/src/cluster/cluster-policy.js.map +1 -1
  16. package/dist/src/cluster/cluster-repo.d.ts +155 -9
  17. package/dist/src/cluster/cluster-repo.d.ts.map +1 -1
  18. package/dist/src/cluster/cluster-repo.js +446 -58
  19. package/dist/src/cluster/cluster-repo.js.map +1 -1
  20. package/dist/src/cluster/commit-proof.js +2 -2
  21. package/dist/src/cluster/race-resolution.d.ts +51 -7
  22. package/dist/src/cluster/race-resolution.d.ts.map +1 -1
  23. package/dist/src/cluster/race-resolution.js +71 -7
  24. package/dist/src/cluster/race-resolution.js.map +1 -1
  25. package/dist/src/cluster/rebalance-monitor.d.ts +67 -5
  26. package/dist/src/cluster/rebalance-monitor.d.ts.map +1 -1
  27. package/dist/src/cluster/rebalance-monitor.js +120 -26
  28. package/dist/src/cluster/rebalance-monitor.js.map +1 -1
  29. package/dist/src/cluster/spread-on-churn.d.ts.map +1 -1
  30. package/dist/src/cluster/spread-on-churn.js +34 -47
  31. package/dist/src/cluster/spread-on-churn.js.map +1 -1
  32. package/dist/src/cohort-topic/host.d.ts.map +1 -1
  33. package/dist/src/cohort-topic/host.js +8 -6
  34. package/dist/src/cohort-topic/host.js.map +1 -1
  35. package/dist/src/cohort-topic/membership-source.js +1 -1
  36. package/dist/src/cohort-topic/membership-source.js.map +1 -1
  37. package/dist/src/cohort-topic/peer-codec.d.ts.map +1 -1
  38. package/dist/src/cohort-topic/peer-codec.js +5 -2
  39. package/dist/src/cohort-topic/peer-codec.js.map +1 -1
  40. package/dist/src/cohort-topic/stream-util.d.ts +24 -3
  41. package/dist/src/cohort-topic/stream-util.d.ts.map +1 -1
  42. package/dist/src/cohort-topic/stream-util.js +36 -3
  43. package/dist/src/cohort-topic/stream-util.js.map +1 -1
  44. package/dist/src/cohort-topic/topic-router.d.ts +9 -0
  45. package/dist/src/cohort-topic/topic-router.d.ts.map +1 -1
  46. package/dist/src/cohort-topic/topic-router.js +12 -2
  47. package/dist/src/cohort-topic/topic-router.js.map +1 -1
  48. package/dist/src/dispute/client.d.ts.map +1 -1
  49. package/dist/src/dispute/client.js +15 -3
  50. package/dist/src/dispute/client.js.map +1 -1
  51. package/dist/src/index.d.ts +5 -0
  52. package/dist/src/index.d.ts.map +1 -1
  53. package/dist/src/index.js +5 -0
  54. package/dist/src/index.js.map +1 -1
  55. package/dist/src/libp2p-key-network.d.ts +78 -17
  56. package/dist/src/libp2p-key-network.d.ts.map +1 -1
  57. package/dist/src/libp2p-key-network.js +234 -147
  58. package/dist/src/libp2p-key-network.js.map +1 -1
  59. package/dist/src/libp2p-node-base.d.ts +35 -1
  60. package/dist/src/libp2p-node-base.d.ts.map +1 -1
  61. package/dist/src/libp2p-node-base.js +151 -26
  62. package/dist/src/libp2p-node-base.js.map +1 -1
  63. package/dist/src/libp2p-node-rn.d.ts +2 -2
  64. package/dist/src/libp2p-node-rn.d.ts.map +1 -1
  65. package/dist/src/libp2p-node-rn.js.map +1 -1
  66. package/dist/src/libp2p-node.d.ts +2 -2
  67. package/dist/src/libp2p-node.d.ts.map +1 -1
  68. package/dist/src/libp2p-node.js.map +1 -1
  69. package/dist/src/logger.d.ts.map +1 -1
  70. package/dist/src/logger.js +6 -1
  71. package/dist/src/logger.js.map +1 -1
  72. package/dist/src/matchmaking/query-transport.d.ts +3 -4
  73. package/dist/src/matchmaking/query-transport.d.ts.map +1 -1
  74. package/dist/src/matchmaking/query-transport.js +9 -9
  75. package/dist/src/matchmaking/query-transport.js.map +1 -1
  76. package/dist/src/network/network-manager-service.d.ts +10 -5
  77. package/dist/src/network/network-manager-service.d.ts.map +1 -1
  78. package/dist/src/network/network-manager-service.js +11 -2
  79. package/dist/src/network/network-manager-service.js.map +1 -1
  80. package/dist/src/network/relay-reservation.d.ts +170 -0
  81. package/dist/src/network/relay-reservation.d.ts.map +1 -0
  82. package/dist/src/network/relay-reservation.js +527 -0
  83. package/dist/src/network/relay-reservation.js.map +1 -0
  84. package/dist/src/pend-validation.d.ts +3 -2
  85. package/dist/src/pend-validation.d.ts.map +1 -1
  86. package/dist/src/pend-validation.js +3 -2
  87. package/dist/src/pend-validation.js.map +1 -1
  88. package/dist/src/protocol-client.d.ts +8 -1
  89. package/dist/src/protocol-client.d.ts.map +1 -1
  90. package/dist/src/protocol-client.js +11 -0
  91. package/dist/src/protocol-client.js.map +1 -1
  92. package/dist/src/reactivity/forwarder-host.d.ts +2 -1
  93. package/dist/src/reactivity/forwarder-host.d.ts.map +1 -1
  94. package/dist/src/reactivity/forwarder-host.js +2 -1
  95. package/dist/src/reactivity/forwarder-host.js.map +1 -1
  96. package/dist/src/reactivity/origination-manager.d.ts +3 -3
  97. package/dist/src/reactivity/origination-manager.js +3 -3
  98. package/dist/src/reactivity/recover-transport.d.ts +22 -14
  99. package/dist/src/reactivity/recover-transport.d.ts.map +1 -1
  100. package/dist/src/reactivity/recover-transport.js +32 -19
  101. package/dist/src/reactivity/recover-transport.js.map +1 -1
  102. package/dist/src/reactivity/subscription-manager.d.ts +2 -2
  103. package/dist/src/reactivity/topic-bytes.d.ts +6 -7
  104. package/dist/src/reactivity/topic-bytes.d.ts.map +1 -1
  105. package/dist/src/reactivity/topic-bytes.js +8 -9
  106. package/dist/src/reactivity/topic-bytes.js.map +1 -1
  107. package/dist/src/repo/client.d.ts +5 -2
  108. package/dist/src/repo/client.d.ts.map +1 -1
  109. package/dist/src/repo/client.js +49 -40
  110. package/dist/src/repo/client.js.map +1 -1
  111. package/dist/src/repo/cluster-coordinator.d.ts +96 -11
  112. package/dist/src/repo/cluster-coordinator.d.ts.map +1 -1
  113. package/dist/src/repo/cluster-coordinator.js +164 -25
  114. package/dist/src/repo/cluster-coordinator.js.map +1 -1
  115. package/dist/src/repo/coordinator-repo.d.ts +240 -122
  116. package/dist/src/repo/coordinator-repo.d.ts.map +1 -1
  117. package/dist/src/repo/coordinator-repo.js +627 -473
  118. package/dist/src/repo/coordinator-repo.js.map +1 -1
  119. package/dist/src/repo/i-under-replication-ledger.d.ts +87 -0
  120. package/dist/src/repo/i-under-replication-ledger.d.ts.map +1 -0
  121. package/dist/src/repo/i-under-replication-ledger.js +2 -0
  122. package/dist/src/repo/i-under-replication-ledger.js.map +1 -0
  123. package/dist/src/repo/kv-under-replication-ledger.d.ts +91 -0
  124. package/dist/src/repo/kv-under-replication-ledger.d.ts.map +1 -0
  125. package/dist/src/repo/kv-under-replication-ledger.js +287 -0
  126. package/dist/src/repo/kv-under-replication-ledger.js.map +1 -0
  127. package/dist/src/repo/responsibility.d.ts +37 -0
  128. package/dist/src/repo/responsibility.d.ts.map +1 -0
  129. package/dist/src/repo/responsibility.js +37 -0
  130. package/dist/src/repo/responsibility.js.map +1 -0
  131. package/dist/src/repo/service.d.ts +44 -15
  132. package/dist/src/repo/service.d.ts.map +1 -1
  133. package/dist/src/repo/service.js +64 -27
  134. package/dist/src/repo/service.js.map +1 -1
  135. package/dist/src/repo/stuck-reservation.d.ts +127 -0
  136. package/dist/src/repo/stuck-reservation.d.ts.map +1 -0
  137. package/dist/src/repo/stuck-reservation.js +179 -0
  138. package/dist/src/repo/stuck-reservation.js.map +1 -0
  139. package/dist/src/repo/under-replication-drain.d.ts +208 -0
  140. package/dist/src/repo/under-replication-drain.d.ts.map +1 -0
  141. package/dist/src/repo/under-replication-drain.js +461 -0
  142. package/dist/src/repo/under-replication-drain.js.map +1 -0
  143. package/dist/src/rn.d.ts +5 -0
  144. package/dist/src/rn.d.ts.map +1 -1
  145. package/dist/src/rn.js +5 -0
  146. package/dist/src/rn.js.map +1 -1
  147. package/dist/src/storage/block-latch.d.ts +3 -2
  148. package/dist/src/storage/block-latch.d.ts.map +1 -1
  149. package/dist/src/storage/block-latch.js +7 -4
  150. package/dist/src/storage/block-latch.js.map +1 -1
  151. package/dist/src/storage/block-storage.d.ts +45 -3
  152. package/dist/src/storage/block-storage.d.ts.map +1 -1
  153. package/dist/src/storage/block-storage.js +156 -9
  154. package/dist/src/storage/block-storage.js.map +1 -1
  155. package/dist/src/storage/i-block-storage.d.ts +57 -5
  156. package/dist/src/storage/i-block-storage.d.ts.map +1 -1
  157. package/dist/src/storage/i-block-storage.js.map +1 -1
  158. package/dist/src/storage/pending-claim.d.ts +167 -0
  159. package/dist/src/storage/pending-claim.d.ts.map +1 -0
  160. package/dist/src/storage/pending-claim.js +156 -0
  161. package/dist/src/storage/pending-claim.js.map +1 -0
  162. package/dist/src/storage/raw-store-codec.d.ts +13 -0
  163. package/dist/src/storage/raw-store-codec.d.ts.map +1 -1
  164. package/dist/src/storage/raw-store-codec.js +24 -3
  165. package/dist/src/storage/raw-store-codec.js.map +1 -1
  166. package/dist/src/storage/restoration-coordinator.d.ts.map +1 -1
  167. package/dist/src/storage/restoration-coordinator.js +2 -1
  168. package/dist/src/storage/restoration-coordinator.js.map +1 -1
  169. package/dist/src/storage/ring-shift-coordinator.d.ts.map +1 -1
  170. package/dist/src/storage/ring-shift-coordinator.js +3 -3
  171. package/dist/src/storage/ring-shift-coordinator.js.map +1 -1
  172. package/dist/src/storage/storage-repo.d.ts +122 -5
  173. package/dist/src/storage/storage-repo.d.ts.map +1 -1
  174. package/dist/src/storage/storage-repo.js +245 -68
  175. package/dist/src/storage/storage-repo.js.map +1 -1
  176. package/dist/src/storage/struct.d.ts +58 -0
  177. package/dist/src/storage/struct.d.ts.map +1 -1
  178. package/dist/src/testing/mesh-harness.d.ts +77 -11
  179. package/dist/src/testing/mesh-harness.d.ts.map +1 -1
  180. package/dist/src/testing/mesh-harness.js +226 -100
  181. package/dist/src/testing/mesh-harness.js.map +1 -1
  182. package/package.json +2 -2
  183. package/readme.md +27 -3
  184. package/src/cluster/block-transfer-service.ts +132 -4
  185. package/src/cluster/block-transfer.ts +79 -84
  186. package/src/cluster/client.ts +115 -119
  187. package/src/cluster/cluster-policy.ts +2 -1
  188. package/src/cluster/cluster-repo.ts +493 -65
  189. package/src/cluster/commit-proof.ts +2 -2
  190. package/src/cluster/race-resolution.ts +76 -7
  191. package/src/cluster/rebalance-monitor.ts +677 -539
  192. package/src/cluster/spread-on-churn.ts +34 -54
  193. package/src/cohort-topic/host.ts +8 -6
  194. package/src/cohort-topic/membership-source.ts +1 -1
  195. package/src/cohort-topic/peer-codec.ts +34 -31
  196. package/src/cohort-topic/stream-util.ts +39 -4
  197. package/src/cohort-topic/topic-router.ts +12 -2
  198. package/src/dispute/client.ts +17 -7
  199. package/src/index.ts +64 -59
  200. package/src/libp2p-key-network.ts +1377 -1260
  201. package/src/libp2p-node-base.ts +186 -27
  202. package/src/libp2p-node-rn.ts +31 -30
  203. package/src/libp2p-node.ts +37 -36
  204. package/src/logger.ts +6 -1
  205. package/src/matchmaking/query-transport.ts +9 -9
  206. package/src/network/network-manager-service.ts +16 -5
  207. package/src/network/relay-reservation.ts +636 -0
  208. package/src/pend-validation.ts +3 -2
  209. package/src/protocol-client.ts +13 -1
  210. package/src/reactivity/forwarder-host.ts +2 -1
  211. package/src/reactivity/origination-manager.ts +3 -3
  212. package/src/reactivity/recover-transport.ts +39 -22
  213. package/src/reactivity/subscription-manager.ts +2 -2
  214. package/src/reactivity/topic-bytes.ts +35 -37
  215. package/src/repo/client.ts +172 -173
  216. package/src/repo/cluster-coordinator.ts +183 -25
  217. package/src/repo/coordinator-repo.ts +656 -506
  218. package/src/repo/i-under-replication-ledger.ts +89 -0
  219. package/src/repo/kv-under-replication-ledger.ts +302 -0
  220. package/src/repo/responsibility.ts +48 -0
  221. package/src/repo/service.ts +76 -39
  222. package/src/repo/stuck-reservation.ts +224 -0
  223. package/src/repo/under-replication-drain.ts +582 -0
  224. package/src/rn.ts +74 -69
  225. package/src/storage/block-latch.ts +7 -4
  226. package/src/storage/block-storage.ts +161 -10
  227. package/src/storage/i-block-storage.ts +60 -5
  228. package/src/storage/pending-claim.ts +200 -0
  229. package/src/storage/raw-store-codec.ts +26 -3
  230. package/src/storage/restoration-coordinator.ts +212 -211
  231. package/src/storage/ring-shift-coordinator.ts +271 -271
  232. package/src/storage/storage-repo.ts +280 -72
  233. package/src/storage/struct.ts +58 -0
  234. package/src/testing/mesh-harness.ts +293 -112
@@ -1,12 +1,14 @@
1
1
  import type { PendRequest, ActionBlocks, IRepo, MessageOptions, CommitResult, GetBlockResults, PendResult, StaleFailure, BlockGets, CommitRequest, RepoMessage, IKeyNetwork, ICluster, ClusterConsensusConfig, BlockId, ActionContext, ClusterRecord } from "@optimystic/db-core";
2
+ import { type CohortResolution } from "./cluster-coordinator.js";
2
3
  import type { PeerId } from "@libp2p/interface";
3
4
  import type { FretService } from "p2p-fret";
4
5
  import type { IPeerReputation } from "../reputation/types.js";
5
6
  import type { ITransactionStateStore } from "../cluster/i-transaction-state-store.js";
6
7
  import { type ProofAnchoring } from "../cluster/certified-claims.js";
7
8
  import { type BlockCommitProof } from "../cluster/commit-proof.js";
8
- import type { ReconcileBlockCallback } from "../cluster/cluster-repo.js";
9
+ import type { ReconcileBlockCallback, CommittedHoldersSink } from "../cluster/cluster-repo.js";
9
10
  import type { CertifiedActionRev } from "../storage/block-archive.js";
11
+ import type { IUnderReplicationLedger } from "./i-under-replication-ledger.js";
10
12
  /**
11
13
  * Acquire a block's content for a cohort-corroborated revision, from the cohort, and persist it.
12
14
  *
@@ -28,6 +30,8 @@ interface LocalClusterWithExecutionTracking extends ICluster {
28
30
  getExecutedPendResult?(messageHash: string): PendResult | undefined;
29
31
  /** Local storage's verdict for a commit applied during consensus; see ClusterMember.getExecutedCommitResult. */
30
32
  getExecutedCommitResult?(messageHash: string): CommitResult | undefined;
33
+ /** One more reconcile for a behind-refused commit, once remote members hold it; see ClusterMember.reconcileRefusedCommit. */
34
+ reconcileRefusedCommit?(record: ClusterRecord): Promise<void>;
31
35
  /** Self-sign a one-peer commit proof for the solo-cohort commit path; see ClusterMember.mintSoloCommitProof.
32
36
  * Optional like its siblings: absent on a bare ICluster double, and then the solo path simply
33
37
  * commits proof-less — exactly the pre-mint behavior. */
@@ -79,6 +83,17 @@ interface CoordinatorRepoComponents {
79
83
  * acceptance internally regardless.
80
84
  */
81
85
  proofAnchoring?: ProofAnchoring;
86
+ /**
87
+ * Optional durable record of commits acknowledged below full replication, and who is still
88
+ * missing each block — see {@link CoordinatorRepo.noteReplicationShortfall}. Absent → nothing is
89
+ * recorded and commit behaves exactly as without it.
90
+ */
91
+ underReplicationLedger?: IUnderReplicationLedger;
92
+ /**
93
+ * Optional: told who holds each cohort commit this node acknowledges and holds — see
94
+ * {@link CoordinatorRepo.reportCommittedHolders}. Absent → commit behaves exactly as without it.
95
+ */
96
+ onCommittedHolders?: CommittedHoldersSink;
82
97
  }
83
98
  /**
84
99
  * Consensus config for the coordinator side, plus the repair yardstick the read-repair path measures
@@ -108,8 +123,11 @@ export declare function coordinatorRepo(keyNetwork: IKeyNetwork, createClusterCl
108
123
  * revert to being ignored. If that field is ever renamed, grep the specs for `coordinator:`.
109
124
  */
110
125
  export interface ICoordinatorClusterSeam {
126
+ /** Used by `cancel` alone; `pend` and `commit` read {@link resolveCohort}. */
111
127
  getClusterSize(blockId: BlockId): Promise<number>;
112
- getClusterPeerIds(blockId: BlockId): Promise<string[]>;
128
+ /** Whether the cohort could be established at all, and who it is — the primitive
129
+ * `getClusterSize` derives from. `pend` and `commit` classify their solo short-circuit on it. */
130
+ resolveCohort(blockId: BlockId): Promise<CohortResolution>;
113
131
  executeClusterTransaction(blockId: BlockId, message: RepoMessage, options?: MessageOptions): Promise<{
114
132
  record: ClusterRecord;
115
133
  localExecuted: boolean;
@@ -135,37 +153,13 @@ export declare class CoordinatorRepo implements IRepo {
135
153
  private readonly clusterLatestCallback?;
136
154
  private readonly acquireBlockFromCohort?;
137
155
  private readonly proofAnchoring?;
156
+ private readonly underReplicationLedger?;
157
+ private readonly onCommittedHolders?;
138
158
  private coordinator;
139
159
  private readonly DEFAULT_TIMEOUT;
140
160
  private readonly localPeerId?;
141
161
  private readonly responsibilityCache;
142
- private static readonly RESPONSIBILITY_TTL_MS;
143
162
  private readonly lastSeenCommitMs;
144
- /**
145
- * Per block, when (`this.now()` at the consult's start) a consult last SETTLED that this node's
146
- * absence of it is the cohort's answer too — see `absenceSettled` on {@link fetchBlockFromCluster}'s
147
- * result. Only the solo-self exit settles today: when this node is the block's whole cohort, every
148
- * acknowledged commit of it lands in this node's storage before the writer hears success, so the
149
- * block reads present and the memo dies. Read only for a block still missing locally
150
- * ({@link absenceIsSettled}); cleared by any pend or commit this node coordinates for the block, by
151
- * seeing it present, and by any later consult of it that does not settle.
152
- *
153
- * Deliberately its OWN map rather than `lastSeenCommitMs`: that one is also stamped for missing
154
- * blocks at exits whose verdict is NOT a confirmed absence (the `cohort-too-small` arm when a peer
155
- * claimed a revision, the post-restore arm when acquisition failed), so reading it here would turn
156
- * a `claimed-elsewhere` absence into an authoritative one for a whole window.
157
- *
158
- * NOTE: accepted tradeoff — a cohort-of-one view can be transient (peers still mid-identify; see
159
- * the solo exit), and a block another node creates through the cohort it sees is then reported
160
- * absent here for up to one `readRepairWindowMs` after this node's view grows — the same one-window
161
- * cost the held-block window pays for a growing cohort. Revisit if a caller ever needs
162
- * create-visibility across coordinators tighter than one window — such a caller needs a revision
163
- * floor (backlog `feat-refresh-can-demand-a-revision-floor`), not a shorter window.
164
- *
165
- * NOTE: LRU-bounded like its siblings; an eviction under >1000 settled blocks loses a memo and
166
- * costs one extra consult — the safe direction.
167
- */
168
- private readonly settledAbsences;
169
163
  /** Per block, what earlier repair passes left unresolved — see {@link AheadClaimState}.
170
164
  * Outlives the consult on purpose: the read-repair window skips consults for blocks checked
171
165
  * recently, and a doubt dropped there is a stale answer served as confirmed again.
@@ -174,14 +168,14 @@ export declare class CoordinatorRepo implements IRepo {
174
168
  * {@link reportRepairDeadlock} say its piece a second time. */
175
169
  private readonly unsettledAheadClaims;
176
170
  /**
177
- * Per block, what its pending-conflict refusals have added up to — see {@link StuckReservationWatch}
178
- * and {@link noteStuckReservation}. Deliberately its OWN map rather than a third fact hung off
179
- * {@link unsettledAheadClaims}: that entry belongs to the read-repair path and is cleared by a block
180
- * converging on a revision, whereas this one belongs to the write path and is cleared by the block
181
- * accepting a write. Sharing the entry would mean teaching both of those lifetimes about a fact
182
- * neither owns (backlog `debt-freshness-state-scattered-across-coordinator-repo` is the standing
183
- * argument for collapsing all of this per-block state behind one collaborator; adding a fourth
184
- * carve-out to the freshness entry would have made that harder, not easier).
171
+ * Per block, what its pending-conflict refusals have added up to — see {@link StuckReservationTracker}
172
+ * and {@link noteStuckReservation}. Deliberately its OWN collaborator rather than a third fact hung
173
+ * off {@link unsettledAheadClaims}: that entry belongs to the read-repair path and is cleared by a
174
+ * block converging on a revision, whereas this one belongs to the write path and is cleared by the
175
+ * block accepting a write. Sharing the entry would mean teaching both of those lifetimes about a
176
+ * fact neither owns (backlog `debt-freshness-state-scattered-across-coordinator-repo` is the
177
+ * standing argument for collapsing all of this per-block state behind one collaborator; adding a
178
+ * fourth carve-out to the freshness entry would have made that harder, not easier).
185
179
  *
186
180
  * NOTE: LRU-bounded like its siblings. An eviction under >1000 conflicted blocks loses an episode's
187
181
  * say-once flag, so the line can repeat once for that block — the same bounded duplication
@@ -190,10 +184,9 @@ export declare class CoordinatorRepo implements IRepo {
190
184
  * NOTE: per COORDINATOR, and a block's coordinator is whichever peer the writer's key lookup
191
185
  * resolved — normally stable, but cohort churn or a routing change moves it. When it moves, the
192
186
  * count restarts on the new coordinator (the condition is named later) and the old one may name the
193
- * same episode again (the condition is named twice). Fine while a wedged block is diagnosed by
194
- * searching for its id; if a churning deployment ever makes duplicate lines the noisy failure this
195
- * one exists to replace, the say-once state has to move to where the record lives (the member's own
196
- * storage) rather than to where the refusal was classified.
187
+ * same episode again (the condition is named twice). Each MEMBER now keeps its own tracker as well
188
+ * (`ClusterMember.validatePendOperations`), fed by its own `held` votes, so the episode is also
189
+ * named where the record lives, by a count that does not move with the coordinator.
197
190
  */
198
191
  private readonly stuckReservations;
199
192
  private readonly readRepairMode;
@@ -217,7 +210,7 @@ export declare class CoordinatorRepo implements IRepo {
217
210
  now: () => number;
218
211
  /** Test seam: overridable RNG (0..1) for sample-rate gating. */
219
212
  rand: () => number;
220
- constructor(keyNetwork: IKeyNetwork, createClusterClient: (peerId: PeerId) => ICluster, storageRepo: IRepo, cfg?: CoordinatorRepoConfig, localCluster?: LocalClusterWithExecutionTracking | undefined, localPeerId?: PeerId, fretService?: FretService, clusterLatestCallback?: ClusterLatestCallback | undefined, reputation?: IPeerReputation, stateStore?: ITransactionStateStore, acquireBlockFromCohort?: AcquireBlockCallback | undefined, proofAnchoring?: ProofAnchoring | undefined);
213
+ constructor(keyNetwork: IKeyNetwork, createClusterClient: (peerId: PeerId) => ICluster, storageRepo: IRepo, cfg?: CoordinatorRepoConfig, localCluster?: LocalClusterWithExecutionTracking | undefined, localPeerId?: PeerId, fretService?: FretService, clusterLatestCallback?: ClusterLatestCallback | undefined, reputation?: IPeerReputation, stateStore?: ITransactionStateStore, acquireBlockFromCohort?: AcquireBlockCallback | undefined, proofAnchoring?: ProofAnchoring | undefined, underReplicationLedger?: IUnderReplicationLedger | undefined, onCommittedHolders?: CommittedHoldersSink | undefined);
221
214
  /**
222
215
  * The resolved super-majority threshold this coordinator commits on. Exposed so the composition root
223
216
  * can fail-fast if the coordinator and the cluster member would run different thresholds (see the
@@ -227,15 +220,38 @@ export declare class CoordinatorRepo implements IRepo {
227
220
  /** Recover coordinator transactions from persistent store after a restart. */
228
221
  recoverTransactions(): Promise<void>;
229
222
  /**
230
- * Check if this node is in the cluster for a given block.
231
- * Uses findCluster membership in the real network layer, self is always
232
- * included in the cohort when this node is responsible. This serves as a
233
- * defense-in-depth guard for requests that arrive at the wrong node.
234
- * Returns true if localPeerId is not set (backward compat for single-node/test setups).
223
+ * Whether this node is in the cohort for a block. Uses `findCluster` membership — in the real network
224
+ * layer, self is in the cohort exactly when this node is among the nearest `clusterSize` serving peers
225
+ * for the block, so a request that reaches a node outside it was sent to the wrong machine.
226
+ *
227
+ * Three answers, because a lookup that THREW is not an answer: `undetermined` is never cached (routing
228
+ * can recover on the next request) and never read as `responsible` — what each caller does with it is
229
+ * that caller's posture (see {@link verifyResponsibility} and `get`).
230
+ *
231
+ * With no `localPeerId` the check is skipped and the answer is `responsible`. That bypass exists for
232
+ * wiring without an identity (direct constructors, single-node and test setups), never for production,
233
+ * where `libp2p-node-base` always passes the node's peer id.
234
+ *
235
+ * NOTE: a cached answer stands for up to {@link RESPONSIBILITY_TTL_MS} after the cohort changes, so a
236
+ * node can still say `responsible` for a minute after it stops being so. {@link soloCohortDurability}'s
237
+ * `unrouted` class and `ClusterCoordinator.executeClusterTransaction`'s cohort-membership guard are what
238
+ * keep that window honest; if churn ever makes the window matter, shorten the TTL rather than
239
+ * re-looking-up on every write.
235
240
  */
236
- private isResponsibleForBlock;
241
+ private responsibilityFor;
237
242
  /**
238
- * Verify this node is responsible for all given block IDs. Throws if not.
243
+ * The write path's gate (`pend`, `cancel`, `commit`): refuse unless this node is responsible for EVERY
244
+ * block, and refuse too when it cannot tell — fail CLOSED. A write accepted on a thrown lookup commits
245
+ * where the network was never consulted (GitHub #19); refusing hands it back to the writer's transactor,
246
+ * which excludes this peer and re-picks inside the cohort.
247
+ *
248
+ * Every block is checked so the error names all of them. When the blocks split between the two kinds,
249
+ * `not-responsible` is the one thrown: it is a settled answer that the request is misrouted, which no
250
+ * recovery of the lookup would change; the undetermined blocks are still logged.
251
+ *
252
+ * For `cancel`, a refusal on a transient lookup fault leaves the pending record standing on this node
253
+ * until the writer's cancel retry lands on another cohort member — and this node is still discharged
254
+ * then, since as a member it judges the cancel against the record's own `peers`, not against a lookup.
239
255
  */
240
256
  private verifyResponsibility;
241
257
  get(blockGets: BlockGets, options?: MessageOptions): Promise<GetBlockResults>;
@@ -327,29 +343,30 @@ export declare class CoordinatorRepo implements IRepo {
327
343
  private flagUnconfirmedCurrency;
328
344
  /** Decide whether the read-repair policy wants us to consult the cluster for a present-but-possibly-stale block. */
329
345
  private shouldReadRepair;
330
- /**
331
- * Decide whether a block MISSING locally may skip its consult: an earlier consult settled its
332
- * absence within one read-repair window (see {@link settledAbsences}). The absence counterpart of
333
- * {@link shouldReadRepair}, giving absence the guarantee the window already gives content —
334
- * "checked with the cohort within one window" — and nothing weaker.
335
- *
336
- * Modes: `paranoid` never skips ("verify every read" means every read). `lazy` uses the window and
337
- * the sample rate, exactly as {@link shouldReadRepair} does. `off` uses the window but not the
338
- * sample rate (a `lazy`-only knob, as it is for content): `off` disables STALE-CONTENT repair, and
339
- * the absence consult is not that — it is what makes an absent answer authoritative at all — so
340
- * leaving it unbounded would make the mode meant to do less network work do more.
341
- */
342
- private absenceIsSettled;
343
346
  /** Milliseconds since we last marked this block fresh, or undefined if never. */
344
347
  private ageMs;
348
+ /**
349
+ * Whether the solo-self exit of {@link fetchBlockFromCluster} has already named `blockId` inside
350
+ * the current read-repair window, for a block this node does NOT hold (`localRev` undefined). Such
351
+ * a block reaches that exit on every read, because `get` never remembers an absence (GitHub
352
+ * issue #20). So its `cluster-fetch:solo-self-skip` line and its stamp are both skipped while the
353
+ * stamp is at most one `readRepairWindowMs` old. An unconditional line would bring back issue #8's
354
+ * log volume for a probed but never-written collection. Re-stamping on every read would keep the
355
+ * stamp fresh and silence the line for good on a block read more often than once a window.
356
+ *
357
+ * Withholding the stamp never skips a consult: `get` asks {@link shouldReadRepair} only about
358
+ * present blocks. A HELD block reaches the exit only when read-repair already chose to consult, so
359
+ * this is always false for one. Its line and stamp are unchanged, and the line keeps pairing with
360
+ * `cluster-tx:read-repair-triggered`.
361
+ *
362
+ * NOTE: the stamp is shared with every exit that marks a block seen, so a missing block one of
363
+ * them stamped inside the window is not named until that stamp lapses. Fine for a diagnostic
364
+ * line; if anything ever needs "first answer from a self-only view" exactly, give the line its own
365
+ * per-block stamp.
366
+ */
367
+ private soloAbsenceNamedThisWindow;
345
368
  /** Mark blocks as freshly observed from cluster authority (post-commit or post-fetch). */
346
369
  private markBlocksSeen;
347
- /**
348
- * Drop any settled-absence memo for `blockIds` ({@link settledAbsences}) — called at the top of a
349
- * local pend or commit, before routing and whatever the outcome. Clearing is always the safe
350
- * direction: the most it can cost is one extra consult.
351
- */
352
- private forgetSettledAbsences;
353
370
  /**
354
371
  * True when a commit's approve votes form a strict majority of the FULL cohort — the only case
355
372
  * where "this node committed" is evidence that no rival commit moved past it. Two strict
@@ -404,15 +421,9 @@ export declare class CoordinatorRepo implements IRepo {
404
421
  * retire it when the memo's claimants are among the peers that answered), `no-evidence`
405
422
  * leaves it standing untouched. Required, not optional, so an exit added later has to say
406
423
  * which it means.
407
- * - `absenceSettled` — whether this pass SETTLED the block's absence for one read-repair window:
408
- * no write of it this node has not seen can exist. Only the solo-self exit can say that today
409
- * (this node is the whole cohort, so every acknowledged commit lands here). `get` remembers a
410
- * settled absence ({@link settledAbsences}) and skips the consult while the block stays missing.
411
- * `absence === 'confirmed'` alone is not enough — the empty-cohort exit reports it without
412
- * asking anyone, and a multi-peer cohort's unanimous "nothing" can be overtaken by a commit
413
- * still on its way to this node. Required, like
414
- * `currency`, so an exit added later has to say which side it falls on rather than
415
- * remembering (or forgetting) to arm something.
424
+ *
425
+ * Nothing is remembered about an absence: `get` runs this pass on every read of a block missing
426
+ * locally (see the accepted-tradeoff NOTE there).
416
427
  */
417
428
  private fetchBlockFromCluster;
418
429
  /**
@@ -600,8 +611,34 @@ export declare class CoordinatorRepo implements IRepo {
600
611
  private penalizeProofService;
601
612
  pend(request: PendRequest, options?: MessageOptions): Promise<PendResult>;
602
613
  /** The cluster half of {@link pend}, after responsibility is verified: consensus, the local-verdict
603
- * arms, and the two optimistic-concurrency classifiers a rejection is run through. */
614
+ * arms, and the catch that turns each optimistic-concurrency refusal into a retryable answer
615
+ * the two signed-evidence ones ({@link ConflictRaceLostError}, {@link BlocksHeldError}) directly,
616
+ * and a validator rejection only through {@link classifyStaleRejection}. */
604
617
  private pendThroughCluster;
618
+ /**
619
+ * The solo short-circuit of {@link pend}: a cohort of at most one peer runs no consensus, and the
620
+ * pend goes straight to local storage exactly as before. What changes is the answer's class —
621
+ * see {@link soloCohortDurability} for the four-way split. A refusal is returned untouched.
622
+ */
623
+ private pendSolo;
624
+ /**
625
+ * The class of a write that took the solo short-circuit, from the cohort resolution that put it
626
+ * there. Policy-free: the write already happened, this only says what it was.
627
+ * - not resolved (the lookup threw, or named nobody) → `unrouted`;
628
+ * - resolved to exactly this node → `local`, a correct and complete one-machine write;
629
+ * - resolved to exactly one peer that is NOT this node → `unrouted` — this node wrote somewhere
630
+ * the cohort does not look, which is a write whose destination is wrong, not a solo write.
631
+ * With no local peer id (direct constructors, single-node and test wiring) a resolved cohort of
632
+ * one reads as `local`: the same posture `responsibilityFor` takes for a node with no
633
+ * identity, and a node with no identity cannot be in any cohort but its own.
634
+ *
635
+ * Both `unrouted` arms are defence in depth now, not the main guard: {@link verifyResponsibility}
636
+ * refuses a write whose lookup throws and a write for a cohort that excludes this node before the
637
+ * short-circuit is reached. A write lands here unrouted only inside the responsibility cache's
638
+ * staleness window, or when a second lookup fails moments after the first succeeded — and then it
639
+ * still reports honestly rather than posing as `local`.
640
+ */
641
+ private soloCohortDurability;
605
642
  /**
606
643
  * Decide whether a cluster validator rejection was an optimistic-concurrency loss — the block
607
644
  * already advanced past the requested revision — rather than a genuine validation fault.
@@ -623,62 +660,69 @@ export declare class CoordinatorRepo implements IRepo {
623
660
  */
624
661
  private classifyStaleRejection;
625
662
  /**
626
- * Sibling of {@link classifyStaleRejection} for the OTHER optimistic-concurrency refusal shape:
627
- * the promise-phase pending-conflict vote (`validatePendOperations` rejecting a pend whose
628
- * blocks are held by a different unresolved pending action). That vote surfaces here as a
629
- * {@link ValidatorRejectionError}, and without classification it would escape as a throw —
630
- * splitting multi-tree pends mid-batch instead of taking the retry path a lost race deserves.
663
+ * Answer a pend the cohort refused with signed `held` votes: the blocks are reserved by a different
664
+ * unresolved action on one or more members ({@link BlocksHeldError}). Always a retryable
665
+ * {@link StaleFailure} with `conflict: true`, so the caller's normal retry path
666
+ * (`Collection.sync`, and the multi-collection pendPhase via `isConflictFailure`) absorbs it
667
+ * instead of a thrown error escaping mid-batch and splitting multi-tree pends.
668
+ *
669
+ * The local re-read is an ENRICHER, not a gate. It used to be the gate — this refusal arrived as a
670
+ * `ValidatorRejectionError` and was only converted when the coordinator's own storage corroborated
671
+ * the rival — and under latency the refusing member is routinely ahead of the coordinator, so the
672
+ * corroboration missed and a transient refusal escaped as a permanent-looking throw. The `held`
673
+ * vote is already signed evidence from the member that holds the rival, so retryability no longer
674
+ * depends on a local re-read at all. What the re-read still buys, when it succeeds, is the concrete
675
+ * rival list for {@link StaleFailure.pending} and the input {@link noteStuckReservation} needs to
676
+ * name a block wedged behind a reservation that will never clear.
631
677
  *
632
- * Same confirmation discipline as the stale classifier: purely local. Re-read the affected
633
- * blocks from our own storage and require some block's `state.pendings` to carry a rival
634
- * actionId; the signed reject text is never consulted. A confirmed rival returns a
635
- * {@link StaleFailure} with `conflict: true` and the rivals as `pending` (`ActionPending`
636
- * without `transform` the type allows it, and no consumer rebases from it). Unconfirmed
637
- * including read errors during confirmation — stays a throw, preserving fail-fast for genuine
638
- * validation faults. Checked after `classifyStaleRejection` so a confirmed committed loss
639
- * (which carries the sharper `staleAt`) wins when both hold.
678
+ * NOTE: `error.heldBy` (peerId holding action id) is dropped at this boundary, the same deliberate
679
+ * drop the {@link ConflictRaceLostError} arm of {@link pendThroughCluster} documents: `StaleFailure`
680
+ * has no field for it, and the members' action ids are not the same claim as the rivals this node
681
+ * read out of its own storage, so they must not be folded into `pending`. A caller that wants to
682
+ * WAIT on the holder rather than re-race it needs a typed field added here; never recover the ids
683
+ * by parsing `reason`.
640
684
  */
641
- private classifyPendingConflictRejection;
685
+ private answerBlocksHeld;
686
+ /**
687
+ * The rival unresolved actions THIS node's own storage says hold `blockIds`, excluding the request's
688
+ * own action (a redelivered pend must not corroborate against itself). Empty when nothing is found
689
+ * — including when the read itself fails, which is reported and then treated as "nothing to add",
690
+ * since the caller's answer does not depend on it.
691
+ *
692
+ * Carries no `transform`, which {@link ActionPending} allows and no consumer rebases from.
693
+ *
694
+ * Diagnostic enrichment only, never a gate: the refusal it corroborates was already cast and signed
695
+ * by a member, and nothing here can turn an admission into a refusal or the reverse.
696
+ */
697
+ private corroborateHeldBlocks;
698
+ /**
699
+ * This node's pending records on `blockId`, each with the slot it claims when storage can say
700
+ * (`IPendingClaimReader`, which `StorageRepo` implements). A repo without the capability answers
701
+ * with `state.pendings` alone, every record read as an unknown claim — which reserves, so the
702
+ * corroboration can only over-name, never under-name.
703
+ */
704
+ private pendingClaimsOf;
642
705
  /**
643
706
  * Count one confirmed pending-conflict refusal against the holder(s) of each block it names, and say
644
707
  * ONCE — in words, at the moment it becomes provable — when a block is wedged behind a reservation
645
- * that is not going to clear.
646
- *
647
- * **Why this needs saying at all.** Every individual refusal here is indistinguishable from an
648
- * ordinary lost race, which is a normal and healthy event, so the logs of a permanently wedged block
649
- * read exactly like the logs of a busy one. Finding the difference today means noticing that the
650
- * SAME rival action id keeps appearing across unrelated writers for as long as the process lives —
651
- * a pattern nothing points at, and one that cost a downstream project several tickets and weeks to
652
- * re-derive from raw traces. The node has the fact in hand at every refusal; this makes it sayable.
653
- *
654
- * **The signal, and the two things that are NOT the signal.** The discriminator is repetition
655
- * against an unchanged holder — see {@link STUCK_RESERVATION_DISTINCT_ACTIONS} for why distinct
656
- * refused actions is the right counter and for the measured threshold. Two cheaper-looking tests
657
- * were tried and do not work: the members' in-memory reservation table
658
- * (`ClusterMember.activeTransactions`) clears the moment a rival's pend reaches consensus, so a
659
- * perfectly healthy rival inside its pend-to-commit window is absent from it too and absence there
660
- * says nothing; and "the block already passed this pending record's revision" catches a different
661
- * orphan class entirely — in the verified instance the wedged block sat at revision 1 while the
662
- * orphaned record was for revision 2, still nominally promotable.
663
- *
664
- * **Never a control path.** This classifies and logs; it never refuses, expires, or deletes
665
- * anything. Deciding when a durable pending record may be removed is precisely the hard problem
666
- * backlog `debt-unpromotable-pending-records-need-a-sweep` exists for — deleting a live reservation
667
- * is worse than the leak — and a counter accurate enough for a log line is not evidence enough to
668
- * destroy state.
708
+ * that is not going to clear. The counting, the threshold and the wording live in
709
+ * {@link StuckReservationTracker}; this node's part is the corroborated holder list and the tag.
669
710
  *
670
711
  * Returns the highest distinct-refusal count any of this refusal's blocks has now reached, for the
671
712
  * classification line to carry; it saturates at the threshold once an episode has been reported,
672
713
  * since the ids are dropped at that point.
673
714
  *
674
- * NOTE: fed only by {@link classifyPendingConflictRejection}, i.e. by refusals that arrive as a
675
- * cohort-wide validator rejection. A block only PART of whose cohort holds the stranded record can
715
+ * NOTE: fed only by {@link answerBlocksHeld}, i.e. by cohort-wide `held`-answered refusals that this
716
+ * node's own storage can corroborate. A block only PART of whose cohort holds the stranded record can
676
717
  * still reach approval super-majority, and its refusal then comes back through the retained local
677
- * apply verdict (`getExecutedPendResult`) instead, which this never sees so a partially wedged
678
- * block goes unnamed. That is the weaker condition (the write does land on the healthy members),
679
- * and instrumenting the second path would count a refusal that the cohort as a whole did not make.
680
- * If partial strands ever turn out to be the common shape in the field, the counter belongs on the
681
- * member side (`ClusterMember.validatePendOperations`), where each member sees its own votes.
718
+ * apply verdict (`getExecutedPendResult`) instead, which this never sees. The un-corroborated arm of
719
+ * {@link answerBlocksHeld} is likewise unfed: this node cannot name the holder, and feeding it a
720
+ * guess would poison the holder comparison, which is what separates a wedge from healthy
721
+ * contention. Neither gap goes unnamed any more: every MEMBER keeps its own tracker, fed by its own
722
+ * `held` votes (`ClusterMember.validatePendOperations`, tag `cluster-member:stuck-reservation`), so
723
+ * a reservation only some members hold — the shape `a-member-that-missed-a-commit-refuses-every-
724
+ * later-write` measured, before the member stopped refusing on a superseded record at all — is
725
+ * named by the members that hold it.
682
726
  */
683
727
  private noteStuckReservation;
684
728
  /**
@@ -742,6 +786,80 @@ export declare class CoordinatorRepo implements IRepo {
742
786
  * freshness stamp belongs.
743
787
  */
744
788
  private tolerateLocalCommitDivergence;
789
+ /**
790
+ * The one way a success leaves {@link commit}: record the replication shortfall the answer
791
+ * describes, then return the answer unchanged. Every success exit — solo, local-executed, local
792
+ * fallback, tolerated divergence — runs after the durability gate admitted it, so a refused
793
+ * commit never reaches the ledger.
794
+ *
795
+ * `localHolds` is whether this node's own storage durably holds every block of the commit, which
796
+ * is what makes it a source for the missing copies — not whether the class counted it. `record`
797
+ * is the consensus the commit ran on, absent for the solo short-circuit (no cohort ran, so no
798
+ * holders to report).
799
+ */
800
+ private acknowledgeCommit;
801
+ /**
802
+ * Tell the {@link CommittedHoldersSink} who holds a cohort commit this node holds, so its rebalance
803
+ * monitor does not push the blocks back to members that stored them. A holder is a member the
804
+ * durability class confirmed AND that signed an approving commit vote: the confirmation rests on
805
+ * the member's unsigned apply report, and requiring the signature too means a member lying in that
806
+ * report can only misstate its own copy — a member already trusted with the commit. The members
807
+ * the class names unconfirmed are reported as such, which withdraws any earlier record of them
808
+ * (including the signer list this node's own member reported at apply), so they are pushed the
809
+ * block. Never throws: the commit is already acknowledged.
810
+ */
811
+ private reportCommittedHolders;
812
+ /**
813
+ * Write down who is still missing an acknowledged commit, while this node still knows — the
814
+ * cohort's answer is gone the moment the writer is answered, and the in-memory commit retry does
815
+ * not survive a restart. One entry per block, all sharing this commit's one cohort answer
816
+ * (consensus ran on `blockIds[0]`'s cohort for the whole request):
817
+ * - `full` settles any older entry for the block, whether or not this node holds it;
818
+ * - `majority` records the unconfirmed members by name;
819
+ * - `local` and `unrouted` record an EMPTY missing set, meaning "unknown" — nobody could be named.
820
+ * A shortfall is recorded only when `localHolds`: a node holding nothing has nothing to push, and
821
+ * the remote majority that admitted the commit already holds it.
822
+ *
823
+ * NEVER throws, and that asymmetry is deliberate: by the time this runs the commit is already
824
+ * durable at the class the answer states, so a ledger fault must not turn an acknowledged write
825
+ * into a reported failure. A failure is logged per block and the answer still goes out; the
826
+ * block's copy is then owed with nobody tracking it, exactly as before the ledger existed.
827
+ *
828
+ * NOTE: one ledger read and write per block per below-full commit, awaited before the writer is
829
+ * answered — on a node that is genuinely alone that is every commit (a `full` commit settles from
830
+ * the ledger's in-memory index and touches the store only when an entry exists). If it shows in
831
+ * commit latency, coalesce the writes rather than answering first: an entry written after the
832
+ * answer can be lost to a crash in between, which is the one case the ledger exists for.
833
+ */
834
+ private noteReplicationShortfall;
835
+ private noteBlockShortfall;
836
+ /**
837
+ * The durability class beside the gate: derived from the SAME sets {@link isDurableMajority} was
838
+ * just measured on, with this node's own contribution passed per arm exactly as the gate counted
839
+ * it, so the class and the gate can never disagree. One rule for all three success exits of
840
+ * {@link commit}: `full` iff every cohort member is confirmed, otherwise `majority` (the gate
841
+ * already refused anything below that). Never `local` or `unrouted` here — those belong to the
842
+ * solo short-circuit, where no cohort ran.
843
+ */
844
+ private cohortWriteDurability;
845
+ /**
846
+ * The solo short-circuit of {@link commit}: consensus never runs, so no ClusterRecord exists to
847
+ * project a proof from — the lone member self-signs a one-peer proof instead (mintSoloCommitProof),
848
+ * which is what lets a block born on a cohort of one ever gain a second holder under the
849
+ * certified-push default (handlePush refuses a proof-less block). Minted even when the cohort did
850
+ * not resolve or the sole peer is not self — a failed `findCluster` puts the DEGRADED-ROUTING case
851
+ * in this same branch, and self genuinely committed these bytes either way; a proof's peer list is
852
+ * already not evidence of cohort membership by design (caller obligation #1 on
853
+ * verifyBlockCommitProofClaim), so gating the mint on cohort composition would buy no safety while
854
+ * opening a silent no-proof hole exactly when routing is degraded.
855
+ *
856
+ * The policy is unchanged — every write accepted here before is accepted now. What changes is
857
+ * that the answer says which situation it was: the `commit:solo-cohort` log line (how an operator
858
+ * tells a real cohort of one — cohortSize 1, soleIsSelf true — from a routing failure) now also
859
+ * carries the `quorum` the writer is told, and both come from {@link soloCohortDurability}, so the
860
+ * log and the answer cannot disagree.
861
+ */
862
+ private commitSolo;
745
863
  /**
746
864
  * The durability gate's answer: a retryable refusal ({@link COMMIT_NOT_DURABLE_REASON}) naming how
747
865
  * many of the cohort reported holding the revision. `conflict: true` because the members that
@@ -1 +1 @@
1
- {"version":3,"file":"coordinator-repo.d.ts","sourceRoot":"","sources":["../../../src/repo/coordinator-repo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,sBAAsB,EAAE,OAAO,EAAuB,aAAa,EAAE,aAAa,EAAyC,MAAM,qBAAqB,CAAC;AAG9U,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAA6D,KAAK,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIhI,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE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