Repository navigation
Commit ab9714b
Cut the Pine source layer out of BacktestEngine (R4-C, roadmap slice B) (#253)
* Freeze the v15 host provider and add the source-layer relocation tooling (R4-C L0)
Freeze the e7cdf05 v15 host closure and extend the real provider matrix with same-epoch v15 pairing controls. Add the native include-independence fail-before checker, its tooling tests, and the relocation-proof handoff tooling.
Contract: §6.1, §6.5, §8.1, §8.9.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Add the source-layer headers and the empty PineStrategyHost (R4-C L1 step 1)
Add the five source-layer header placeholders and the empty PineStrategyHost hook/constructor implementation.
Register the source translation-unit group after the existing pineforge sources (R4-C §3.1, §4, §7 L1; amendment A8).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Introduce source::PineStrategyHost and the on_source_bar hook; port Pine tests and the example (R4-C L1)
Port Pine-facing test fixtures and helper headers to source::PineStrategyHost, preserving direct engine.on_bar calls through the final forwarding hook.
Retarget the handwritten runner example and committed tutorial consumers; leave NativeStrategyHost and pure native request/settlement/position/account fixtures untouched.
Contract rules: R4-C §2 P1/P2, §3.1, §7 L1; amendments A5 and A8.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Add native source-seam default witnesses (R4-C L2)
Add pre-transfer native-host witnesses for the S11, S19, S20-S24, and S35 defaults. (A28)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Relocate source scheduler and policy bodies (R4-C L2 WIP)
Move ledger-classified source-route bodies to src/source and add initial native-default seam dispatch scaffolding. (A13, A16, A17, A23, A28)
Settlement coordinators remain on the base under the recorded A15 conflict.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Introduce Pine language-state mixin and source reset hook (R4-C L2 WIP)
Add data-only PineLanguageState and route F6 source-series reset through the source host while preserving native empty defaults. (A13, A17, F6)
Use source-qualified relocated definitions for moved-only normalization. (3.7)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Route pending lifecycle and C observers through the source host (R4-C L2 WIP)
Introduce source lifecycle hooks, F1-F5/F7-F12 position hooks, and source-owned pending observer routing. (A15, A17, A22)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Materialize source pending intent and observer seams (R4-C L2 WIP)
Move source PendingOrder compatibility interfaces, source lifecycle hooks, reset fragments, and C observer projections onto PineStrategyHost. (A5, A15, A17, A22)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Move Pine language storage behind source state hooks (R4-C L2 WIP)
Remove source language fields from BacktestEngine and route metadata, reset, position-view, and C observation behavior through PineStrategyHost. (A13, A17, A20)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Split broker state hash through source extension (R4-C L2 WIP)
Move the shared FNV sink into a source-free internal header and route relocated Pine state through S34. Keep the A31 settlement coordinator context generic and hash it there. Port the native physical-position test helper.\n\nContract rules: A24, S34, A31, A5.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Move source pending intent behind the host (R4-C L2 WIP)
Relocate PendingOrder ownership and public pending accessors into PineStrategyHost, re-key StrategyOverrides to the source adapter, and route stream entry comments through S33.\n\nContract rules: A5, A21, A22, S13-S18, S33.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Split source mirror and advance source host epoch (R4-C L2 WIP)
Make base construction source-free, move remaining adapter-owned state into PineStrategyHost, split the PendingOrder descriptor and source projection TUs, and advance internal ownership/hash fingerprints to v16 with matching local guard parsing.\n\nContract rules: A21, A24, S10, S33, S34, §6.4, EPOCH-LEDGER.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Advance source ABI relocation proof and generic evaluator ownership (R4-C L2 WIP)
Move S37 auxiliary-feed storage behind source views, restore P10 generic security evaluation, and complete v15-to-v16 relocation-manifest tooling. Port affected source-host test accessors and split hash/mirror coverage checks.\n\nContract rules: A3, A5, A11, A15, A18, A19, A24, A30, A31.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Re-key source PendingOrder outside the engine epoch (R4-C L2 WIP)
Remove the v16 engine PendingOrder alias, re-key residual bridge signatures and test fixtures to source::PendingOrder, and keep the aggregate and settlement epoch checks fail-closed.\n\nContract rules: A3, A5, A11, A13, A19, A21, A24.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Move source path-resolution helpers beside the pending book (R4-C L2 WIP)
Relocate the PendingOrder-specific path helper cluster into the source layer and register its source translation unit.\n\nContract rules: A5, A11, A19.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Retire duplicate base lifecycle ownership (R4-C L2 WIP)
Keep source lifecycle helpers behind S22-S24 host overrides and remove their duplicate generic implementation unit.\n\nContract rules: A15, A19.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Move Pine policy free helpers out of engine.hpp (R4-C L2 WIP)
Relocate tv-money and enum-string free helpers to source policy support, re-key their consumers, and complete the v15/v16 settlement matrix caller split.\n\nContract rules: A3, A11, A14, A18, A19.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Cut the Pine source layer out of BacktestEngine: relocate policy, pending route, scheduler and hash; fence engine_script_run_v16 (R4-C L2)
Complete the L2 atomic source-layer relocation: language and policy storage, pending route, scheduler seams, adapter/configuration ownership, state-hash extension, mirror projection, and engine_script_run_v16 epoch fencing.\n\nContract rules: A2, A3, A5, A11, A13, A15, A17, A18, A20, A21, A22, A23, A24, A28, A30, A31; §3.7; §6.4.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Isolate source hash mutation fixture from native checker temp state (R4-C L2 WIP)
Ignore the native-version checker’s transient authenticated-fixture directory while the A24 source-hash mutation suite materializes its disposable repository copy. This is test-fixture isolation only; no product or moved-body behavior changes.\n\nContract rule: A24.\n\nCo-Authored-By: Claude Fable 5.1 <[email protected]>\nClaude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Fence the v16 host epoch, split the pending mirror and hash sinks, and enforce native include independence (R4-C L3)
Remove the residual source-only include closure from engine.hpp, make the generic and source includes explicit, and prove the installed native header boundary.
Add source-state fingerprint/reset/replay coverage and the frozen C-v1 PendingOrder canary; retain the L2 v16 mirror/hash split through direct runtime checks.
Wire the identifier guard into preflight and the installed include-independence proof into the release/native verifier profiles, with dependency and nm evidence output. Update the v16/source-adapter and O1-gap documentation.
Contract rules: §6.2, §6.3, §6.4, §6.5, §8.8; A11, A24, A25.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Scan the native source guard with Python instead of ripgrep (R4-C L3c)
Replace the ripgrep subprocess scan with equivalent standard-library regex scans.
Preserve the source/Pine include and C-ABI diagnostics, enforce the A18
identifier-bound scan with its comment and frozen-export exclusions, and
exercise a forbidden identifier in a temporary-tree self-test.
Contract rules: §6.5; A18.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Add the intraday-cap limit setter to the Pine source host (R4-C L3b)
Add the public PineStrategyHost risk setter and route integer limits through adapter_.cap, preserving IntradayCap attachment and ledger semantics (R4-C A32). Add a focused source-host test and register it in the CTest suite.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
(cherry picked from commit 3d6035f1572bd1928a35b364103d38f43173b2c0)
* Repair the source-host writer surface, restore generic trail/fold context, drop the dead Pine declarations and add real native witnesses (R4-C L5)
Repair A33/A34 Pine risk writer semantics and cover direction plus sticky percent state.
Restore A37 generic trail/fold ownership and hash folds, update the v15→v16 relocation manifest, and remove F8/F10/S28.
Apply A35 waiver coverage enforcement, A36 source-only declaration cleanup and guard, and A38/A39 native and metadata witnesses/surface repairs.
Contract rules: A33, A34, A35, A36, A37, A38, A39, A40.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
* Value-initialise partial pending orders and pin the is_long audit (R4-C L5b)
Value-initialise partial PendingOrder test fixtures before vector relocation and mirror use (A41).
Audit the five product construction paths; each assigns is_long before it can be read, so preserve the relocated member declaration verbatim and add no allow-list exception (A41).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
---------
Co-authored-by: Claude Fable 5.1 <[email protected]>1 parent 66d9dc4 commit ab9714b
327 files changed
Lines changed: 20929 additions & 16835 deletions
File tree
- docs
- pages
- include/pineforge
- compat/pine
- source
- runner
- examples
- scripts
- src
- compat/pine
- source
- tests
- fixtures
- native_cpp_abi
- host-e7cdf05
- host-f736676
- settlement_cpp_abi
- tutorial
- macd
- mtf
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
79 | 96 | | |
80 | 97 | | |
81 | 98 | | |
| |||
88 | 105 | | |
89 | 106 | | |
90 | 107 | | |
91 | | - | |
92 | 108 | | |
93 | 109 | | |
94 | | - | |
95 | 110 | | |
96 | 111 | | |
97 | 112 | | |
98 | 113 | | |
99 | 114 | | |
100 | | - | |
101 | 115 | | |
102 | | - | |
103 | 116 | | |
104 | 117 | | |
105 | 118 | | |
| |||
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
| 139 | + | |
126 | 140 | | |
127 | 141 | | |
128 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | | - | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
95 | | - | |
| 102 | + | |
96 | 103 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
109 | 127 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
114 | 133 | | |
115 | 134 | | |
116 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
136 | 143 | | |
137 | 144 | | |
138 | 145 | | |
139 | 146 | | |
140 | 147 | | |
141 | 148 | | |
142 | 149 | | |
143 | | - | |
144 | | - | |
145 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| |||
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
161 | | - | |
| 171 | + | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
165 | | - | |
| 175 | + | |
| 176 | + | |
166 | 177 | | |
167 | 178 | | |
168 | 179 | | |
| |||
212 | 223 | | |
213 | 224 | | |
214 | 225 | | |
215 | | - | |
216 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
217 | 229 | | |
218 | 230 | | |
219 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
244 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
| 601 | + | |
| 602 | + | |
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
| |||
613 | 614 | | |
614 | 615 | | |
615 | 616 | | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
616 | 632 | | |
617 | 633 | | |
618 | 634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
0 commit comments