@orangecharts/wrun-chart-host 0.11.0 → 0.14.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 +1 -0
- package/dist/constants/feature-flags.constants.d.ts +3 -4
- package/dist/constants/feature-flags.constants.js +34 -52
- package/dist/constants/feature-limits.constants.d.ts +1 -1
- package/dist/constants/feature-limits.constants.js +5 -4
- package/dist/constants/interval.constants.d.ts +7 -0
- package/dist/constants/interval.constants.js +7 -0
- package/dist/constants/scriptEditor/cme-official-scripts.constants.d.ts +20 -149
- package/dist/constants/scriptEditor/cme-official-scripts.constants.js +20 -309
- package/dist/constants/stocks-compliance.constants.d.ts +15 -0
- package/dist/constants/stocks-compliance.constants.js +15 -0
- package/dist/host-env.d.ts +55 -3
- package/dist/host-env.js +6 -0
- package/dist/host-ports.types.d.ts +36 -3
- package/dist/index.d.ts +18 -0
- package/dist/index.js +19 -0
- package/dist/indicators/controls/tpo-session.util.d.ts +78 -15
- package/dist/indicators/controls/tpo-session.util.js +320 -242
- package/dist/instances/script-engine-worker-ohlcv-transfer.d.ts +6 -0
- package/dist/instances/script-engine-worker-ohlcv-transfer.js +16 -0
- package/dist/interfaces/cme-realtime.interface.d.ts +8 -0
- package/dist/interfaces/cme-realtime.interface.js +2 -1
- package/dist/interfaces/feed.interface.d.ts +15 -1
- package/dist/interfaces/replay.interface.d.ts +5 -0
- package/dist/interfaces/stocks-realtime.interface.d.ts +4 -3
- package/dist/interfaces/stocks-realtime.interface.js +5 -4
- package/dist/interfaces/wrun-runtime.interface.d.ts +97 -19
- package/dist/kscript-data/controls/live-ohlcv-merge.util.d.ts +17 -0
- package/dist/kscript-data/controls/live-ohlcv-merge.util.js +22 -0
- package/dist/kscript-data/controls/live-trades-merge.util.d.ts +46 -40
- package/dist/kscript-data/controls/live-trades-merge.util.js +80 -107
- package/dist/market-data/billing.interface.d.ts +9 -1
- package/dist/market-data/venue.d.ts +1 -1
- package/dist/market-data/venues/index.d.ts +4 -4
- package/dist/market-data/venues/stocks.contract.copy.json +4 -4
- package/dist/market-data/venues/stocks.d.ts +4 -4
- package/dist/market-data/venues/stocks.js +15 -13
- package/dist/settings-templates/frvp-fields.d.ts +12 -1
- package/dist/settings-templates/frvp-fields.js +15 -4
- package/dist/settings-templates/index.js +12 -5
- package/dist/settings-templates/indicator-fields.js +28 -2
- package/dist/settings-templates/tool-rules.d.ts +17 -8
- package/dist/settings-templates/tool-rules.js +15 -8
- package/dist/settings-templates/tool-tables.generated.js +4 -2
- package/dist/utility/auth/server-clock.util.d.ts +3 -1
- package/dist/utility/auth/server-clock.util.js +3 -1
- package/dist/utility/chart/book-live-bucket.util.js +2 -2
- package/dist/utility/chart/cache-alignment.util.d.ts +15 -7
- package/dist/utility/chart/cache-alignment.util.js +14 -7
- package/dist/utility/chart/chart-data-fetch-generation.util.d.ts +2 -0
- package/dist/utility/chart/chart-data-fetch-generation.util.js +16 -0
- package/dist/utility/chart/cme-session-bucket.util.d.ts +18 -75
- package/dist/utility/chart/cme-session-bucket.util.js +25 -332
- package/dist/utility/chart/continuous-contracts.util.js +6 -5
- package/dist/utility/chart/display-offset.leaf.d.ts +24 -0
- package/dist/utility/chart/display-offset.leaf.js +41 -0
- package/dist/utility/chart/effective-chart-session.util.d.ts +2 -1
- package/dist/utility/chart/effective-chart-session.util.js +13 -5
- package/dist/utility/chart/feed-interval.util.d.ts +6 -20
- package/dist/utility/chart/feed-interval.util.js +13 -22
- package/dist/utility/chart/fetch-dedupe-policy.util.d.ts +27 -7
- package/dist/utility/chart/fetch-dedupe-policy.util.js +86 -11
- package/dist/utility/chart/host-bar-placement.util.d.ts +7 -4
- package/dist/utility/chart/host-bar-placement.util.js +8 -2
- package/dist/utility/chart/indicator-inflight-registry.util.d.ts +32 -0
- package/dist/utility/chart/indicator-inflight-registry.util.js +52 -0
- package/dist/utility/chart/indicator-run-interval.util.d.ts +10 -4
- package/dist/utility/chart/indicator-run-interval.util.js +21 -12
- package/dist/utility/chart/interval-registry.util.d.ts +1 -1
- package/dist/utility/chart/interval-registry.util.js +1 -1
- package/dist/utility/chart/kscript-legend-entries.util.d.ts +12 -0
- package/dist/utility/chart/kscript-legend-entries.util.js +16 -0
- package/dist/utility/chart/kscript-run-interval-projection.util.d.ts +1 -1
- package/dist/utility/chart/kscript-run-interval-projection.util.js +4 -2
- package/dist/utility/chart/kscript-venue-policy.util.d.ts +53 -62
- package/dist/utility/chart/kscript-venue-policy.util.js +85 -94
- package/dist/utility/chart/live-bucket.util.d.ts +39 -17
- package/dist/utility/chart/live-bucket.util.js +103 -57
- package/dist/utility/chart/local-kscript-source-revalidation.util.d.ts +58 -20
- package/dist/utility/chart/local-kscript-source-revalidation.util.js +98 -23
- package/dist/utility/chart/local-kscript-warmup-depth.util.d.ts +35 -11
- package/dist/utility/chart/local-kscript-warmup-depth.util.js +24 -3
- package/dist/utility/chart/market-session-schedule.util.d.ts +8 -0
- package/dist/utility/chart/market-session-schedule.util.js +39 -1
- package/dist/utility/chart/market-session.util.d.ts +136 -0
- package/dist/utility/chart/market-session.util.js +341 -0
- package/dist/utility/chart/market-sessions.util.d.ts +83 -0
- package/dist/utility/chart/market-sessions.util.js +220 -0
- package/dist/utility/chart/om-panel.util.d.ts +5 -3
- package/dist/utility/chart/om-panel.util.js +42 -7
- package/dist/utility/chart/om-target.util.d.ts +14 -1
- package/dist/utility/chart/om-target.util.js +22 -5
- package/dist/utility/chart/opra-read-access.leaf.d.ts +16 -1
- package/dist/utility/chart/opra-read-access.leaf.js +22 -0
- package/dist/utility/chart/profile-row-height.util.d.ts +49 -16
- package/dist/utility/chart/profile-row-height.util.js +74 -37
- package/dist/utility/chart/rth-session.util.d.ts +55 -20
- package/dist/utility/chart/rth-session.util.js +94 -46
- package/dist/utility/chart/session-interval.util.d.ts +2 -1
- package/dist/utility/chart/session-interval.util.js +1 -3
- package/dist/utility/chart/session-lattice.util.d.ts +150 -0
- package/dist/utility/chart/session-lattice.util.js +488 -0
- package/dist/utility/chart/trading-day.util.d.ts +40 -2
- package/dist/utility/chart/trading-day.util.js +84 -7
- package/dist/utility/chart/us-equities-session.util.d.ts +32 -11
- package/dist/utility/chart/us-equities-session.util.js +44 -15
- package/dist/utility/chart/window-geometry.leaf.d.ts +28 -7
- package/dist/utility/chart/window-geometry.leaf.js +57 -8
- package/dist/utility/chart/wrun-bar-session-facts.util.d.ts +21 -14
- package/dist/utility/chart/wrun-bar-session-facts.util.js +32 -38
- package/dist/utility/chart/wrun-run-result.util.d.ts +29 -12
- package/dist/utility/chart/wrun-run-result.util.js +89 -25
- package/dist/utility/common/time.util.js +5 -4
- package/dist/utility/market-events/earnings-scope.util.d.ts +10 -5
- package/dist/utility/market-events/earnings-scope.util.js +17 -9
- package/dist/utility/market-events/market-events.util.d.ts +14 -7
- package/dist/utility/market-events/market-events.util.js +30 -17
- package/dist/utility/number-format.util.d.ts +14 -21
- package/dist/utility/number-format.util.js +38 -24
- package/dist/utility/options/option-venue-disclosure.util.d.ts +40 -6
- package/dist/utility/options/option-venue-disclosure.util.js +71 -11
- package/dist/utility/options/option-venue.util.d.ts +1 -1
- package/dist/utility/options/option-venue.util.js +1 -1
- package/dist/utility/pool-symbol.leaf.d.ts +7 -0
- package/dist/utility/pool-symbol.leaf.js +50 -5
- package/dist/utility/stocks/stock-display.util.d.ts +15 -0
- package/dist/utility/stocks/stock-display.util.js +37 -0
- package/dist/utility/symbol-selection/contract-expiry.util.js +5 -4
- package/dist/utility/v2/gate-plane.util.d.ts +6 -0
- package/dist/utility/v2/gate-plane.util.js +11 -1
- package/dist/utility/v2/gate-session-latch.util.d.ts +1 -1
- package/dist/utility/v2/gate-session-latch.util.js +3 -3
- package/dist/utility/v2/governed-tier.leaf.d.ts +17 -16
- package/dist/utility/v2/governed-tier.leaf.js +17 -16
- package/dist/utility/v2/stocks-governed.util.d.ts +5 -0
- package/dist/utility/v2/stocks-governed.util.js +14 -0
- package/dist/utility/v2/v2-enums.leaf.d.ts +13 -0
- package/dist/utility/v2/v2-enums.leaf.js +458 -0
- package/dist/utility/wrun/derived-roots.leaf.d.ts +21 -1
- package/dist/utility/wrun/derived-roots.leaf.js +27 -1
- package/dist/utility/wrun/derived-roots.util.d.ts +44 -32
- package/dist/utility/wrun/derived-roots.util.js +97 -56
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.d.ts +4 -3
- package/dist/utility/wrun/run-schedule/wrun-late-reads.util.js +4 -3
- package/dist/utility/wrun/sources/lanes/option_daily.d.ts +2 -1
- package/dist/utility/wrun/sources/lanes/option_daily.js +2 -1
- package/dist/utility/wrun/sources/lanes/options_flow.d.ts +3 -0
- package/dist/utility/wrun/sources/lanes/options_flow.js +23 -5
- package/dist/utility/wrun/sources/opra-option-lanes.util.d.ts +3 -4
- package/dist/utility/wrun/sources/row-lane-registry.js +9 -4
- package/dist/utility/wrun/sources/row-lanes/dark_pool.d.ts +19 -0
- package/dist/utility/wrun/sources/row-lanes/dark_pool.js +104 -0
- package/dist/utility/wrun/sources/row-lanes/index.js +2 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.d.ts +20 -0
- package/dist/utility/wrun/sources/wrun-lane-fetch-abort.util.js +103 -0
- package/dist/utility/wrun/sources/wrun-poll-lane.types.d.ts +19 -2
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.d.ts +15 -13
- package/dist/utility/wrun/sources/wrun-poll-lanes.util.js +49 -23
- package/dist/utility/wrun/sources/wrun-row-lane.types.d.ts +14 -9
- package/dist/utility/wrun/sources/wrun-row-lanes.util.d.ts +75 -27
- package/dist/utility/wrun/sources/wrun-row-lanes.util.js +139 -82
- package/dist/utility/wrun/wrun-app-layer.leaf.d.ts +78 -0
- package/dist/utility/wrun/wrun-app-layer.leaf.js +89 -0
- package/dist/utility/wrun/wrun-bar-count.util.d.ts +11 -7
- package/dist/utility/wrun/wrun-bar-count.util.js +12 -8
- package/dist/utility/wrun/wrun-batched-kinds.leaf.d.ts +13 -0
- package/dist/utility/wrun/wrun-batched-kinds.leaf.js +18 -0
- package/dist/utility/wrun/wrun-batched-marks.util.d.ts +41 -22
- package/dist/utility/wrun/wrun-batched-marks.util.js +255 -59
- package/dist/utility/wrun/wrun-batched-readout.util.d.ts +26 -19
- package/dist/utility/wrun/wrun-batched-readout.util.js +81 -27
- package/dist/utility/wrun/wrun-book-bands.leaf.d.ts +8 -0
- package/dist/utility/wrun/wrun-book-bands.leaf.js +7 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.d.ts +19 -0
- package/dist/utility/wrun/wrun-candle-equal.leaf.js +40 -0
- package/dist/utility/wrun/wrun-canvas-readout.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-canvases.util.js +7 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.d.ts +6 -3
- package/dist/utility/wrun/wrun-chart-context-names.util.js +8 -4
- package/dist/utility/wrun/wrun-chart-market-facts.util.d.ts +47 -29
- package/dist/utility/wrun/wrun-chart-market-facts.util.js +201 -201
- package/dist/utility/wrun/wrun-child-overlay-id.util.js +2 -1
- package/dist/utility/wrun/wrun-cme-legs-note.util.d.ts +15 -0
- package/dist/utility/wrun/wrun-cme-legs-note.util.js +49 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.d.ts +38 -0
- package/dist/utility/wrun/wrun-cme-root-specs.util.js +81 -0
- package/dist/utility/wrun/wrun-coin-lane-live.util.js +3 -0
- package/dist/utility/wrun/wrun-color-settings.util.d.ts +6 -1
- package/dist/utility/wrun/wrun-color-settings.util.js +32 -7
- package/dist/utility/wrun/wrun-dark-pool.util.d.ts +50 -0
- package/dist/utility/wrun/wrun-dark-pool.util.js +127 -0
- package/dist/utility/wrun/wrun-declared-warmup.util.d.ts +67 -12
- package/dist/utility/wrun/wrun-declared-warmup.util.js +165 -13
- package/dist/utility/wrun/wrun-draft-legend-note.util.d.ts +18 -8
- package/dist/utility/wrun/wrun-draft-legend-note.util.js +57 -11
- package/dist/utility/wrun/wrun-draft-overlay.util.d.ts +14 -10
- package/dist/utility/wrun/wrun-draft-overlay.util.js +26 -14
- package/dist/utility/wrun/wrun-earnings-facts.util.js +3 -2
- package/dist/utility/wrun/wrun-etf-funds.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-etf-funds.util.js +4 -0
- package/dist/utility/wrun/wrun-held-lanes.util.js +8 -2
- package/dist/utility/wrun/wrun-history-as-of.util.d.ts +77 -0
- package/dist/utility/wrun/wrun-history-as-of.util.js +108 -0
- package/dist/utility/wrun/wrun-host.service.d.ts +64 -14
- package/dist/utility/wrun/wrun-host.service.js +137 -27
- package/dist/utility/wrun/wrun-hosted-wire-caps.d.ts +3 -3
- package/dist/utility/wrun/wrun-hosted-wire-caps.js +12 -2
- package/dist/utility/wrun/wrun-inert-legend.util.d.ts +13 -0
- package/dist/utility/wrun/wrun-inert-legend.util.js +31 -3
- package/dist/utility/wrun/wrun-input-requirements.leaf.d.ts +7 -5
- package/dist/utility/wrun/wrun-input-requirements.leaf.js +16 -6
- package/dist/utility/wrun/wrun-install-pacer.util.d.ts +26 -0
- package/dist/utility/wrun/wrun-install-pacer.util.js +145 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.d.ts +22 -0
- package/dist/utility/wrun/wrun-kit-refusal-stages.types.js +1 -0
- package/dist/utility/wrun/wrun-lane-refusal.leaf.d.ts +12 -5
- package/dist/utility/wrun/wrun-lane-refusal.leaf.js +23 -5
- package/dist/utility/wrun/wrun-lane-warmup.util.js +22 -4
- package/dist/utility/wrun/wrun-leg-close.util.d.ts +6 -5
- package/dist/utility/wrun/wrun-leg-close.util.js +11 -9
- package/dist/utility/wrun/wrun-leg-fetch.util.d.ts +3 -1
- package/dist/utility/wrun/wrun-leg-fetch.util.js +9 -2
- package/dist/utility/wrun/wrun-levels-child.util.d.ts +2 -0
- package/dist/utility/wrun/wrun-levels-child.util.js +6 -0
- package/dist/utility/wrun/wrun-lifecycle.contract.d.ts +4 -0
- package/dist/utility/wrun/wrun-live-intake.util.d.ts +15 -6
- package/dist/utility/wrun/wrun-live-intake.util.js +167 -47
- package/dist/utility/wrun/wrun-live-tick.util.d.ts +52 -8
- package/dist/utility/wrun/wrun-live-tick.util.js +648 -97
- package/dist/utility/wrun/wrun-market-facts.util.d.ts +16 -2
- package/dist/utility/wrun/wrun-market-facts.util.js +32 -3
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.d.ts +27 -27
- package/dist/utility/wrun/wrun-market-size-defaults.leaf.js +28 -16
- package/dist/utility/wrun/wrun-market-size-defaults.util.js +34 -5
- package/dist/utility/wrun/wrun-oi-lane.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-oi-lane.util.js +16 -10
- package/dist/utility/wrun/wrun-option-strike-flow.util.js +1 -1
- package/dist/utility/wrun/wrun-option-views.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-option-views.util.js +5 -2
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.d.ts +5 -0
- package/dist/utility/wrun/wrun-options-flow-underlying.leaf.js +16 -0
- package/dist/utility/wrun/wrun-options-stop.util.d.ts +3 -2
- package/dist/utility/wrun/wrun-options-stop.util.js +6 -4
- package/dist/utility/wrun/wrun-overlay-drivers.util.d.ts +75 -11
- package/dist/utility/wrun/wrun-overlay-drivers.util.js +176 -43
- package/dist/utility/wrun/wrun-overlay-lifecycle.util.js +20 -10
- package/dist/utility/wrun/wrun-overlay-park.util.d.ts +84 -0
- package/dist/utility/wrun/wrun-overlay-park.util.js +135 -0
- package/dist/utility/wrun/wrun-overlay-recovery.util.d.ts +37 -4
- package/dist/utility/wrun/wrun-overlay-recovery.util.js +26 -14
- package/dist/utility/wrun/wrun-overlay-run.util.d.ts +239 -24
- package/dist/utility/wrun/wrun-overlay-run.util.js +2204 -405
- package/dist/utility/wrun/wrun-pack.util.d.ts +8 -5
- package/dist/utility/wrun/wrun-panel-mount.util.d.ts +2 -1
- package/dist/utility/wrun/wrun-panel-mount.util.js +20 -14
- package/dist/utility/wrun/wrun-panel-style.util.d.ts +4 -2
- package/dist/utility/wrun/wrun-panel-style.util.js +3 -2
- package/dist/utility/wrun/wrun-pin-spelling.util.d.ts +7 -0
- package/dist/utility/wrun/wrun-pin-spelling.util.js +18 -4
- package/dist/utility/wrun/wrun-pin-venues.util.d.ts +26 -17
- package/dist/utility/wrun/wrun-pin-venues.util.js +43 -36
- package/dist/utility/wrun/wrun-pinned-lanes.util.d.ts +58 -0
- package/dist/utility/wrun/wrun-pinned-lanes.util.js +72 -0
- package/dist/utility/wrun/wrun-prefix-cohort.util.js +2 -1
- package/dist/utility/wrun/wrun-prefix-lanes.util.d.ts +22 -9
- package/dist/utility/wrun/wrun-prefix-lanes.util.js +145 -26
- package/dist/utility/wrun/wrun-prefix-proof.util.d.ts +29 -0
- package/dist/utility/wrun/wrun-prefix-proof.util.js +23 -5
- package/dist/utility/wrun/wrun-refusal-surface.util.d.ts +9 -1
- package/dist/utility/wrun/wrun-refusal-surface.util.js +15 -1
- package/dist/utility/wrun/wrun-refusal.util.d.ts +19 -1
- package/dist/utility/wrun/wrun-refusal.util.js +103 -16
- package/dist/utility/wrun/wrun-registry-errors.util.d.ts +20 -6
- package/dist/utility/wrun/wrun-registry-errors.util.js +20 -6
- package/dist/utility/wrun/wrun-replay-rows.util.js +6 -10
- package/dist/utility/wrun/wrun-run-health.util.d.ts +89 -2
- package/dist/utility/wrun/wrun-run-health.util.js +204 -1
- package/dist/utility/wrun/wrun-run-interval-session.util.d.ts +2 -2
- package/dist/utility/wrun/wrun-run-interval-session.util.js +2 -2
- package/dist/utility/wrun/wrun-run-interval.util.d.ts +9 -8
- package/dist/utility/wrun/wrun-run-interval.util.js +13 -11
- package/dist/utility/wrun/wrun-sandbox-row-source.js +5 -2
- package/dist/utility/wrun/wrun-script-inputs.util.d.ts +13 -3
- package/dist/utility/wrun/wrun-script-inputs.util.js +51 -13
- package/dist/utility/wrun/wrun-session-composition.util.d.ts +81 -0
- package/dist/utility/wrun/wrun-session-composition.util.js +169 -0
- package/dist/utility/wrun/wrun-setting-words.util.d.ts +10 -7
- package/dist/utility/wrun/wrun-setting-words.util.js +25 -7
- package/dist/utility/wrun/wrun-source-rows.util.d.ts +94 -28
- package/dist/utility/wrun/wrun-source-rows.util.js +738 -93
- package/dist/utility/wrun/wrun-stream-clock.util.d.ts +45 -0
- package/dist/utility/wrun/wrun-stream-clock.util.js +108 -0
- package/dist/utility/wrun/wrun-tape-coins.util.d.ts +116 -0
- package/dist/utility/wrun/wrun-tape-coins.util.js +110 -0
- package/dist/utility/wrun/wrun-tape-source.util.d.ts +62 -32
- package/dist/utility/wrun/wrun-tape-source.util.js +72 -34
- package/dist/utility/wrun/wrun-tier-grid.util.d.ts +13 -5
- package/dist/utility/wrun/wrun-tier-grid.util.js +23 -13
- package/dist/utility/wrun/wrun-tpo-rows.util.js +2 -1
- package/dist/utility/wrun/wrun-trades-lane.util.d.ts +73 -0
- package/dist/utility/wrun/wrun-trades-lane.util.js +82 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.d.ts +5 -0
- package/dist/utility/wrun/wrun-twin-compute-inputs.util.js +9 -2
- package/dist/utility/wrun/wrun-visibility-table.d.ts +13 -0
- package/dist/utility/wrun/wrun-visibility-table.js +9 -0
- package/dist/utility/wrun/wrun-volume-profile.util.js +44 -32
- package/dist/utils/replay/replay-buffer-math.d.ts +16 -6
- package/dist/utils/replay/replay-buffer-math.js +60 -30
- package/dist/workers/constants/socket-slots.d.ts +11 -7
- package/dist/workers/constants/socket-slots.js +6 -5
- package/package.json +11 -11
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The warm workspace switch's park (SWITCH-COST U1): an overlay's live session kept through its chart's teardown, so
|
|
3
|
+
* the switch back takes it back (wrun-overlay-run.util adoptWrunParkedLiveSession) instead of running the package
|
|
4
|
+
* over the whole history again.
|
|
5
|
+
*
|
|
6
|
+
* A park releases the overlay from its chart exactly as a teardown does (every live teardown hook hears 'teardown': the
|
|
7
|
+
* feed channels, the timers, the queues, the held row source, the chrome go; the driver and the refusal attempts go),
|
|
8
|
+
* except that the worker's live series stays open under its epoch and the live context leaves the registry for the
|
|
9
|
+
* handle (wrun-overlay-drivers.util releaseWrunOverlayLiveSessionForPark). The handle keeps the context (its lane
|
|
10
|
+
* buffers, carry seed, session seed and output rows), the picture the chart showed, the chart's bars the adoption
|
|
11
|
+
* judges the return against (its first, its newest closed and its newest) and the overlay's history as-of pins: no
|
|
12
|
+
* chart engine, no mounted meta, no DOM. It names the worker series by the epoch its live-start opened it under
|
|
13
|
+
* (`seriesEpoch`), which an adoption keeps while it moves the generation, so a session parked again after an adoption
|
|
14
|
+
* still names its series. It is settled exactly once: taken by the adoption, or ended
|
|
15
|
+
* (endWrunParkedLiveSession: that epoch's worker series only, never a later run's under the same id). The web side
|
|
16
|
+
* (src/utility/wrun/wrun-run-park.util.ts) decides when, bounds the parks and ends a handle on every other way out.
|
|
17
|
+
*
|
|
18
|
+
* Off the pre-candle path: the registry loader and the run pass import it, and both load with the first Indicator.
|
|
19
|
+
*/
|
|
20
|
+
import { type WrunRunResult } from '../chart/wrun-run-result.util.js';
|
|
21
|
+
import type { WrunRunWindow } from './wrun-lifecycle.contract.js';
|
|
22
|
+
import { type WrunHistoryAsOfSnapshot } from './wrun-history-as-of.util.js';
|
|
23
|
+
import { type WrunOverlayLiveContext } from './wrun-overlay-drivers.util.js';
|
|
24
|
+
/** What a parked session's chart showed at the park: the result as built (the live tick's last applied build, else
|
|
25
|
+
* the last full integrate's: wrun-overlay-run.util `wrunMountedRunResultOf`) and the window it computed over. */
|
|
26
|
+
export interface WrunParkedShown {
|
|
27
|
+
runResult: WrunRunResult;
|
|
28
|
+
window?: WrunRunWindow;
|
|
29
|
+
}
|
|
30
|
+
/** The bars the chart showed at the park, which the adoption judges the chart against: its first bar, its newest
|
|
31
|
+
* closed bar (the one before its newest; null on a chart of one bar) and its newest. */
|
|
32
|
+
export interface WrunParkedBars {
|
|
33
|
+
firstTs: number;
|
|
34
|
+
lastClosedTs: number | null;
|
|
35
|
+
lastTs: number;
|
|
36
|
+
}
|
|
37
|
+
/** A parked live session (see the header). Its pieces are cleared when it is taken or ended. */
|
|
38
|
+
export interface WrunParkedLiveSession {
|
|
39
|
+
readonly indicatorId: string;
|
|
40
|
+
/** The worker series' epoch: the live-start that opened it (`seriesEpoch`, else the generation). Never the
|
|
41
|
+
* generation an adoption moved the context to: the series keeps its epoch until a live-start replaces it. */
|
|
42
|
+
readonly epoch: number;
|
|
43
|
+
readonly parkedAt: number;
|
|
44
|
+
readonly bars: WrunParkedBars;
|
|
45
|
+
/** The rough bytes the park keeps (wrunParkedLiveSessionBytes), read once at the park. */
|
|
46
|
+
readonly bytes: number;
|
|
47
|
+
/** The CME authorisation at the park (cme-user-scripts-gate.util `captureCmeStudyAuth`) of a session that read CME:
|
|
48
|
+
* its adoption judges the gate and the epoch again (wrun-overlay-run.util `adoptWrunParkedLiveSession`). */
|
|
49
|
+
readonly cmeAuth?: {
|
|
50
|
+
epoch: number;
|
|
51
|
+
};
|
|
52
|
+
context: WrunOverlayLiveContext | undefined;
|
|
53
|
+
shown: WrunParkedShown | undefined;
|
|
54
|
+
historyAsOf: WrunHistoryAsOfSnapshot | undefined;
|
|
55
|
+
}
|
|
56
|
+
/** What an adoption takes from a parked session, once. */
|
|
57
|
+
export interface WrunParkedLiveSessionTake {
|
|
58
|
+
context: WrunOverlayLiveContext;
|
|
59
|
+
shown: WrunParkedShown;
|
|
60
|
+
historyAsOf: WrunHistoryAsOfSnapshot | undefined;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Park an overlay's live session at a warm workspace switch's teardown, while it still stands, with `shown`, the
|
|
64
|
+
* picture its chart shows. Undefined, with nothing released, for a session the drivers refuse to keep whole (see
|
|
65
|
+
* releaseWrunOverlayLiveSessionForPark). The caller settles the handle exactly once: adopted, or ended on every other
|
|
66
|
+
* way out. A session parked earlier under the same id is ended first: one parked series per id.
|
|
67
|
+
*/
|
|
68
|
+
export declare function parkWrunOverlayLiveSession(indicatorId: string, shown: WrunParkedShown, bars: WrunParkedBars, nowMs?: number, cmeAuth?: {
|
|
69
|
+
epoch: number;
|
|
70
|
+
}): WrunParkedLiveSession | undefined;
|
|
71
|
+
/** Take a parked session's pieces for its adoption, once: undefined once it was adopted or ended. An adoption that
|
|
72
|
+
* refuses after the take ends the series itself (endWrunParkedLiveSeries). */
|
|
73
|
+
export declare function takeWrunParkedLiveSession(parked: WrunParkedLiveSession): WrunParkedLiveSessionTake | undefined;
|
|
74
|
+
/** End a parked session that will not be adopted: its pieces go and the worker's series of its epoch ends.
|
|
75
|
+
* Idempotent: a settled handle ends nothing more. */
|
|
76
|
+
export declare function endWrunParkedLiveSession(parked: WrunParkedLiveSession): void;
|
|
77
|
+
/** End a parked session's worker series by its epoch: the end's last step, and a refused adoption's after its take. */
|
|
78
|
+
export declare function endWrunParkedLiveSeries(parked: Pick<WrunParkedLiveSession, 'indicatorId' | 'epoch'>): void;
|
|
79
|
+
/** The rough bytes one park keeps (see wrunParkedSessionBytesOf). */
|
|
80
|
+
export declare function wrunParkedLiveSessionBytes(parked: WrunParkedLiveSession): number;
|
|
81
|
+
/** Specs only: the sessions parked now. */
|
|
82
|
+
export declare function __wrunParkedLiveSessionsForTests(): WrunParkedLiveSession[];
|
|
83
|
+
/** Specs only: forget every parked session (nothing ends: a spec's worker is a fake). */
|
|
84
|
+
export declare function __resetWrunParkedLiveSessionsForTests(): void;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The warm workspace switch's park (SWITCH-COST U1): an overlay's live session kept through its chart's teardown, so
|
|
3
|
+
* the switch back takes it back (wrun-overlay-run.util adoptWrunParkedLiveSession) instead of running the package
|
|
4
|
+
* over the whole history again.
|
|
5
|
+
*
|
|
6
|
+
* A park releases the overlay from its chart exactly as a teardown does (every live teardown hook hears 'teardown': the
|
|
7
|
+
* feed channels, the timers, the queues, the held row source, the chrome go; the driver and the refusal attempts go),
|
|
8
|
+
* except that the worker's live series stays open under its epoch and the live context leaves the registry for the
|
|
9
|
+
* handle (wrun-overlay-drivers.util releaseWrunOverlayLiveSessionForPark). The handle keeps the context (its lane
|
|
10
|
+
* buffers, carry seed, session seed and output rows), the picture the chart showed, the chart's bars the adoption
|
|
11
|
+
* judges the return against (its first, its newest closed and its newest) and the overlay's history as-of pins: no
|
|
12
|
+
* chart engine, no mounted meta, no DOM. It names the worker series by the epoch its live-start opened it under
|
|
13
|
+
* (`seriesEpoch`), which an adoption keeps while it moves the generation, so a session parked again after an adoption
|
|
14
|
+
* still names its series. It is settled exactly once: taken by the adoption, or ended
|
|
15
|
+
* (endWrunParkedLiveSession: that epoch's worker series only, never a later run's under the same id). The web side
|
|
16
|
+
* (src/utility/wrun/wrun-run-park.util.ts) decides when, bounds the parks and ends a handle on every other way out.
|
|
17
|
+
*
|
|
18
|
+
* Off the pre-candle path: the registry loader and the run pass import it, and both load with the first Indicator.
|
|
19
|
+
*/
|
|
20
|
+
import { wrunRunResultRenderBytes } from '../chart/wrun-run-result.util.js';
|
|
21
|
+
import { WRUN_MEMORY_LIMIT_BYTES } from './wrun-memory-clamp.util.js';
|
|
22
|
+
import { restoreWrunHistoryAsOf, takeWrunHistoryAsOf } from './wrun-history-as-of.util.js';
|
|
23
|
+
import { endWrunOverlayLiveSeriesAt, getWrunOverlayLiveContext, onWrunOverlayMemoryCensus, releaseWrunOverlayLiveSessionForPark, wrunCensusLaneBytes, wrunCensusResultRows, wrunLiveContextCensusOf, } from './wrun-overlay-drivers.util.js';
|
|
24
|
+
/** The sessions parked now, one per overlay id: the census lists them, and a park under an id ends the earlier. */
|
|
25
|
+
const parkedSessions = new Map();
|
|
26
|
+
/**
|
|
27
|
+
* Park an overlay's live session at a warm workspace switch's teardown, while it still stands, with `shown`, the
|
|
28
|
+
* picture its chart shows. Undefined, with nothing released, for a session the drivers refuse to keep whole (see
|
|
29
|
+
* releaseWrunOverlayLiveSessionForPark). The caller settles the handle exactly once: adopted, or ended on every other
|
|
30
|
+
* way out. A session parked earlier under the same id is ended first: one parked series per id.
|
|
31
|
+
*/
|
|
32
|
+
export function parkWrunOverlayLiveSession(indicatorId, shown, bars, nowMs = Date.now(), cmeAuth) {
|
|
33
|
+
// Out of the registry before the release forgets them: the adoption puts the pins back, every other way starts
|
|
34
|
+
// afresh. Back at once when nothing is released.
|
|
35
|
+
const historyAsOf = takeWrunHistoryAsOf(indicatorId);
|
|
36
|
+
// The result the live tick's build made, read before the release drops the last patch: the picture a tick shows can
|
|
37
|
+
// be a copy of it (corner tables placed clear of the chrome) that the byte receipt does not know.
|
|
38
|
+
const built = getWrunOverlayLiveContext(indicatorId)?.liveApplied?.build?.result;
|
|
39
|
+
const context = releaseWrunOverlayLiveSessionForPark(indicatorId);
|
|
40
|
+
if (context === undefined) {
|
|
41
|
+
if (historyAsOf !== undefined)
|
|
42
|
+
restoreWrunHistoryAsOf(indicatorId, historyAsOf);
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
const earlier = parkedSessions.get(indicatorId);
|
|
46
|
+
if (earlier !== undefined)
|
|
47
|
+
endWrunParkedLiveSession(earlier);
|
|
48
|
+
const parked = {
|
|
49
|
+
indicatorId,
|
|
50
|
+
epoch: context.seriesEpoch ?? context.generation,
|
|
51
|
+
parkedAt: nowMs,
|
|
52
|
+
bars,
|
|
53
|
+
bytes: wrunParkedSessionBytesOf(context, shown, built),
|
|
54
|
+
...(cmeAuth !== undefined ? { cmeAuth } : {}),
|
|
55
|
+
context,
|
|
56
|
+
shown,
|
|
57
|
+
historyAsOf,
|
|
58
|
+
};
|
|
59
|
+
parkedSessions.set(indicatorId, parked);
|
|
60
|
+
return parked;
|
|
61
|
+
}
|
|
62
|
+
/** Take a parked session's pieces for its adoption, once: undefined once it was adopted or ended. An adoption that
|
|
63
|
+
* refuses after the take ends the series itself (endWrunParkedLiveSeries). */
|
|
64
|
+
export function takeWrunParkedLiveSession(parked) {
|
|
65
|
+
const { context, shown, historyAsOf } = parked;
|
|
66
|
+
if (context === undefined || shown === undefined)
|
|
67
|
+
return undefined;
|
|
68
|
+
clearParkedSession(parked);
|
|
69
|
+
return { context, shown, historyAsOf };
|
|
70
|
+
}
|
|
71
|
+
/** End a parked session that will not be adopted: its pieces go and the worker's series of its epoch ends.
|
|
72
|
+
* Idempotent: a settled handle ends nothing more. */
|
|
73
|
+
export function endWrunParkedLiveSession(parked) {
|
|
74
|
+
if (parked.context === undefined)
|
|
75
|
+
return;
|
|
76
|
+
clearParkedSession(parked);
|
|
77
|
+
endWrunParkedLiveSeries(parked);
|
|
78
|
+
}
|
|
79
|
+
/** End a parked session's worker series by its epoch: the end's last step, and a refused adoption's after its take. */
|
|
80
|
+
export function endWrunParkedLiveSeries(parked) {
|
|
81
|
+
endWrunOverlayLiveSeriesAt(parked.indicatorId, parked.epoch);
|
|
82
|
+
}
|
|
83
|
+
function clearParkedSession(parked) {
|
|
84
|
+
parked.context = undefined;
|
|
85
|
+
parked.shown = undefined;
|
|
86
|
+
parked.historyAsOf = undefined;
|
|
87
|
+
if (parkedSessions.get(parked.indicatorId) === parked)
|
|
88
|
+
parkedSessions.delete(parked.indicatorId);
|
|
89
|
+
}
|
|
90
|
+
/** The rough bytes one park keeps (see wrunParkedSessionBytesOf). */
|
|
91
|
+
export function wrunParkedLiveSessionBytes(parked) {
|
|
92
|
+
return parked.bytes;
|
|
93
|
+
}
|
|
94
|
+
/** Heap bytes a held value byte costs, roughly: a [time, value] row is 16 value bytes and about 48 on the heap. */
|
|
95
|
+
const WRUN_PARK_HEAP_PER_VALUE_BYTE = 3;
|
|
96
|
+
/**
|
|
97
|
+
* What a park keeps, roughly: the context's lane buffers (sampled like the census, 8 bytes a number), its output rows
|
|
98
|
+
* (~64 bytes of record and 8 a value each), the shown result, and the worker's share: its guest memory and the one
|
|
99
|
+
* forming-bar snapshot it keeps of it (the memory its live-start reported, `workerMemoryBytes`, else the 4 MiB
|
|
100
|
+
* ceiling). The shown result counts the value bytes its build charged its render budget (wrunRunResultRenderBytes, read
|
|
101
|
+
* off the build when the shown one is a copy of it: its rows, drawings, labels, tables, frame panels, handles and
|
|
102
|
+
* strategy; at least its data rows' 16 bytes each) at
|
|
103
|
+
* WRUN_PARK_HEAP_PER_VALUE_BYTE heap bytes a value byte. The run-level payload beyond the rows (the handle set, the
|
|
104
|
+
* frames, the strategy) is held twice more: as the worker answered it on the context's rows and in the worker's own
|
|
105
|
+
* handle ledger and broker, so a polyline-heavy run counts for what it keeps and the byte budget evicts by it.
|
|
106
|
+
*/
|
|
107
|
+
function wrunParkedSessionBytesOf(context, shown, built) {
|
|
108
|
+
const outputs = context.metadata.outputs?.length ?? 0;
|
|
109
|
+
const outputBytes = context.outputRows.length * (64 + outputs * 8);
|
|
110
|
+
const rowValues = wrunCensusResultRows(shown.runResult) * 16;
|
|
111
|
+
// The shown result's own receipt, else its build's (a placement copy keeps the build's payload, shared).
|
|
112
|
+
const receipt = wrunRunResultRenderBytes(shown.runResult) ?? (built !== undefined ? wrunRunResultRenderBytes(built) : undefined);
|
|
113
|
+
const values = Math.max(receipt ?? 0, rowValues);
|
|
114
|
+
const shownBytes = WRUN_PARK_HEAP_PER_VALUE_BYTE * (values + 2 * (values - rowValues));
|
|
115
|
+
const memory = context.workerMemoryBytes ?? WRUN_MEMORY_LIMIT_BYTES;
|
|
116
|
+
return wrunCensusLaneBytes(context).laneBytes + outputBytes + shownBytes + 2 * memory;
|
|
117
|
+
}
|
|
118
|
+
// The memory census lists every parked session beside the live ones, under the chart it left. A spec that mocks the
|
|
119
|
+
// drivers util partially has no census hook (reading a missing export of a mocked module throws): skipped there.
|
|
120
|
+
try {
|
|
121
|
+
onWrunOverlayMemoryCensus(() => [...parkedSessions.values()].flatMap((parked) => parked.context === undefined
|
|
122
|
+
? []
|
|
123
|
+
: [{ ...wrunLiveContextCensusOf(parked.context, parked.shown?.runResult), parked: true }]));
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// partial module mock (specs)
|
|
127
|
+
}
|
|
128
|
+
/** Specs only: the sessions parked now. */
|
|
129
|
+
export function __wrunParkedLiveSessionsForTests() {
|
|
130
|
+
return [...parkedSessions.values()];
|
|
131
|
+
}
|
|
132
|
+
/** Specs only: forget every parked session (nothing ends: a spec's worker is a fake). */
|
|
133
|
+
export function __resetWrunParkedLiveSessionsForTests() {
|
|
134
|
+
parkedSessions.clear();
|
|
135
|
+
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*/
|
|
33
33
|
import type { WrunDegradedLane, WrunHealSignal, WrunHealVerdict, WrunOverlayHold, WrunRunFailureClass, WrunRunReason, WrunRunWindow } from './wrun-lifecycle.contract.js';
|
|
34
34
|
import { type WrunHostDeathContext } from './wrun-registry-errors.util.js';
|
|
35
|
-
import { type WrunRefusalGatePlane } from './wrun-refusal.util.js';
|
|
35
|
+
import { type WrunRefusalGatePlane, type WrunRefusalSeed } from './wrun-refusal.util.js';
|
|
36
36
|
/**
|
|
37
37
|
* Why a run of this overlay must not touch the chart now, first match wins;
|
|
38
38
|
* null means run. The kScript holds, read where kScript reads them: the pause
|
|
@@ -54,9 +54,11 @@ candidate?: {
|
|
|
54
54
|
}): Promise<WrunOverlayHold>;
|
|
55
55
|
/** How the heal treats a failed run: the venue wall and the pause hold have
|
|
56
56
|
* their own way out (leaving the venue, Resume); an author trap, a
|
|
57
|
-
* quarantined package, the row cap
|
|
58
|
-
*
|
|
59
|
-
*
|
|
57
|
+
* quarantined package, the row cap, a refusal the cloud keeps for good and a
|
|
58
|
+
* hold on a lane the data plane refused by name (a book on a market with no
|
|
59
|
+
* order book, the tape over its cap) fail the same way again (the chip's
|
|
60
|
+
* Retry, an edit, a settings save or a narrower window is the way out),
|
|
61
|
+
* except a first-strike timeout quarantine,
|
|
60
62
|
* which the heal waits out and runs once more; everything else (deadline, no
|
|
61
63
|
* bars, a declined lane, a worker death, a transient source failure such as
|
|
62
64
|
* the cloud's market data being unavailable, another integration failure) is
|
|
@@ -111,6 +113,17 @@ export declare function retireWrunSourceRecovery(indicatorId: string, cause: 're
|
|
|
111
113
|
* take-back can serve it.
|
|
112
114
|
*/
|
|
113
115
|
export declare function rerunWrunGatePlaneReaders(plane: WrunRefusalGatePlane, heldElsewhere: boolean): void;
|
|
116
|
+
/** One overlay a worker death took down, as its producer reported it (the
|
|
117
|
+
* tick's poison branch, a reseed's, the casualty retry's): frozen at the
|
|
118
|
+
* report, read by the batch (the reseed), the retry and the parking (its chip
|
|
119
|
+
* names who held the sandbox). `chartIndex` is the overlay's chart, read
|
|
120
|
+
* from its live context while it stands, else remembered from an earlier
|
|
121
|
+
* death; undefined when neither knows it. */
|
|
122
|
+
export interface WrunCasualty {
|
|
123
|
+
readonly indicatorId: string;
|
|
124
|
+
readonly chartIndex: number | undefined;
|
|
125
|
+
readonly death: WrunHostDeathContext;
|
|
126
|
+
}
|
|
114
127
|
/**
|
|
115
128
|
* The overlays a worker death took down (the tick's poison branch, a reseed
|
|
116
129
|
* that died again), with the host's record of that death (the poison error's
|
|
@@ -125,4 +138,24 @@ export declare function rerunWrunGatePlaneReaders(plane: WrunRefusalGatePlane, h
|
|
|
125
138
|
* is the same death.
|
|
126
139
|
*/
|
|
127
140
|
export declare function requestWrunCasualtyRebuilds(indicatorIds: ReadonlyArray<string>, death?: WrunHostDeathContext): void;
|
|
141
|
+
type WrunMountedChart = {
|
|
142
|
+
metadata?: unknown;
|
|
143
|
+
} | null | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* The refusal seed a parked casualty's chip words its death with (the
|
|
146
|
+
* `not-reached` variants): `boot` when the worker died before it booted (the
|
|
147
|
+
* host's `booted: false`: no one's code ran, its script or a chunk of it did
|
|
148
|
+
* not arrive, so the words name the download and no holder, FB27); `held`
|
|
149
|
+
* when a run timed out under a holder that can be named (its live session's
|
|
150
|
+
* overlay by its name on any mounted chart, a session key being the overlay
|
|
151
|
+
* id, else its package id from the quarantine key), with the run budget it
|
|
152
|
+
* used up (counted from dispatch: the words say the holder's run timed out,
|
|
153
|
+
* never that it executed that long); `ended` for a worker error or a holder
|
|
154
|
+
* nobody can name. Undefined when the casualty held the sandbox itself: its
|
|
155
|
+
* own run's deadline words stand. The casualty's own name is resolved the
|
|
156
|
+
* same way; the record falls back to the overlay's refusal context when it
|
|
157
|
+
* resolves to nothing.
|
|
158
|
+
*/
|
|
159
|
+
export declare function wrunCasualtyRefusalSeed(casualty: WrunCasualty, charts: ReadonlyArray<WrunMountedChart>): WrunRefusalSeed | undefined;
|
|
128
160
|
export declare function __resetWrunOverlayRecoveryForTests(): void;
|
|
161
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import { getWrunOverlayLiveContext, hasWrunOverlayDriver, isWrunOverlayRerunInFl
|
|
|
2
2
|
import { liveWrunRefusalAttempt, wrunRefusalAttemptFacts } from './wrun-refusal-surface.util.js';
|
|
3
3
|
import { isWrunOverlayPausedError, isWrunQuarantinedError, isWrunVenueBlockedError, isWrunWorkerPoisonError, WrunChartGoneError, WrunWorkerPoisonError, } from './wrun-registry-errors.util.js';
|
|
4
4
|
import { attachWrunRefusal } from './wrun-refusal.util.js';
|
|
5
|
+
import { wrunLaneRefusedHoldCodeOf } from './wrun-lane-refusal.leaf.js';
|
|
5
6
|
import { onGateSessionLatchChange } from '../v2/gate-session-latch.util.js';
|
|
6
7
|
import { __resetWrunGatePlaneReadersForTests, forgetWrunGatePlaneReader, wrunGatePlaneReaders, } from './wrun-gate-plane-readers.util.js';
|
|
7
8
|
import { overlayExecutionGuardKey } from '../chart/overlay-execution-guard-key.leaf.js';
|
|
@@ -25,7 +26,8 @@ const COLLAPSED_HOLD_REASONS = new Set([
|
|
|
25
26
|
'loaded-range-refresh',
|
|
26
27
|
]);
|
|
27
28
|
/** The heal declines on these without asking the hold: the same run fails the same way (an author
|
|
28
|
-
* trap, a package quarantined past its first timeout
|
|
29
|
+
* trap, a package quarantined past its first timeout, a hold on a lane refused by name), the venue
|
|
30
|
+
* wall refuses it, or it is paused. The row cap's refusal
|
|
29
31
|
* is not one of them: the hold's keyed latch declines it only while the heal would run the refused
|
|
30
32
|
* window with the refused settings, so a narrower window or other settings heal. */
|
|
31
33
|
const HEAL_DECLINED_FAILURES = new Set(['deterministic', 'venue', 'paused']);
|
|
@@ -205,9 +207,11 @@ function isWrunPermanentCloudRefusal(error) {
|
|
|
205
207
|
}
|
|
206
208
|
/** How the heal treats a failed run: the venue wall and the pause hold have
|
|
207
209
|
* their own way out (leaving the venue, Resume); an author trap, a
|
|
208
|
-
* quarantined package, the row cap
|
|
209
|
-
*
|
|
210
|
-
*
|
|
210
|
+
* quarantined package, the row cap, a refusal the cloud keeps for good and a
|
|
211
|
+
* hold on a lane the data plane refused by name (a book on a market with no
|
|
212
|
+
* order book, the tape over its cap) fail the same way again (the chip's
|
|
213
|
+
* Retry, an edit, a settings save or a narrower window is the way out),
|
|
214
|
+
* except a first-strike timeout quarantine,
|
|
211
215
|
* which the heal waits out and runs once more; everything else (deadline, no
|
|
212
216
|
* bars, a declined lane, a worker death, a transient source failure such as
|
|
213
217
|
* the cloud's market data being unavailable, another integration failure) is
|
|
@@ -235,6 +239,9 @@ function wrunHealFailureOf(error) {
|
|
|
235
239
|
return 'deterministic';
|
|
236
240
|
if (isWrunPermanentCloudRefusal(error))
|
|
237
241
|
return 'deterministic';
|
|
242
|
+
// A hold on a lane refused by name: a heal run would ask the same read and meet the same refusal.
|
|
243
|
+
if (wrunLaneRefusedHoldCodeOf(error) !== undefined)
|
|
244
|
+
return 'deterministic';
|
|
238
245
|
if (isWrunOutputOversized(error))
|
|
239
246
|
return 'row-budget';
|
|
240
247
|
return 'retryable';
|
|
@@ -1024,18 +1031,23 @@ function quarantinedPackageId(quarantineKey) {
|
|
|
1024
1031
|
}
|
|
1025
1032
|
/**
|
|
1026
1033
|
* The refusal seed a parked casualty's chip words its death with (the
|
|
1027
|
-
* `not-reached` variants): `
|
|
1028
|
-
*
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1034
|
+
* `not-reached` variants): `boot` when the worker died before it booted (the
|
|
1035
|
+
* host's `booted: false`: no one's code ran, its script or a chunk of it did
|
|
1036
|
+
* not arrive, so the words name the download and no holder, FB27); `held`
|
|
1037
|
+
* when a run timed out under a holder that can be named (its live session's
|
|
1038
|
+
* overlay by its name on any mounted chart, a session key being the overlay
|
|
1039
|
+
* id, else its package id from the quarantine key), with the run budget it
|
|
1040
|
+
* used up (counted from dispatch: the words say the holder's run timed out,
|
|
1041
|
+
* never that it executed that long); `ended` for a worker error or a holder
|
|
1042
|
+
* nobody can name. Undefined when the casualty held the sandbox itself: its
|
|
1043
|
+
* own run's deadline words stand. The casualty's own name is resolved the
|
|
1044
|
+
* same way; the record falls back to the overlay's refusal context when it
|
|
1045
|
+
* resolves to nothing.
|
|
1036
1046
|
*/
|
|
1037
|
-
function wrunCasualtyRefusalSeed(casualty, charts) {
|
|
1047
|
+
export function wrunCasualtyRefusalSeed(casualty, charts) {
|
|
1038
1048
|
const { indicatorId, chartIndex, death } = casualty;
|
|
1049
|
+
if (death.booted === false)
|
|
1050
|
+
return { cls: 'not-reached', variant: 'boot' };
|
|
1039
1051
|
if (death.sessionKey === indicatorId)
|
|
1040
1052
|
return undefined;
|
|
1041
1053
|
const own = mountedOverlayName(chartIndex === undefined ? charts : [charts[chartIndex], ...charts], indicatorId);
|