@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.
- package/README.md +3 -1
- package/dist/application/application.d.ts +109 -0
- package/dist/application/application.js +97 -0
- package/dist/application/memory.d.ts +20 -0
- package/dist/application/memory.js +79 -0
- package/dist/application/store.d.ts +101 -0
- package/dist/application/store.js +25 -0
- package/dist/audience/audience.d.ts +36 -0
- package/dist/audience/audience.js +41 -0
- package/dist/audience/compose.d.ts +112 -0
- package/dist/audience/compose.js +134 -0
- package/dist/audience/memory.d.ts +14 -0
- package/dist/audience/memory.js +71 -0
- package/dist/audience/overlay-store.d.ts +343 -0
- package/dist/audience/overlay-store.js +217 -0
- package/dist/audience/rule.d.ts +121 -0
- package/dist/audience/rule.js +78 -0
- package/dist/cli/index.d.ts +3 -4
- package/dist/cli/index.js +3 -4
- package/dist/cli/templates.js +19 -0
- package/dist/data/adapter.d.ts +9 -1
- package/dist/data/adapter.js +2 -0
- package/dist/data/plan.js +0 -0
- package/dist/data/resolution.d.ts +23 -1
- package/dist/data/resolve.d.ts +31 -4
- package/dist/data/resolve.js +11 -3
- package/dist/ids.d.ts +10 -0
- package/dist/ids.js +11 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/interpretation/anthropic.d.ts +1 -1
- package/dist/interpretation/anthropic.js +2 -22
- package/dist/interpretation/client.d.ts +1 -1
- package/dist/interpretation/materialize.js +67 -22
- package/dist/interpretation/openai-compatible.d.ts +36 -0
- package/dist/interpretation/openai-compatible.js +79 -0
- package/dist/interpretation/status.d.ts +19 -0
- package/dist/interpretation/status.js +26 -0
- package/dist/live/index.d.ts +73 -0
- package/dist/live/index.js +73 -0
- package/dist/live/pages.d.ts +187 -0
- package/dist/live/pages.js +161 -0
- package/dist/live/pull.d.ts +147 -0
- package/dist/live/pull.js +398 -0
- package/dist/live/pulling.d.ts +79 -0
- package/dist/live/pulling.js +117 -0
- package/dist/live/window.d.ts +129 -0
- package/dist/live/window.js +132 -0
- package/dist/patch.d.ts +54 -0
- package/dist/patch.js +44 -0
- package/dist/project/closing.d.ts +51 -0
- package/dist/project/closing.js +53 -0
- package/dist/project/memory.d.ts +20 -0
- package/dist/project/memory.js +97 -0
- package/dist/project/project.d.ts +90 -0
- package/dist/project/project.js +91 -0
- package/dist/project/store.d.ts +135 -0
- package/dist/project/store.js +41 -0
- package/dist/registered.d.ts +64 -0
- package/dist/registered.js +118 -0
- package/dist/render/addressed.d.ts +35 -0
- package/dist/render/addressed.js +79 -0
- package/dist/render/behaviour-adjust.d.ts +11 -19
- package/dist/render/behaviour-adjust.js +75 -21
- package/dist/render/behaviour-present.d.ts +8 -0
- package/dist/render/behaviour-present.js +57 -6
- package/dist/render/behaviour.d.ts +98 -17
- package/dist/render/behaviour.js +91 -26
- package/dist/render/control-name.d.ts +68 -0
- package/dist/render/control-name.js +37 -0
- package/dist/render/diagnostics.d.ts +72 -0
- package/dist/render/diagnostics.js +7 -0
- package/dist/render/document-theme.d.ts +70 -0
- package/dist/render/document-theme.js +139 -0
- package/dist/render/editable.d.ts +15 -1
- package/dist/render/editable.js +13 -1
- package/dist/render/expected.d.ts +98 -0
- package/dist/render/expected.js +88 -0
- package/dist/render/index.d.ts +4 -0
- package/dist/render/index.js +4 -0
- package/dist/render/reads.d.ts +11 -0
- package/dist/render/reads.js +12 -1
- package/dist/render/render.d.ts +11 -0
- package/dist/render/render.js +294 -53
- package/dist/render/request.d.ts +8 -1
- package/dist/render/request.js +1 -0
- package/dist/render/slots.d.ts +52 -0
- package/dist/render/slots.js +24 -0
- package/dist/render/theme.d.ts +54 -1
- package/dist/render/theme.js +23 -1
- package/dist/render/unshown.d.ts +152 -0
- package/dist/render/unshown.js +80 -0
- package/dist/runtime/analysis.d.ts +94 -9
- package/dist/runtime/analysis.js +54 -9
- package/dist/runtime/assessment.d.ts +36 -2
- package/dist/runtime/assessment.js +27 -2
- package/dist/runtime/auto-apply-ceiling.d.ts +54 -0
- package/dist/runtime/auto-apply-ceiling.js +66 -0
- package/dist/runtime/checks.d.ts +148 -0
- package/dist/runtime/checks.js +112 -0
- package/dist/runtime/disposition.d.ts +96 -0
- package/dist/runtime/disposition.js +46 -0
- package/dist/runtime/gate.js +91 -10
- package/dist/runtime/index.d.ts +4 -0
- package/dist/runtime/index.js +4 -0
- package/dist/runtime/irreversibility.d.ts +64 -0
- package/dist/runtime/irreversibility.js +45 -0
- package/dist/runtime/nesting.d.ts +13 -1
- package/dist/runtime/nesting.js +41 -24
- package/dist/runtime/pipeline.d.ts +43 -0
- package/dist/runtime/pipeline.js +10 -2
- package/dist/runtime/policy-change.d.ts +93 -0
- package/dist/runtime/policy-change.js +305 -0
- package/dist/runtime/policy-log.d.ts +406 -0
- package/dist/runtime/policy-log.js +285 -0
- package/dist/runtime/policy.d.ts +8 -6
- package/dist/runtime/policy.js +5 -2
- package/dist/runtime/repointing.js +0 -0
- package/dist/runtime/reversibility.d.ts +11 -9
- package/dist/runtime/stakes.d.ts +129 -1
- package/dist/runtime/stakes.js +240 -26
- package/dist/runtime/vocabulary.d.ts +164 -7
- package/dist/runtime/vocabulary.js +181 -8
- package/dist/sdk/audit.d.ts +174 -3
- package/dist/sdk/audit.js +176 -17
- package/dist/sdk/catalogue.d.ts +9 -1
- package/dist/sdk/conformance.d.ts +37 -3
- package/dist/sdk/conformance.js +25 -4
- package/dist/sdk/definition.d.ts +129 -5
- package/dist/sdk/definition.js +66 -0
- package/dist/sdk/registry.d.ts +45 -2
- package/dist/sdk/registry.js +102 -1
- package/dist/signals/acted.contract.d.ts +21 -0
- package/dist/signals/acted.contract.js +236 -0
- package/dist/signals/acted.d.ts +359 -0
- package/dist/signals/acted.js +135 -0
- package/dist/signals/action-change.d.ts +507 -0
- package/dist/signals/action-change.js +265 -0
- package/dist/signals/action.d.ts +331 -0
- package/dist/signals/action.js +182 -0
- package/dist/signals/agenda.d.ts +585 -0
- package/dist/signals/agenda.js +295 -0
- package/dist/signals/applied-window.contract.d.ts +23 -0
- package/dist/signals/applied-window.contract.js +160 -0
- package/dist/signals/arrivals.contract.d.ts +21 -0
- package/dist/signals/arrivals.contract.js +180 -0
- package/dist/signals/arrivals.d.ts +375 -0
- package/dist/signals/arrivals.js +254 -0
- package/dist/signals/arriving.d.ts +210 -0
- package/dist/signals/arriving.js +133 -0
- package/dist/signals/audiences.d.ts +528 -0
- package/dist/signals/audiences.js +255 -0
- package/dist/signals/broadcast.d.ts +33 -17
- package/dist/signals/broadcast.js +255 -32
- package/dist/signals/change.d.ts +378 -0
- package/dist/signals/change.js +327 -0
- package/dist/signals/collect.d.ts +169 -34
- package/dist/signals/collect.js +186 -38
- package/dist/signals/conversion.d.ts +348 -0
- package/dist/signals/conversion.js +235 -0
- package/dist/signals/copy-change.d.ts +553 -0
- package/dist/signals/copy-change.js +377 -0
- package/dist/signals/copy.d.ts +337 -0
- package/dist/signals/copy.js +211 -0
- package/dist/signals/correlated.contract.d.ts +24 -0
- package/dist/signals/correlated.contract.js +94 -0
- package/dist/signals/counters.d.ts +97 -0
- package/dist/signals/counters.js +160 -0
- package/dist/signals/deliver.d.ts +23 -4
- package/dist/signals/deliver.js +34 -6
- package/dist/signals/deployment-change.d.ts +395 -0
- package/dist/signals/deployment-change.js +309 -0
- package/dist/signals/deployment.d.ts +278 -0
- package/dist/signals/deployment.js +178 -0
- package/dist/signals/door.d.ts +114 -0
- package/dist/signals/door.js +77 -0
- package/dist/signals/expire.d.ts +192 -0
- package/dist/signals/expire.js +213 -0
- package/dist/signals/fold.d.ts +10 -0
- package/dist/signals/fold.js +5 -1
- package/dist/signals/form-action.d.ts +302 -0
- package/dist/signals/form-action.js +169 -0
- package/dist/signals/form-copy.d.ts +523 -0
- package/dist/signals/form-copy.js +346 -0
- package/dist/signals/forms.d.ts +247 -0
- package/dist/signals/forms.js +147 -0
- package/dist/signals/frontier.d.ts +268 -0
- package/dist/signals/frontier.js +145 -0
- package/dist/signals/funnel-change.d.ts +548 -0
- package/dist/signals/funnel-change.js +361 -0
- package/dist/signals/funnel-hours.contract.d.ts +21 -0
- package/dist/signals/funnel-hours.contract.js +221 -0
- package/dist/signals/funnel-hours.d.ts +293 -0
- package/dist/signals/funnel-hours.js +99 -0
- package/dist/signals/funnel.d.ts +592 -0
- package/dist/signals/funnel.js +231 -0
- package/dist/signals/health.d.ts +694 -0
- package/dist/signals/health.js +573 -0
- package/dist/signals/index.d.ts +60 -0
- package/dist/signals/index.js +60 -0
- package/dist/signals/ingest.d.ts +56 -1
- package/dist/signals/ingest.js +91 -1
- package/dist/signals/inside.d.ts +190 -0
- package/dist/signals/inside.js +263 -0
- package/dist/signals/join.d.ts +56 -0
- package/dist/signals/join.js +60 -0
- package/dist/signals/journal.d.ts +123 -9
- package/dist/signals/kept.contract.d.ts +22 -0
- package/dist/signals/kept.contract.js +111 -0
- package/dist/signals/kinds.d.ts +8 -6
- package/dist/signals/kinds.js +14 -6
- package/dist/signals/library-action.d.ts +430 -0
- package/dist/signals/library-action.js +336 -0
- package/dist/signals/library-agenda-change.d.ts +324 -0
- package/dist/signals/library-agenda-change.js +199 -0
- package/dist/signals/library-agenda.d.ts +258 -0
- package/dist/signals/library-agenda.js +167 -0
- package/dist/signals/library-change.d.ts +477 -0
- package/dist/signals/library-change.js +335 -0
- package/dist/signals/library-copy-change.d.ts +498 -0
- package/dist/signals/library-copy-change.js +476 -0
- package/dist/signals/library-pace.d.ts +319 -0
- package/dist/signals/library-pace.js +305 -0
- package/dist/signals/library-reach-change.d.ts +646 -0
- package/dist/signals/library-reach-change.js +542 -0
- package/dist/signals/library-reach.d.ts +377 -0
- package/dist/signals/library-reach.js +227 -0
- package/dist/signals/library-senders-change.d.ts +457 -0
- package/dist/signals/library-senders-change.js +367 -0
- package/dist/signals/library-senders-reach-change.d.ts +486 -0
- package/dist/signals/library-senders-reach-change.js +538 -0
- package/dist/signals/library-senders-reach.d.ts +340 -0
- package/dist/signals/library-senders-reach.js +252 -0
- package/dist/signals/library-senders.d.ts +271 -0
- package/dist/signals/library-senders.js +180 -0
- package/dist/signals/library-word-reach-change.d.ts +567 -0
- package/dist/signals/library-word-reach-change.js +564 -0
- package/dist/signals/library.d.ts +306 -0
- package/dist/signals/library.js +178 -0
- package/dist/signals/memory.d.ts +9 -0
- package/dist/signals/memory.js +246 -14
- package/dist/signals/migrate.d.ts +20 -4
- package/dist/signals/migrate.js +269 -8
- package/dist/signals/notice.d.ts +389 -0
- package/dist/signals/notice.js +250 -0
- package/dist/signals/pace-change.d.ts +501 -0
- package/dist/signals/pace-change.js +310 -0
- package/dist/signals/pace.d.ts +296 -0
- package/dist/signals/pace.js +291 -0
- package/dist/signals/page-views.d.ts +365 -0
- package/dist/signals/page-views.js +218 -0
- package/dist/signals/part-pace.d.ts +378 -0
- package/dist/signals/part-pace.js +333 -0
- package/dist/signals/parts.d.ts +354 -0
- package/dist/signals/parts.js +232 -0
- package/dist/signals/postgres.d.ts +16 -2
- package/dist/signals/postgres.js +753 -76
- package/dist/signals/progress.d.ts +212 -0
- package/dist/signals/progress.js +150 -0
- package/dist/signals/ratios.d.ts +108 -0
- package/dist/signals/ratios.js +40 -0
- package/dist/signals/reach.d.ts +309 -0
- package/dist/signals/reach.js +93 -0
- package/dist/signals/readable.d.ts +34 -0
- package/dist/signals/readable.js +34 -0
- package/dist/signals/readership.d.ts +381 -0
- package/dist/signals/readership.js +308 -0
- package/dist/signals/region-pages.d.ts +173 -0
- package/dist/signals/region-pages.js +62 -0
- package/dist/signals/region.d.ts +287 -0
- package/dist/signals/region.js +198 -0
- package/dist/signals/retention.d.ts +163 -0
- package/dist/signals/retention.js +75 -0
- package/dist/signals/rhythm.d.ts +302 -0
- package/dist/signals/rhythm.js +262 -0
- package/dist/signals/rollup.d.ts +194 -4
- package/dist/signals/rollup.js +0 -0
- package/dist/signals/schema.d.ts +1069 -1
- package/dist/signals/schema.js +393 -3
- package/dist/signals/signal.d.ts +237 -11
- package/dist/signals/signal.js +70 -10
- package/dist/signals/silence-census.d.ts +205 -0
- package/dist/signals/silence-census.js +87 -0
- package/dist/signals/silences.d.ts +1147 -0
- package/dist/signals/silences.js +996 -0
- package/dist/signals/subtrees.d.ts +123 -0
- package/dist/signals/subtrees.js +102 -0
- package/dist/signals/tally.d.ts +262 -12
- package/dist/signals/unread.d.ts +292 -0
- package/dist/signals/unread.js +137 -0
- package/dist/signals/window-agenda.d.ts +276 -0
- package/dist/signals/window-agenda.js +83 -0
- package/dist/signals/window-figures.d.ts +148 -0
- package/dist/signals/window-figures.js +42 -0
- package/dist/signals/window-funnels.d.ts +88 -0
- package/dist/signals/window-funnels.js +47 -0
- package/dist/signals/window.d.ts +866 -0
- package/dist/signals/window.js +693 -0
- package/dist/signals/words.d.ts +24 -0
- package/dist/signals/words.js +24 -0
- package/dist/store/cache.d.ts +101 -0
- package/dist/store/cache.js +149 -0
- package/dist/store/history.d.ts +82 -0
- package/dist/store/history.js +36 -0
- package/dist/store/index.d.ts +30 -0
- package/dist/store/index.js +30 -0
- package/dist/store/memory.d.ts +2 -1
- package/dist/store/memory.js +48 -12
- package/dist/store/migrate.d.ts +106 -0
- package/dist/store/migrate.js +323 -7
- package/dist/store/postgres-applications.d.ts +4 -0
- package/dist/store/postgres-applications.js +197 -0
- package/dist/store/postgres-audience.d.ts +14 -0
- package/dist/store/postgres-audience.js +272 -0
- package/dist/store/postgres-holds.d.ts +10 -1
- package/dist/store/postgres-holds.js +116 -101
- package/dist/store/postgres-policy-log.d.ts +14 -0
- package/dist/store/postgres-policy-log.js +240 -0
- package/dist/store/postgres-projects.d.ts +4 -0
- package/dist/store/postgres-projects.js +217 -0
- package/dist/store/postgres.d.ts +17 -1
- package/dist/store/postgres.js +60 -9
- package/dist/store/replay.d.ts +102 -1
- package/dist/store/replay.js +190 -19
- package/dist/store/reseed.d.ts +238 -0
- package/dist/store/reseed.js +308 -0
- package/dist/store/schema.d.ts +762 -2
- package/dist/store/schema.js +218 -5
- package/dist/store/source.d.ts +57 -1
- package/dist/store/source.js +65 -1
- package/dist/store/store.d.ts +29 -6
- package/dist/submit/resolve.d.ts +1 -1
- package/dist/submit/resolve.js +2 -1
- package/dist/telemetry/calibration.d.ts +25 -0
- package/dist/telemetry/calibration.js +27 -1
- package/dist/telemetry/event.d.ts +391 -33
- package/dist/telemetry/event.js +84 -20
- package/dist/telemetry/index.d.ts +2 -0
- package/dist/telemetry/index.js +2 -0
- package/dist/telemetry/journal.d.ts +104 -3
- package/dist/telemetry/journal.js +9 -0
- package/dist/telemetry/lookup.d.ts +27 -0
- package/dist/telemetry/lookup.js +18 -0
- package/dist/telemetry/memory.js +33 -1
- package/dist/telemetry/migrate.js +22 -1
- package/dist/telemetry/postgres.d.ts +10 -1
- package/dist/telemetry/postgres.js +188 -90
- package/dist/telemetry/remeasure.d.ts +78 -0
- package/dist/telemetry/remeasure.js +83 -0
- package/dist/telemetry/retention.d.ts +2 -2
- package/dist/telemetry/schema.d.ts +17 -0
- package/dist/telemetry/schema.js +27 -1
- package/dist/telemetry/sink.d.ts +2 -2
- package/dist/telemetry/window.d.ts +135 -0
- package/dist/telemetry/window.js +101 -0
- package/dist/testing/application-contract.d.ts +14 -0
- package/dist/testing/application-contract.js +270 -0
- package/dist/testing/audience-overlay-contract.d.ts +31 -0
- package/dist/testing/audience-overlay-contract.js +354 -0
- package/dist/testing/contracts.d.ts +13 -7
- package/dist/testing/contracts.js +13 -7
- package/dist/testing/definitions.d.ts +78 -0
- package/dist/testing/definitions.js +134 -9
- package/dist/testing/doubles.d.ts +103 -0
- package/dist/testing/doubles.js +143 -0
- package/dist/testing/index.d.ts +2 -2
- package/dist/testing/index.js +2 -2
- package/dist/testing/journal-contract.js +297 -6
- package/dist/testing/model-contract.d.ts +110 -0
- package/dist/testing/model-contract.js +150 -0
- package/dist/testing/policy-log-contract.d.ts +26 -0
- package/dist/testing/policy-log-contract.js +344 -0
- package/dist/testing/project-contract.d.ts +14 -0
- package/dist/testing/project-contract.js +266 -0
- package/dist/testing/reader-signal-contract.d.ts +27 -2
- package/dist/testing/reader-signal-contract.js +475 -5
- package/dist/testing/store-contract.d.ts +7 -1
- package/dist/testing/store-contract.js +84 -3
- package/dist/theme/apply.d.ts +20 -1
- package/dist/theme/apply.js +5 -3
- package/dist/theme/contrast.d.ts +19 -14
- package/dist/theme/contrast.js +181 -17
- package/dist/theme/derive.d.ts +22 -0
- package/dist/theme/derive.js +54 -1
- package/dist/theme/library.js +1 -1
- package/dist/theme/measure.d.ts +34 -0
- package/dist/theme/measure.js +30 -1
- package/dist/theme/palettes.js +7 -7
- package/dist/theme/ramp.d.ts +64 -0
- package/dist/theme/ramp.js +114 -0
- package/dist/theme/registry.d.ts +9 -0
- package/dist/theme/registry.js +11 -1
- package/dist/theme/separation.d.ts +97 -3
- package/dist/theme/separation.js +75 -0
- package/dist/tree/apply.js +13 -0
- package/dist/tree/compare.d.ts +9 -0
- package/dist/tree/compare.js +18 -0
- package/dist/tree/mutation.d.ts +18 -0
- package/dist/tree/mutation.js +24 -12
- package/dist/tree/navigation.d.ts +5 -0
- package/dist/tree/navigation.js +32 -10
- package/dist/tree/outline.d.ts +7 -0
- package/dist/tree/outline.js +9 -5
- package/dist/write/computed.d.ts +60 -0
- package/dist/write/computed.js +61 -0
- package/dist/write/held.d.ts +59 -0
- package/dist/write/index.d.ts +5 -2
- package/dist/write/index.js +5 -2
- package/dist/write/reseed.d.ts +151 -0
- package/dist/write/reseed.js +184 -0
- package/dist/write/revert.js +2 -16
- package/package.json +25 -3
- package/dist/runtime/inverse-interpreter.d.ts +0 -90
- package/dist/runtime/inverse-interpreter.js +0 -56
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import type { AudienceId } from "../audience/audience.js";
|
|
2
|
+
import type { TreeId } from "../ids.js";
|
|
3
|
+
import type { ChangeSilence, ComparedStop, ReadingChange } from "./change.js";
|
|
4
|
+
import { type StoredPageViews } from "./page-views.js";
|
|
5
|
+
/**
|
|
6
|
+
* Which of a deployment's pages a change helped, and which it hurt.
|
|
7
|
+
*
|
|
8
|
+
* A deployment ships a change and then has forty pages and one question:
|
|
9
|
+
* *where did it land?* Every comparison in this subsystem answers that about
|
|
10
|
+
* **one** page — where its reading stops now, how much of it gets read now,
|
|
11
|
+
* whether its readers had time for it now — and a deployment-wide order existed
|
|
12
|
+
* only for one window at a time, so *which page is worst* could be asked and
|
|
13
|
+
* *which page got worse* could not.
|
|
14
|
+
*
|
|
15
|
+
* This is that order, taken off the comparisons a deployment already holds and
|
|
16
|
+
* nothing else: no payload, no browser change, no counter that does not exist,
|
|
17
|
+
* no column and no byte on any wire. Two windows of readings go in, already
|
|
18
|
+
* compared page by page, and the pages come back in the order somebody should
|
|
19
|
+
* look at them.
|
|
20
|
+
*
|
|
21
|
+
* ## A movement is comparable across two pages only once the door has scaled it
|
|
22
|
+
*
|
|
23
|
+
* A before-and-after reading compares *shares* and never counts, because the
|
|
24
|
+
* counts on either side of a change are two windows of two trees with two sets
|
|
25
|
+
* of readers and nothing divides out
|
|
26
|
+
* ([0224](../../decisions/0224-a-before-and-after-reading-compares-two-shares-and-a-pair-the-change-dissolved-is-an-answer.md)).
|
|
27
|
+
* The share movement it publishes is sound, and so is the figure it ranks one
|
|
28
|
+
* page's own stops by: the movement times the readers that reached the stop in
|
|
29
|
+
* the later window.
|
|
30
|
+
*
|
|
31
|
+
* **That figure is not comparable with another page's**, and the reason is the
|
|
32
|
+
* one an order over a single window already had to answer
|
|
33
|
+
* ([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)):
|
|
34
|
+
* a distinct view count is generous by every page view that straddled a rollup
|
|
35
|
+
* window, and the straddle rate is each page's own. A page readers linger on
|
|
36
|
+
* for twenty minutes against a rollup window of five has every count against it
|
|
37
|
+
* inflated roughly fourfold; a page read in ninety seconds does not. The share
|
|
38
|
+
* movement has no straddle in it — both of its sides are ratios off their own
|
|
39
|
+
* rows — and then it is multiplied by a count that does, so the straddle walks
|
|
40
|
+
* straight back into the ranking key at the last step.
|
|
41
|
+
*
|
|
42
|
+
* So the key here is that figure put **on the scale the door counts in**, by
|
|
43
|
+
* `atDoorScale` off that revision's own door row
|
|
44
|
+
* ([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),
|
|
45
|
+
* [0346](../../decisions/0346-the-doors-scale-is-total-so-the-three-ranking-keys-read-the-one-rule.md)).
|
|
46
|
+
* The row is the later window's and is picked out with the rule published beside
|
|
47
|
+
* the counter rather than written again
|
|
48
|
+
* ([0219](../../decisions/0219-a-page-view-is-counted-once-at-the-door-and-the-over-count-in-the-node-counters-is-a-measurement.md)).
|
|
49
|
+
* What comes out is not a count of people and is deliberately not rounded into
|
|
50
|
+
* one.
|
|
51
|
+
*
|
|
52
|
+
* **Only the later window's door is asked for, and that is not an omission.**
|
|
53
|
+
* The figure being scaled is the later window's own — a share movement at the
|
|
54
|
+
* volume the page has *now* — so the earlier window's row would be scaling a
|
|
55
|
+
* number it is not the denominator of. A caller holding both windows hands over
|
|
56
|
+
* the later one.
|
|
57
|
+
*
|
|
58
|
+
* ## A page has no net movement, so there are two orders and not one
|
|
59
|
+
*
|
|
60
|
+
* The obvious shape is one signed order: most readers lost at the top, most
|
|
61
|
+
* kept at the bottom. It would imply a thing that does not exist. **There is no
|
|
62
|
+
* page-level total of readers a change moved** — a reader who got past the
|
|
63
|
+
* second band and then the third is in both stops' figures, so adding them
|
|
64
|
+
* counts one reader twice, which is the trap written down for views
|
|
65
|
+
* ([0147](../../decisions/0147-a-rollup-is-added-to-what-is-stored-and-a-distinct-view-count-is-therefore-approximate.md))
|
|
66
|
+
* and for presses
|
|
67
|
+
* ([0167](../../decisions/0167-a-delegated-signal-names-the-regions-it-happened-inside.md))
|
|
68
|
+
* and refused again where it would look most like a headline. A page's harm and
|
|
69
|
+
* a page's help are two different stops, and a real change usually does both:
|
|
70
|
+
* the band it rewrote reads better and the one it pushed below the fold reads
|
|
71
|
+
* worse.
|
|
72
|
+
*
|
|
73
|
+
* So a page is ordered twice, by its own worst stop and by its own best one,
|
|
74
|
+
* and it stands in both orders when it earned both places. Nothing is added
|
|
75
|
+
* anywhere, and the two orders are the only artefact.
|
|
76
|
+
*
|
|
77
|
+
* ## A page the door cannot scale, and a page nothing moved
|
|
78
|
+
*
|
|
79
|
+
* The same refusal an order over one window makes, for the same reason: a page
|
|
80
|
+
* whose comparison is sound and whose door row is missing has no place in an
|
|
81
|
+
* order against pages that have one, and there is no safe direction to guess in.
|
|
82
|
+
* It is reported out of the orders with the standing saying why.
|
|
83
|
+
*
|
|
84
|
+
* **A page nothing moved is an answer and not a silence.** A comparison gates
|
|
85
|
+
* its own stops on whether the movement is worth at least one reader on the
|
|
86
|
+
* coarser side, which is what keeps a page three people read off the top of a
|
|
87
|
+
* screen; a page with no stop past that gate is `unmoved`, and the two windows'
|
|
88
|
+
* view floors travel with the row so a quiet window can be told from a steady
|
|
89
|
+
* page.
|
|
90
|
+
*
|
|
91
|
+
* Pure, linear in the comparisons times the rows, and reaches no store, clock
|
|
92
|
+
* or DOM.
|
|
93
|
+
*/
|
|
94
|
+
/** A reason a page is in neither order. */
|
|
95
|
+
export type DeploymentChangeSilence =
|
|
96
|
+
/**
|
|
97
|
+
* One of the two windows reported no view of its revision, so there was
|
|
98
|
+
* nothing to compare.
|
|
99
|
+
*
|
|
100
|
+
* The comparison's own reason, carried through on the row rather than
|
|
101
|
+
* restated: a surface that wants to say which window was quiet reads the
|
|
102
|
+
* floors beside it.
|
|
103
|
+
*
|
|
104
|
+
* **It covers two comparison silences and the sentence above is true of only
|
|
105
|
+
* one of them.** `nothing-measured` is this; `different-audiences` is a pair
|
|
106
|
+
* of windows that both reported plenty and are of two populations (0301),
|
|
107
|
+
* and it arrives here with a door row and two view floors that all
|
|
108
|
+
* contradict the sentence. The cause is on {@link MovedPage.silence} and a
|
|
109
|
+
* surface printing one sentence should print that one. Giving the second a
|
|
110
|
+
* standing of its own is proposed, in a record of its own that is awaiting
|
|
111
|
+
* review, and is deliberately not taken here.
|
|
112
|
+
*/
|
|
113
|
+
"unread"
|
|
114
|
+
/**
|
|
115
|
+
* The two readings are of two different pages, so the comparison is not a
|
|
116
|
+
* movement of anything.
|
|
117
|
+
*
|
|
118
|
+
* A caller's pairing fault and never a state of a deployment's readers. It is
|
|
119
|
+
* in the standings rather than dropped, because an order that silently shed a
|
|
120
|
+
* mispaired comparison would answer *your deployment has thirty-nine pages*.
|
|
121
|
+
*/
|
|
122
|
+
| "mispaired"
|
|
123
|
+
/**
|
|
124
|
+
* There is no page-view row at the door for the later revision, so this
|
|
125
|
+
* page's movement cannot be put on the same scale as another's.
|
|
126
|
+
*
|
|
127
|
+
* Not a page that was not measured. Its comparison is as good as any other's
|
|
128
|
+
* and every share in it stands; what is missing is the one number that makes
|
|
129
|
+
* two pages' movements the same kind of figure.
|
|
130
|
+
*/
|
|
131
|
+
| "unscaled"
|
|
132
|
+
/**
|
|
133
|
+
* The later window's door row is there and nothing in it says a page view
|
|
134
|
+
* ever began.
|
|
135
|
+
*
|
|
136
|
+
* Either nobody read the new revision, or the senders are not marking their
|
|
137
|
+
* openings — and the page-view reading publishes both numbers, so the
|
|
138
|
+
* diagnosis is a subtraction a surface can make.
|
|
139
|
+
*/
|
|
140
|
+
| "unopened"
|
|
141
|
+
/**
|
|
142
|
+
* A stop reports more readers in the later window than the door has ever seen
|
|
143
|
+
* appear, which no rollup produces.
|
|
144
|
+
*
|
|
145
|
+
* A reading assembled by hand or by a sender that is not one. The share
|
|
146
|
+
* movements are published and the scaled figures are withheld, because they
|
|
147
|
+
* are the ones the disagreement makes absurd.
|
|
148
|
+
*/
|
|
149
|
+
| "inconsistent"
|
|
150
|
+
/**
|
|
151
|
+
* One of the two windows holds two forms of the page and named neither, so
|
|
152
|
+
* that side was read as neither population.
|
|
153
|
+
*
|
|
154
|
+
* The comparison's own `audiences-mixed` (0301), named here rather than
|
|
155
|
+
* folded into `unread` for the reason that record exists: a refused reading
|
|
156
|
+
* publishes a view floor of nought, so *one of the two windows reported no
|
|
157
|
+
* view of its revision* was printed about a window holding every reader of
|
|
158
|
+
* both forms. A caller reads the cause off {@link MovedPage.silence} either
|
|
159
|
+
* way; the standing is what a screen groups by, and grouping a fault in the
|
|
160
|
+
* asking under a fact about readers is what sends a deployment to look for a
|
|
161
|
+
* broken sender.
|
|
162
|
+
*
|
|
163
|
+
* It is the one standing here a caller fixes by asking again:
|
|
164
|
+
* split both windows by audience (`byAudience`) and compare each form.
|
|
165
|
+
*/
|
|
166
|
+
| "unsplit";
|
|
167
|
+
export declare const DEPLOYMENT_CHANGE_SILENCES: readonly DeploymentChangeSilence[];
|
|
168
|
+
/**
|
|
169
|
+
* One line per silence, for a surface saying why a page is in neither order.
|
|
170
|
+
*
|
|
171
|
+
* **The sentences are the orders' own, moved here rather than written again.**
|
|
172
|
+
* Every member is also a {@link MovementStanding} and
|
|
173
|
+
* {@link describeMovementStanding} has had a line for each since the orders
|
|
174
|
+
* were built; it defers to this for the six they share, and the text is
|
|
175
|
+
* unchanged from what it returned.
|
|
176
|
+
*
|
|
177
|
+
* Each one names **which of the two windows** it is about, because every member
|
|
178
|
+
* here is a statement about a side rather than about the comparison: a sentence
|
|
179
|
+
* that said *no view of its revision* without saying which window would send a
|
|
180
|
+
* deployment to look at the wrong week.
|
|
181
|
+
*
|
|
182
|
+
* **One sentence of the six is not the standing's own text and says so here.**
|
|
183
|
+
* `inconsistent` read *it reports more readers at a stop than have ever
|
|
184
|
+
* appeared*, which is the only member whose wording left the window out while
|
|
185
|
+
* its own doc comment above says *in the later window*. Two words are added and
|
|
186
|
+
* nothing else of it moves; the standing prints the corrected line because it
|
|
187
|
+
* defers to this.
|
|
188
|
+
*/
|
|
189
|
+
export declare const describeDeploymentChangeSilence: (silence: DeploymentChangeSilence) => string;
|
|
190
|
+
/** Where one page stands in the two orders, or why it is in neither. */
|
|
191
|
+
export type MovementStanding =
|
|
192
|
+
/** In at least one of the orders, with a movement and a scale for it. */
|
|
193
|
+
"ranked"
|
|
194
|
+
/**
|
|
195
|
+
* Compared, scalable, and no stop moved by as much as one reader.
|
|
196
|
+
*
|
|
197
|
+
* The answer a change that landed on nothing gives, and the answer a window
|
|
198
|
+
* too thin to show a movement gives as well. The two view floors on the row
|
|
199
|
+
* are what tell them apart.
|
|
200
|
+
*/
|
|
201
|
+
| "unmoved" | DeploymentChangeSilence;
|
|
202
|
+
export declare const MOVEMENT_STANDINGS: readonly MovementStanding[];
|
|
203
|
+
/** One line per standing, for a surface naming why a page is where it is. */
|
|
204
|
+
export declare const describeMovementStanding: (standing: MovementStanding) => string;
|
|
205
|
+
/** One page's sharpest movement in one direction. */
|
|
206
|
+
export type PageMovement = {
|
|
207
|
+
/**
|
|
208
|
+
* The pair of siblings it happened at, carried through from the comparison
|
|
209
|
+
* unchanged.
|
|
210
|
+
*
|
|
211
|
+
* Both of its sides are there, so a surface naming the band can also print
|
|
212
|
+
* what each window measured without a second lookup.
|
|
213
|
+
*/
|
|
214
|
+
readonly at: ComparedStop;
|
|
215
|
+
/**
|
|
216
|
+
* How much of the page's readers moved, as a share, with the direction in the
|
|
217
|
+
* name rather than in the sign.
|
|
218
|
+
*
|
|
219
|
+
* The magnitude of the comparison's own share movement (0224), which is sound
|
|
220
|
+
* on its own: each side is a fall off its own rows, so each window's straddle
|
|
221
|
+
* divided out before the two met. Published even where the scaled figure is
|
|
222
|
+
* withheld.
|
|
223
|
+
*/
|
|
224
|
+
readonly share: number;
|
|
225
|
+
/**
|
|
226
|
+
* The same movement as readers, at the later window's door scale, or `null`
|
|
227
|
+
* where this page has no scale.
|
|
228
|
+
*
|
|
229
|
+
* The key the orders are on. A magnitude and not a count of people: it is a
|
|
230
|
+
* share times a count of views, restated at the scale the door counts in, and
|
|
231
|
+
* it is deliberately not rounded. **Never added across pages or across the
|
|
232
|
+
* two orders** — one reader is in every stop they walked past.
|
|
233
|
+
*/
|
|
234
|
+
readonly readers: number | null;
|
|
235
|
+
};
|
|
236
|
+
/** One page of a deployment, as a change left it. */
|
|
237
|
+
export type MovedPage = {
|
|
238
|
+
/** The page, which is the earlier reading's tree. */
|
|
239
|
+
readonly treeId: TreeId;
|
|
240
|
+
/** The two revisions compared, which may be the same one read in two windows. */
|
|
241
|
+
readonly revisions: {
|
|
242
|
+
readonly was: number;
|
|
243
|
+
readonly now: number;
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* The audience the later window was collected under, or `null` where the
|
|
247
|
+
* reading named none.
|
|
248
|
+
*
|
|
249
|
+
* Taken from the later side for the reason only the later window's rows are
|
|
250
|
+
* asked for: the figure being scaled is that window's own. Two forms of one
|
|
251
|
+
* page are two rows here, as they are in every other order this subsystem
|
|
252
|
+
* publishes (0290), and nothing is summed across them — a reader of one form
|
|
253
|
+
* is not a reader of the other.
|
|
254
|
+
*/
|
|
255
|
+
readonly audienceId: AudienceId | null;
|
|
256
|
+
readonly standing: MovementStanding;
|
|
257
|
+
/**
|
|
258
|
+
* Each window's view floor, carried through from its own reading unchanged.
|
|
259
|
+
*
|
|
260
|
+
* Floors and not counts, which is why neither is the denominator of anything
|
|
261
|
+
* here. They are what tells a steady page from a window too quiet to have
|
|
262
|
+
* shown a movement.
|
|
263
|
+
*/
|
|
264
|
+
readonly views: {
|
|
265
|
+
readonly was: number;
|
|
266
|
+
readonly now: number;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Page views counted at the later door, exact, or `null` where that revision
|
|
270
|
+
* has no row.
|
|
271
|
+
*
|
|
272
|
+
* The weight behind the row: *of the eleven hundred readers this revision
|
|
273
|
+
* had*, where the figures beside it are stated at this number's scale.
|
|
274
|
+
*/
|
|
275
|
+
readonly opened: number | null;
|
|
276
|
+
/** The later window's own straddle rate, which is what scales the movements. */
|
|
277
|
+
readonly inflation: number | null;
|
|
278
|
+
/**
|
|
279
|
+
* The comparison's own reason for saying nothing, where it gave one.
|
|
280
|
+
*
|
|
281
|
+
* Carried rather than translated, because a standing says what this order
|
|
282
|
+
* does with the page and the comparison's silence says what the comparison
|
|
283
|
+
* found. A surface printing one sentence prints this one.
|
|
284
|
+
*/
|
|
285
|
+
readonly silence: ChangeSilence | null;
|
|
286
|
+
/** The stop the change costs most readers at, where it worsened one. */
|
|
287
|
+
readonly worsened: PageMovement | null;
|
|
288
|
+
/** The stop it keeps most readers at, where it improved one. */
|
|
289
|
+
readonly improved: PageMovement | null;
|
|
290
|
+
};
|
|
291
|
+
/** A deployment's pages, as a change left them. */
|
|
292
|
+
export type DeploymentChange = {
|
|
293
|
+
/**
|
|
294
|
+
* Every page the change cost readers, worst first.
|
|
295
|
+
*
|
|
296
|
+
* Most readers lost at the door's scale, then the larger share, then by tree
|
|
297
|
+
* id and newest later revision first — so two pages the change cost the same
|
|
298
|
+
* do not reorder on a refresh.
|
|
299
|
+
*/
|
|
300
|
+
readonly harmed: readonly MovedPage[];
|
|
301
|
+
/** Every page it kept readers on, best first, by the same rule. */
|
|
302
|
+
readonly helped: readonly MovedPage[];
|
|
303
|
+
/**
|
|
304
|
+
* Every page in neither order, by tree id and newest later revision first.
|
|
305
|
+
*
|
|
306
|
+
* A page in neither is not a page nothing is known about: `unmoved` is an
|
|
307
|
+
* answer, and the four silences each name something a surface can act on.
|
|
308
|
+
*/
|
|
309
|
+
readonly unranked: readonly MovedPage[];
|
|
310
|
+
/** The head of the harm order, which is the page to look at first. `null` where nothing worsened. */
|
|
311
|
+
readonly worst: MovedPage | null;
|
|
312
|
+
/** The head of the help order. `null` where nothing improved. */
|
|
313
|
+
readonly best: MovedPage | null;
|
|
314
|
+
/**
|
|
315
|
+
* How many pages stand in each state, counting a page once however many
|
|
316
|
+
* orders it is in.
|
|
317
|
+
*
|
|
318
|
+
* A page the change both helped and hurt is one `ranked` page and not two,
|
|
319
|
+
* which is the one place these two orders could have been made to look like
|
|
320
|
+
* more pages than a deployment has.
|
|
321
|
+
*/
|
|
322
|
+
readonly standings: Readonly<Record<MovementStanding, number>>;
|
|
323
|
+
/**
|
|
324
|
+
* Comparisons read, which is pages: one comparison stands per page.
|
|
325
|
+
*
|
|
326
|
+
* Not the comparisons handed in. The duplicated and the ambiguous are not in
|
|
327
|
+
* it, and the two numbers beside it say how many of each there were.
|
|
328
|
+
*/
|
|
329
|
+
readonly compared: number;
|
|
330
|
+
/**
|
|
331
|
+
* Page views counted at the later door across the pages read, added once per
|
|
332
|
+
* revision.
|
|
333
|
+
*
|
|
334
|
+
* Exact and addable, for the reason no other figure here is: a page view
|
|
335
|
+
* began on one revision of one tree and was counted once. It is a weight
|
|
336
|
+
* rather than a deployment total — this sees the pages its caller compared,
|
|
337
|
+
* not the deployment's.
|
|
338
|
+
*
|
|
339
|
+
* Once per revision and not once per row, because two comparisons can name
|
|
340
|
+
* one later revision while being two rows: a mispaired comparison is filed
|
|
341
|
+
* under the earlier reading's page and scaled at the later one's door, so a
|
|
342
|
+
* caller that handed in both would otherwise have that revision's openings
|
|
343
|
+
* counted twice.
|
|
344
|
+
*/
|
|
345
|
+
readonly arrivals: number;
|
|
346
|
+
/**
|
|
347
|
+
* Comparisons of a page beyond the first that compared the same two
|
|
348
|
+
* revisions, which were dropped.
|
|
349
|
+
*
|
|
350
|
+
* A caller that concatenated two reads holds one page's movement twice, and a
|
|
351
|
+
* page twice in an order is the one way an order can lie about how much there
|
|
352
|
+
* is to fix. The first stands and the rest are counted here.
|
|
353
|
+
*/
|
|
354
|
+
readonly duplicated: number;
|
|
355
|
+
/**
|
|
356
|
+
* Door rows for the later revision beyond the first, which were ignored.
|
|
357
|
+
*
|
|
358
|
+
* A store keeps one row per revision, so this is a caller's two reads again —
|
|
359
|
+
* and adding them would double a page's arrivals and halve every movement
|
|
360
|
+
* scaled by them.
|
|
361
|
+
*/
|
|
362
|
+
readonly duplicatedRows: number;
|
|
363
|
+
/**
|
|
364
|
+
* Pages one of whose **forms** was handed in with two different comparisons,
|
|
365
|
+
* of which neither was read.
|
|
366
|
+
*
|
|
367
|
+
* A tree live at two revisions is two live versions of one page, and both
|
|
368
|
+
* belong in an order over one window; a comparison pairs by form, so such a
|
|
369
|
+
* form has two movements and no single one that is its own. Picking either
|
|
370
|
+
* would publish a number nobody could account for, so the page is named here
|
|
371
|
+
* and that form is in no order, in no standing and in no total.
|
|
372
|
+
*
|
|
373
|
+
* **Two forms of one page are not this** (0290). A deployment serving two
|
|
374
|
+
* audiences hands in one comparison per form, which is two movements that
|
|
375
|
+
* are each somebody's; both are read and both stand. Before the audience was
|
|
376
|
+
* part of the pairing, that deployment's page landed here and lost both.
|
|
377
|
+
*/
|
|
378
|
+
readonly ambiguous: readonly TreeId[];
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* What a change did across a deployment's pages, as two orders.
|
|
382
|
+
*
|
|
383
|
+
* Takes the comparisons rather than the counters, for the reason every derived
|
|
384
|
+
* reading in this subsystem does: the movements and the gates are what this is
|
|
385
|
+
* made of, and deriving them twice is how two screens come to disagree. A caller
|
|
386
|
+
* with two windows of counters reads each page's parts, then its progress, then
|
|
387
|
+
* its comparison, then this.
|
|
388
|
+
*
|
|
389
|
+
* The rows are the **later** window's page-view rows — the whole window a
|
|
390
|
+
* deployment holds, not one page's — because the figure being scaled is the
|
|
391
|
+
* later window's own. Each page's row is picked out by the published rule, so no
|
|
392
|
+
* caller writes the matching itself.
|
|
393
|
+
*/
|
|
394
|
+
export declare const deploymentChangeOf: (changes: readonly ReadingChange[], rows: readonly StoredPageViews[]) => DeploymentChange;
|
|
395
|
+
//# sourceMappingURL=deployment-change.d.ts.map
|