@cello-protocol/daemon 0.0.181 → 0.0.183

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 (197) hide show
  1. package/dist/agent-id-migration.d.ts +9 -0
  2. package/dist/agent-id-migration.d.ts.map +1 -1
  3. package/dist/agent-id-migration.js +73 -1
  4. package/dist/agent-id-migration.js.map +1 -1
  5. package/dist/agent-selection.d.ts +73 -0
  6. package/dist/agent-selection.d.ts.map +1 -0
  7. package/dist/agent-selection.js +80 -0
  8. package/dist/agent-selection.js.map +1 -0
  9. package/dist/agent-settings-keys.d.ts.map +1 -1
  10. package/dist/agent-settings-keys.js +18 -0
  11. package/dist/agent-settings-keys.js.map +1 -1
  12. package/dist/assignment-verify.d.ts +62 -0
  13. package/dist/assignment-verify.d.ts.map +1 -0
  14. package/dist/assignment-verify.js +185 -0
  15. package/dist/assignment-verify.js.map +1 -0
  16. package/dist/backup-restore.d.ts +102 -0
  17. package/dist/backup-restore.d.ts.map +1 -0
  18. package/dist/backup-restore.js +340 -0
  19. package/dist/backup-restore.js.map +1 -0
  20. package/dist/bin/cello-daemon.js +91 -49
  21. package/dist/bin/cello-daemon.js.map +1 -1
  22. package/dist/close-commitment.d.ts +67 -0
  23. package/dist/close-commitment.d.ts.map +1 -0
  24. package/dist/close-commitment.js +78 -0
  25. package/dist/close-commitment.js.map +1 -0
  26. package/dist/close-session-handler.d.ts +20 -0
  27. package/dist/close-session-handler.d.ts.map +1 -1
  28. package/dist/close-session-handler.js +351 -58
  29. package/dist/close-session-handler.js.map +1 -1
  30. package/dist/consortium-bootstrap.d.ts +2 -0
  31. package/dist/consortium-bootstrap.d.ts.map +1 -1
  32. package/dist/consortium-bootstrap.js +182 -9
  33. package/dist/consortium-bootstrap.js.map +1 -1
  34. package/dist/content-encryption-status.d.ts +97 -0
  35. package/dist/content-encryption-status.d.ts.map +1 -0
  36. package/dist/content-encryption-status.js +122 -0
  37. package/dist/content-encryption-status.js.map +1 -0
  38. package/dist/content-park-client.d.ts +10 -0
  39. package/dist/content-park-client.d.ts.map +1 -1
  40. package/dist/content-park-client.js +84 -3
  41. package/dist/content-park-client.js.map +1 -1
  42. package/dist/content-park.d.ts.map +1 -1
  43. package/dist/content-park.js +323 -21
  44. package/dist/content-park.js.map +1 -1
  45. package/dist/daemon.d.ts +13 -1
  46. package/dist/daemon.d.ts.map +1 -1
  47. package/dist/daemon.js +1168 -141
  48. package/dist/daemon.js.map +1 -1
  49. package/dist/delivery-session-suspects.d.ts.map +1 -1
  50. package/dist/delivery-session-suspects.js +5 -0
  51. package/dist/delivery-session-suspects.js.map +1 -1
  52. package/dist/directory-auth-posture.d.ts +87 -0
  53. package/dist/directory-auth-posture.d.ts.map +1 -0
  54. package/dist/directory-auth-posture.js +134 -0
  55. package/dist/directory-auth-posture.js.map +1 -0
  56. package/dist/directory-bootstrap.d.ts +66 -3
  57. package/dist/directory-bootstrap.d.ts.map +1 -1
  58. package/dist/directory-bootstrap.js +133 -7
  59. package/dist/directory-bootstrap.js.map +1 -1
  60. package/dist/document-delivery-transport.d.ts +22 -2
  61. package/dist/document-delivery-transport.d.ts.map +1 -1
  62. package/dist/document-delivery-transport.js +11 -3
  63. package/dist/document-delivery-transport.js.map +1 -1
  64. package/dist/document-handlers.d.ts.map +1 -1
  65. package/dist/document-handlers.js +119 -0
  66. package/dist/document-handlers.js.map +1 -1
  67. package/dist/document-layer.d.ts +0 -2
  68. package/dist/document-layer.d.ts.map +1 -1
  69. package/dist/document-layer.js.map +1 -1
  70. package/dist/inbound-sessions.d.ts +31 -1
  71. package/dist/inbound-sessions.d.ts.map +1 -1
  72. package/dist/inbound-sessions.js +276 -16
  73. package/dist/inbound-sessions.js.map +1 -1
  74. package/dist/index.d.ts +2 -0
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +3 -0
  77. package/dist/index.js.map +1 -1
  78. package/dist/initiate-session-handler.d.ts.map +1 -1
  79. package/dist/initiate-session-handler.js +34 -3
  80. package/dist/initiate-session-handler.js.map +1 -1
  81. package/dist/ipc-server.d.ts +5 -1
  82. package/dist/ipc-server.d.ts.map +1 -1
  83. package/dist/ipc-server.js +19 -3
  84. package/dist/ipc-server.js.map +1 -1
  85. package/dist/manifest-deps.d.ts +0 -11
  86. package/dist/manifest-deps.d.ts.map +1 -1
  87. package/dist/manifest-deps.js +28 -2
  88. package/dist/manifest-deps.js.map +1 -1
  89. package/dist/manifest-validity.d.ts +153 -0
  90. package/dist/manifest-validity.d.ts.map +1 -0
  91. package/dist/manifest-validity.js +268 -0
  92. package/dist/manifest-validity.js.map +1 -0
  93. package/dist/notification-handlers.d.ts.map +1 -1
  94. package/dist/notification-handlers.js +15 -0
  95. package/dist/notification-handlers.js.map +1 -1
  96. package/dist/outbound-sessions.d.ts +31 -0
  97. package/dist/outbound-sessions.d.ts.map +1 -1
  98. package/dist/outbound-sessions.js +217 -17
  99. package/dist/outbound-sessions.js.map +1 -1
  100. package/dist/park-envelope.d.ts +95 -1
  101. package/dist/park-envelope.d.ts.map +1 -1
  102. package/dist/park-envelope.js +195 -4
  103. package/dist/park-envelope.js.map +1 -1
  104. package/dist/refusal-reasons.d.ts +72 -0
  105. package/dist/refusal-reasons.d.ts.map +1 -0
  106. package/dist/refusal-reasons.js +69 -0
  107. package/dist/refusal-reasons.js.map +1 -0
  108. package/dist/register-handler.d.ts.map +1 -1
  109. package/dist/register-handler.js +76 -0
  110. package/dist/register-handler.js.map +1 -1
  111. package/dist/registration-manager.d.ts.map +1 -1
  112. package/dist/registration-manager.js +20 -1
  113. package/dist/registration-manager.js.map +1 -1
  114. package/dist/relay-only.d.ts +133 -0
  115. package/dist/relay-only.d.ts.map +1 -0
  116. package/dist/relay-only.js +183 -0
  117. package/dist/relay-only.js.map +1 -0
  118. package/dist/restart-seal-resolver.d.ts.map +1 -1
  119. package/dist/restart-seal-resolver.js +6 -0
  120. package/dist/restart-seal-resolver.js.map +1 -1
  121. package/dist/retry-queue.d.ts +49 -2
  122. package/dist/retry-queue.d.ts.map +1 -1
  123. package/dist/retry-queue.js +55 -10
  124. package/dist/retry-queue.js.map +1 -1
  125. package/dist/roster-freshness.d.ts +169 -0
  126. package/dist/roster-freshness.d.ts.map +1 -0
  127. package/dist/roster-freshness.js +249 -0
  128. package/dist/roster-freshness.js.map +1 -0
  129. package/dist/seal-certificate-pull.d.ts +17 -1
  130. package/dist/seal-certificate-pull.d.ts.map +1 -1
  131. package/dist/seal-certificate-pull.js +37 -3
  132. package/dist/seal-certificate-pull.js.map +1 -1
  133. package/dist/seal-coordinator.d.ts +17 -1
  134. package/dist/seal-coordinator.d.ts.map +1 -1
  135. package/dist/seal-coordinator.js +71 -0
  136. package/dist/seal-coordinator.js.map +1 -1
  137. package/dist/seal-failure-store.d.ts +104 -0
  138. package/dist/seal-failure-store.d.ts.map +1 -0
  139. package/dist/seal-failure-store.js +126 -0
  140. package/dist/seal-failure-store.js.map +1 -0
  141. package/dist/seal-flows.d.ts.map +1 -1
  142. package/dist/seal-flows.js +35 -6
  143. package/dist/seal-flows.js.map +1 -1
  144. package/dist/seal-upgrade.d.ts +20 -5
  145. package/dist/seal-upgrade.d.ts.map +1 -1
  146. package/dist/seal-upgrade.js +28 -5
  147. package/dist/seal-upgrade.js.map +1 -1
  148. package/dist/session-assignment-parser.d.ts +41 -5
  149. package/dist/session-assignment-parser.d.ts.map +1 -1
  150. package/dist/session-assignment-parser.js +77 -14
  151. package/dist/session-assignment-parser.js.map +1 -1
  152. package/dist/session-ceremony.d.ts +35 -0
  153. package/dist/session-ceremony.d.ts.map +1 -1
  154. package/dist/session-ceremony.js +97 -0
  155. package/dist/session-ceremony.js.map +1 -1
  156. package/dist/session-connection-gater.d.ts +46 -7
  157. package/dist/session-connection-gater.d.ts.map +1 -1
  158. package/dist/session-connection-gater.js +163 -12
  159. package/dist/session-connection-gater.js.map +1 -1
  160. package/dist/session-content-handlers.d.ts +12 -0
  161. package/dist/session-content-handlers.d.ts.map +1 -1
  162. package/dist/session-content-handlers.js +149 -8
  163. package/dist/session-content-handlers.js.map +1 -1
  164. package/dist/session-node-manager.d.ts +653 -40
  165. package/dist/session-node-manager.d.ts.map +1 -1
  166. package/dist/session-node-manager.js +5938 -374
  167. package/dist/session-node-manager.js.map +1 -1
  168. package/dist/session-read-handlers.d.ts +27 -0
  169. package/dist/session-read-handlers.d.ts.map +1 -1
  170. package/dist/session-read-handlers.js +127 -6
  171. package/dist/session-read-handlers.js.map +1 -1
  172. package/dist/session-relay-client.d.ts +177 -2
  173. package/dist/session-relay-client.d.ts.map +1 -1
  174. package/dist/session-relay-client.js +564 -16
  175. package/dist/session-relay-client.js.map +1 -1
  176. package/dist/session-salt-agreement.d.ts +338 -0
  177. package/dist/session-salt-agreement.d.ts.map +1 -0
  178. package/dist/session-salt-agreement.js +478 -0
  179. package/dist/session-salt-agreement.js.map +1 -0
  180. package/dist/signal-submission.d.ts.map +1 -1
  181. package/dist/signal-submission.js +10 -1
  182. package/dist/signal-submission.js.map +1 -1
  183. package/dist/signaling-connect.d.ts +18 -1
  184. package/dist/signaling-connect.d.ts.map +1 -1
  185. package/dist/signaling-connect.js +206 -6
  186. package/dist/signaling-connect.js.map +1 -1
  187. package/dist/types.d.ts +75 -0
  188. package/dist/types.d.ts.map +1 -1
  189. package/dist/types.js.map +1 -1
  190. package/dist/vocabulary.d.ts.map +1 -1
  191. package/dist/vocabulary.js +10 -0
  192. package/dist/vocabulary.js.map +1 -1
  193. package/dist/wire-content-hash.d.ts +68 -0
  194. package/dist/wire-content-hash.d.ts.map +1 -1
  195. package/dist/wire-content-hash.js +83 -0
  196. package/dist/wire-content-hash.js.map +1 -1
  197. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"delivery-session-suspects.d.ts","sourceRoot":"","sources":["../src/delivery-session-suspects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,M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,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GACrD,eAAe,CAyCjB"}
