@serfab/cadre-core 1.5.0 → 1.6.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.
@@ -1 +1 @@
1
- {"version":3,"file":"peer-join-backfill.js","sourceRoot":"","sources":["../src/peer-join-backfill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,mBAAmB,EAA2C,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,sFAAsF;AACtF,0FAA0F;AAC1F,qFAAqF;AACrF,0FAA0F;AAC1F,0FAA0F;AAC1F,yFAAyF;AACzF,yFAAyF;AACzF,EAAE;AACF,wFAAwF;AACxF,iFAAiF;AACjF,0FAA0F;AAC1F,uFAAuF;AACvF,0FAA0F;AAC1F,sBAAsB;AACtB,EAAE;AACF,2FAA2F;AAC3F,wFAAwF;AACxF,oBAAoB;AACpB,EAAE;AACF,gFAAgF;AAChF,uBAAuB;AACvB,EAAE;AACF,2FAA2F;AAC3F,2FAA2F;AAC3F,0FAA0F;AAC1F,2FAA2F;AAC3F,2FAA2F;AAC3F,4EAA4E;AAC5E,sFAAsF;AACtF,kFAAkF;AAClF,gFAAgF;AAChF,iFAAiF;AACjF,wFAAwF;AACxF,yFAAyF;AACzF,wFAAwF;AACxF,wFAAwF;AACxF,uEAAuE;AACvE,oFAAoF;AACpF,oFAAoF;AACpF,EAAE;AACF,wEAAwE;AACxE,yFAAyF;AACzF,wFAAwF;AACxF,wFAAwF;AACxF,0FAA0F;AAC1F,0FAA0F;AAC1F,+EAA+E;AAC/E,0FAA0F;AAC1F,EAAE;AACF,0FAA0F;AAC1F,4FAA4F;AAC5F,yFAAyF;AACzF,0DAA0D;AAC1D,+DAA+D;AAC/D,EAAE;AACF,4FAA4F;AAC5F,uFAAuF;AACvF,8FAA8F;AAC9F,4FAA4F;AAC5F,gBAAgB;AAChB,EAAE;A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AC;YAChC,CAAC;YACD,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC;YAC7B,MAAM,CAAC,OAAO,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,eAAe,EAAE,EAAE,CAAC;YACxC,MAAM,KAAK,EAAE,CAAC;QAChB,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,GAAG,CAAC,yEAAyE,EAC3E,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9E,CAAC;QAED,MAAM,KAAK,GAAG,CAAC,WAAW,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC;QAC3D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;IACpD,CAAC;CACF"}
@@ -132,12 +132,12 @@ export interface RelayReservationState {
132
132
  /**
133
133
  * How long {@link driveRelayReservation} waits for a reservation to appear, at the DEFAULT
134
134
  * declared link round trip: `RELAY_RESERVATION_ROUND_TRIPS` (4) x `DECLARED_LINK_ROUND_TRIP_MS`
135
- * (2000 ms) = 8000 ms, where it was a fixed 10_000 before.
135
+ * (3500 ms) = 14 000 ms, where it was a fixed 10_000 before it was derived.
136
136
  *
137
137
  * Counted rather than chosen because this one deadline bounds the whole drive — dial the relay,
138
138
  * request the reservation, wait — and each of those costs a fixed number of exchanges, not a
139
139
  * fixed number of milliseconds. `link-budget.ts` carries the counts, the measurement behind
140
- * them, and the ceiling above which no relayed connection can be established whatever this says.
140
+ * them, and what still fails at the supported link whatever this says.
141
141
  *
142
142
  * A host on a slower link moves it by declaring `NetworkConfig.linkRoundTripMs`, which both
143
143
  * call sites thread in (`CadreNode.reserveRelays` for the control node,
@@ -109,12 +109,12 @@ const log = debug('sereus:cadre:relay-reservation');
109
109
  /**
110
110
  * How long {@link driveRelayReservation} waits for a reservation to appear, at the DEFAULT
111
111
  * declared link round trip: `RELAY_RESERVATION_ROUND_TRIPS` (4) x `DECLARED_LINK_ROUND_TRIP_MS`
112
- * (2000 ms) = 8000 ms, where it was a fixed 10_000 before.
112
+ * (3500 ms) = 14 000 ms, where it was a fixed 10_000 before it was derived.
113
113
  *
114
114
  * Counted rather than chosen because this one deadline bounds the whole drive — dial the relay,
115
115
  * request the reservation, wait — and each of those costs a fixed number of exchanges, not a
116
116
  * fixed number of milliseconds. `link-budget.ts` carries the counts, the measurement behind
117
- * them, and the ceiling above which no relayed connection can be established whatever this says.
117
+ * them, and what still fails at the supported link whatever this says.
118
118
  *
119
119
  * A host on a slower link moves it by declaring `NetworkConfig.linkRoundTripMs`, which both
120
120
  * call sites thread in (`CadreNode.reserveRelays` for the control node,
@@ -593,7 +593,7 @@ export class SeedBootstrapService {
593
593
  // (`dialPeerAddrs`), so an owner whose first address never answers neither
594
594
  // stalls seed application nor goes undialed at its other addresses.
595
595
  // NOTE: `handleSeedStream` acks only after this loop, so an unreachable owner
596
- // can hold the ack for up to `dialBudget.totalMs` each — 32 s at the default declared link
596
+ // can hold the ack for up to `dialBudget.totalMs` each — 56 s at the default declared link
597
597
  // round trip, more on a host that declared a slower one (`link-budget.ts`) — past a sender's
598
598
  // 10 s `seedDeliverTimeoutMs`; the seed is still applied. If senders start
599
599
  // reporting accepted seeds as timed out, ack before dialing.
@@ -17,9 +17,17 @@
17
17
  * freshly initialized `StrandDatabase` back from the app — `StrandInstance.database` stays
18
18
  * unset and the instance reports `'syncing'` — and probes on a cadence until the Header is
19
19
  * readable AND a read of each app table settles, at which point the database is published
20
- * and the instance goes `'active'`. A machine that already holds the Header (a restart, a
21
- * hibernation resume, a founder) passes the probe on the first try and is never gated, so
22
- * offline-first writes on a machine that has synced before keep working.
20
+ * and the instance goes `'active'`. A machine whose store already holds the Header and every
21
+ * app table (a founder, and normally a restart or a hibernation resume) passes the probe on
22
+ * the first try and is never gated, so offline-first writes on a machine that has synced
23
+ * before keep working.
24
+ *
25
+ * "Has synced before" is decided by what the local store actually holds, not by whether this
26
+ * machine once read the strand: a machine that left soon after its first sync can hold less
27
+ * than it read, and is then gated like a joiner. The re-attach measurement on
28
+ * {@link DEFAULT_STRAND_FIRST_SYNC_TIMEOUT_MS} saw exactly that — a machine back over the store
29
+ * it kept, without the `Strand.Header` collection it had read before it left. Gating it is
30
+ * right: writing into a collection this machine does not hold would fork it.
23
31
  *
24
32
  * Why the app tables too: the Header is ONE collection. It reaches a joiner ahead of the
25
33
  * founder's app-table collections (peer-join backfill and pull-on-read deliver those
@@ -36,10 +44,12 @@
36
44
  * every machine; the first write to it still creates its collection — see `docs/strands.md`
37
45
  * ("Joining") for that residual.
38
46
  *
39
- * Owned by `StrandInstanceManager`: created in `buildStrandRuntime` for a non-founder launch
40
- * whose first probe finds no Header, stopped and dropped in `releaseRuntime` (so a quiesce →
41
- * resume rebuild re-probes over the same store), and force-opened when a founder request
42
- * runs the bootstrap against the still-gated database (`foundExistingStrand`).
47
+ * Owned by `StrandInstanceManager`: created in `buildStrandRuntime` for every launch, armed
48
+ * only for a non-founder launch whose first probe fails, stopped and dropped in
49
+ * `releaseRuntime` (so a quiesce → resume rebuild re-probes over the same store), and opened
50
+ * by `publishDatabase` whenever the database is published without its loop — a launch that
51
+ * needed no gate, or a founder request that ran the bootstrap against the still-gated
52
+ * database (`foundExistingStrand`).
43
53
  *
44
54
  * NOTE: the gate covers app and membership tables, not the schema catalog. Every launch —
45
55
  * joiner or founder — writes the catalog collection (`optimystic/schema` plus two
@@ -57,48 +67,80 @@ import { type TimeoutScheduler } from './timeout-scheduler.js';
57
67
  /** How often a gated launch re-probes (`Strand.Header`, then every `App` table) while waiting for its first sync. */
58
68
  export declare const DEFAULT_STRAND_FIRST_SYNC_POLL_MS = 500;
59
69
  /**
60
- * How long `CadreNode.addStrand` waits for a joining machine's first sync before rejecting
61
- * with {@link StrandAwaitingFirstSyncError}.
70
+ * How long `CadreNode.addStrand` waits for a machine's first sync before rejecting with
71
+ * {@link StrandAwaitingFirstSyncError}. It has to cover the slowest attach sereus carries,
72
+ * which is not a first join: a machine RE-attaching through a relay on a slow link can take
73
+ * longer than one joining for the first time.
62
74
  *
63
75
  * Measured over a DIRECT connection (2026-09-16): the joiner reads the founder's rows about
64
- * 1.3 s after `addStrand` would previously have resolved. That is still the fast case, and it
65
- * is not what this budget has to cover.
76
+ * 1.3 s after `addStrand` would previously have resolved. That is the fast case, and it is not
77
+ * what this budget has to cover.
66
78
  *
67
- * Measured over a RELAYED SLOW LINK (2026-09-26): one Windows developer machine, two
79
+ * Every harness figure below was taken on one shape: one Windows developer machine, two
68
80
  * relay-only `CadreNode`s (`listenAddrs: []`) on a shared loopback dedicated relay, with a
69
81
  * 900 ms one-way per-frame outbound delay applied to every websocket by
70
82
  * `integration-tests/src/harness/ws-latency.ts` in `pipelined` mode — frames stay overlapped
71
83
  * in flight, so the figure is latency and bandwidth stays unlimited; the harness's other mode
72
84
  * (`serial`) is a per-socket frame-rate cap and its delays are NOT comparable
73
- * (`docs/testing.md` → "Link latency"). A round trip therefore costs about
74
- * 1.8 s. Time from `addStrand` to writable, for a machine holding nothing of the strand yet:
75
- * 23, 27, 31 and 41 s over four runs at optimystic's 1000 ms cohort read deadline, and 35, 42
76
- * and 46 s over three runs at a 5000 ms one. **The second band is the one in force**: sereus
77
- * declares 5000 ms (`COHORT_READ_DEADLINE_MS`, `quereus-plugin-sereus/src/cluster-size.ts`),
78
- * because 1000 ms is shorter than one round trip on that link and leaves every cohort read with
79
- * no answer to corroborate against. Widening that deadline makes a consult against a peer that
80
- * cannot answer cost longer, and this phase runs several of those — which is why the two bands
81
- * are both recorded here, and why a change to either number has to be weighed against the
82
- * other. 120 s clears the worst sample of the band in force by about 2.6x. The previous 30 s
83
- * default sat INSIDE the first band, so roughly half of those joins were rejected as "not
84
- * writable yet" while the sync was progressing normally and went on to complete.
85
+ * (`docs/testing.md` → "Link latency"). A round trip therefore costs about 1.8 s. Times run
86
+ * from the `addStrand` call to writable.
87
+ *
88
+ * FRESH JOIN (2026-09-26), a machine holding nothing of the strand yet: 23, 27, 31 and 41 s
89
+ * over four runs at optimystic's 1000 ms cohort read deadline, and 35, 42 and 46 s over three
90
+ * runs at a 5000 ms one; the re-attach scenario below later took 38.7, 38.7 and 56.9 s for
91
+ * the same fresh join. **The 5000 ms band, 35-57 s, is the one in force**: sereus declares
92
+ * 5000 ms (`COHORT_READ_DEADLINE_MS`, `quereus-plugin-sereus/src/cluster-size.ts`), because
93
+ * 1000 ms is shorter than one round trip on that link and leaves every cohort read with no
94
+ * answer to corroborate against. Widening that deadline makes a consult against a peer that
95
+ * cannot answer cost longer, and this phase runs several of those — which is why both bands
96
+ * are recorded here, and why a change to either number has to be weighed against the other.
97
+ *
98
+ * RE-ATTACH (2026-09-26, the opt-in
99
+ * `integration-tests/src/scenarios/strand-reattach-first-sync-measure.integration.ts` — re-run
100
+ * it before changing this number): B attached once on an undelayed link, left with
101
+ * `stopStrand`, A wrote while it was away, the delay was raised, and B called `addStrand`
102
+ * again.
103
+ * - Over an EMPTY store (one minted per launch, cadre's default with no storage provider):
104
+ * gated in all four runs and writable at 38.7-56.8 s, the same as a fresh join.
105
+ * - Over the store it KEPT (a phone with durable storage), bimodal. In 3 of 8 runs the store
106
+ * held everything and the launch came up writable (5.6 s, the launch itself). In the other
107
+ * 5 it lacked the `Strand.Header` collection B had read on its first attach, so B was gated
108
+ * like a joiner and became writable at 64.1-78.7 s — the slowest attach measured, about
109
+ * twice a fresh join. Why syncing over a partial store is slower sits inside optimystic
110
+ * (`tickets/blocked/report-reattach-over-partial-replica-to-optimystic`).
111
+ * - Neither a redial nor catching up on missed writes explains the time: B's strand node
112
+ * connected to A's at 11 s in every arm, fresh join included, and a run with 20 missed
113
+ * writes fell inside the run-to-run spread of those with 1.
114
+ * This budget covers WRITABLE, not caught up: in the gated kept-store runs the row A wrote
115
+ * while B was away became readable only at 140-162 s.
116
+ *
117
+ * Two samples from outside this harness, neither reproduced here and neither discarded: a
118
+ * reporter's re-attach of the same shape (optimystic #22; their harness, storage and delay
119
+ * injector are unknown to us) opened the gate at about 150 s, after the previous 120 s budget
120
+ * had already rejected; and a real Galaxy S7 joining fresh through relay.sereus.org took 178 s.
121
+ *
122
+ * 300 s clears the worst harness sample (79 s) by about 3.8x, the reporter's re-attach by 2x
123
+ * and the device join by about 1.7x. 240 s was rejected: it clears the device join by only
124
+ * 1.35x, and that sample was not a re-attach. History: the original 30 s sat INSIDE the 1000 ms
125
+ * fresh band and refused about half of those joins while their sync was progressing normally;
126
+ * 120 s was sized from fresh joins only and refused the reporter's re-attach.
85
127
  *
86
- * NOTE: accepted tradeoff — what 120 s costs. This wait is what an app's `addStrand` sits in
87
- * before it is told "not yet", so a strand none of whose members is reachable at all takes two
88
- * minutes to report instead of thirty seconds. The slow report was weighed against refusing
89
- * joins that were working, and the refusal is the worse failure. The cost is bounded — the
90
- * rejection is retryable, the strand stays launched and keeps probing, and `strand:writable`
91
- * fires the moment the sync lands, so an app that listens for the event rather than awaiting
92
- * the call is unaffected either way. Revisit if the gate ever learns whether ANY other member
93
- * is connected: "no peer at all" could then be reported at once and this budget would only
94
- * ever be spent on a sync that is actually in progress.
128
+ * NOTE: accepted tradeoff — what 300 s costs. This wait is what an app's `addStrand` sits in
129
+ * before it is told "not yet", so a strand none of whose members is reachable at all takes five
130
+ * minutes to report instead of two. The slow report was weighed against refusing attaches that
131
+ * were working, and the refusal is the worse failure. The cost is bounded — the rejection is
132
+ * retryable, the strand stays launched and keeps probing, and `strand:writable` fires the
133
+ * moment the sync lands, so an app that listens for the event rather than awaiting the call is
134
+ * unaffected either way. Revisit if the gate ever learns whether ANY other member is connected:
135
+ * "no peer at all" could then be reported at once and this budget would only ever be spent on a
136
+ * sync that is actually in progress — worth more the longer this budget gets.
95
137
  */
96
- export declare const DEFAULT_STRAND_FIRST_SYNC_TIMEOUT_MS = 120000;
138
+ export declare const DEFAULT_STRAND_FIRST_SYNC_TIMEOUT_MS = 300000;
97
139
  /** Embedder-facing tuning for the gate, threaded from `CadreNodeConfig.strandFirstSync`. */
98
140
  export interface StrandFirstSyncConfig {
99
141
  /**
100
- * Default wait for `CadreNode.addStrand` (and `whenStrandWritable`) before a joining
101
- * machine that has reached no other member is reported as not yet writable. Default
142
+ * Default wait for `CadreNode.addStrand` (and `whenStrandWritable`) before a machine whose
143
+ * first sync has not completed is reported as not yet writable. Default
102
144
  * {@link DEFAULT_STRAND_FIRST_SYNC_TIMEOUT_MS}.
103
145
  */
104
146
  timeoutMs?: number;
@@ -106,11 +148,12 @@ export interface StrandFirstSyncConfig {
106
148
  pollIntervalMs?: number;
107
149
  }
108
150
  /**
109
- * Thrown by `CadreNode.addStrand` / `whenStrandWritable` when a joining machine has not
110
- * received the strand's data from any other member within the wait budget. RETRYABLE: the
111
- * strand stays launched and keeps probing, so a later `addStrand` (or `whenStrandWritable`)
112
- * for the same strand completes the attach once another member is reachable; the
113
- * `strand:writable` event fires at that moment too.
151
+ * Thrown by `CadreNode.addStrand` / `whenStrandWritable` when a machine has not received the
152
+ * strand's data from another member within the wait budget — because no other member is
153
+ * reachable, or because one is and the sync is still arriving over a slow link; the gate
154
+ * cannot tell the two apart. RETRYABLE: the strand stays launched and keeps probing, so a
155
+ * later `addStrand` (or `whenStrandWritable`) for the same strand completes the attach once
156
+ * the data has arrived; the `strand:writable` event fires at that moment too.
114
157
  */
115
158
  export declare class StrandAwaitingFirstSyncError extends Error {
116
159
  readonly strandId: string;
@@ -171,8 +214,10 @@ export declare class StrandFirstSyncGate {
171
214
  /** Arm the probe loop. The first probe runs after one interval — the caller already probed once. */
172
215
  start(): void;
173
216
  /**
174
- * Force-open: the caller has just written the Header itself (a founder bootstrap run
175
- * against the gated database). Stops the loop; `onHeaderHeld` is NOT invoked.
217
+ * Open without the probe loop: the caller is publishing the database itself — a launch
218
+ * whose first probe passed (or a founder's), which never armed the loop, or a founder
219
+ * bootstrap just run against the gated database. Stops the loop; `onHeaderHeld` is NOT
220
+ * invoked.
176
221
  */
177
222
  open(): void;
178
223
  /** Disarm the loop; a probe already in flight completes and is then ignored. */
@@ -17,9 +17,17 @@
17
17
  * freshly initialized `StrandDatabase` back from the app — `StrandInstance.database` stays
18
18
  * unset and the instance reports `'syncing'` — and probes on a cadence until the Header is
19
19
  * readable AND a read of each app table settles, at which point the database is published
20
- * and the instance goes `'active'`. A machine that already holds the Header (a restart, a
21
- * hibernation resume, a founder) passes the probe on the first try and is never gated, so
22
- * offline-first writes on a machine that has synced before keep working.
20
+ * and the instance goes `'active'`. A machine whose store already holds the Header and every
21
+ * app table (a founder, and normally a restart or a hibernation resume) passes the probe on
22
+ * the first try and is never gated, so offline-first writes on a machine that has synced
23
+ * before keep working.
24
+ *
25
+ * "Has synced before" is decided by what the local store actually holds, not by whether this
26
+ * machine once read the strand: a machine that left soon after its first sync can hold less
27
+ * than it read, and is then gated like a joiner. The re-attach measurement on
28
+ * {@link DEFAULT_STRAND_FIRST_SYNC_TIMEOUT_MS} saw exactly that — a machine back over the store
29
+ * it kept, without the `Strand.Header` collection it had read before it left. Gating it is
30
+ * right: writing into a collection this machine does not hold would fork it.
23
31
  *
24
32
  * Why the app tables too: the Header is ONE collection. It reaches a joiner ahead of the
25
33
  * founder's app-table collections (peer-join backfill and pull-on-read deliver those
@@ -36,10 +44,12 @@
36
44
  * every machine; the first write to it still creates its collection — see `docs/strands.md`
37
45
  * ("Joining") for that residual.
38
46
  *
39
- * Owned by `StrandInstanceManager`: created in `buildStrandRuntime` for a non-founder launch
40
- * whose first probe finds no Header, stopped and dropped in `releaseRuntime` (so a quiesce →
41
- * resume rebuild re-probes over the same store), and force-opened when a founder request
42
- * runs the bootstrap against the still-gated database (`foundExistingStrand`).
47
+ * Owned by `StrandInstanceManager`: created in `buildStrandRuntime` for every launch, armed
48
+ * only for a non-founder launch whose first probe fails, stopped and dropped in
49
+ * `releaseRuntime` (so a quiesce → resume rebuild re-probes over the same store), and opened
50
+ * by `publishDatabase` whenever the database is published without its loop — a launch that
51
+ * needed no gate, or a founder request that ran the bootstrap against the still-gated
52
+ * database (`foundExistingStrand`).
43
53
  *
44
54
  * NOTE: the gate covers app and membership tables, not the schema catalog. Every launch —
45
55
  * joiner or founder — writes the catalog collection (`optimystic/schema` plus two
@@ -57,56 +67,90 @@ const log = debug('sereus:cadre:strand-first-sync');
57
67
  /** How often a gated launch re-probes (`Strand.Header`, then every `App` table) while waiting for its first sync. */
58
68
  export const DEFAULT_STRAND_FIRST_SYNC_POLL_MS = 500;
59
69
  /**
60
- * How long `CadreNode.addStrand` waits for a joining machine's first sync before rejecting
61
- * with {@link StrandAwaitingFirstSyncError}.
70
+ * How long `CadreNode.addStrand` waits for a machine's first sync before rejecting with
71
+ * {@link StrandAwaitingFirstSyncError}. It has to cover the slowest attach sereus carries,
72
+ * which is not a first join: a machine RE-attaching through a relay on a slow link can take
73
+ * longer than one joining for the first time.
62
74
  *
63
75
  * Measured over a DIRECT connection (2026-09-16): the joiner reads the founder's rows about
64
- * 1.3 s after `addStrand` would previously have resolved. That is still the fast case, and it
65
- * is not what this budget has to cover.
76
+ * 1.3 s after `addStrand` would previously have resolved. That is the fast case, and it is not
77
+ * what this budget has to cover.
66
78
  *
67
- * Measured over a RELAYED SLOW LINK (2026-09-26): one Windows developer machine, two
79
+ * Every harness figure below was taken on one shape: one Windows developer machine, two
68
80
  * relay-only `CadreNode`s (`listenAddrs: []`) on a shared loopback dedicated relay, with a
69
81
  * 900 ms one-way per-frame outbound delay applied to every websocket by
70
82
  * `integration-tests/src/harness/ws-latency.ts` in `pipelined` mode — frames stay overlapped
71
83
  * in flight, so the figure is latency and bandwidth stays unlimited; the harness's other mode
72
84
  * (`serial`) is a per-socket frame-rate cap and its delays are NOT comparable
73
- * (`docs/testing.md` → "Link latency"). A round trip therefore costs about
74
- * 1.8 s. Time from `addStrand` to writable, for a machine holding nothing of the strand yet:
75
- * 23, 27, 31 and 41 s over four runs at optimystic's 1000 ms cohort read deadline, and 35, 42
76
- * and 46 s over three runs at a 5000 ms one. **The second band is the one in force**: sereus
77
- * declares 5000 ms (`COHORT_READ_DEADLINE_MS`, `quereus-plugin-sereus/src/cluster-size.ts`),
78
- * because 1000 ms is shorter than one round trip on that link and leaves every cohort read with
79
- * no answer to corroborate against. Widening that deadline makes a consult against a peer that
80
- * cannot answer cost longer, and this phase runs several of those — which is why the two bands
81
- * are both recorded here, and why a change to either number has to be weighed against the
82
- * other. 120 s clears the worst sample of the band in force by about 2.6x. The previous 30 s
83
- * default sat INSIDE the first band, so roughly half of those joins were rejected as "not
84
- * writable yet" while the sync was progressing normally and went on to complete.
85
+ * (`docs/testing.md` → "Link latency"). A round trip therefore costs about 1.8 s. Times run
86
+ * from the `addStrand` call to writable.
87
+ *
88
+ * FRESH JOIN (2026-09-26), a machine holding nothing of the strand yet: 23, 27, 31 and 41 s
89
+ * over four runs at optimystic's 1000 ms cohort read deadline, and 35, 42 and 46 s over three
90
+ * runs at a 5000 ms one; the re-attach scenario below later took 38.7, 38.7 and 56.9 s for
91
+ * the same fresh join. **The 5000 ms band, 35-57 s, is the one in force**: sereus declares
92
+ * 5000 ms (`COHORT_READ_DEADLINE_MS`, `quereus-plugin-sereus/src/cluster-size.ts`), because
93
+ * 1000 ms is shorter than one round trip on that link and leaves every cohort read with no
94
+ * answer to corroborate against. Widening that deadline makes a consult against a peer that
95
+ * cannot answer cost longer, and this phase runs several of those — which is why both bands
96
+ * are recorded here, and why a change to either number has to be weighed against the other.
97
+ *
98
+ * RE-ATTACH (2026-09-26, the opt-in
99
+ * `integration-tests/src/scenarios/strand-reattach-first-sync-measure.integration.ts` — re-run
100
+ * it before changing this number): B attached once on an undelayed link, left with
101
+ * `stopStrand`, A wrote while it was away, the delay was raised, and B called `addStrand`
102
+ * again.
103
+ * - Over an EMPTY store (one minted per launch, cadre's default with no storage provider):
104
+ * gated in all four runs and writable at 38.7-56.8 s, the same as a fresh join.
105
+ * - Over the store it KEPT (a phone with durable storage), bimodal. In 3 of 8 runs the store
106
+ * held everything and the launch came up writable (5.6 s, the launch itself). In the other
107
+ * 5 it lacked the `Strand.Header` collection B had read on its first attach, so B was gated
108
+ * like a joiner and became writable at 64.1-78.7 s — the slowest attach measured, about
109
+ * twice a fresh join. Why syncing over a partial store is slower sits inside optimystic
110
+ * (`tickets/blocked/report-reattach-over-partial-replica-to-optimystic`).
111
+ * - Neither a redial nor catching up on missed writes explains the time: B's strand node
112
+ * connected to A's at 11 s in every arm, fresh join included, and a run with 20 missed
113
+ * writes fell inside the run-to-run spread of those with 1.
114
+ * This budget covers WRITABLE, not caught up: in the gated kept-store runs the row A wrote
115
+ * while B was away became readable only at 140-162 s.
116
+ *
117
+ * Two samples from outside this harness, neither reproduced here and neither discarded: a
118
+ * reporter's re-attach of the same shape (optimystic #22; their harness, storage and delay
119
+ * injector are unknown to us) opened the gate at about 150 s, after the previous 120 s budget
120
+ * had already rejected; and a real Galaxy S7 joining fresh through relay.sereus.org took 178 s.
121
+ *
122
+ * 300 s clears the worst harness sample (79 s) by about 3.8x, the reporter's re-attach by 2x
123
+ * and the device join by about 1.7x. 240 s was rejected: it clears the device join by only
124
+ * 1.35x, and that sample was not a re-attach. History: the original 30 s sat INSIDE the 1000 ms
125
+ * fresh band and refused about half of those joins while their sync was progressing normally;
126
+ * 120 s was sized from fresh joins only and refused the reporter's re-attach.
85
127
  *
86
- * NOTE: accepted tradeoff — what 120 s costs. This wait is what an app's `addStrand` sits in
87
- * before it is told "not yet", so a strand none of whose members is reachable at all takes two
88
- * minutes to report instead of thirty seconds. The slow report was weighed against refusing
89
- * joins that were working, and the refusal is the worse failure. The cost is bounded — the
90
- * rejection is retryable, the strand stays launched and keeps probing, and `strand:writable`
91
- * fires the moment the sync lands, so an app that listens for the event rather than awaiting
92
- * the call is unaffected either way. Revisit if the gate ever learns whether ANY other member
93
- * is connected: "no peer at all" could then be reported at once and this budget would only
94
- * ever be spent on a sync that is actually in progress.
128
+ * NOTE: accepted tradeoff — what 300 s costs. This wait is what an app's `addStrand` sits in
129
+ * before it is told "not yet", so a strand none of whose members is reachable at all takes five
130
+ * minutes to report instead of two. The slow report was weighed against refusing attaches that
131
+ * were working, and the refusal is the worse failure. The cost is bounded — the rejection is
132
+ * retryable, the strand stays launched and keeps probing, and `strand:writable` fires the
133
+ * moment the sync lands, so an app that listens for the event rather than awaiting the call is
134
+ * unaffected either way. Revisit if the gate ever learns whether ANY other member is connected:
135
+ * "no peer at all" could then be reported at once and this budget would only ever be spent on a
136
+ * sync that is actually in progress — worth more the longer this budget gets.
95
137
  */
96
- export const DEFAULT_STRAND_FIRST_SYNC_TIMEOUT_MS = 120000;
138
+ export const DEFAULT_STRAND_FIRST_SYNC_TIMEOUT_MS = 300000;
97
139
  /**
98
- * Thrown by `CadreNode.addStrand` / `whenStrandWritable` when a joining machine has not
99
- * received the strand's data from any other member within the wait budget. RETRYABLE: the
100
- * strand stays launched and keeps probing, so a later `addStrand` (or `whenStrandWritable`)
101
- * for the same strand completes the attach once another member is reachable; the
102
- * `strand:writable` event fires at that moment too.
140
+ * Thrown by `CadreNode.addStrand` / `whenStrandWritable` when a machine has not received the
141
+ * strand's data from another member within the wait budget — because no other member is
142
+ * reachable, or because one is and the sync is still arriving over a slow link; the gate
143
+ * cannot tell the two apart. RETRYABLE: the strand stays launched and keeps probing, so a
144
+ * later `addStrand` (or `whenStrandWritable`) for the same strand completes the attach once
145
+ * the data has arrived; the `strand:writable` event fires at that moment too.
103
146
  */
104
147
  export class StrandAwaitingFirstSyncError extends Error {
105
148
  constructor(strandId, waitedMs) {
106
- super(`Strand ${strandId} is not writable yet: no member of this strand has been reachable ` +
107
- `since this machine joined, so it has not received the strand's data (waited ${waitedMs} ms). ` +
108
- 'The strand stays launched and keeps trying — call addStrand again, or wait for the ' +
109
- "'strand:writable' event, once another member is reachable.");
149
+ super(`Strand ${strandId} is not writable yet: this machine has not yet received the strand's data ` +
150
+ `from another member (waited ${waitedMs} ms). Either no other member is reachable, or the ` +
151
+ 'link to one is slow and the sync is still in progress. The strand stays launched and keeps ' +
152
+ 'trying — call addStrand or whenStrandWritable(strandId) again to keep waiting, or listen ' +
153
+ "for the 'strand:writable' event.");
110
154
  this.name = 'StrandAwaitingFirstSyncError';
111
155
  this.strandId = strandId;
112
156
  this.waitedMs = waitedMs;
@@ -192,15 +236,17 @@ export class StrandFirstSyncGate {
192
236
  log('[%s] first-sync gate armed: no Strand.Header held yet; probing every %dms', this.deps.label, this.pollIntervalMs);
193
237
  }
194
238
  /**
195
- * Force-open: the caller has just written the Header itself (a founder bootstrap run
196
- * against the gated database). Stops the loop; `onHeaderHeld` is NOT invoked.
239
+ * Open without the probe loop: the caller is publishing the database itself — a launch
240
+ * whose first probe passed (or a founder's), which never armed the loop, or a founder
241
+ * bootstrap just run against the gated database. Stops the loop; `onHeaderHeld` is NOT
242
+ * invoked.
197
243
  */
198
244
  open() {
199
245
  if (this.opened)
200
246
  return;
201
247
  this.opened = true;
202
248
  this.stop();
203
- log('[%s] first-sync gate opened by the caller (Header written locally)', this.deps.label);
249
+ log('[%s] database published by the caller; first-sync gate not needed or force-opened', this.deps.label);
204
250
  }
205
251
  /** Disarm the loop; a probe already in flight completes and is then ignored. */
206
252
  stop() {
@@ -1 +1 @@
1
- {"version":3,"file":"strand-first-sync-gate.js","sourceRoot":"","sources":["../src/strand-first-sync-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,uBAAuB,EAAyB,MAAM,wBAAwB,CAAC;AAExF,MAAM,GAAG,GAAG,KAAK,CAAC,gCAAgC,CAAC,CAAC;AAEpD,qHAAqH;AACrH,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;G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Y,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1D,OAAO,KAAK,CAAC;QACf,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;CACF"}
@@ -13,7 +13,7 @@ import { StrandFirstSyncGate, StrandAwaitingFirstSyncError, strandFirstSyncCompl
13
13
  import { DEFAULT_CONNECTION_MONITOR, resolveStrandClusterSize, strandClusterPolicy } from './types.js';
14
14
  import { strandNodeAddrs } from './strand-network-config.js';
15
15
  import { superviseRelayReservation } from './relay-reservation.js';
16
- import { peerJoinPushBudget, relayReservationBudgetMs, resolveLinkRoundTripMs } from './link-budget.js';
16
+ import { connectionManagerTimeouts, peerJoinPushBudget, relayReservationBudgetMs, resolveLinkRoundTripMs } from './link-budget.js';
17
17
  const log = debug('sereus:cadre:strand-manager');
18
18
  const timing = debug('sereus:cadre:timing');
19
19
  /**
@@ -433,6 +433,10 @@ export class StrandInstanceManager {
433
433
  // widened ping deadline has to reach the strand nodes too (see
434
434
  // DEFAULT_CONNECTION_MONITOR).
435
435
  connectionMonitor: config.network?.connectionMonitor ?? DEFAULT_CONNECTION_MONITOR,
436
+ // The same declared-link limits the control node takes, and for the same reason: a
437
+ // strand node is the listener for every other member's strand node (`link-budget.ts`,
438
+ // `connectionManagerTimeouts`).
439
+ connectionManager: connectionManagerTimeouts(config.network?.linkRoundTripMs),
436
440
  // Listen entries plus the WebSocket transport switch they imply — a strand node
437
441
  // announces nothing the operator configured (`strand-network-config.ts`), and
438
442
  // spreads AFTER `transports` above because the switch is a no-op whenever the
@@ -600,7 +604,7 @@ export class StrandInstanceManager {
600
604
  // failing here would only trade that for `StrandWatcher`'s full-rebuild retry.
601
605
  //
602
606
  // NOTE: a relay that is down costs this launch one full drive — the reservation budget
603
- // counted from the declared link round trip, 8 s at its default (`link-budget.ts`) — and
607
+ // counted from the declared link round trip, 14 s at its default (`link-budget.ts`) — and
604
608
  // `StrandWatcher` launches strands one at a time, so N strands cost N of those in
605
609
  // bring-up during a relay outage, and MORE on a host that declared a slower link. If that
606
610
  // ever matters, stop awaiting here (the circuit addr then lands after `active`) rather