@jam-overture/loom 0.1.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 (414) hide show
  1. package/README.md +3 -1
  2. package/dist/application/application.d.ts +109 -0
  3. package/dist/application/application.js +97 -0
  4. package/dist/application/memory.d.ts +20 -0
  5. package/dist/application/memory.js +79 -0
  6. package/dist/application/store.d.ts +101 -0
  7. package/dist/application/store.js +25 -0
  8. package/dist/audience/audience.d.ts +36 -0
  9. package/dist/audience/audience.js +41 -0
  10. package/dist/audience/compose.d.ts +112 -0
  11. package/dist/audience/compose.js +134 -0
  12. package/dist/audience/memory.d.ts +14 -0
  13. package/dist/audience/memory.js +71 -0
  14. package/dist/audience/overlay-store.d.ts +343 -0
  15. package/dist/audience/overlay-store.js +217 -0
  16. package/dist/audience/rule.d.ts +121 -0
  17. package/dist/audience/rule.js +78 -0
  18. package/dist/cli/index.d.ts +3 -4
  19. package/dist/cli/index.js +3 -4
  20. package/dist/cli/templates.js +19 -0
  21. package/dist/data/adapter.d.ts +9 -1
  22. package/dist/data/adapter.js +2 -0
  23. package/dist/data/plan.js +0 -0
  24. package/dist/data/resolution.d.ts +23 -1
  25. package/dist/data/resolve.d.ts +31 -4
  26. package/dist/data/resolve.js +11 -3
  27. package/dist/ids.d.ts +10 -0
  28. package/dist/ids.js +11 -1
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +1 -0
  31. package/dist/interpretation/anthropic.d.ts +1 -1
  32. package/dist/interpretation/anthropic.js +2 -22
  33. package/dist/interpretation/client.d.ts +1 -1
  34. package/dist/interpretation/materialize.js +67 -22
  35. package/dist/interpretation/openai-compatible.d.ts +36 -0
  36. package/dist/interpretation/openai-compatible.js +79 -0
  37. package/dist/interpretation/status.d.ts +19 -0
  38. package/dist/interpretation/status.js +26 -0
  39. package/dist/live/index.d.ts +73 -0
  40. package/dist/live/index.js +73 -0
  41. package/dist/live/pages.d.ts +187 -0
  42. package/dist/live/pages.js +161 -0
  43. package/dist/live/pull.d.ts +147 -0
  44. package/dist/live/pull.js +398 -0
  45. package/dist/live/pulling.d.ts +79 -0
  46. package/dist/live/pulling.js +117 -0
  47. package/dist/live/window.d.ts +129 -0
  48. package/dist/live/window.js +132 -0
  49. package/dist/patch.d.ts +54 -0
  50. package/dist/patch.js +44 -0
  51. package/dist/project/closing.d.ts +51 -0
  52. package/dist/project/closing.js +53 -0
  53. package/dist/project/memory.d.ts +20 -0
  54. package/dist/project/memory.js +97 -0
  55. package/dist/project/project.d.ts +90 -0
  56. package/dist/project/project.js +91 -0
  57. package/dist/project/store.d.ts +135 -0
  58. package/dist/project/store.js +41 -0
  59. package/dist/registered.d.ts +64 -0
  60. package/dist/registered.js +118 -0
  61. package/dist/render/addressed.d.ts +35 -0
  62. package/dist/render/addressed.js +79 -0
  63. package/dist/render/behaviour-adjust.d.ts +11 -19
  64. package/dist/render/behaviour-adjust.js +75 -21
  65. package/dist/render/behaviour-present.d.ts +8 -0
  66. package/dist/render/behaviour-present.js +57 -6
  67. package/dist/render/behaviour.d.ts +98 -17
  68. package/dist/render/behaviour.js +91 -26
  69. package/dist/render/control-name.d.ts +68 -0
  70. package/dist/render/control-name.js +37 -0
  71. package/dist/render/diagnostics.d.ts +72 -0
  72. package/dist/render/diagnostics.js +7 -0
  73. package/dist/render/document-theme.d.ts +70 -0
  74. package/dist/render/document-theme.js +139 -0
  75. package/dist/render/editable.d.ts +15 -1
  76. package/dist/render/editable.js +13 -1
  77. package/dist/render/expected.d.ts +98 -0
  78. package/dist/render/expected.js +88 -0
  79. package/dist/render/index.d.ts +4 -0
  80. package/dist/render/index.js +4 -0
  81. package/dist/render/reads.d.ts +11 -0
  82. package/dist/render/reads.js +12 -1
  83. package/dist/render/render.d.ts +11 -0
  84. package/dist/render/render.js +294 -53
  85. package/dist/render/request.d.ts +8 -1
  86. package/dist/render/request.js +1 -0
  87. package/dist/render/slots.d.ts +52 -0
  88. package/dist/render/slots.js +24 -0
  89. package/dist/render/theme.d.ts +54 -1
  90. package/dist/render/theme.js +23 -1
  91. package/dist/render/unshown.d.ts +152 -0
  92. package/dist/render/unshown.js +80 -0
  93. package/dist/runtime/analysis.d.ts +94 -9
  94. package/dist/runtime/analysis.js +54 -9
  95. package/dist/runtime/assessment.d.ts +36 -2
  96. package/dist/runtime/assessment.js +27 -2
  97. package/dist/runtime/auto-apply-ceiling.d.ts +54 -0
  98. package/dist/runtime/auto-apply-ceiling.js +66 -0
  99. package/dist/runtime/checks.d.ts +148 -0
  100. package/dist/runtime/checks.js +112 -0
  101. package/dist/runtime/disposition.d.ts +96 -0
  102. package/dist/runtime/disposition.js +46 -0
  103. package/dist/runtime/gate.js +91 -10
  104. package/dist/runtime/index.d.ts +4 -0
  105. package/dist/runtime/index.js +4 -0
  106. package/dist/runtime/irreversibility.d.ts +64 -0
  107. package/dist/runtime/irreversibility.js +45 -0
  108. package/dist/runtime/nesting.d.ts +13 -1
  109. package/dist/runtime/nesting.js +41 -24
  110. package/dist/runtime/pipeline.d.ts +43 -0
  111. package/dist/runtime/pipeline.js +10 -2
  112. package/dist/runtime/policy-change.d.ts +93 -0
  113. package/dist/runtime/policy-change.js +305 -0
  114. package/dist/runtime/policy-log.d.ts +406 -0
  115. package/dist/runtime/policy-log.js +285 -0
  116. package/dist/runtime/policy.d.ts +8 -6
  117. package/dist/runtime/policy.js +5 -2
  118. package/dist/runtime/repointing.js +0 -0
  119. package/dist/runtime/reversibility.d.ts +11 -9
  120. package/dist/runtime/stakes.d.ts +129 -1
  121. package/dist/runtime/stakes.js +240 -26
  122. package/dist/runtime/vocabulary.d.ts +164 -7
  123. package/dist/runtime/vocabulary.js +181 -8
  124. package/dist/sdk/audit.d.ts +174 -3
  125. package/dist/sdk/audit.js +176 -17
  126. package/dist/sdk/catalogue.d.ts +9 -1
  127. package/dist/sdk/conformance.d.ts +37 -3
  128. package/dist/sdk/conformance.js +25 -4
  129. package/dist/sdk/definition.d.ts +129 -5
  130. package/dist/sdk/definition.js +66 -0
  131. package/dist/sdk/registry.d.ts +45 -2
  132. package/dist/sdk/registry.js +102 -1
  133. package/dist/signals/acted.contract.d.ts +21 -0
  134. package/dist/signals/acted.contract.js +236 -0
  135. package/dist/signals/acted.d.ts +359 -0
  136. package/dist/signals/acted.js +135 -0
  137. package/dist/signals/action-change.d.ts +507 -0
  138. package/dist/signals/action-change.js +265 -0
  139. package/dist/signals/action.d.ts +331 -0
  140. package/dist/signals/action.js +182 -0
  141. package/dist/signals/agenda.d.ts +585 -0
  142. package/dist/signals/agenda.js +295 -0
  143. package/dist/signals/applied-window.contract.d.ts +23 -0
  144. package/dist/signals/applied-window.contract.js +160 -0
  145. package/dist/signals/arrivals.contract.d.ts +21 -0
  146. package/dist/signals/arrivals.contract.js +180 -0
  147. package/dist/signals/arrivals.d.ts +375 -0
  148. package/dist/signals/arrivals.js +254 -0
  149. package/dist/signals/arriving.d.ts +210 -0
  150. package/dist/signals/arriving.js +133 -0
  151. package/dist/signals/audiences.d.ts +528 -0
  152. package/dist/signals/audiences.js +255 -0
  153. package/dist/signals/broadcast.d.ts +33 -17
  154. package/dist/signals/broadcast.js +255 -32
  155. package/dist/signals/change.d.ts +378 -0
  156. package/dist/signals/change.js +327 -0
  157. package/dist/signals/collect.d.ts +169 -34
  158. package/dist/signals/collect.js +186 -38
  159. package/dist/signals/conversion.d.ts +348 -0
  160. package/dist/signals/conversion.js +235 -0
  161. package/dist/signals/copy-change.d.ts +553 -0
  162. package/dist/signals/copy-change.js +377 -0
  163. package/dist/signals/copy.d.ts +337 -0
  164. package/dist/signals/copy.js +211 -0
  165. package/dist/signals/correlated.contract.d.ts +24 -0
  166. package/dist/signals/correlated.contract.js +94 -0
  167. package/dist/signals/counters.d.ts +97 -0
  168. package/dist/signals/counters.js +160 -0
  169. package/dist/signals/deliver.d.ts +23 -4
  170. package/dist/signals/deliver.js +34 -6
  171. package/dist/signals/deployment-change.d.ts +395 -0
  172. package/dist/signals/deployment-change.js +309 -0
  173. package/dist/signals/deployment.d.ts +278 -0
  174. package/dist/signals/deployment.js +178 -0
  175. package/dist/signals/door.d.ts +114 -0
  176. package/dist/signals/door.js +77 -0
  177. package/dist/signals/expire.d.ts +192 -0
  178. package/dist/signals/expire.js +213 -0
  179. package/dist/signals/fold.d.ts +10 -0
  180. package/dist/signals/fold.js +5 -1
  181. package/dist/signals/form-action.d.ts +302 -0
  182. package/dist/signals/form-action.js +169 -0
  183. package/dist/signals/form-copy.d.ts +523 -0
  184. package/dist/signals/form-copy.js +346 -0
  185. package/dist/signals/forms.d.ts +247 -0
  186. package/dist/signals/forms.js +147 -0
  187. package/dist/signals/frontier.d.ts +268 -0
  188. package/dist/signals/frontier.js +145 -0
  189. package/dist/signals/funnel-change.d.ts +548 -0
  190. package/dist/signals/funnel-change.js +361 -0
  191. package/dist/signals/funnel-hours.contract.d.ts +21 -0
  192. package/dist/signals/funnel-hours.contract.js +221 -0
  193. package/dist/signals/funnel-hours.d.ts +293 -0
  194. package/dist/signals/funnel-hours.js +99 -0
  195. package/dist/signals/funnel.d.ts +592 -0
  196. package/dist/signals/funnel.js +231 -0
  197. package/dist/signals/health.d.ts +694 -0
  198. package/dist/signals/health.js +573 -0
  199. package/dist/signals/index.d.ts +60 -0
  200. package/dist/signals/index.js +60 -0
  201. package/dist/signals/ingest.d.ts +56 -1
  202. package/dist/signals/ingest.js +91 -1
  203. package/dist/signals/inside.d.ts +190 -0
  204. package/dist/signals/inside.js +263 -0
  205. package/dist/signals/join.d.ts +56 -0
  206. package/dist/signals/join.js +60 -0
  207. package/dist/signals/journal.d.ts +123 -9
  208. package/dist/signals/kept.contract.d.ts +22 -0
  209. package/dist/signals/kept.contract.js +111 -0
  210. package/dist/signals/kinds.d.ts +8 -6
  211. package/dist/signals/kinds.js +14 -6
  212. package/dist/signals/library-action.d.ts +430 -0
  213. package/dist/signals/library-action.js +336 -0
  214. package/dist/signals/library-agenda-change.d.ts +324 -0
  215. package/dist/signals/library-agenda-change.js +199 -0
  216. package/dist/signals/library-agenda.d.ts +258 -0
  217. package/dist/signals/library-agenda.js +167 -0
  218. package/dist/signals/library-change.d.ts +477 -0
  219. package/dist/signals/library-change.js +335 -0
  220. package/dist/signals/library-copy-change.d.ts +498 -0
  221. package/dist/signals/library-copy-change.js +476 -0
  222. package/dist/signals/library-pace.d.ts +319 -0
  223. package/dist/signals/library-pace.js +305 -0
  224. package/dist/signals/library-reach-change.d.ts +646 -0
  225. package/dist/signals/library-reach-change.js +542 -0
  226. package/dist/signals/library-reach.d.ts +377 -0
  227. package/dist/signals/library-reach.js +227 -0
  228. package/dist/signals/library-senders-change.d.ts +457 -0
  229. package/dist/signals/library-senders-change.js +367 -0
  230. package/dist/signals/library-senders-reach-change.d.ts +486 -0
  231. package/dist/signals/library-senders-reach-change.js +538 -0
  232. package/dist/signals/library-senders-reach.d.ts +340 -0
  233. package/dist/signals/library-senders-reach.js +252 -0
  234. package/dist/signals/library-senders.d.ts +271 -0
  235. package/dist/signals/library-senders.js +180 -0
  236. package/dist/signals/library-word-reach-change.d.ts +567 -0
  237. package/dist/signals/library-word-reach-change.js +564 -0
  238. package/dist/signals/library.d.ts +306 -0
  239. package/dist/signals/library.js +178 -0
  240. package/dist/signals/memory.d.ts +9 -0
  241. package/dist/signals/memory.js +246 -14
  242. package/dist/signals/migrate.d.ts +20 -4
  243. package/dist/signals/migrate.js +269 -8
  244. package/dist/signals/notice.d.ts +389 -0
  245. package/dist/signals/notice.js +250 -0
  246. package/dist/signals/pace-change.d.ts +501 -0
  247. package/dist/signals/pace-change.js +310 -0
  248. package/dist/signals/pace.d.ts +296 -0
  249. package/dist/signals/pace.js +291 -0
  250. package/dist/signals/page-views.d.ts +365 -0
  251. package/dist/signals/page-views.js +218 -0
  252. package/dist/signals/part-pace.d.ts +378 -0
  253. package/dist/signals/part-pace.js +333 -0
  254. package/dist/signals/parts.d.ts +354 -0
  255. package/dist/signals/parts.js +232 -0
  256. package/dist/signals/postgres.d.ts +16 -2
  257. package/dist/signals/postgres.js +753 -76
  258. package/dist/signals/progress.d.ts +212 -0
  259. package/dist/signals/progress.js +150 -0
  260. package/dist/signals/ratios.d.ts +108 -0
  261. package/dist/signals/ratios.js +40 -0
  262. package/dist/signals/reach.d.ts +309 -0
  263. package/dist/signals/reach.js +93 -0
  264. package/dist/signals/readable.d.ts +34 -0
  265. package/dist/signals/readable.js +34 -0
  266. package/dist/signals/readership.d.ts +381 -0
  267. package/dist/signals/readership.js +308 -0
  268. package/dist/signals/region-pages.d.ts +173 -0
  269. package/dist/signals/region-pages.js +62 -0
  270. package/dist/signals/region.d.ts +287 -0
  271. package/dist/signals/region.js +198 -0
  272. package/dist/signals/retention.d.ts +163 -0
  273. package/dist/signals/retention.js +75 -0
  274. package/dist/signals/rhythm.d.ts +302 -0
  275. package/dist/signals/rhythm.js +262 -0
  276. package/dist/signals/rollup.d.ts +194 -4
  277. package/dist/signals/rollup.js +0 -0
  278. package/dist/signals/schema.d.ts +1069 -1
  279. package/dist/signals/schema.js +393 -3
  280. package/dist/signals/signal.d.ts +237 -11
  281. package/dist/signals/signal.js +70 -10
  282. package/dist/signals/silence-census.d.ts +205 -0
  283. package/dist/signals/silence-census.js +87 -0
  284. package/dist/signals/silences.d.ts +1147 -0
  285. package/dist/signals/silences.js +996 -0
  286. package/dist/signals/subtrees.d.ts +123 -0
  287. package/dist/signals/subtrees.js +102 -0
  288. package/dist/signals/tally.d.ts +262 -12
  289. package/dist/signals/unread.d.ts +292 -0
  290. package/dist/signals/unread.js +137 -0
  291. package/dist/signals/window-agenda.d.ts +276 -0
  292. package/dist/signals/window-agenda.js +83 -0
  293. package/dist/signals/window-figures.d.ts +148 -0
  294. package/dist/signals/window-figures.js +42 -0
  295. package/dist/signals/window-funnels.d.ts +88 -0
  296. package/dist/signals/window-funnels.js +47 -0
  297. package/dist/signals/window.d.ts +866 -0
  298. package/dist/signals/window.js +693 -0
  299. package/dist/signals/words.d.ts +24 -0
  300. package/dist/signals/words.js +24 -0
  301. package/dist/store/cache.d.ts +101 -0
  302. package/dist/store/cache.js +149 -0
  303. package/dist/store/history.d.ts +82 -0
  304. package/dist/store/history.js +36 -0
  305. package/dist/store/index.d.ts +30 -0
  306. package/dist/store/index.js +30 -0
  307. package/dist/store/memory.d.ts +2 -1
  308. package/dist/store/memory.js +48 -12
  309. package/dist/store/migrate.d.ts +106 -0
  310. package/dist/store/migrate.js +323 -7
  311. package/dist/store/postgres-applications.d.ts +4 -0
  312. package/dist/store/postgres-applications.js +197 -0
  313. package/dist/store/postgres-audience.d.ts +14 -0
  314. package/dist/store/postgres-audience.js +272 -0
  315. package/dist/store/postgres-holds.d.ts +10 -1
  316. package/dist/store/postgres-holds.js +116 -101
  317. package/dist/store/postgres-policy-log.d.ts +14 -0
  318. package/dist/store/postgres-policy-log.js +240 -0
  319. package/dist/store/postgres-projects.d.ts +4 -0
  320. package/dist/store/postgres-projects.js +217 -0
  321. package/dist/store/postgres.d.ts +17 -1
  322. package/dist/store/postgres.js +60 -9
  323. package/dist/store/replay.d.ts +102 -1
  324. package/dist/store/replay.js +190 -19
  325. package/dist/store/reseed.d.ts +238 -0
  326. package/dist/store/reseed.js +308 -0
  327. package/dist/store/schema.d.ts +762 -2
  328. package/dist/store/schema.js +218 -5
  329. package/dist/store/source.d.ts +57 -1
  330. package/dist/store/source.js +65 -1
  331. package/dist/store/store.d.ts +29 -6
  332. package/dist/submit/resolve.d.ts +1 -1
  333. package/dist/submit/resolve.js +2 -1
  334. package/dist/telemetry/calibration.d.ts +25 -0
  335. package/dist/telemetry/calibration.js +27 -1
  336. package/dist/telemetry/event.d.ts +391 -33
  337. package/dist/telemetry/event.js +84 -20
  338. package/dist/telemetry/index.d.ts +2 -0
  339. package/dist/telemetry/index.js +2 -0
  340. package/dist/telemetry/journal.d.ts +104 -3
  341. package/dist/telemetry/journal.js +9 -0
  342. package/dist/telemetry/lookup.d.ts +27 -0
  343. package/dist/telemetry/lookup.js +18 -0
  344. package/dist/telemetry/memory.js +33 -1
  345. package/dist/telemetry/migrate.js +22 -1
  346. package/dist/telemetry/postgres.d.ts +10 -1
  347. package/dist/telemetry/postgres.js +188 -90
  348. package/dist/telemetry/remeasure.d.ts +78 -0
  349. package/dist/telemetry/remeasure.js +83 -0
  350. package/dist/telemetry/retention.d.ts +2 -2
  351. package/dist/telemetry/schema.d.ts +17 -0
  352. package/dist/telemetry/schema.js +27 -1
  353. package/dist/telemetry/sink.d.ts +2 -2
  354. package/dist/telemetry/window.d.ts +135 -0
  355. package/dist/telemetry/window.js +101 -0
  356. package/dist/testing/application-contract.d.ts +14 -0
  357. package/dist/testing/application-contract.js +270 -0
  358. package/dist/testing/audience-overlay-contract.d.ts +31 -0
  359. package/dist/testing/audience-overlay-contract.js +354 -0
  360. package/dist/testing/contracts.d.ts +13 -7
  361. package/dist/testing/contracts.js +13 -7
  362. package/dist/testing/definitions.d.ts +78 -0
  363. package/dist/testing/definitions.js +134 -9
  364. package/dist/testing/doubles.d.ts +103 -0
  365. package/dist/testing/doubles.js +143 -0
  366. package/dist/testing/index.d.ts +2 -2
  367. package/dist/testing/index.js +2 -2
  368. package/dist/testing/journal-contract.js +297 -6
  369. package/dist/testing/model-contract.d.ts +110 -0
  370. package/dist/testing/model-contract.js +150 -0
  371. package/dist/testing/policy-log-contract.d.ts +26 -0
  372. package/dist/testing/policy-log-contract.js +344 -0
  373. package/dist/testing/project-contract.d.ts +14 -0
  374. package/dist/testing/project-contract.js +266 -0
  375. package/dist/testing/reader-signal-contract.d.ts +27 -2
  376. package/dist/testing/reader-signal-contract.js +475 -5
  377. package/dist/testing/store-contract.d.ts +7 -1
  378. package/dist/testing/store-contract.js +84 -3
  379. package/dist/theme/apply.d.ts +20 -1
  380. package/dist/theme/apply.js +5 -3
  381. package/dist/theme/contrast.d.ts +19 -14
  382. package/dist/theme/contrast.js +181 -17
  383. package/dist/theme/derive.d.ts +22 -0
  384. package/dist/theme/derive.js +54 -1
  385. package/dist/theme/library.js +1 -1
  386. package/dist/theme/measure.d.ts +34 -0
  387. package/dist/theme/measure.js +30 -1
  388. package/dist/theme/palettes.js +7 -7
  389. package/dist/theme/ramp.d.ts +64 -0
  390. package/dist/theme/ramp.js +114 -0
  391. package/dist/theme/registry.d.ts +9 -0
  392. package/dist/theme/registry.js +11 -1
  393. package/dist/theme/separation.d.ts +97 -3
  394. package/dist/theme/separation.js +75 -0
  395. package/dist/tree/apply.js +13 -0
  396. package/dist/tree/compare.d.ts +9 -0
  397. package/dist/tree/compare.js +18 -0
  398. package/dist/tree/mutation.d.ts +18 -0
  399. package/dist/tree/mutation.js +24 -12
  400. package/dist/tree/navigation.d.ts +5 -0
  401. package/dist/tree/navigation.js +32 -10
  402. package/dist/tree/outline.d.ts +7 -0
  403. package/dist/tree/outline.js +9 -5
  404. package/dist/write/computed.d.ts +60 -0
  405. package/dist/write/computed.js +61 -0
  406. package/dist/write/held.d.ts +59 -0
  407. package/dist/write/index.d.ts +5 -2
  408. package/dist/write/index.js +5 -2
  409. package/dist/write/reseed.d.ts +151 -0
  410. package/dist/write/reseed.js +184 -0
  411. package/dist/write/revert.js +2 -16
  412. package/package.json +25 -3
  413. package/dist/runtime/inverse-interpreter.d.ts +0 -90
  414. package/dist/runtime/inverse-interpreter.js +0 -56