@@ -38,6 +38,11 @@ export const TERMINAL_ISH_REFUSALS = new Set([
38
38
  "session_sealed",
39
39
  "session_not_found",
40
40
  "relay_session_gone",
41
+ // DOD-M15-TERMINAL-REASON-1: the relay now names WHY it ended a session, and this set was keyed
42
+ // on the old catch-all literal. A merits refusal must count as a suspect here for the same reason
43
+ // `session_sealed` does — the session is over and a document that keeps being pushed down it is
44
+ // being pushed at nothing.
45
+ "seal_refused",
41
46
  ]);
42
47
  /** Consecutive terminal-ish refusals before delivery stops reusing a session. */
43
48
  export const SUSPECT_THRESHOLD = 2;
@@ -1 +1 @@
1
- {"version":3,"file":"delivery-session-suspects.js","sourceRoot":"","sources":["../src/delivery-session-suspects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAwB,IAAI,GAAG,CAAC;IAChE,gBAAgB;IAChB,mBAAmB;IACnB,oBAAoB;CACrB,CAAC,CAAC;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAavC,MAAM,UAAU,qBAAqB,CACnC,OAAoD,EAAE;IAEtD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,iBAAiB,CAAC;IACtD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,mBAAmB,CAAC;IAC1D,iGAAiG;IACjG,MAAM,IAAI,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEvC,OAAO;QACL,WAAW,CAAC,SAAiB,EAAE,MAAc;YAC3C,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,OAAO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AAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC;QACD,SAAS,CAAC,SAAiB;YACzB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACrC,8FAA8F;YAC9F,6FAA6F;YAC7F,4FAA4F;YAC5F,8FAA8F;YAC9F,4FAA4F;YAC5F,6DAA6D;YAC7D,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;gBACZ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBACvB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;YAC3B,CAAC;YACD,OAAO,GAAG,IAAI,SAAS,CAAC;QAC1B,CAAC;QACD,IAAI;YACF,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * DOD-M15-DIRAUTH-1 — directory authentication cannot be silently skipped.
3
+ *
4
+ * ─── The map, grepped rather than assumed ──────────────────────────────────────────────────────
5
+ *
6
+ * DECIDED `manifest-deps.ts` builds a challenge verifier ONLY when the resolved directory URL
7
+ * byte-matches a bundled endpoint; otherwise it returns `{}` and logs
8
+ * `daemon.manifest.bundled.skipped` once at startup.
9
+ * ENFORCED `signaling-connect.ts` step 6 — `if (verifier) { … }`. With a verifier it fails CLOSED
10
+ * correctly: missing proof throws, bad signature throws.
11
+ * SKIPPED the same `if (verifier)`. Without one the block is stepped over on every connect and
12
+ * every reconnect, and nothing is logged at that site at all.
13
+ *
14
+ * NOT the live path, despite a comment claiming it is: `signaling-manager.ts`'s `processStep5Frame`
15
+ * has no production caller. Its `no_challenge_verifier` branch returns silently and nothing reaches
16
+ * it. Mistaking that for the enforcement point is the error this header exists to prevent.
17
+ *
18
+ * ─── Why the skip exists, and why it is still a hole ───────────────────────────────────────────
19
+ *
20
+ * The bundled manifest is the trust anchor for the PRODUCTION consortium only. Local dev and the
21
+ * e2e harness run their own directory on 127.0.0.1, which the bundle cannot describe, so enforcing
22
+ * there would reject every connection. The skip is correct for them.
23
+ *
24
+ * The hole is the test itself. It compares against the bundled roster after NORMALISATION — trimmed,
25
+ * trailing slash dropped, lowercased (`manifest-deps.ts`) — so case and a trailing slash are
26
+ * forgiven. **A DNS name pointing at the very same machine is not**, so an operator doing the most
27
+ * natural thing available — putting a hostname in `CELLO_DIRECTORY_URL` — silently loses directory
28
+ * identity authentication.
29
+ *
30
+ * (Review F7: this said "byte-equality" three times, including in operator-facing text. An operator
31
+ * told that would hunt a trailing slash or a capital letter — both of which are tolerated — and not
32
+ * find it.)
33
+ * The DoD line is explicit that this is a workaround rather than a fix: *"That is why the production
34
+ * directory URL is a raw IP."*
35
+ *
36
+ * Step 6 is what stops a `/bootstrap` MITM redirecting failover to a rogue directory — precisely, it
37
+ * CONVERTS the redirect into a refused connection: the rogue host cannot produce a signature over
38
+ * `nodeId ‖ our agent pubkey ‖ nonce ‖ timestamp` without a manifest node's private key, so the
39
+ * connect throws and the failover resolver moves on. The attacker keeps denial-of-service; they do
40
+ * not get impersonation. Without step 6 the client authenticates to whatever answers.
41
+ *
42
+ * ─── Scope ─────────────────────────────────────────────────────────────────────────────────────
43
+ *
44
+ * This does not remove the skip. It makes it impossible to MISS (the posture is stated in the agent
45
+ * response, both directions) and makes it REFUSABLE (`CELLO_REQUIRE_DIRECTORY_AUTH`). Resolving the
46
+ * bootstrap coordinate over an authenticated channel is the line's second bullet, and is carried.
47
+ */
48
+ /**
49
+ * Should a missing challenge verifier be a REFUSAL rather than a skip?
50
+ *
51
+ * Default OFF, and that is not timidity: enforcing unconditionally would reject every local-dev and
52
+ * e2e connection, since those directories cannot be described by the bundled manifest at all.
53
+ *
54
+ * The parsing is deliberately lopsided — anything set that is not an explicit negative counts as ON.
55
+ * A security opt-in that silently fails to apply is worse than not offering one: an operator who
56
+ * writes `CELLO_REQUIRE_DIRECTORY_AUTH=yes` believes they have demanded authentication, and a
57
+ * parser that recognised only `1`/`true` would hand them the permissive default while they believed
58
+ * the opposite. Getting it wrong in the safe direction costs a startup error the operator can read.
59
+ */
60
+ export declare function directoryAuthRequired(env: Record<string, string | undefined>): boolean;
61
+ /**
62
+ * The posture, for `cello_status`.
63
+ *
64
+ * NOTE the inversion from the rest of this milestone: here the healthy case DOES contribute a field.
65
+ * Everywhere else a field on the good path is furniture that teaches the reader to skip the block
66
+ * that matters — but the whole defect being fixed is that ON and OFF are distinguished only by the
67
+ * absence of a log line nobody reads. "I checked, and it is on" has to be an answer an operator can
68
+ * actually obtain. Only the GUIDANCE is conditional.
69
+ */
70
+ export declare function describeDirectoryAuth(opts: {
71
+ verifierPresent: boolean;
72
+ directoryUrl: string;
73
+ /**
74
+ * Did the operator actually SET `CELLO_DIRECTORY_URL` — review F5.
75
+ *
76
+ * With it unset, `resolveDirectoryUrl` returns a RANDOM bundled endpoint, freshly picked on every
77
+ * call. So the first cut printed a different URL on consecutive status reads, and worse, the
78
+ * refusal asserted *"the usual cause is a DNS hostname"* while quoting a URL that IS a bundled
79
+ * endpoint — naming a cause that could not have produced the state it was describing. Exactly the
80
+ * error-substitution class this milestone exists to kill.
81
+ *
82
+ * When it is unset there is no configured URL to blame, and the honest explanation is different:
83
+ * no challenge verifier was supplied to this daemon at all.
84
+ */
85
+ urlExplicitlyConfigured?: boolean;
86
+ }): Record<string, unknown>;
87
+ //# sourceMappingURL=directory-auth-posture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-auth-posture.d.ts","sourceRoot":"","sources":["../src/directory-auth-posture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAKH;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,OAAO,CAMtF;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;OAWG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsD1B"}
@@ -0,0 +1,134 @@
1
+ /**
2
+ * DOD-M15-DIRAUTH-1 — directory authentication cannot be silently skipped.
3
+ *
4
+ * ─── The map, grepped rather than assumed ──────────────────────────────────────────────────────
5
+ *
6
+ * DECIDED `manifest-deps.ts` builds a challenge verifier ONLY when the resolved directory URL
7
+ * byte-matches a bundled endpoint; otherwise it returns `{}` and logs
8
+ * `daemon.manifest.bundled.skipped` once at startup.
9
+ * ENFORCED `signaling-connect.ts` step 6 — `if (verifier) { … }`. With a verifier it fails CLOSED
10
+ * correctly: missing proof throws, bad signature throws.
11
+ * SKIPPED the same `if (verifier)`. Without one the block is stepped over on every connect and
12
+ * every reconnect, and nothing is logged at that site at all.
13
+ *
14
+ * NOT the live path, despite a comment claiming it is: `signaling-manager.ts`'s `processStep5Frame`
15
+ * has no production caller. Its `no_challenge_verifier` branch returns silently and nothing reaches
16
+ * it. Mistaking that for the enforcement point is the error this header exists to prevent.
17
+ *
18
+ * ─── Why the skip exists, and why it is still a hole ───────────────────────────────────────────
19
+ *
20
+ * The bundled manifest is the trust anchor for the PRODUCTION consortium only. Local dev and the
21
+ * e2e harness run their own directory on 127.0.0.1, which the bundle cannot describe, so enforcing
22
+ * there would reject every connection. The skip is correct for them.
23
+ *
24
+ * The hole is the test itself. It compares against the bundled roster after NORMALISATION — trimmed,
25
+ * trailing slash dropped, lowercased (`manifest-deps.ts`) — so case and a trailing slash are
26
+ * forgiven. **A DNS name pointing at the very same machine is not**, so an operator doing the most
27
+ * natural thing available — putting a hostname in `CELLO_DIRECTORY_URL` — silently loses directory
28
+ * identity authentication.
29
+ *
30
+ * (Review F7: this said "byte-equality" three times, including in operator-facing text. An operator
31
+ * told that would hunt a trailing slash or a capital letter — both of which are tolerated — and not
32
+ * find it.)
33
+ * The DoD line is explicit that this is a workaround rather than a fix: *"That is why the production
34
+ * directory URL is a raw IP."*
35
+ *
36
+ * Step 6 is what stops a `/bootstrap` MITM redirecting failover to a rogue directory — precisely, it
37
+ * CONVERTS the redirect into a refused connection: the rogue host cannot produce a signature over
38
+ * `nodeId ‖ our agent pubkey ‖ nonce ‖ timestamp` without a manifest node's private key, so the
39
+ * connect throws and the failover resolver moves on. The attacker keeps denial-of-service; they do
40
+ * not get impersonation. Without step 6 the client authenticates to whatever answers.
41
+ *
42
+ * ─── Scope ─────────────────────────────────────────────────────────────────────────────────────
43
+ *
44
+ * This does not remove the skip. It makes it impossible to MISS (the posture is stated in the agent
45
+ * response, both directions) and makes it REFUSABLE (`CELLO_REQUIRE_DIRECTORY_AUTH`). Resolving the
46
+ * bootstrap coordinate over an authenticated channel is the line's second bullet, and is carried.
47
+ */
48
+ /** Private/loopback ranges — a directory here is local dev or the e2e harness, by design. */
49
+ const LOCAL_URL = /^https?:\/\/(localhost|127\.|\[::1\]|10\.|192\.168\.|172\.(1[6-9]|2\d|3[01])\.)/;
50
+ /**
51
+ * Should a missing challenge verifier be a REFUSAL rather than a skip?
52
+ *
53
+ * Default OFF, and that is not timidity: enforcing unconditionally would reject every local-dev and
54
+ * e2e connection, since those directories cannot be described by the bundled manifest at all.
55
+ *
56
+ * The parsing is deliberately lopsided — anything set that is not an explicit negative counts as ON.
57
+ * A security opt-in that silently fails to apply is worse than not offering one: an operator who
58
+ * writes `CELLO_REQUIRE_DIRECTORY_AUTH=yes` believes they have demanded authentication, and a
59
+ * parser that recognised only `1`/`true` would hand them the permissive default while they believed
60
+ * the opposite. Getting it wrong in the safe direction costs a startup error the operator can read.
61
+ */
62
+ export function directoryAuthRequired(env) {
63
+ const raw = env["CELLO_REQUIRE_DIRECTORY_AUTH"];
64
+ if (raw === undefined)
65
+ return false;
66
+ const v = raw.trim().toLowerCase();
67
+ if (v === "" || v === "0" || v === "false" || v === "no" || v === "off")
68
+ return false;
69
+ return true;
70
+ }
71
+ /**
72
+ * The posture, for `cello_status`.
73
+ *
74
+ * NOTE the inversion from the rest of this milestone: here the healthy case DOES contribute a field.
75
+ * Everywhere else a field on the good path is furniture that teaches the reader to skip the block
76
+ * that matters — but the whole defect being fixed is that ON and OFF are distinguished only by the
77
+ * absence of a log line nobody reads. "I checked, and it is on" has to be an answer an operator can
78
+ * actually obtain. Only the GUIDANCE is conditional.
79
+ */
80
+ export function describeDirectoryAuth(opts) {
81
+ if (opts.verifierPresent) {
82
+ return { directory_authentication: "enforced" };
83
+ }
84
+ const configured = opts.urlExplicitlyConfigured !== false;
85
+ // NORMALISE FIRST — review F6. `manifest-deps.ts` applies its local/public test to the normalised
86
+ // URL; applying it to the raw one here made the two classifiers disagree on `HTTP://127.0.0.1`
87
+ // (the regex is case-sensitive) and on a leading space from a .env or compose value. The result
88
+ // was the rogue-directory alarm firing on a loopback dev run — a signal on the designed case.
89
+ const expected = LOCAL_URL.test(opts.directoryUrl.trim().toLowerCase());
90
+ return {
91
+ directory_authentication: "disabled",
92
+ /**
93
+ * Two very different situations, which must not read the same.
94
+ *
95
+ * A loopback or private address is local dev or the e2e harness pointing at its own directory —
96
+ * designed, and an alarm there would fire on every local run. Anything else is a client talking
97
+ * to a PUBLIC directory with identity authentication off, which is weaker than its operator
98
+ * believes, and the only previous signal was the absence of a log line.
99
+ */
100
+ directory_authentication_expected: expected,
101
+ // Only reported when the operator actually chose it. An unset CELLO_DIRECTORY_URL yields a fresh
102
+ // RANDOM bundled endpoint per call, and printing that as "the directory URL" invites an operator
103
+ // to debug a value nothing decided anything from (review F5).
104
+ ...(configured ? { directory_authentication_directory_url: opts.directoryUrl } : {}),
105
+ directory_authentication_guidance: !configured
106
+ ? "Directory identity authentication (step 6) is OFF: no challenge verifier was supplied to " +
107
+ "this daemon, and CELLO_DIRECTORY_URL is not set, so there is no configured directory URL " +
108
+ "to have failed the roster match. This is the shape an in-process embedder or a test harness " +
109
+ "produces. A daemon started through the normal CLI builds a verifier automatically when its " +
110
+ "directory URL matches the bundled roster."
111
+ : expected
112
+ ? `Directory identity authentication (step 6) is OFF because ${opts.directoryUrl} is a local ` +
113
+ "address, which the bundled consortium manifest cannot describe. This is the designed " +
114
+ "configuration for local development and the e2e harness — enforcing here would reject " +
115
+ "every connection. To turn it on, supply a matching manifest with CELLO_CONSORTIUM_MANIFEST " +
116
+ "AND CELLO_CONSORTIUM_ROOT_KEYS AND CELLO_CONSORTIUM_THRESHOLD — all three are required " +
117
+ "together, and setting only the first makes the daemon refuse to start with a different error."
118
+ : `Directory identity authentication (step 6) is OFF, because ${opts.directoryUrl} is not ` +
119
+ "in the bundled consortium manifest after normalisation (trimmed, trailing slash dropped, " +
120
+ "lowercased — so case and a trailing slash are forgiven). This client is weaker than " +
121
+ "it looks: step 6 is what stops a MITM on the plaintext /bootstrap endpoint redirecting " +
122
+ "failover to a ROGUE DIRECTORY, and without it this daemon will authenticate to whatever " +
123
+ "answers. The usual cause is a HOSTNAME — normalisation forgives case and slashes but not " +
124
+ "DNS, so a name pointing at exactly the right machine still does not match, which is why the " +
125
+ "production " +
126
+ "directory URL is a raw address. Either use a bundled endpoint address, or supply a matching " +
127
+ "manifest with CELLO_CONSORTIUM_MANIFEST AND CELLO_CONSORTIUM_ROOT_KEYS AND " +
128
+ "CELLO_CONSORTIUM_THRESHOLD — all three are required together, and setting only the first " +
129
+ "makes the daemon refuse to start with a different error. Set CELLO_REQUIRE_DIRECTORY_AUTH=1 " +
130
+ "to refuse to start rather than run without step 6; to turn that demand back off set it to " +
131
+ "0, false, no or off (an unrecognised value counts as ON, deliberately).",
132
+ };
133
+ }
134
+ //# sourceMappingURL=directory-auth-posture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-auth-posture.js","sourceRoot":"","sources":["../src/directory-auth-posture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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3F,8FAA8F;gBAC9F,6FAA6F;gBAC7F,2CAA2C;YAC7C,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,6DAA6D,IAAI,CAAC,YAAY,cAAc;oBAC5F,uFAAuF;oBACvF,wFAAwF;oBACxF,6FAA6F;oBAC7F,yFAAyF;oBACzF,+FAA+F;gBACjG,CAAC,CAAC,8DAA8D,IAAI,CAAC,YAAY,UAAU;oBACzF,2FAA2F;oBAC3F,sFAAsF;oBACtF,yFAAyF;oBACzF,0FAA0F;oBAC1F,2FAA2F;oBAC3F,8FAA8F;oBAC9F,aAAa;oBACb,8FAA8F;oBAC9F,6EAA6E;oBAC7E,2FAA2F;oBAC3F,8FAA8F;oBAC9F,4FAA4F;oBAC5F,yEAAyE;KAC9E,CAAC;AACJ,CAAC"}
@@ -69,18 +69,59 @@ export declare function resolveDirectoryUrl(env?: Record<string, string | undefi
69
69
  export type BootstrapFailureReason = "dns_error" | "connect_error" | "timeout" | "http_error" | "bad_response";
70
70
  export type BootstrapResult = {
71
71
  ok: true;
72
- multiaddr: string;
72
+ multiaddr: string; /** How many probes it took. 1 on the happy path. */
73
+ attempts?: number;
73
74
  } | {
74
75
  ok: false;
75
76
  reason: BootstrapFailureReason;
76
- detail?: string;
77
+ detail?: string; /** How many probes were spent. */
78
+ attempts?: number;
77
79
  };
78
80
  /**
79
81
  * Auto-discover the directory multiaddr via GET /bootstrap, classifying failures
80
82
  * so callers can log a `reason` that distinguishes "this machine cannot resolve
81
83
  * the name" from "the server is down" from "the payload is wrong".
82
84
  */
83
- export declare function fetchBootstrapResult(directoryUrl: string, fetchFn?: typeof fetch): Promise<BootstrapResult>;
85
+ export interface ProbeBudget {
86
+ /** How many probes to spend. */
87
+ attempts: number;
88
+ /** Deadline for each probe. */
89
+ timeoutMs: number;
90
+ /** Wall-clock ceiling across all probes. */
91
+ totalMs: number;
92
+ }
93
+ /**
94
+ * The default: persistent. Used where nothing is waiting on the answer — the roster sweep, which
95
+ * runs its nodes in parallel and would rather spend 16 s than drop a healthy node.
96
+ */
97
+ export declare const PERSISTENT_PROBE: ProbeBudget;
98
+ /**
99
+ * FAIL-FAST, for the reconnect path — review F1, a regression the retry introduced.
100
+ *
101
+ * `createDirectoryEndpointResolver` runs on EVERY connect attempt, and the signaling stream turns
102
+ * over roughly every 70 seconds. Giving that path the persistent budget meant a lossy link could
103
+ * spend 16 s resolving before falling back to the last-known-good endpoint it already had — and
104
+ * `outbound-sessions` waits only 10 s for signaling before giving up, so `cello_initiate_session`
105
+ * would start returning `directory_signaling_timeout` where it used to get a usable endpoint in
106
+ * time. A resilience fix that breaks the thing it was protecting.
107
+ *
108
+ * TWO PROBES AT 2 s, AND THE ARITHMETIC IS THE POINT. The blocked resolver has TWO legs inside that
109
+ * one 10 s wait — the primary, and then the roster sweep, whose `Promise.all` waits for the slowest
110
+ * node. So the budget has to fit TWICE: 2 × 2 s × 2 legs = 8 s, with headroom. A first attempt at
111
+ * 4 s looked generous and was wrong for exactly this reason, and the test that now asserts it
112
+ * against `SIGNALING_CONNECT_WAIT_MS` is what caught it.
113
+ *
114
+ * ISN'T 2 s TOO SHORT for a link where a probe was measured at 16.2 s? Yes — and that is the honest
115
+ * answer rather than a problem. Inside a 10 s deadline you cannot afford a 16 s probe from either
116
+ * leg, so pretending to try is how the deadline gets blown and the caller gets NOTHING. Failing fast
117
+ * here preserves the thing that actually helps on a bad link: the last-known-good endpoint, and a
118
+ * background sweep on the persistent budget that keeps the roster current without anyone waiting.
119
+ *
120
+ * The retry is still the mechanism — two probes means a second, FRESH connection, which is what
121
+ * recovers a lost handshake. One would be the original defect.
122
+ */
123
+ export declare const FAST_PROBE: ProbeBudget;
124
+ export declare function fetchBootstrapResult(directoryUrl: string, fetchFn?: typeof fetch, nowMs?: () => number, budget?: ProbeBudget): Promise<BootstrapResult>;
84
125
  /**
85
126
  * Auto-discover the directory multiaddr via GET /bootstrap on the directory HTTP
86
127
  * endpoint. Returns the multiaddr (which embeds the peer ID after "/p2p/"), or null.
@@ -127,9 +168,31 @@ export interface NodeResolveFailure {
127
168
  endpoint: string;
128
169
  reason: string;
129
170
  detail?: string;
171
+ /**
172
+ * How many probes were spent before giving up (DOD-M15-BOOTSTRAP-1).
173
+ *
174
+ * On the OPERATOR SURFACE, not only in the log, because the two shapes call for opposite
175
+ * responses: one probe means the node answered definitively (a 404, a bad payload) and the
176
+ * problem is that node's configuration; three means it never answered and the problem is the
177
+ * path to it.
178
+ */
179
+ attempts?: number;
130
180
  }
131
181
  export interface ManifestResolveOptions {
132
182
  logger: Logger;
183
+ /**
184
+ * DOD-M15-BOOTSTRAP-1 (review HIGH-1) — which probe budget this sweep may spend.
185
+ *
186
+ * The first fix put `FAST_PROBE` on the resolver's PRIMARY leg and left this sweep on the
187
+ * persistent one. Both legs sit inside the same 10 s signaling wait, and this is the bigger:
188
+ * `Promise.all` waits for the slowest node, so ONE unreachable node costs the whole sweep 16 s —
189
+ * and the failover path pays 8 s on the primary before even starting it. The regression moved
190
+ * rather than went away.
191
+ *
192
+ * Defaults to persistent, which is right for startup and the background poll, where nothing is
193
+ * blocked. A caller that IS blocked passes `FAST_PROBE`.
194
+ */
195
+ probeBudget?: ProbeBudget;
133
196
  /** Injectable fetch for testing. */
134
197
  fetchFn?: typeof fetch;
135
198
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"directory-bootstrap.d.ts","sourceRoot":"","sources":["../src/directory-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,aAAa,CAAC,MAAM,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,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC/C;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,0BAA0B,GAC/B,MAAM,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CA2GzC"}
@@ -62,6 +62,34 @@ export function resolveDirectoryUrl(env = process.env) {
62
62
  return env["CELLO_DIRECTORY_URL"];
63
63
  return pickRandomBundledEndpoint(BUNDLED_CONSORTIUM_MANIFEST.nodes);
64
64
  }
65
+ /**
66
+ * DOD-M15-BOOTSTRAP-1 — retry budget for the bootstrap probe.
67
+ *
68
+ * Three attempts at 8 s, capped at 20 s in total. The numbers come from a measurement, not a guess:
69
+ * over a mobile link one probe returned at **16.2 s** and another returned nothing in 30 s, while
70
+ * the old code gave each node ONE attempt with a 5-second deadline. A packet lost during the TCP
71
+ * handshake is abandoned inside the retransmit backoff, and the node is dropped from the roster —
72
+ * for a normal user, on a normal lossy link, with nothing wrong anywhere in the system.
73
+ *
74
+ * A LONGER DEADLINE ALONE DOES NOT FIX IT, which is the counter-intuitive part and the reason this
75
+ * is a retry rather than a bigger number: the win comes from a FRESH CONNECTION. Waiting 20 s on
76
+ * the original socket keeps waiting on the same lost handshake; a new `fetch` starts a new one.
77
+ *
78
+ * The total cap exists so a genuinely dead node cannot hold startup for a minute — the roster has
79
+ * other nodes to try, and spending 3 × 8 s on the first one delays reaching them.
80
+ */
81
+ const PROBE_ATTEMPTS = 3;
82
+ const PROBE_TIMEOUT_MS = 8_000;
83
+ const PROBE_TOTAL_BUDGET_MS = 20_000;
84
+ /**
85
+ * Failure classes worth a second look. A lost packet, a DNS server that blinked, a connection
86
+ * refused during a node restart — all of these can succeed on a fresh connection moments later.
87
+ *
88
+ * `http_error` and `bad_response` are NOT here, deliberately: a 404, a 500, or a payload without a
89
+ * `/p2p/` is a deterministic answer from a server that IS reachable. Retrying it spends the whole
90
+ * budget to receive the same reply three times and delays every other node in the roster.
91
+ */
92
+ const RETRYABLE = new Set(["timeout", "connect_error", "dns_error"]);
65
93
  /** DNS-level getaddrinfo failures vs transport-level connection failures. */
66
94
  const DNS_CODES = new Set(["ENOTFOUND", "EAI_AGAIN"]);
67
95
  /** Walk an error's `cause` chain for the first Node `code` (undici nests the coded error). */
@@ -87,14 +115,67 @@ function classifyFetchError(err) {
87
115
  return { reason: "connect_error", detail: err instanceof Error ? err.message : String(err) };
88
116
  }
89
117
  /**
90
- * Auto-discover the directory multiaddr via GET /bootstrap, classifying failures
91
- * so callers can log a `reason` that distinguishes "this machine cannot resolve
92
- * the name" from "the server is down" from "the payload is wrong".
118
+ * The default: persistent. Used where nothing is waiting on the answer the roster sweep, which
119
+ * runs its nodes in parallel and would rather spend 16 s than drop a healthy node.
120
+ */
121
+ export const PERSISTENT_PROBE = {
122
+ attempts: PROBE_ATTEMPTS,
123
+ timeoutMs: PROBE_TIMEOUT_MS,
124
+ totalMs: PROBE_TOTAL_BUDGET_MS,
125
+ };
126
+ /**
127
+ * FAIL-FAST, for the reconnect path — review F1, a regression the retry introduced.
128
+ *
129
+ * `createDirectoryEndpointResolver` runs on EVERY connect attempt, and the signaling stream turns
130
+ * over roughly every 70 seconds. Giving that path the persistent budget meant a lossy link could
131
+ * spend 16 s resolving before falling back to the last-known-good endpoint it already had — and
132
+ * `outbound-sessions` waits only 10 s for signaling before giving up, so `cello_initiate_session`
133
+ * would start returning `directory_signaling_timeout` where it used to get a usable endpoint in
134
+ * time. A resilience fix that breaks the thing it was protecting.
135
+ *
136
+ * TWO PROBES AT 2 s, AND THE ARITHMETIC IS THE POINT. The blocked resolver has TWO legs inside that
137
+ * one 10 s wait — the primary, and then the roster sweep, whose `Promise.all` waits for the slowest
138
+ * node. So the budget has to fit TWICE: 2 × 2 s × 2 legs = 8 s, with headroom. A first attempt at
139
+ * 4 s looked generous and was wrong for exactly this reason, and the test that now asserts it
140
+ * against `SIGNALING_CONNECT_WAIT_MS` is what caught it.
141
+ *
142
+ * ISN'T 2 s TOO SHORT for a link where a probe was measured at 16.2 s? Yes — and that is the honest
143
+ * answer rather than a problem. Inside a 10 s deadline you cannot afford a 16 s probe from either
144
+ * leg, so pretending to try is how the deadline gets blown and the caller gets NOTHING. Failing fast
145
+ * here preserves the thing that actually helps on a bad link: the last-known-good endpoint, and a
146
+ * background sweep on the persistent budget that keeps the roster current without anyone waiting.
147
+ *
148
+ * The retry is still the mechanism — two probes means a second, FRESH connection, which is what
149
+ * recovers a lost handshake. One would be the original defect.
150
+ */
151
+ export const FAST_PROBE = { attempts: 2, timeoutMs: 2_000, totalMs: 5_000 };
152
+ export async function fetchBootstrapResult(directoryUrl, fetchFn = fetch, nowMs = Date.now, budget = PERSISTENT_PROBE) {
153
+ const started = nowMs();
154
+ let last = { ok: false, reason: "connect_error", detail: "no attempt was made" };
155
+ for (let attempt = 1; attempt <= budget.attempts; attempt++) {
156
+ last = await probeOnce(directoryUrl, fetchFn, budget.timeoutMs);
157
+ if (last.ok)
158
+ return { ...last, attempts: attempt };
159
+ if (!RETRYABLE.has(last.reason))
160
+ return { ...last, attempts: attempt };
161
+ // Stop if another full attempt cannot finish inside the budget — better to let the caller move
162
+ // on to the next node than to spend the remainder proving this one is still unreachable.
163
+ const spent = nowMs() - started;
164
+ if (attempt === budget.attempts || spent + budget.timeoutMs > budget.totalMs) {
165
+ return { ...last, attempts: attempt };
166
+ }
167
+ }
168
+ return { ...last, attempts: budget.attempts };
169
+ }
170
+ /**
171
+ * ONE probe, on its OWN connection. Separated from the retry loop above precisely because the fresh
172
+ * connection is the mechanism — each call is a new `fetch`, so a handshake lost in TCP backoff is
173
+ * abandoned rather than waited out.
93
174
  */
94
- export async function fetchBootstrapResult(directoryUrl, fetchFn = fetch) {
175
+ async function probeOnce(directoryUrl, fetchFn, timeoutMs) {
95
176
  const bootstrapUrl = `${directoryUrl.replace(/\/$/, "")}/bootstrap`;
96
177
  const ac = new AbortController();
97
- const timeout = setTimeout(() => ac.abort(), 5000);
178
+ const timeout = setTimeout(() => ac.abort(), timeoutMs);
98
179
  try {
99
180
  let resp;
100
181
  try {
@@ -110,6 +191,25 @@ export async function fetchBootstrapResult(directoryUrl, fetchFn = fetch) {
110
191
  json = (await resp.json());
111
192
  }
112
193
  catch (err) {
194
+ /**
195
+ * AN ABORTED BODY READ IS A TIMEOUT, NOT A MALFORMED PAYLOAD — review F3.
196
+ *
197
+ * The deadline covers the body as well as the request, so a server that sends headers and
198
+ * then stalls — the ordinary shape of a lossy mobile link, which is this unit's entire
199
+ * subject — aborts inside `resp.json()`. Reporting that as `bad_response` was wrong twice:
200
+ * it sent the operator to inspect a payload that was never received, and `bad_response` is
201
+ * deliberately NOT retryable, so the node got one probe and was dropped. Precisely the
202
+ * outcome the retry exists to prevent, reached through the retry's own policy.
203
+ */
204
+ const classified = classifyFetchError(err);
205
+ if (classified.reason === "timeout" || ac.signal.aborted) {
206
+ // Both conditions, deliberately. The signal alone is what production sees when the deadline
207
+ // fires, but keying ONLY on it makes the behaviour depend on controller state rather than on
208
+ // what was actually thrown — untestable, and wrong the moment a body read aborts for any
209
+ // other reason. `classifyFetchError` already knows an AbortError is a timeout; reuse it
210
+ // rather than growing a second opinion about the same error.
211
+ return { ok: false, reason: "timeout", detail: classified.detail ?? "aborted reading the response body" };
212
+ }
113
213
  return { ok: false, reason: "bad_response", detail: err instanceof Error ? err.message : String(err) };
114
214
  }
115
215
  if (typeof json.multiaddr === "string" && json.multiaddr.includes("/p2p/")) {
@@ -189,22 +289,47 @@ export async function manifestNodesToEndpoints(nodes, opts) {
189
289
  });
190
290
  return null;
191
291
  }
192
- const probe = await fetchBootstrapResult(base, fetchFn);
292
+ const probe = await fetchBootstrapResult(base, fetchFn, Date.now, opts.probeBudget ?? PERSISTENT_PROBE);
193
293
  if (!probe.ok) {
194
294
  opts.logger.warn("directory.consortium.node.unresolved", {
195
295
  nodeId: node.nodeId,
196
296
  endpoint: node.endpoint,
197
297
  reason: probe.reason,
198
298
  detail: probe.detail,
299
+ // DOD-M15-BOOTSTRAP-1: how many probes were spent before giving up. Without it, a node
300
+ // dropped after one deterministic 404 and a node dropped after three timed-out probes on
301
+ // a lossy link read identically — and they call for opposite responses.
302
+ attempts: probe.attempts,
199
303
  });
200
304
  opts.onNodeUnresolved?.({
201
305
  nodeId: node.nodeId,
202
306
  endpoint: node.endpoint,
203
307
  reason: probe.reason,
204
308
  detail: probe.detail,
309
+ // Review F2: this is the OPERATOR SURFACE (it feeds cello_status), and it was left
310
+ // without the count while the log got it. This file's own comment says it: "a `warn` in
311
+ // the log is not a surface." One 404 and three timed-out probes are different problems.
312
+ attempts: probe.attempts,
205
313
  });
206
314
  return null;
207
315
  }
316
+ /**
317
+ * DOD-M15-BOOTSTRAP-1 — a node that only answered on a RETRY is not the same as one that
318
+ * answered first time, and a silent success hides that difference.
319
+ *
320
+ * This is the operator's early warning: the link to that node is losing packets. Before the
321
+ * retry existed, the same conditions dropped it from the roster outright, and the log said
322
+ * only "unresolved". Reported at INFO, not WARN — nothing is wrong yet, and a warning that
323
+ * fires on a recovered probe would be noise.
324
+ */
325
+ if ((probe.attempts ?? 1) > 1) {
326
+ opts.logger.info("directory.consortium.node.resolved_after_retry", {
327
+ nodeId: node.nodeId,
328
+ endpoint: node.endpoint,
329
+ attempts: probe.attempts,
330
+ impact: "this node answered only after a repeated probe, which means the path to it is dropping packets; before the retry existed this node would have been skipped entirely",
331
+ });
332
+ }
208
333
  const multiaddr = probe.multiaddr;
209
334
  const peerId = parsePeerIdFromMultiaddr(multiaddr);
210
335
  if (!peerId) {
@@ -250,7 +375,8 @@ export function createDirectoryEndpointResolver(opts) {
250
375
  const staleFallback = opts.staleFallback ?? true;
251
376
  let lastGood = null;
252
377
  return async function getDirectoryEndpoint() {
253
- const probe = await fetchBootstrapResult(directoryUrl, fetchFn);
378
+ // FAST_PROBE, not the persistent one: a caller is blocked on this. See its definition.
379
+ const probe = await fetchBootstrapResult(directoryUrl, fetchFn, Date.now, FAST_PROBE);
254
380
  if (probe.ok) {
255
381
  const multiaddr = probe.multiaddr;
256
382
  const peerId = parsePeerIdFromMultiaddr(multiaddr);
@@ -1 +1 @@
1
- {"version":3,"file":"directory-bootstrap.js","sourceRoot":"","sources":["../src/directory-bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAI/E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAA6C;IAE7C,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC7E,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC;AAC5E,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAA0C,OAAO,CAAC,GAAG;IACvF,IAAI,GAAG,CAAC,qBAAqB,CAAC;QAAE,OAAO,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAClE,OAAO,yBAAyB,CAAC,2BAA2B,CAAC,KAA+C,CAAC,CAAC;AAChH,CAAC;AAiBD,6EAA6E;AAC7E,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AAEtD,8FAA8F;AAC9F,SAAS,aAAa,CAAC,GAAY;IACjC,IAAI,GAAG,GAAY,GAAG,CAAC;IACvB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,IAAI,GAAG,YAAY,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;QAC/D,MAAM,IAAI,GAAI,GAAkC,C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