[CI probe] L2 report truth alone (hash-pin environment check) - #261
Closed
luisleo526 wants to merge 2 commits into
Closed
luisleo526 wants to merge 2 commits into
luisleo526 wants to merge 2 commits into
Conversation
…, lanes Code-grounded design for making pineforge-engine usable without any Pine adapter: a pure-C++ strategy against NativeStrategyHost gets every execution feature Pine strategies rely on, and the Pine adapter becomes a thin TradingView-parity layer that selects policy knobs on the same kernel features. Merged from three independent audits of the same brief (Claude Fable 5.1, Claude Opus, GPT-5.6 Sol) under the supervisor rulings R5-1..R5-11; every citation (514) is script-checked against this tree (main @ 73817c1). Contents: merged inventory (89 rows: 34 native / 14 partial / 29 missing / 12 TV-quirk), structural work (kernel-only target, coupling extraction, C API, native HTF, examples), the lane roadmap L0-L13 with per-lane neutrality proof, twin test and epoch impact, v1.0.0 prerequisites, risks and open questions, and signature-level API proposals per lane. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
…-end rows (R5 lane L2)
A bare NativeStrategyHost gets a truthful report, opt-in through
NativeRunSpec (native_run_spec_v3):
- NativeReportPolicy { HostRecorded (default, today's behaviour),
KernelRecorded }: under KernelRecorded the native consumer marks one
equity point per script calculation — update_equity_extremes() then
record_equity_point(script_open) right after each host callback, in the
order the Pine host uses — so the curve has one point per script bar and
the drawdown / run-up walk is no longer degenerate.
- report_open_position_at_end: a position still open at run end is reported
as mark-to-market closed rows at the last close, one per physical lot,
through the existing non-mutating row builder into range_end_trades_.
Reporting only: no cash booked, no order placed, no hash moved.
- closed_trade_count() / closed_trade(i): public read accessors on
BacktestEngine for the closed rows.
The new spec fields fold into the continuation hash only when the policy is
not HostRecorded, so every existing continuation hash is unchanged; the
adapter never sets them and is not touched.
Tests: tests/test_native_report_truth.cpp (default pin, curve length and
hand-walked drawdown, open-position row with identical broker hash, twin vs
the adapter-driven path, hash neutrality pinned against clean main).
ci_verify release PASS (495 tests). Design: docs/design/native-feature-parity.md A.1.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, not for merge: checks whether the lane's continuation-hash pin (passes locally, fails on CI in #260) is environment-sensitive on its own base tree.