@@ -0,0 +1,309 @@
1
+ import { everyMemberOf } from "../closed-set.js";
2
+ import { formKeyOf, readingKeyOf } from "./audiences.js";
3
+ import { atDoorScale, doorOf } from "./door.js";
4
+ import { pageViewsFor } from "./page-views.js";
5
+ export const DEPLOYMENT_CHANGE_SILENCES = everyMemberOf()([
6
+ "unread",
7
+ "mispaired",
8
+ "unsplit",
9
+ "unscaled",
10
+ "unopened",
11
+ "inconsistent",
12
+ ]);
13
+ /**
14
+ * One line per silence, for a surface saying why a page is in neither order.
15
+ *
16
+ * **The sentences are the orders' own, moved here rather than written again.**
17
+ * Every member is also a {@link MovementStanding} and
18
+ * {@link describeMovementStanding} has had a line for each since the orders
19
+ * were built; it defers to this for the six they share, and the text is
20
+ * unchanged from what it returned.
21
+ *
22
+ * Each one names **which of the two windows** it is about, because every member
23
+ * here is a statement about a side rather than about the comparison: a sentence
24
+ * that said *no view of its revision* without saying which window would send a
25
+ * deployment to look at the wrong week.
26
+ *
27
+ * **One sentence of the six is not the standing's own text and says so here.**
28
+ * `inconsistent` read *it reports more readers at a stop than have ever
29
+ * appeared*, which is the only member whose wording left the window out while
30
+ * its own doc comment above says *in the later window*. Two words are added and
31
+ * nothing else of it moves; the standing prints the corrected line because it
32
+ * defers to this.
33
+ */
34
+ export const describeDeploymentChangeSilence = (silence) => {
35
+ switch (silence) {
36
+ case "unread":
37
+ return "one of the two windows reported no view of its revision";
38
+ case "mispaired":
39
+ return "the two readings are of different pages, so there is no movement here";
40
+ case "unsplit":
41
+ return "one window holds two forms of the page and says which readers neither";
42
+ case "unscaled":
43
+ return "no page views counted at the later door, so its movement is not comparable with another page's";
44
+ case "unopened":
45
+ return "the later page-view row is there and nothing has said a page view began";
46
+ case "inconsistent":
47
+ return "it reports more readers at a stop in the later window than have ever appeared";
48
+ }
49
+ };
50
+ export const MOVEMENT_STANDINGS = everyMemberOf()([
51
+ "ranked",
52
+ "unmoved",
53
+ "unread",
54
+ "mispaired",
55
+ "unsplit",
56
+ "unscaled",
57
+ "unopened",
58
+ "inconsistent",
59
+ ]);
60
+ /** One line per standing, for a surface naming why a page is where it is. */
61
+ export const describeMovementStanding = (standing) => {
62
+ switch (standing) {
63
+ case "ranked":
64
+ return "in an order, by the readers its sharpest movement moves at the door's scale";
65
+ case "unmoved":
66
+ return "compared, and nothing on it moved by as much as one reader";
67
+ default:
68
+ return describeDeploymentChangeSilence(standing);
69
+ }
70
+ };
71
+ const EMPTY_STANDINGS = Object.freeze(Object.fromEntries(MOVEMENT_STANDINGS.map((standing) => [standing, 0])));
72
+ /**
73
+ * The form this comparison is of, under the published rule.
74
+ *
75
+ * `formKeyOf` was written in this module and now lives beside `readingKeyOf`,
76
+ * for the reason that one is published: four library comparisons had the defect
77
+ * it fixes and no key to import, so each spelled the pairing by tree alone
78
+ * (0293). The difference between the two rules is written where they are
79
+ * published.
80
+ *
81
+ * The audience is the later window's, for the reason only the later window's
82
+ * rows are asked for.
83
+ */
84
+ const formKeyOfChange = (change) => formKeyOf({ treeId: change.treeId, audienceId: change.progress.now.audienceId });
85
+ /**
86
+ * What makes two reads of a comparison the same read: the form, and the two
87
+ * revisions it compared.
88
+ *
89
+ * The form carries the audience, for the reason `readingKeyOf` does (0290): a
90
+ * page is one base tree and the deltas an audience earns, so two forms of it
91
+ * are compared over the same two revisions, and a key without the audience
92
+ * makes the second form's comparison the first one handed in twice.
93
+ */
94
+ const pairKeyOf = (change) => `${formKeyOfChange(change)}\u0000${change.revisions.was}\u0000${change.revisions.now}`;
95
+ /**
96
+ * One direction's movement, scaled where the page has a scale.
97
+ *
98
+ * The magnitude is taken of the comparison's own ranking figure rather than
99
+ * multiplied up again here, because deriving it twice is how two screens come to
100
+ * disagree about which band a change hurt.
101
+ *
102
+ * **A `null` door is *do not scale this one*** and not *this page has no door*:
103
+ * the caller hands one in for a ranked row and withholds it for a row whose
104
+ * counters disagree with the door row, which publishes the movement's share
105
+ * without a headcount against it.
106
+ *
107
+ * The scale itself is the rule published beside the counter (0346). It was
108
+ * `Math.abs(at.readersKept) ÷ (1 + inflation)` here, which is the same rule by a
109
+ * different route — and this figure is a share movement times a count, so it is
110
+ * **not a whole number**: on a page with no drift the two routes differ in the
111
+ * last place, and the published rule is the one that leaves a figure the door has
112
+ * nothing to correct exactly as it found it.
113
+ */
114
+ const movementOf = (at, scale) => at === null
115
+ ? null
116
+ : {
117
+ at,
118
+ share: Math.abs(at.improvement),
119
+ readers: scale === null ? null : atDoorScale(Math.abs(at.readersKept), scale),
120
+ };
121
+ /**
122
+ * The standing a comparison's own silence puts a page in.
123
+ *
124
+ * Two of the four comparison silences name themselves here and two share
125
+ * `unread`, which is the coarser bucket and is deliberate: `different-audiences`
126
+ * and `nothing-measured` are both *there was nothing to compare on one side*,
127
+ * and the cause travels on {@link MovedPage.silence} for a surface that wants
128
+ * to say which. `audiences-mixed` does not share it, because what it has in
129
+ * common with them is a nought rather than a state of a deployment's readers
130
+ * (0301).
131
+ *
132
+ * **That the cause travels is now asserted rather than promised**, by a pair
133
+ * of fixtures standing the two side by side, so the day a fourth standing is
134
+ * taken — proposed, in a record of its own awaiting review — there is a test
135
+ * that says what moved.
136
+ */
137
+ const standingFor = (silence) => {
138
+ switch (silence) {
139
+ case "different-trees":
140
+ return "mispaired";
141
+ case "audiences-mixed":
142
+ return "unsplit";
143
+ case "different-audiences":
144
+ case "nothing-measured":
145
+ return "unread";
146
+ }
147
+ };
148
+ /**
149
+ * One page's row, with the reasons tried in the order they have to be tried in.
150
+ *
151
+ * The comparison's own silence first, because *there was nothing to compare* is
152
+ * a better answer than *its movement could not be scaled*. The door next,
153
+ * because a page with no scale has nothing to put a movement on. Then the gate
154
+ * the comparison itself applies, so a page nothing moved is not reported as a
155
+ * page whose counters disagree with its row. And the disagreement last, because
156
+ * it is a statement about a stop and a row together.
157
+ */
158
+ const rowOf = (change, door) => {
159
+ const where = {
160
+ treeId: change.treeId,
161
+ revisions: change.revisions,
162
+ audienceId: change.progress.now.audienceId,
163
+ views: { was: change.progress.was.views, now: change.progress.now.views },
164
+ opened: door?.opened ?? null,
165
+ inflation: door?.inflation ?? null,
166
+ silence: change.silence,
167
+ };
168
+ const nothing = { worsened: null, improved: null };
169
+ if (change.silence !== null) {
170
+ return { ...where, ...nothing, standing: standingFor(change.silence) };
171
+ }
172
+ if (door === null)
173
+ return { ...where, ...nothing, standing: "unscaled" };
174
+ /**
175
+ * A null inflation is exactly an opened of nought — the page-view reading
176
+ * withholds the fraction rather than dividing by nothing — so the check is
177
+ * written on the figure the scale needs and not on the count behind it.
178
+ */
179
+ if (door.inflation === null)
180
+ return { ...where, ...nothing, standing: "unopened" };
181
+ if (change.mostLost === null && change.mostKept === null) {
182
+ return { ...where, ...nothing, standing: "unmoved" };
183
+ }
184
+ const beyond = (at) => at !== null && at.now.reached > door.appearances;
185
+ if (beyond(change.mostLost) || beyond(change.mostKept)) {
186
+ return {
187
+ ...where,
188
+ standing: "inconsistent",
189
+ worsened: movementOf(change.mostLost, null),
190
+ improved: movementOf(change.mostKept, null),
191
+ };
192
+ }
193
+ const scale = doorOf(door);
194
+ return {
195
+ ...where,
196
+ standing: "ranked",
197
+ worsened: movementOf(change.mostLost, scale),
198
+ improved: movementOf(change.mostKept, scale),
199
+ };
200
+ };
201
+ /** Tree id, then newest later revision first, which is the order a page's rows are read in. */
202
+ const byPage = (one, other) => one.treeId.localeCompare(other.treeId) ||
203
+ other.revisions.now - one.revisions.now ||
204
+ (one.audienceId ?? "").localeCompare(other.audienceId ?? "");
205
+ /**
206
+ * The sharper of two movements in one direction, which is the ranking rule
207
+ * spelled once.
208
+ *
209
+ * By readers before share, for the reason a page ranks its own stops that way
210
+ * (0221, 0224): a stop two readers out of three left is a worse rate and a
211
+ * smaller problem than one four hundred out of a thousand left.
212
+ */
213
+ const sharperOn = (direction) => (one, other) => (other[direction]?.readers ?? 0) - (one[direction]?.readers ?? 0) ||
214
+ (other[direction]?.share ?? 0) - (one[direction]?.share ?? 0) ||
215
+ byPage(one, other);
216
+ /**
217
+ * What a change did across a deployment's pages, as two orders.
218
+ *
219
+ * Takes the comparisons rather than the counters, for the reason every derived
220
+ * reading in this subsystem does: the movements and the gates are what this is
221
+ * made of, and deriving them twice is how two screens come to disagree. A caller
222
+ * with two windows of counters reads each page's parts, then its progress, then
223
+ * its comparison, then this.
224
+ *
225
+ * The rows are the **later** window's page-view rows — the whole window a
226
+ * deployment holds, not one page's — because the figure being scaled is the
227
+ * later window's own. Each page's row is picked out by the published rule, so no
228
+ * caller writes the matching itself.
229
+ */
230
+ export const deploymentChangeOf = (changes, rows) => {
231
+ /**
232
+ * Grouped by **form** rather than by page. Two forms of one page are two live
233
+ * things with two movements of their own (0290), so a tree handed in with one
234
+ * comparison per form is not the ambiguity this gate exists for — it is a
235
+ * deployment serving two audiences. What is still ambiguous is one *form*
236
+ * handed in with two different revision pairs, which is the state the
237
+ * one-window order deliberately keeps as two rows and which a comparison
238
+ * cannot reduce to one.
239
+ */
240
+ const pairsByForm = new Map();
241
+ for (const change of changes) {
242
+ const pairs = pairsByForm.get(formKeyOfChange(change)) ?? new Set();
243
+ pairs.add(pairKeyOf(change));
244
+ pairsByForm.set(formKeyOfChange(change), pairs);
245
+ }
246
+ const unsettled = (change) => (pairsByForm.get(formKeyOfChange(change))?.size ?? 0) > 1;
247
+ /**
248
+ * Named by tree, because a page is what a surface draws and the tree id is
249
+ * what it has. A deployment whose two forms are *each* ambiguous names the
250
+ * tree once, and a tree one of whose forms is sound still names it — that
251
+ * form is read, and the name says a reading of this page is incomplete.
252
+ */
253
+ const ambiguous = [...new Set(changes.filter(unsettled).map((change) => change.treeId))].sort((one, other) => one.localeCompare(other));
254
+ const unreadable = new Set(changes.filter(unsettled).map(formKeyOfChange));
255
+ const seen = new Set();
256
+ const counted = new Set();
257
+ const read = [];
258
+ let duplicated = 0;
259
+ let duplicatedRows = 0;
260
+ let arrivals = 0;
261
+ for (const change of changes) {
262
+ if (unreadable.has(formKeyOfChange(change)))
263
+ continue;
264
+ const key = pairKeyOf(change);
265
+ if (seen.has(key)) {
266
+ duplicated += 1;
267
+ continue;
268
+ }
269
+ seen.add(key);
270
+ /**
271
+ * The audience travels with the asking, so the door row picked is this
272
+ * form's own (0290). Dropping it here would divide one form's movement by
273
+ * a row that may be the other form's, chosen by the caller's array order.
274
+ */
275
+ const later = {
276
+ treeId: change.progress.now.treeId,
277
+ revision: change.revisions.now,
278
+ audienceId: change.progress.now.audienceId,
279
+ };
280
+ const door = pageViewsFor(later, rows);
281
+ const doorKey = readingKeyOf(later);
282
+ duplicatedRows += door.duplicated;
283
+ if (!counted.has(doorKey)) {
284
+ counted.add(doorKey);
285
+ arrivals += door.measured?.opened ?? 0;
286
+ }
287
+ read.push(rowOf(change, door.measured));
288
+ }
289
+ const harmed = read.filter((row) => row.worsened?.readers != null).sort(sharperOn("worsened"));
290
+ const helped = read.filter((row) => row.improved?.readers != null).sort(sharperOn("improved"));
291
+ const ranked = new Set([...harmed, ...helped]);
292
+ const standings = { ...EMPTY_STANDINGS };
293
+ for (const row of read)
294
+ standings[row.standing] += 1;
295
+ return {
296
+ harmed,
297
+ helped,
298
+ unranked: read.filter((row) => !ranked.has(row)).sort(byPage),
299
+ worst: harmed[0] ?? null,
300
+ best: helped[0] ?? null,
301
+ standings,
302
+ compared: read.length,
303
+ arrivals,
304
+ duplicated,
305
+ duplicatedRows,
306
+ ambiguous,
307
+ };
308
+ };
309
+ //# sourceMappingURL=deployment-change.js.map
@@ -0,0 +1,278 @@
1
+ import type { AudienceId } from "../audience/audience.js";
2
+ import type { TreeId } from "../ids.js";
3
+ import { type StoredPageViews } from "./page-views.js";
4
+ import type { ReadingProgress, ReadingStop } from "./progress.js";
5
+ /**
6
+ * Which of a deployment's pages to fix first.
7
+ *
8
+ * Every reading in this subsystem answers about one revision of one page: where
9
+ * its reading stops, how much of what it says gets read, whether a change made
10
+ * room to read it. A deployment has forty of them, and nothing until now could
11
+ * put them in an order — so the first question anybody opening a portal asks,
12
+ * *where is the problem*, was the one question the counters could not be asked.
13
+ *
14
+ * This is that order, taken off the readings a deployment already has and
15
+ * nothing else: no payload, no browser change, no counter that does not exist,
16
+ * no column and no byte on any wire.
17
+ *
18
+ * ## A count is comparable across two pages only once the door has scaled it
19
+ *
20
+ * Inside one page a fall is reported as a ratio of two counts off the same rows,
21
+ * and the over-count in a distinct view count very nearly divides out: a reader
22
+ * who straddled a rollup window straddled it for the whole page
23
+ * ([0221](../../decisions/0221-where-reading-stops-is-a-fall-between-two-siblings-and-a-ratio-of-two-counts-off-one-row-set.md)).
24
+ *
25
+ * **Across two pages it does not divide out, because the straddle rate is each
26
+ * page's own.** A page readers linger on for twenty minutes, against a rollup
27
+ * window of five, posts its batches into four windows and has every distinct
28
+ * count against it inflated roughly fourfold; a page read in ninety seconds
29
+ * does not. Ranking the raw losses therefore ranks partly by how long readers
30
+ * stay, which is not the question anybody asked.
31
+ *
32
+ * So the ranking key is the loss put **on the scale the door counts in**, by
33
+ * `atDoorScale` off that page's own door row
34
+ * ([0265](../../decisions/0265-what-readers-do-inside-a-kind-of-part-is-a-share-of-the-readers-who-met-it-and-the-door-is-only-a-weight.md),
35
+ * [0346](../../decisions/0346-the-doors-scale-is-total-so-the-three-ranking-keys-read-the-one-rule.md)).
36
+ * The rule for picking the right row is published beside the counter it is a
37
+ * rule about and is reused here rather than written a second time
38
+ * ([0219](../../decisions/0219-a-page-view-is-counted-once-at-the-door-and-the-over-count-in-the-node-counters-is-a-measurement.md)).
39
+ *
40
+ * The figure that comes out is not a count of people and is deliberately not
41
+ * rounded into one. It is a loss stated at the door's scale, which is what makes
42
+ * two pages' losses the same kind of number.
43
+ *
44
+ * ## A page the door cannot scale is not ranked against one it can
45
+ *
46
+ * A page can be perfectly well measured and still have no place in the order:
47
+ * its counters are full of readers and its door row is missing, expired, or
48
+ * predates the column. Mixing its unscaled loss in with scaled ones would put it
49
+ * in the order at the wrong height, and there is no direction that is the safe
50
+ * one — a long-dwell page would be over-ranked and a quick one under-ranked.
51
+ *
52
+ * So it is reported out of the order rather than in it, with the standing saying
53
+ * which of four reasons applies. That is the same refusal a region map makes
54
+ * about a bucket it may not publish: the figure a surface could misread is one
55
+ * the function never offers.
56
+ *
57
+ * ## What is deliberately not published
58
+ *
59
+ * **No deployment-wide loss.** The artefact is an order and not a sum. Two
60
+ * revisions of one tree are two live versions of one page and both belong in the
61
+ * order, so anything that added their losses would count one page's problem
62
+ * twice — and a count that has been added cannot be unadded
63
+ * ([0158](../../decisions/0158-counting-a-window-of-reader-signals-and-forgetting-it-are-one-operation.md)).
64
+ * A ranking cannot double-count, because nothing in it is added: the only error
65
+ * available to it is one page standing in it twice, and that is the one thing
66
+ * deduplicated here.
67
+ *
68
+ * The one figure that is added is `arrivals`, and it is addable for the reason
69
+ * every other counter here is not: a page view began on exactly one revision of
70
+ * exactly one tree, was counted once at the door, and is never recounted.
71
+ *
72
+ * Pure, linear in the pages times the rows, and reaches no store, clock or DOM.
73
+ */
74
+ /** A reason a page has no place in the order. */
75
+ export type DeploymentSilence =
76
+ /**
77
+ * The window's counters report no view of this revision.
78
+ *
79
+ * There is no fall to rank because there was no reading, and this is checked
80
+ * before the door is, so a page nobody opened is not reported as a page the
81
+ * door could not scale.
82
+ *
83
+ * **It means what it says, which it did not before.** A reading refused for
84
+ * holding two forms of the page publishes the same nought
85
+ * ({@link ReadingProgress.views}), so until `unsplit` existed this standing
86
+ * was printed over a window full of readers (0301).
87
+ */
88
+ "unread"
89
+ /**
90
+ * The reading handed in holds two forms of the page and named neither, so it
91
+ * was read as neither population.
92
+ *
93
+ * **Not a page nobody read, which is what it was reported as.** A page served
94
+ * in two forms (0263) has two sets of counters over one tree at one revision,
95
+ * and a page reading handed both with no audience asked for reads neither:
96
+ * every part is `unknown` and its view floor is nought (0290). That nought is
97
+ * indistinguishable from a page nothing has opened, so this order published
98
+ * *nothing reported a view of this version* about a window holding every
99
+ * reader of both forms — and it published it beside a door row that **sums**
100
+ * those forms' arrivals (0299), so the row said five hundred readers arrived
101
+ * at a page nobody read.
102
+ *
103
+ * Checked before `unread`, because it is that nought's cause. It is a fault
104
+ * in the asking rather than in the deployment, and the only standing here
105
+ * that is: split the window by audience (`byAudience`) and read each form on
106
+ * its own, and the page takes its place in the order twice.
107
+ */
108
+ | "unsplit"
109
+ /**
110
+ * There is no page-view row at the door for this revision, so its loss cannot
111
+ * be put on the same scale as another page's.
112
+ *
113
+ * Not a page that was not measured. Its own reading is as good as any other's
114
+ * and every figure inside it stands; what is missing is the one number that
115
+ * makes two pages comparable.
116
+ */
117
+ | "unscaled"
118
+ /**
119
+ * The door row is there and nothing in it says a page view ever began.
120
+ *
121
+ * Either nobody has read this revision, or the senders are not marking their
122
+ * openings — which the page-view reading publishes both numbers for, so the
123
+ * diagnosis is a subtraction a surface can make.
124
+ */
125
+ | "unopened"
126
+ /**
127
+ * It reports more readers lost at one fall than the door has ever seen
128
+ * appear, which no rollup produces.
129
+ *
130
+ * A reading assembled by hand or by a sender that is not one. The scaled
131
+ * figure is withheld because it is the one the disagreement makes absurd, and
132
+ * the fall it was taken from is published so the disagreement can be seen.
133
+ */
134
+ | "inconsistent";
135
+ export declare const DEPLOYMENT_SILENCES: readonly DeploymentSilence[];
136
+ /**
137
+ * One line per silence, for a surface saying why a page is not in the order.
138
+ *
139
+ * **The sentences are the order's own, moved here rather than written again.**
140
+ * Every member of this set is also a {@link RankStanding}, and
141
+ * {@link describeRankStanding} has had a line for each since the order was
142
+ * built — so writing a second spelling of *nothing reported a view of this
143
+ * version* would be the overlap the census of silences exists to resolve, one
144
+ * module in. The standing defers to this for the five they share and the text
145
+ * is unchanged from what it returned.
146
+ */
147
+ export declare const describeDeploymentSilence: (silence: DeploymentSilence) => string;
148
+ /** Where one page stands in the order, or why it is not in it. */
149
+ export type RankStanding =
150
+ /** In the order, with a fall and a scale for it. */
151
+ "ranked"
152
+ /**
153
+ * Read, scalable, and losing nobody anywhere on the page.
154
+ *
155
+ * The cheerful answer, and a thin window can produce it as well: a revision
156
+ * two readers saw through to the end has no fall in it either. `views` is what
157
+ * tells the two apart and it travels with the row.
158
+ */
159
+ | "unbroken" | DeploymentSilence;
160
+ export declare const RANK_STANDINGS: readonly RankStanding[];
161
+ /** One line per standing, for a surface naming why a page is where it is. */
162
+ export declare const describeRankStanding: (standing: RankStanding) => string;
163
+ /** One revision of one page, as the order has it. */
164
+ export type RankedPage = {
165
+ readonly treeId: TreeId;
166
+ readonly revision: number;
167
+ /**
168
+ * The audience this row is about, or `null` where the reading named none.
169
+ *
170
+ * Two forms of one page stand here as two rows, for the reason two revisions
171
+ * of one tree do (0250): both are live, both have readers, and an order that
172
+ * showed one of them would be hiding a page a deployment is serving. Nothing
173
+ * is summed across them — a reader of one form is not a reader of the other,
174
+ * and the two rows' losses are losses from two populations.
175
+ */
176
+ readonly audienceId: AudienceId | null;
177
+ readonly standing: RankStanding;
178
+ /**
179
+ * The window's view floor, carried through from the reading unchanged.
180
+ *
181
+ * A floor and not a count, which is why it is never the denominator of
182
+ * anything here.
183
+ */
184
+ readonly views: number;
185
+ /**
186
+ * Page views counted at the door, exact, or `null` where this revision has no
187
+ * row.
188
+ *
189
+ * The weight behind the row: *three hundred and forty of twelve hundred
190
+ * readers*, where the second number is this and the first is scaled to it.
191
+ */
192
+ readonly opened: number | null;
193
+ /** This page's own straddle rate, which is what scales its loss. */
194
+ readonly inflation: number | null;
195
+ /** The sharpest fall on the page, where it has one. */
196
+ readonly at: ReadingStop | null;
197
+ /** Readers lost at that fall, as the window's counters have it. */
198
+ readonly lost: number | null;
199
+ /**
200
+ * The same loss on the door's scale, which is the key the order is on.
201
+ *
202
+ * Not a count of people and not rounded into one. Withheld where the page has
203
+ * no fall, no reading, or no row to scale it by.
204
+ */
205
+ readonly readers: number | null;
206
+ /**
207
+ * The fall as a share of the readers who reached the part before it, carried
208
+ * through unchanged.
209
+ *
210
+ * Sound without any correction, because both of its counts come off the same
211
+ * rows — so it is published even for a page whose scaled figure is withheld
212
+ * as inconsistent.
213
+ */
214
+ readonly share: number | null;
215
+ };
216
+ /** A deployment's pages, in the order they should be looked at. */
217
+ export type DeploymentReading = {
218
+ /**
219
+ * Every page with a fall and a scale for it, worst first.
220
+ *
221
+ * Most readers lost at the door's scale, then the larger share, then by tree
222
+ * id and newest revision first — so two pages that lose the same do not
223
+ * reorder on a refresh.
224
+ */
225
+ readonly ranked: readonly RankedPage[];
226
+ /** Every other page, by tree id and newest revision first. */
227
+ readonly unranked: readonly RankedPage[];
228
+ /** The head of the order, which is the page to fix first. */
229
+ readonly worst: RankedPage | null;
230
+ /** How many pages stand in each state, over the ranked and the unranked alike. */
231
+ readonly standings: Readonly<Record<RankStanding, number>>;
232
+ /**
233
+ * Distinct trees across every page read, which is not the number of pages.
234
+ *
235
+ * Two revisions of one tree are two live versions of one page, and both are
236
+ * in the order rather than one replacing the other: a revision shipped an
237
+ * hour ago with four readers on it does not supersede the one that nine
238
+ * thousand read.
239
+ */
240
+ readonly trees: number;
241
+ /**
242
+ * Page views counted at the door across the pages handed in, added.
243
+ *
244
+ * Exact and addable, for the reason no other figure here is: a page view began
245
+ * on one revision of one tree and was counted once. It is a weight rather than
246
+ * a deployment total — this sees the pages its caller read, not the
247
+ * deployment's.
248
+ */
249
+ readonly arrivals: number;
250
+ /**
251
+ * Readings of a revision beyond the first, which were dropped.
252
+ *
253
+ * A caller that concatenated two reads holds one page twice, and a page twice
254
+ * in an order is the one way an order can lie about how much there is to fix.
255
+ */
256
+ readonly duplicated: number;
257
+ /**
258
+ * Door rows for one revision beyond the first, which were ignored.
259
+ *
260
+ * A store keeps one row per revision, so this is a caller's two reads again —
261
+ * and adding them would double a page's arrivals and halve its scaled loss.
262
+ */
263
+ readonly duplicatedRows: number;
264
+ };
265
+ /**
266
+ * A deployment's pages, in the order they should be looked at.
267
+ *
268
+ * Takes the readings rather than the counters, for the reason every derived
269
+ * reading in this subsystem does: the falls and the standings are what this is
270
+ * made of, and deriving them twice is how two screens come to disagree. A
271
+ * caller with counters and trees reads the parts, then the progress, then this.
272
+ *
273
+ * The rows are the whole window of page-view rows a deployment holds, not one
274
+ * page's — each page's own row is picked out of them by the published rule, so
275
+ * no caller writes the matching itself.
276
+ */
277
+ export declare const deploymentReadingOf: (pages: readonly ReadingProgress[], rows: readonly StoredPageViews[]) => DeploymentReading;
278
+ //# sourceMappingURL=deployment.d.ts.map