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 4342247
Browse filesBrowse the repository at this point in the historyBrowse files
live runner: a delta report stream by default, and report-path work that does not rescan closed trades
After every input the runner scanned the whole closed-trade prefix again and,
with --report-jsonl, printed the entire cumulative report: quadratic CPU and
output over a long run, plus a retained copy of the whole document.
- ReportDeltas carries a closed-trade high-water mark, so extraction visits only
the trades appended since the last update. The retained cumulative document
exists only in full mode; the default keeps scalar state and array counts.
- --report-jsonl now emits one pineforge-native-report-delta/v1 document per
committed input, the same payload the ledger stores. The cumulative document
is --report-jsonl=full. This changes the stream shape for consumers that read
the cumulative document; in-repo consumers and the documentation are updated.
- The native fill_report call still rebuilds the engine's trade and
equity/metrics report for each input. Removing that term needs an
engine-side carried accumulator and its own proof that batch reports stay
byte for byte identical; the changelog says so.
- tests/test_live_report.cpp compares the final cumulative report, applying the
delta stream with the test's own applier, with the full-mode document;
counts the closed trades visited over runs of N and 10N inputs and the bytes
written in delta mode; and checks the option values.
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:272), 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