You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1df103f
Browse filesBrowse the repository at this point in the historyBrowse files
live runner: verified cumulative report checkpoints, so report export reads a bounded tail
Exporting the report of an earlier cursor rebuilt it from the whole stored
history, and the runner had no checkpoint structure.
- The ledger writes an immutable cumulative report checkpoint in the same
transaction as the input commit at every configured boundary (default 1024
inputs, --checkpoint-interval K). Report export starts from the nearest
checkpoint at or below the cursor and applies only the deltas after it, so the
rows read are at most the interval plus the checkpoint row.
- A checkpoint is verified against the report integrity chain before use; a
payload or witness failure records a typed diagnostic and falls back to full
reconstruction, which returns the same bytes. Ledgers written by the previous
version open unchanged and get their first checkpoint at the next boundary.
- The checkpoint holds report state only: the engine has no state restore entry
point, so restart recovery still replays committed strategy inputs and
validates their state hashes and actions. This is stated in the documentation.
- tests/test_native_live_checkpoint.cpp compares exports with an independent
full reconstruction for every cursor, bounds the rows read for a history ten
times longer, refuses a corrupted checkpoint and falls back, opens an old
ledger, and checks commit atomicity.
tests/test_native_live_checkpoint_measurement.cpp is a diagnostic row that
prints ledger bytes, WAL bytes, peak RSS, open descriptors and recovery and
export times for growing input counts; it asserts only the structural bound.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| CT4 | Partial-bar view / open-bar lookahead guard |**no** — the open hook receives the *complete* script bar: `invoke_bar_open_callback(engine, bar, point)` native_execution_consumer.cpp:8403 with `engine.current_bar_ = open_view` native_execution_consumer.cpp:8454 (the complete bar unless `OpenOnly`) **Closed:**`current_partial_bar()` native_host.hpp:1093 is the lookahead-free bar so far, through the last path point consumed (a fill inside a segment reads it at the segment's origin), and `NativeOpenBarView::OpenOnly` native_run_spec.hpp:109 masks `on_native_bar_open`'s bar to `H = L = C = open` as presentation only — the complete bar is restored before the open match (`tests/test_native_calc_timing.cpp`). | K | L5 | F:E3| (single-source) The adapter needs the full bar, so the guard is opt-in. |
122
122
| CT5 | Raw input observation before aggregation |**yes** — `on_native_input` native_host.hpp:895, `NativeInputContext` native_host.hpp:793-798 | K | — | O:F3| (single-source row) |
123
123
| CT6 | Calculate on order fills (scheduler `PineScheduler::recalculate` pine_scheduler_native.cpp:767, `coof_recalculation_due` pine_scheduler_native.cpp:733, the first-open chain `kFirstOpenLoopGuard` pine_scheduler_native.cpp:888; `begin_coof_recalc` pine_adapter.cpp:7114, `flush_coof_tail` pine_adapter.cpp:7536, `end_coof_recalc` pine_adapter.cpp:7171) | **partial** — `on_native_applied` native_host.hpp:958 fires mid-path after each fill native_execution_consumer.cpp:8307, native_execution_consumer.cpp:8307; commands are legal there `commands_allowed` native_execution_consumer.cpp:1966; a request born there is eligible on the unconsumed rest of the bar `born_on_remaining_path` native_execution_consumer.cpp:6857, `remaining_path_delivery` native_order.cpp:4347-4355. Missing: calculation re-entry, a documented chronology, a bar-so-far view **Closed:** `NativeCalculationTrigger::BarCloseAndFills` native_run_spec.hpp:96 drives one `OrderFill` recalculation per applied execution at that event's own cursor, delivered as `on_native_recalculate(..., OrderFill, cause)` and bounded by `max_recalculations_per_point` (`tests/test_native_calc_timing.cpp`). | K+A | L5 | F:E4 O:F5 S:C2 | **Disagree:** F partial / O, S no; F, S v1 / O deferrable. R5-5: v1, sub-bar hook + chronology contract, adapter path unchanged. TV parts → CT11. |
124
-
| CT7 | Calculate on every tick |**partial** — `on_native_tick` native_host.hpp:898 fires per accepted realtime print native_execution_consumer.cpp:8542; no per-tick calculation in batch; the guide pinned "close-only" (`docs/pages/native-engine.md`, "Batch OHLCV vs ticks vs quiet") **Closed:**`NativeCalculationTrigger::EveryModeledPoint` native_run_spec.hpp:97 adds one `Tick` recalculation at every modeled point of the delivered path and at every observed print, in batch and in a stream alike (`tests/test_native_calc_timing.cpp`). | K | L5 | F:E5 O:F4 S:C3|**Disagree:** F yes / O partial / S no. R5-5: v1. Not an adapter feature either: absent from `PineStrategyConfig` pine_adapter.hpp:67-81, the runner rejects it (`calc_on_every_tick` main.cpp:259), the Pine stream route refuses `calc_on_order_fills` pine_strategy_host.cpp:608. |
124
+
| CT7 | Calculate on every tick |**partial** — `on_native_tick` native_host.hpp:898 fires per accepted realtime print native_execution_consumer.cpp:8542; no per-tick calculation in batch; the guide pinned "close-only" (`docs/pages/native-engine.md`, "Batch OHLCV vs ticks vs quiet") **Closed:**`NativeCalculationTrigger::EveryModeledPoint` native_run_spec.hpp:97 adds one `Tick` recalculation at every modeled point of the delivered path and at every observed print, in batch and in a stream alike (`tests/test_native_calc_timing.cpp`). | K | L5 | F:E5 O:F4 S:C3|**Disagree:** F yes / O partial / S no. R5-5: v1. Not an adapter feature either: absent from `PineStrategyConfig` pine_adapter.hpp:67-81, the runner rejects it (`calc_on_every_tick` main.cpp:266), the Pine stream route refuses `calc_on_order_fills` pine_strategy_host.cpp:608. |
125
125
| CT8 | Historical intrabar calculation (per lower-TF sub-bar / magnifier sample) |**no** — with an `IntrabarPath` the callback still fires once per script-bar calculation (`invoke_callback` native_execution_consumer.cpp:9308). **Closed:**`EveryModeledPoint` recalculates at each intrabar sample, and `on_native_sub_bar` native_host.hpp:948 fires once after each retained lower-timeframe sub-bar's whole matching path (`tests/test_native_calc_timing.cpp`). | K | L5 | F:E6 O:F8 S:C4| — |
126
126
| CT9 | Intrabar (magnifier) matching path + path-order policy (`volume_weighted_cap` pine_adapter.cpp:3120) |**yes** — `IntrabarPath` native_run_spec.hpp:362-403, delivery `deliver_confirmed_script` native_execution_consumer.cpp:8752-9018; `NativePathOrder` native_run_spec.hpp:335-339 | K+A | — | F:E7 F:G5 O:F7 S:C4|**Disagree:** S partial (it wants callback cadence → CT8). TV sampler choice is A: TradingView's own intrabars at its table's timeframe, each owned by the chart bar of its last minute, built from the finer feed (`tradingview_magnifier_bars` magnifier_intrabars.hpp:46, R5 lane MAG-INTRABAR). |
127
127
| CT10 | Batch → warmup → realtime forward execution |**yes** — `stream_begin` engine.hpp:1998, `stream_push_bar` engine.hpp:2004, `stream_end` engine.hpp:2008, `NativeRunPhase` native_host.hpp:41, C ABI `strategy_stream_begin` c_abi.cpp:781 | K+A | — | F:E8 O:J3 S:C5|**Disagree:** S partial. R5-1: the lifecycle is native; Pine trade-start suppression and realtime-tail / probe rules (`trading_window_active` pine_strategy_commands.cpp:15-21, `prepare_native_begin` pine_strategy_host.cpp:548-702) are A. S's "neutral tail + trade-window policy" is single-source and unassigned (§4 Q8). |
0 commit comments