@jam-overture/loom 0.2.0 → 0.3.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 (194) hide show
  1. package/dist/audience/compose.d.ts +112 -0
  2. package/dist/audience/compose.js +134 -0
  3. package/dist/audience/memory.d.ts +14 -0
  4. package/dist/audience/memory.js +71 -0
  5. package/dist/audience/overlay-store.d.ts +343 -0
  6. package/dist/audience/overlay-store.js +217 -0
  7. package/dist/audience/rule.d.ts +121 -0
  8. package/dist/audience/rule.js +78 -0
  9. package/dist/cli/index.d.ts +3 -4
  10. package/dist/cli/index.js +3 -4
  11. package/dist/data/adapter.d.ts +9 -1
  12. package/dist/data/adapter.js +2 -0
  13. package/dist/data/resolve.d.ts +1 -1
  14. package/dist/interpretation/anthropic.d.ts +1 -1
  15. package/dist/interpretation/anthropic.js +2 -22
  16. package/dist/interpretation/client.d.ts +1 -1
  17. package/dist/interpretation/materialize.js +67 -22
  18. package/dist/interpretation/openai-compatible.d.ts +36 -0
  19. package/dist/interpretation/openai-compatible.js +79 -0
  20. package/dist/interpretation/status.d.ts +19 -0
  21. package/dist/interpretation/status.js +26 -0
  22. package/dist/live/index.d.ts +73 -0
  23. package/dist/live/index.js +73 -0
  24. package/dist/live/pages.d.ts +187 -0
  25. package/dist/live/pages.js +161 -0
  26. package/dist/live/pull.d.ts +147 -0
  27. package/dist/live/pull.js +398 -0
  28. package/dist/live/pulling.d.ts +79 -0
  29. package/dist/live/pulling.js +117 -0
  30. package/dist/live/window.d.ts +129 -0
  31. package/dist/live/window.js +132 -0
  32. package/dist/render/addressed.d.ts +35 -0
  33. package/dist/render/addressed.js +79 -0
  34. package/dist/render/document-theme.d.ts +70 -0
  35. package/dist/render/document-theme.js +139 -0
  36. package/dist/render/editable.d.ts +15 -1
  37. package/dist/render/editable.js +13 -1
  38. package/dist/render/expected.d.ts +98 -0
  39. package/dist/render/expected.js +88 -0
  40. package/dist/render/index.d.ts +2 -0
  41. package/dist/render/index.js +2 -0
  42. package/dist/render/render.d.ts +11 -0
  43. package/dist/render/render.js +192 -46
  44. package/dist/render/request.d.ts +8 -1
  45. package/dist/render/request.js +1 -0
  46. package/dist/runtime/auto-apply-ceiling.d.ts +54 -0
  47. package/dist/runtime/auto-apply-ceiling.js +66 -0
  48. package/dist/runtime/gate.js +69 -10
  49. package/dist/runtime/index.d.ts +1 -0
  50. package/dist/runtime/index.js +1 -0
  51. package/dist/runtime/nesting.d.ts +13 -1
  52. package/dist/runtime/nesting.js +41 -24
  53. package/dist/runtime/policy-change.js +8 -2
  54. package/dist/runtime/policy-log.d.ts +5 -5
  55. package/dist/runtime/policy.d.ts +8 -6
  56. package/dist/runtime/policy.js +5 -2
  57. package/dist/runtime/repointing.js +0 -0
  58. package/dist/sdk/definition.d.ts +65 -6
  59. package/dist/sdk/definition.js +44 -0
  60. package/dist/sdk/registry.d.ts +17 -1
  61. package/dist/sdk/registry.js +39 -0
  62. package/dist/signals/acted.contract.d.ts +21 -0
  63. package/dist/signals/acted.contract.js +236 -0
  64. package/dist/signals/acted.d.ts +359 -0
  65. package/dist/signals/acted.js +135 -0
  66. package/dist/signals/agenda.d.ts +585 -0
  67. package/dist/signals/agenda.js +295 -0
  68. package/dist/signals/arrivals.contract.d.ts +21 -0
  69. package/dist/signals/arrivals.contract.js +180 -0
  70. package/dist/signals/arrivals.d.ts +375 -0
  71. package/dist/signals/arrivals.js +254 -0
  72. package/dist/signals/broadcast.d.ts +25 -15
  73. package/dist/signals/broadcast.js +209 -36
  74. package/dist/signals/collect.d.ts +137 -43
  75. package/dist/signals/collect.js +103 -36
  76. package/dist/signals/conversion.d.ts +348 -0
  77. package/dist/signals/conversion.js +235 -0
  78. package/dist/signals/correlated.contract.d.ts +24 -0
  79. package/dist/signals/correlated.contract.js +94 -0
  80. package/dist/signals/counters.d.ts +51 -0
  81. package/dist/signals/counters.js +58 -0
  82. package/dist/signals/deployment-change.d.ts +28 -4
  83. package/dist/signals/deployment-change.js +57 -16
  84. package/dist/signals/deployment.d.ts +18 -5
  85. package/dist/signals/deployment.js +37 -11
  86. package/dist/signals/door.d.ts +34 -12
  87. package/dist/signals/door.js +37 -13
  88. package/dist/signals/expire.d.ts +192 -0
  89. package/dist/signals/expire.js +213 -0
  90. package/dist/signals/frontier.d.ts +268 -0
  91. package/dist/signals/frontier.js +145 -0
  92. package/dist/signals/funnel-hours.contract.d.ts +21 -0
  93. package/dist/signals/funnel-hours.contract.js +221 -0
  94. package/dist/signals/funnel-hours.d.ts +293 -0
  95. package/dist/signals/funnel-hours.js +99 -0
  96. package/dist/signals/funnel.d.ts +60 -0
  97. package/dist/signals/funnel.js +35 -20
  98. package/dist/signals/health.d.ts +201 -4
  99. package/dist/signals/health.js +214 -2
  100. package/dist/signals/index.d.ts +19 -0
  101. package/dist/signals/index.js +19 -0
  102. package/dist/signals/inside.d.ts +190 -0
  103. package/dist/signals/inside.js +263 -0
  104. package/dist/signals/join.d.ts +56 -0
  105. package/dist/signals/join.js +60 -0
  106. package/dist/signals/journal.d.ts +112 -9
  107. package/dist/signals/kept.contract.d.ts +22 -0
  108. package/dist/signals/kept.contract.js +111 -0
  109. package/dist/signals/library-agenda-change.d.ts +324 -0
  110. package/dist/signals/library-agenda-change.js +199 -0
  111. package/dist/signals/library-agenda.d.ts +258 -0
  112. package/dist/signals/library-agenda.js +167 -0
  113. package/dist/signals/library-reach-change.d.ts +10 -0
  114. package/dist/signals/library-reach-change.js +11 -3
  115. package/dist/signals/library-senders-change.d.ts +457 -0
  116. package/dist/signals/library-senders-change.js +367 -0
  117. package/dist/signals/library-senders-reach-change.d.ts +486 -0
  118. package/dist/signals/library-senders-reach-change.js +538 -0
  119. package/dist/signals/library-senders-reach.d.ts +340 -0
  120. package/dist/signals/library-senders-reach.js +252 -0
  121. package/dist/signals/library-senders.d.ts +271 -0
  122. package/dist/signals/library-senders.js +180 -0
  123. package/dist/signals/library-word-reach-change.js +2 -6
  124. package/dist/signals/memory.js +142 -1
  125. package/dist/signals/migrate.d.ts +6 -5
  126. package/dist/signals/migrate.js +150 -6
  127. package/dist/signals/notice.d.ts +88 -33
  128. package/dist/signals/notice.js +38 -16
  129. package/dist/signals/part-pace.d.ts +378 -0
  130. package/dist/signals/part-pace.js +333 -0
  131. package/dist/signals/parts.d.ts +25 -15
  132. package/dist/signals/parts.js +32 -73
  133. package/dist/signals/postgres.js +400 -26
  134. package/dist/signals/region.d.ts +1 -1
  135. package/dist/signals/retention.d.ts +43 -21
  136. package/dist/signals/retention.js +25 -8
  137. package/dist/signals/rhythm.d.ts +302 -0
  138. package/dist/signals/rhythm.js +262 -0
  139. package/dist/signals/rollup.d.ts +127 -1
  140. package/dist/signals/rollup.js +211 -24
  141. package/dist/signals/schema.d.ts +640 -3
  142. package/dist/signals/schema.js +239 -3
  143. package/dist/signals/silences.d.ts +310 -11
  144. package/dist/signals/silences.js +243 -0
  145. package/dist/signals/subtrees.d.ts +123 -0
  146. package/dist/signals/subtrees.js +102 -0
  147. package/dist/signals/tally.d.ts +125 -4
  148. package/dist/signals/unread.d.ts +292 -0
  149. package/dist/signals/unread.js +137 -0
  150. package/dist/signals/window-agenda.d.ts +276 -0
  151. package/dist/signals/window-agenda.js +83 -0
  152. package/dist/signals/window-funnels.d.ts +88 -0
  153. package/dist/signals/window-funnels.js +47 -0
  154. package/dist/store/cache.d.ts +101 -0
  155. package/dist/store/cache.js +149 -0
  156. package/dist/store/history.d.ts +82 -0
  157. package/dist/store/history.js +36 -0
  158. package/dist/store/index.d.ts +11 -0
  159. package/dist/store/index.js +11 -0
  160. package/dist/store/migrate.d.ts +26 -0
  161. package/dist/store/migrate.js +64 -0
  162. package/dist/store/postgres-audience.d.ts +14 -0
  163. package/dist/store/postgres-audience.js +272 -0
  164. package/dist/store/postgres.d.ts +1 -0
  165. package/dist/store/postgres.js +1 -0
  166. package/dist/store/schema.d.ts +312 -0
  167. package/dist/store/schema.js +77 -0
  168. package/dist/store/source.d.ts +57 -1
  169. package/dist/store/source.js +65 -1
  170. package/dist/submit/resolve.d.ts +1 -1
  171. package/dist/telemetry/index.d.ts +1 -0
  172. package/dist/telemetry/index.js +1 -0
  173. package/dist/telemetry/journal.d.ts +32 -0
  174. package/dist/telemetry/memory.js +10 -1
  175. package/dist/telemetry/postgres.js +18 -2
  176. package/dist/telemetry/window.d.ts +135 -0
  177. package/dist/telemetry/window.js +101 -0
  178. package/dist/testing/audience-overlay-contract.d.ts +31 -0
  179. package/dist/testing/audience-overlay-contract.js +354 -0
  180. package/dist/testing/contracts.d.ts +1 -0
  181. package/dist/testing/contracts.js +1 -0
  182. package/dist/testing/journal-contract.js +158 -5
  183. package/dist/theme/contrast.d.ts +19 -14
  184. package/dist/theme/contrast.js +181 -17
  185. package/dist/tree/apply.js +13 -0
  186. package/dist/tree/mutation.d.ts +18 -0
  187. package/dist/tree/mutation.js +24 -12
  188. package/dist/tree/navigation.d.ts +5 -0
  189. package/dist/tree/navigation.js +32 -10
  190. package/dist/tree/outline.d.ts +7 -0
  191. package/dist/tree/outline.js +9 -5
  192. package/package.json +39 -96
  193. package/dist/runtime/inverse-interpreter.d.ts +0 -90
  194. package/dist/runtime/inverse-interpreter.js +0 -56
