Skip to content

[CI probe] L2 report truth alone (hash-pin environment check) - #261

Closed
luisleo526 wants to merge 2 commits into
mainfrom
r5/L2-report-truth
Closed

luisleo526 wants to merge 2 commits into
mainfrom
r5/L2-report-truth

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

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.

luisleo526 and others added 2 commits September 20, 2026 06:52
…, 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
@luisleo526 luisleo526 closed this Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant