PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
report_sequence.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5// CR-150 lane o1w-seq (R14--R18). The optional per-bar sequences -- the
6// broker-state hashes, the runtime trace, the recorded output rows and their
7// events -- are not part of a report's scalar facts. A full report keeps them
8// where it always did (the owning arrays in ReportC, or the report sink
9// stream). The summary retention mode keeps only a fixed ordered witness per
10// sequence, so a trial's resident memory does not grow with the bar, trace or
11// event population.
12//
13// ReportMode::LegacyArrays is the default and the byte-identical historical
14// behaviour. ReportMode::SummaryOnly is the placeholder the lane brief names
15// (the final summary/full flag is owned by lane o1w-contract); in it,
16// set_optional_report_mode returns 0, the ReportC optional arrays stay null,
17// the output readers answer empty, and optional_sequence_summary() returns the
18// fixed witness. A report sink, when installed, still streams the complete
19// sequence externally in either mode.
20#define PINEFORGE_HAS_OPTIONAL_REPORT_SEQUENCES_V1 1
21
22namespace pineforge {
23inline namespace engine_script_run_v19 {
24namespace report_sequence {
25
26enum class ReportMode : std::uint8_t {
29};
30
31// One sequence's ordered witness: how many records were consumed and a digest
32// folded over every semantic field in record order. Both are O(1) state. The
33// witness is maintained by SummaryOnly runs and by every run whose report sink
34// streams the sequence; a pure LegacyArrays run without a sink keeps the
35// owning ReportC arrays instead and does not promise a complete witness.
37 std::uint64_t count = 0;
38 std::uint64_t digest = 0;
39};
40
47
48} // namespace report_sequence
49} // inline namespace engine_script_run_v19
50} // namespace pineforge