@@ -33,12 +33,12 @@ import type { PageReading } from "./parts.js";
33
33
  * ## A fault is named by what it costs, and the remedy is named only where the
34
34
  * rows determine one
35
35
  *
36
- * The six faults here are not six shapes of missing data; they are six
36
+ * The eight faults here are not eight shapes of missing data; they are eight
37
37
  * different things to go and do, and the reason to report them together is that
38
38
  * a person looking at a reader screen cannot tell them apart from the figures.
39
39
  * {@link remedyOf} publishes which of four hands each one falls to — the pages,
40
40
  * the configuration, the caller — and `undetermined` where the rows genuinely do
41
- * not say, which is one fault out of six and is better than inventing one of
41
+ * not say, which is one fault out of eight and is better than inventing one of
42
42
  * three causes.
43
43
  *
44
44
  * ## What a fault costs is the page's arrivals, and a page is counted once
@@ -237,6 +237,31 @@ export type CollectionFault =
237
237
  * cannot come to disagree about what it looks like (0242).
238
238
  */
239
239
  | "actions-uncredited"
240
+ /**
241
+ * A part of this page reported nothing while a part **inside it** reported
242
+ * being reached.
243
+ *
244
+ * A reader was demonstrably below it, so it was on a screen and did not say
245
+ * so. The usual cause is a primitive that does not spread the identity
246
+ * attributes a broadcaster reads — the failure `sdk/conformance.ts` exists to
247
+ * catch — and a sender switched on part-way through a release is the other.
248
+ * Taken from {@link pageFrontierOf} rather than spelled a second time, on the
249
+ * rule `actions-uncredited` is here under (0242).
250
+ *
251
+ * **It is a fault about a *primitive* and not about a page**, which is what
252
+ * makes it worth a member of its own rather than a line on a page reading. A
253
+ * part that is never reached is a page to rewrite; a part that is reached and
254
+ * silent is a component to fix, and every placement of that component in the
255
+ * deployment is wrong in the same way while reading as a page readers skip.
256
+ *
257
+ * **What is detectable is a fraction of what is wrong.** A silent part is
258
+ * only visible here when something *inside* it reported, so a silent leaf —
259
+ * a heading, a price, a control with nothing under it — is indistinguishable
260
+ * from a part nobody reached. The fault therefore says *this page has senders
261
+ * that do not report*, which is a statement about every figure on it, and not
262
+ * *these are the parts that went missing*.
263
+ */
264
+ | "parts-unreporting"
240
265
  /**
241
266
  * Counters filed under this tree and revision that name nodes the tree does
242
267
  * not contain, or the same row handed in twice.
@@ -282,7 +307,7 @@ export type FaultRemedy =
282
307
  /**
283
308
  * Nothing the rows can name.
284
309
  *
285
- * One fault out of seven, and it is the honest answer rather than a gap: a
310
+ * One fault out of eight, and it is the honest answer rather than a gap: a
286
311
  * missing door row is an old sender, an expired row or a hand-built counter,
287
312
  * and inventing one of the three is worse than naming none.
288
313
  */
@@ -290,6 +315,162 @@ export type FaultRemedy =
290
315
  export declare const FAULT_REMEDIES: readonly FaultRemedy[];
291
316
  /** Whose hand this fault falls to, which is the half of a fault a person acts on. */
292
317
  export declare const remedyOf: (fault: CollectionFault) => FaultRemedy;
318
+ /**
319
+ * Whether a fault reaches the figure an order of a deployment's pages is ranked
320
+ * on, which is readers lost at the sharpest fall, deflated to the door's scale
321
+ * (0250).
322
+ *
323
+ * The order is
324
+ * [0250](../../decisions/0250-a-deployment-is-ordered-by-readers-lost-at-the-doors-scale-and-a-page-the-door-cannot-scale-is-out-of-the-order.md)
325
+ * and the join that reads this is
326
+ * [`agenda.ts`](agenda.ts).
327
+ *
328
+ * The second half of a fault, beside {@link remedyOf}'s first: that one says
329
+ * whose hand the fault falls to, and this says whether the fall a deployment
330
+ * was about to act on is evidence of anything. It is **here rather than beside
331
+ * the order** because it is a statement about a fault, and a fault vocabulary
332
+ * written in two places is this subsystem's own commonest defect.
333
+ *
334
+ * ## Why it is not simply *every fault*
335
+ *
336
+ * A fault spoils every **rate** on its page, which is what makes the health
337
+ * reading worth ranking by headcount. It does not follow that it spoils *this*
338
+ * figure, and two of the eight plainly do not:
339
+ *
340
+ * - **`counts-inflated` is already corrected for.** The key the order is on is
341
+ * `lost ÷ (1 + inflation)`, and the inflation comes off the door row, where
342
+ * an opening is counted once and exactly (0219). The fault says the page's
343
+ * absolute counts are not worth printing; the ranking key is not one of them.
344
+ * - **`actions-uncredited` is about a different counter.** A fall is between two
345
+ * siblings on `reached`, and an uncredited sender spends its `engaged`
346
+ * (0242). Every band on the page reads *untouched* and not one fall moves.
347
+ *
348
+ * Taking a page out of the order for either of those would send an operator to
349
+ * repair a sender when what the rows said was *four hundred readers stop here*,
350
+ * and it would be the over-caution that makes a verdict worth ignoring.
351
+ *
352
+ * ## Why three of the six cannot be seen today
353
+ *
354
+ * `door-unscaled`, `openings-unmarked` and `audiences-mixed` are `true` here and
355
+ * **cannot co-occur with a rank**, because the order already refuses those
356
+ * pages as `unscaled`, `unopened` and `unsplit`. They are answered anyway: this
357
+ * says what the fault does to the figure, not what today's standings happen to
358
+ * let through, so the day a standing changes the two readings do not silently
359
+ * come apart.
360
+ *
361
+ * ## Its sibling answers the same question about the other order
362
+ *
363
+ * {@link spoilsTheConversion} is this for the order of a deployment's
364
+ * conversions (0333), and it is **not this function with a word changed**: a
365
+ * short window is corrected for here and manufactures the loss there. Neither
366
+ * answer may be read off the other.
367
+ *
368
+ * The three that can be seen are the three worth seeing. `rows-mishandled` is a
369
+ * tree and a window that do not belong together, which leaves most of the page
370
+ * reading `skipped` — so it manufactures the steepest fall in the deployment and
371
+ * puts the page at the head of the order (0212). `collection-stalled` reads a
372
+ * fall off counters the fold has not caught up to and scales it by a door that
373
+ * has, so the loss is of one window and the scale is of another; it understates
374
+ * rather than overstates, which makes a stalled page's rank a floor on its
375
+ * trouble rather than a measure of it.
376
+ *
377
+ * `parts-unreporting` is `rows-mishandled`'s shape arrived at from the other
378
+ * direction, and it is **not** read off the analogy. A fall is between two
379
+ * siblings on `reached`, and a part that never reports has a `reached` of
380
+ * nought while readers were demonstrably below it — so the fall into it is
381
+ * total, and a total fall is the sharpest fall a page can have. The ranking key
382
+ * is the deployment's sharpest fall, so one silent part is enough to put a page
383
+ * the readers were perfectly happy with at the head of the order. The wider
384
+ * reason is the one on the member itself: the parts this fault can see are the
385
+ * containers, a silent leaf is indistinguishable from a part nobody reached,
386
+ * and *this page's senders do not report everything they are on* is a statement
387
+ * about every `reached` count on it.
388
+ */
389
+ export declare const spoilsTheLoss: (fault: CollectionFault) => boolean;
390
+ /**
391
+ * Whether a fault reaches the figure an order of a deployment's conversions is
392
+ * ranked on, which is readers lost **between** the two ends of a question,
393
+ * deflated to the door's scale.
394
+ *
395
+ * The order is
396
+ * [0333](../../decisions/0333-a-deployments-conversions-are-a-third-order-ranked-on-the-loss-between-the-two-ends.md)
397
+ * and the join that reads this is [`agenda.ts`](agenda.ts).
398
+ *
399
+ * The sibling of {@link spoilsTheLoss}, and it is here for the same reason that
400
+ * one is: the question is about a fault, and a fault vocabulary written in two
401
+ * places is this subsystem's commonest defect.
402
+ *
403
+ * ## It is not {@link spoilsTheLoss} with the word changed
404
+ *
405
+ * The two answers differ on one fault and agree on another for a different
406
+ * reason, and both of those were found by arguing from what the counters are
407
+ * made of rather than by analogy — which is the way a fault vocabulary comes to
408
+ * be right in one of its two places and wrong in the other.
409
+ *
410
+ * - **`counts-inflated` is `false` for a fall and `true` here.** A fall is a
411
+ * difference of two independent distinct-view counts, so a short window
412
+ * inflates both ends of the subtraction and `lost ÷ (1 + inflation)` puts the
413
+ * difference back on the door's scale (0219, 0250). A conversion is **not** a
414
+ * difference of two independent counts: `converted` is a *conjunction inside
415
+ * one rollup window*, so a page view that satisfied the first end in one
416
+ * window and the second in the next contributes `reached 1, converted 0` and
417
+ * its conversion is lost rather than double-counted (0147). A window shorter
418
+ * than the visits being measured therefore **manufactures the very loss this
419
+ * order ranks**, and dividing by the straddle corrects the scale of the count
420
+ * and not the count. `PairReach.rateAtMost` bounds that error for the rate;
421
+ * nothing bounds it for the key, which is why the page leaves the order.
422
+ * - **`actions-uncredited` is `false` in both places and not for the same
423
+ * reason.** A fall survives it because a fall is made of `reached` and an
424
+ * uncredited sender spends `engaged` (0242). A conversion survives it because
425
+ * **no funnel figure is made of `engaged` at all**: an end is satisfied by the
426
+ * node a signal names and the kind it is, and the ancestry a signal carries
427
+ * feeds exactly one counter, which is `engaged` (0167). A question whose
428
+ * second end asks for `activated` on a control is answered from the control's
429
+ * own signal, so the fault cannot touch it.
430
+ *
431
+ * ## The five that transfer, and why
432
+ *
433
+ * `door-unscaled` leaves the loss with no scale to be comparable on;
434
+ * `openings-unmarked` leaves it with no denominator; `audiences-mixed` reads one
435
+ * question of two populations (0300). All three are `true` and, exactly as in
436
+ * {@link spoilsTheLoss}, **none of them can co-occur with a conversion rank
437
+ * today**, because the order already refuses those pages as `unscaled`,
438
+ * `unopened` and `unsplit`. They are answered anyway, so that the day a
439
+ * standing changes the two readings do not silently come apart.
440
+ *
441
+ * `rows-mishandled` is `true` for both halves of what it names. A tree and a
442
+ * window that do not belong together answers this revision's questions with
443
+ * another revision's counters (0212), and a row handed in twice doubles
444
+ * `reached` and `converted` together, which doubles the loss while leaving the
445
+ * rate intact — so the ranking key moves and the figure beside it does not say
446
+ * so (0147).
447
+ *
448
+ * `collection-stalled` is `true` for the reason it is for a fall: the counts are
449
+ * of one window and the scale is of another, because a fold that has stopped
450
+ * freezes the funnel rows while the door goes on counting arrivals. It
451
+ * understates, so a stalled page's place is a floor on its trouble rather than a
452
+ * measure of it.
453
+ *
454
+ * `parts-unreporting` is `true`, and the argument is **weaker here than it is
455
+ * for a fall** — which is why it is written down rather than carried over. A
456
+ * funnel end is satisfied by the node a signal names and the kind it is, so a
457
+ * silent end makes `converted` nought and manufactures a total loss exactly as
458
+ * it manufactures a total fall. But what this fault can actually see is a part
459
+ * with something reported *inside* it, and a funnel's ends are usually controls
460
+ * with nothing inside them, so the end itself is rarely the part that is named.
461
+ * It is `true` on the member's own wider claim instead: a page with one
462
+ * container that does not report has senders that do not report, every silent
463
+ * leaf on it is invisible, and an end that never fired is indistinguishable
464
+ * from an end nobody reached.
465
+ *
466
+ * ## Which can be seen on a ranked page
467
+ *
468
+ * Four, where a fall has three: `counts-inflated`, `collection-stalled`,
469
+ * `rows-mishandled` and `parts-unreporting`. The extra one is the fault a fall
470
+ * is explicitly safe from, which is the whole reason this answer could not be
471
+ * transferred.
472
+ */
473
+ export declare const spoilsTheConversion: (fault: CollectionFault) => boolean;
293
474
  /** Where one revision of one page stands. */
294
475
  export type HealthStanding =
295
476
  /** Measured, with nothing wrong that these rows can see. */
@@ -336,7 +517,7 @@ export type PageHealth = {
336
517
  /**
337
518
  * Every fault, in the order {@link COLLECTION_FAULTS} publishes them, which is
338
519
  * the order they are worth reading in: the one that costs the denominator
339
- * first, the three that are the deployment's, then the caller's.
520
+ * first, the four that are the deployment's, then the caller's.
340
521
  *
341
522
  * Empty on every standing but `faulted`.
342
523
  */
@@ -383,6 +564,22 @@ export type PageHealth = {
383
564
  readonly orphaned: number;
384
565
  /** Node counters and door rows handed in more than once, added. */
385
566
  readonly doubled: number;
567
+ /**
568
+ * Parts that reported nothing while a part inside them reported being
569
+ * reached, which is what `parts-unreporting` is raised on.
570
+ *
571
+ * A count of **parts of the tree** and never of readers, so it is never
572
+ * ranked and never added to an arrival count — the figure that says how bad
573
+ * a faulted page is stays {@link PageHealth.arrivals}, here as everywhere
574
+ * else. It is published beside the fault for the reason `orphaned` and
575
+ * `doubled` are: *your senders are not reporting* is a verdict, and *on one
576
+ * part of this page* and *on nineteen* are two different mornings.
577
+ *
578
+ * **It is a floor on the defect and not a measure of it.** Only a part with
579
+ * something reported inside it can be seen from the counters, so a silent
580
+ * leaf is counted nowhere here and reads as a part nobody reached.
581
+ */
582
+ readonly unreporting: number;
386
583
  };
387
584
  /** What a deployment is collecting, and what is wrong with it. */
388
585
  export type CollectionHealth = {
@@ -1,6 +1,7 @@
1
1
  import { everyMemberOf } from "../closed-set.js";
2
2
  import { pageActionOf } from "./action.js";
3
3
  import { readingKeyOf } from "./audiences.js";
4
+ import { pageFrontierOf } from "./frontier.js";
4
5
  import { pageViewsFor } from "./page-views.js";
5
6
  /**
6
7
  * Whether what a deployment collected can be trusted, and which of its pages
@@ -33,12 +34,12 @@ import { pageViewsFor } from "./page-views.js";
33
34
  * ## A fault is named by what it costs, and the remedy is named only where the
34
35
  * rows determine one
35
36
  *
36
- * The six faults here are not six shapes of missing data; they are six
37
+ * The eight faults here are not eight shapes of missing data; they are eight
37
38
  * different things to go and do, and the reason to report them together is that
38
39
  * a person looking at a reader screen cannot tell them apart from the figures.
39
40
  * {@link remedyOf} publishes which of four hands each one falls to — the pages,
40
41
  * the configuration, the caller — and `undetermined` where the rows genuinely do
41
- * not say, which is one fault out of six and is better than inventing one of
42
+ * not say, which is one fault out of eight and is better than inventing one of
42
43
  * three causes.
43
44
  *
44
45
  * ## What a fault costs is the page's arrivals, and a page is counted once
@@ -120,6 +121,7 @@ export const COLLECTION_FAULTS = everyMemberOf()([
120
121
  "counts-inflated",
121
122
  "collection-stalled",
122
123
  "actions-uncredited",
124
+ "parts-unreporting",
123
125
  "rows-mishandled",
124
126
  "audiences-mixed",
125
127
  ]);
@@ -136,6 +138,8 @@ export const describeCollectionFault = (fault) => {
136
138
  return "page views of this version have been waiting longer than a fold is meant to take";
137
139
  case "actions-uncredited":
138
140
  return "readers acted on this page and no reader was credited with acting inside anything";
141
+ case "parts-unreporting":
142
+ return "parts of this page were on a reader's screen and said nothing, so this page's senders are not reporting everything they are on";
139
143
  case "rows-mishandled":
140
144
  return "rows were handed in that this version cannot account for, or handed in twice";
141
145
  case "audiences-mixed":
@@ -161,12 +165,208 @@ export const remedyOf = (fault) => {
161
165
  return "configuration";
162
166
  case "actions-uncredited":
163
167
  return "senders";
168
+ case "parts-unreporting":
169
+ return "senders";
164
170
  case "rows-mishandled":
165
171
  return "caller";
166
172
  case "audiences-mixed":
167
173
  return "caller";
168
174
  }
169
175
  };
176
+ /**
177
+ * Whether a fault reaches the figure an order of a deployment's pages is ranked
178
+ * on, which is readers lost at the sharpest fall, deflated to the door's scale
179
+ * (0250).
180
+ *
181
+ * The order is
182
+ * [0250](../../decisions/0250-a-deployment-is-ordered-by-readers-lost-at-the-doors-scale-and-a-page-the-door-cannot-scale-is-out-of-the-order.md)
183
+ * and the join that reads this is
184
+ * [`agenda.ts`](agenda.ts).
185
+ *
186
+ * The second half of a fault, beside {@link remedyOf}'s first: that one says
187
+ * whose hand the fault falls to, and this says whether the fall a deployment
188
+ * was about to act on is evidence of anything. It is **here rather than beside
189
+ * the order** because it is a statement about a fault, and a fault vocabulary
190
+ * written in two places is this subsystem's own commonest defect.
191
+ *
192
+ * ## Why it is not simply *every fault*
193
+ *
194
+ * A fault spoils every **rate** on its page, which is what makes the health
195
+ * reading worth ranking by headcount. It does not follow that it spoils *this*
196
+ * figure, and two of the eight plainly do not:
197
+ *
198
+ * - **`counts-inflated` is already corrected for.** The key the order is on is
199
+ * `lost ÷ (1 + inflation)`, and the inflation comes off the door row, where
200
+ * an opening is counted once and exactly (0219). The fault says the page's
201
+ * absolute counts are not worth printing; the ranking key is not one of them.
202
+ * - **`actions-uncredited` is about a different counter.** A fall is between two
203
+ * siblings on `reached`, and an uncredited sender spends its `engaged`
204
+ * (0242). Every band on the page reads *untouched* and not one fall moves.
205
+ *
206
+ * Taking a page out of the order for either of those would send an operator to
207
+ * repair a sender when what the rows said was *four hundred readers stop here*,
208
+ * and it would be the over-caution that makes a verdict worth ignoring.
209
+ *
210
+ * ## Why three of the six cannot be seen today
211
+ *
212
+ * `door-unscaled`, `openings-unmarked` and `audiences-mixed` are `true` here and
213
+ * **cannot co-occur with a rank**, because the order already refuses those
214
+ * pages as `unscaled`, `unopened` and `unsplit`. They are answered anyway: this
215
+ * says what the fault does to the figure, not what today's standings happen to
216
+ * let through, so the day a standing changes the two readings do not silently
217
+ * come apart.
218
+ *
219
+ * ## Its sibling answers the same question about the other order
220
+ *
221
+ * {@link spoilsTheConversion} is this for the order of a deployment's
222
+ * conversions (0333), and it is **not this function with a word changed**: a
223
+ * short window is corrected for here and manufactures the loss there. Neither
224
+ * answer may be read off the other.
225
+ *
226
+ * The three that can be seen are the three worth seeing. `rows-mishandled` is a
227
+ * tree and a window that do not belong together, which leaves most of the page
228
+ * reading `skipped` — so it manufactures the steepest fall in the deployment and
229
+ * puts the page at the head of the order (0212). `collection-stalled` reads a
230
+ * fall off counters the fold has not caught up to and scales it by a door that
231
+ * has, so the loss is of one window and the scale is of another; it understates
232
+ * rather than overstates, which makes a stalled page's rank a floor on its
233
+ * trouble rather than a measure of it.
234
+ *
235
+ * `parts-unreporting` is `rows-mishandled`'s shape arrived at from the other
236
+ * direction, and it is **not** read off the analogy. A fall is between two
237
+ * siblings on `reached`, and a part that never reports has a `reached` of
238
+ * nought while readers were demonstrably below it — so the fall into it is
239
+ * total, and a total fall is the sharpest fall a page can have. The ranking key
240
+ * is the deployment's sharpest fall, so one silent part is enough to put a page
241
+ * the readers were perfectly happy with at the head of the order. The wider
242
+ * reason is the one on the member itself: the parts this fault can see are the
243
+ * containers, a silent leaf is indistinguishable from a part nobody reached,
244
+ * and *this page's senders do not report everything they are on* is a statement
245
+ * about every `reached` count on it.
246
+ */
247
+ export const spoilsTheLoss = (fault) => {
248
+ switch (fault) {
249
+ case "door-unscaled":
250
+ return true;
251
+ case "openings-unmarked":
252
+ return true;
253
+ case "counts-inflated":
254
+ return false;
255
+ case "collection-stalled":
256
+ return true;
257
+ case "actions-uncredited":
258
+ return false;
259
+ case "parts-unreporting":
260
+ return true;
261
+ case "rows-mishandled":
262
+ return true;
263
+ case "audiences-mixed":
264
+ return true;
265
+ }
266
+ };
267
+ /**
268
+ * Whether a fault reaches the figure an order of a deployment's conversions is
269
+ * ranked on, which is readers lost **between** the two ends of a question,
270
+ * deflated to the door's scale.
271
+ *
272
+ * The order is
273
+ * [0333](../../decisions/0333-a-deployments-conversions-are-a-third-order-ranked-on-the-loss-between-the-two-ends.md)
274
+ * and the join that reads this is [`agenda.ts`](agenda.ts).
275
+ *
276
+ * The sibling of {@link spoilsTheLoss}, and it is here for the same reason that
277
+ * one is: the question is about a fault, and a fault vocabulary written in two
278
+ * places is this subsystem's commonest defect.
279
+ *
280
+ * ## It is not {@link spoilsTheLoss} with the word changed
281
+ *
282
+ * The two answers differ on one fault and agree on another for a different
283
+ * reason, and both of those were found by arguing from what the counters are
284
+ * made of rather than by analogy — which is the way a fault vocabulary comes to
285
+ * be right in one of its two places and wrong in the other.
286
+ *
287
+ * - **`counts-inflated` is `false` for a fall and `true` here.** A fall is a
288
+ * difference of two independent distinct-view counts, so a short window
289
+ * inflates both ends of the subtraction and `lost ÷ (1 + inflation)` puts the
290
+ * difference back on the door's scale (0219, 0250). A conversion is **not** a
291
+ * difference of two independent counts: `converted` is a *conjunction inside
292
+ * one rollup window*, so a page view that satisfied the first end in one
293
+ * window and the second in the next contributes `reached 1, converted 0` and
294
+ * its conversion is lost rather than double-counted (0147). A window shorter
295
+ * than the visits being measured therefore **manufactures the very loss this
296
+ * order ranks**, and dividing by the straddle corrects the scale of the count
297
+ * and not the count. `PairReach.rateAtMost` bounds that error for the rate;
298
+ * nothing bounds it for the key, which is why the page leaves the order.
299
+ * - **`actions-uncredited` is `false` in both places and not for the same
300
+ * reason.** A fall survives it because a fall is made of `reached` and an
301
+ * uncredited sender spends `engaged` (0242). A conversion survives it because
302
+ * **no funnel figure is made of `engaged` at all**: an end is satisfied by the
303
+ * node a signal names and the kind it is, and the ancestry a signal carries
304
+ * feeds exactly one counter, which is `engaged` (0167). A question whose
305
+ * second end asks for `activated` on a control is answered from the control's
306
+ * own signal, so the fault cannot touch it.
307
+ *
308
+ * ## The five that transfer, and why
309
+ *
310
+ * `door-unscaled` leaves the loss with no scale to be comparable on;
311
+ * `openings-unmarked` leaves it with no denominator; `audiences-mixed` reads one
312
+ * question of two populations (0300). All three are `true` and, exactly as in
313
+ * {@link spoilsTheLoss}, **none of them can co-occur with a conversion rank
314
+ * today**, because the order already refuses those pages as `unscaled`,
315
+ * `unopened` and `unsplit`. They are answered anyway, so that the day a
316
+ * standing changes the two readings do not silently come apart.
317
+ *
318
+ * `rows-mishandled` is `true` for both halves of what it names. A tree and a
319
+ * window that do not belong together answers this revision's questions with
320
+ * another revision's counters (0212), and a row handed in twice doubles
321
+ * `reached` and `converted` together, which doubles the loss while leaving the
322
+ * rate intact — so the ranking key moves and the figure beside it does not say
323
+ * so (0147).
324
+ *
325
+ * `collection-stalled` is `true` for the reason it is for a fall: the counts are
326
+ * of one window and the scale is of another, because a fold that has stopped
327
+ * freezes the funnel rows while the door goes on counting arrivals. It
328
+ * understates, so a stalled page's place is a floor on its trouble rather than a
329
+ * measure of it.
330
+ *
331
+ * `parts-unreporting` is `true`, and the argument is **weaker here than it is
332
+ * for a fall** — which is why it is written down rather than carried over. A
333
+ * funnel end is satisfied by the node a signal names and the kind it is, so a
334
+ * silent end makes `converted` nought and manufactures a total loss exactly as
335
+ * it manufactures a total fall. But what this fault can actually see is a part
336
+ * with something reported *inside* it, and a funnel's ends are usually controls
337
+ * with nothing inside them, so the end itself is rarely the part that is named.
338
+ * It is `true` on the member's own wider claim instead: a page with one
339
+ * container that does not report has senders that do not report, every silent
340
+ * leaf on it is invisible, and an end that never fired is indistinguishable
341
+ * from an end nobody reached.
342
+ *
343
+ * ## Which can be seen on a ranked page
344
+ *
345
+ * Four, where a fall has three: `counts-inflated`, `collection-stalled`,
346
+ * `rows-mishandled` and `parts-unreporting`. The extra one is the fault a fall
347
+ * is explicitly safe from, which is the whole reason this answer could not be
348
+ * transferred.
349
+ */
350
+ export const spoilsTheConversion = (fault) => {
351
+ switch (fault) {
352
+ case "door-unscaled":
353
+ return true;
354
+ case "openings-unmarked":
355
+ return true;
356
+ case "counts-inflated":
357
+ return true;
358
+ case "collection-stalled":
359
+ return true;
360
+ case "actions-uncredited":
361
+ return false;
362
+ case "parts-unreporting":
363
+ return true;
364
+ case "rows-mishandled":
365
+ return true;
366
+ case "audiences-mixed":
367
+ return true;
368
+ }
369
+ };
170
370
  export const HEALTH_STANDINGS = everyMemberOf()([
171
371
  "sound",
172
372
  "faulted",
@@ -253,6 +453,17 @@ const healthOf = (reading, door, doubledRows, schedule) => {
253
453
  faults.push("collection-stalled");
254
454
  if (pageActionOf(reading).unwalked)
255
455
  faults.push("actions-uncredited");
456
+ /**
457
+ * Taken from the frontier rather than spelled again, on the rule
458
+ * `actions-uncredited` is taken from `pageActionOf` under (0242): a fault
459
+ * vocabulary written in two places is this subsystem's commonest defect, and
460
+ * *a part that reported nothing with a reader below it* is a sentence
461
+ * `frontier.ts` already owns. One more linear pass over the page's parts,
462
+ * which is the bound every reading here is held to.
463
+ */
464
+ const unreporting = pageFrontierOf(reading).notReporting.length;
465
+ if (unreporting > 0)
466
+ faults.push("parts-unreporting");
256
467
  if (reading.orphaned.length > 0 || doubled > 0)
257
468
  faults.push("rows-mishandled");
258
469
  if (reading.audienceId === null && reading.audiences.length > 1)
@@ -278,6 +489,7 @@ const healthOf = (reading, door, doubledRows, schedule) => {
278
489
  foldedAt: door?.foldedAt ?? null,
279
490
  orphaned: reading.orphaned.length,
280
491
  doubled,
492
+ unreporting,
281
493
  };
282
494
  };
283
495
  /**
@@ -16,35 +16,49 @@
16
16
  * `@jam-overture/loom/signals/postgres` is where a deployment picks it up, exactly
17
17
  * as the store and the journal do it.
18
18
  */
19
+ export * from "./acted.js";
19
20
  export * from "./action-change.js";
20
21
  export * from "./action.js";
22
+ export * from "./agenda.js";
23
+ export * from "./arrivals.js";
21
24
  export * from "./arriving.js";
22
25
  export * from "./audiences.js";
23
26
  export * from "./broadcast.js";
24
27
  export * from "./change.js";
25
28
  export * from "./collect.js";
29
+ export * from "./conversion.js";
26
30
  export * from "./copy-change.js";
27
31
  export * from "./copy.js";
28
32
  export * from "./deliver.js";
29
33
  export * from "./deployment-change.js";
30
34
  export * from "./deployment.js";
31
35
  export * from "./door.js";
36
+ export * from "./expire.js";
32
37
  export * from "./fold.js";
33
38
  export * from "./form-action.js";
34
39
  export * from "./form-copy.js";
35
40
  export * from "./forms.js";
41
+ export * from "./frontier.js";
36
42
  export * from "./funnel-change.js";
43
+ export * from "./funnel-hours.js";
37
44
  export * from "./funnel.js";
38
45
  export * from "./health.js";
39
46
  export * from "./ingest.js";
47
+ export * from "./inside.js";
40
48
  export * from "./intake.js";
41
49
  export * from "./journal.js";
42
50
  export * from "./library-action.js";
51
+ export * from "./library-agenda-change.js";
52
+ export * from "./library-agenda.js";
43
53
  export * from "./library-change.js";
44
54
  export * from "./library-copy-change.js";
45
55
  export * from "./library-pace.js";
46
56
  export * from "./library-reach-change.js";
47
57
  export * from "./library-reach.js";
58
+ export * from "./library-senders-change.js";
59
+ export * from "./library-senders-reach-change.js";
60
+ export * from "./library-senders-reach.js";
61
+ export * from "./library-senders.js";
48
62
  export * from "./library-word-reach-change.js";
49
63
  export * from "./library.js";
50
64
  export * from "./memory.js";
@@ -52,6 +66,7 @@ export * from "./notice.js";
52
66
  export * from "./pace-change.js";
53
67
  export * from "./pace.js";
54
68
  export * from "./page-views.js";
69
+ export * from "./part-pace.js";
55
70
  export * from "./parts.js";
56
71
  export * from "./progress.js";
57
72
  export * from "./ratios.js";
@@ -61,12 +76,16 @@ export * from "./readable.js";
61
76
  export * from "./region-pages.js";
62
77
  export * from "./region.js";
63
78
  export * from "./retention.js";
79
+ export * from "./rhythm.js";
64
80
  export * from "./rollup.js";
65
81
  export * from "./signal.js";
66
82
  export * from "./silence-census.js";
67
83
  export * from "./silences.js";
68
84
  export * from "./tally.js";
85
+ export * from "./unread.js";
69
86
  export * from "./view.js";
87
+ export * from "./window-agenda.js";
70
88
  export * from "./window-figures.js";
89
+ export * from "./window-funnels.js";
71
90
  export * from "./window.js";
72
91
  //# sourceMappingURL=index.d.ts.map
@@ -16,35 +16,49 @@
16
16
  * `@jam-overture/loom/signals/postgres` is where a deployment picks it up, exactly
17
17
  * as the store and the journal do it.
18
18
  */
19
+ export * from "./acted.js";
19
20
  export * from "./action-change.js";
20
21
  export * from "./action.js";
22
+ export * from "./agenda.js";
23
+ export * from "./arrivals.js";
21
24
  export * from "./arriving.js";
22
25
  export * from "./audiences.js";
23
26
  export * from "./broadcast.js";
24
27
  export * from "./change.js";
25
28
  export * from "./collect.js";
29
+ export * from "./conversion.js";
26
30
  export * from "./copy-change.js";
27
31
  export * from "./copy.js";
28
32
  export * from "./deliver.js";
29
33
  export * from "./deployment-change.js";
30
34
  export * from "./deployment.js";
31
35
  export * from "./door.js";
36
+ export * from "./expire.js";
32
37
  export * from "./fold.js";
33
38
  export * from "./form-action.js";
34
39
  export * from "./form-copy.js";
35
40
  export * from "./forms.js";
41
+ export * from "./frontier.js";
36
42
  export * from "./funnel-change.js";
43
+ export * from "./funnel-hours.js";
37
44
  export * from "./funnel.js";
38
45
  export * from "./health.js";
39
46
  export * from "./ingest.js";
47
+ export * from "./inside.js";
40
48
  export * from "./intake.js";
41
49
  export * from "./journal.js";
42
50
  export * from "./library-action.js";
51
+ export * from "./library-agenda-change.js";
52
+ export * from "./library-agenda.js";
43
53
  export * from "./library-change.js";
44
54
  export * from "./library-copy-change.js";
45
55
  export * from "./library-pace.js";
46
56
  export * from "./library-reach-change.js";
47
57
  export * from "./library-reach.js";
58
+ export * from "./library-senders-change.js";
59
+ export * from "./library-senders-reach-change.js";
60
+ export * from "./library-senders-reach.js";
61
+ export * from "./library-senders.js";
48
62
  export * from "./library-word-reach-change.js";
49
63
  export * from "./library.js";
50
64
  export * from "./memory.js";
@@ -52,6 +66,7 @@ export * from "./notice.js";
52
66
  export * from "./pace-change.js";
53
67
  export * from "./pace.js";
54
68
  export * from "./page-views.js";
69
+ export * from "./part-pace.js";
55
70
  export * from "./parts.js";
56
71
  export * from "./progress.js";
57
72
  export * from "./ratios.js";
@@ -61,12 +76,16 @@ export * from "./readable.js";
61
76
  export * from "./region-pages.js";
62
77
  export * from "./region.js";
63
78
  export * from "./retention.js";
79
+ export * from "./rhythm.js";
64
80
  export * from "./rollup.js";
65
81
  export * from "./signal.js";
66
82
  export * from "./silence-census.js";
67
83
  export * from "./silences.js";
68
84
  export * from "./tally.js";
85
+ export * from "./unread.js";
69
86
  export * from "./view.js";
87
+ export * from "./window-agenda.js";
70
88
  export * from "./window-figures.js";
89
+ export * from "./window-funnels.js";
71
90
  export * from "./window.js";
72
91
  //# sourceMappingURL=index.js.map