Adapter re-lowering R1: the kernel owns equity recording; the Pine host selects the policy and marks its cadence - #263
Merged
Conversation
…only selects the policy and marks its cadence (R5 lane R1) NativeReportPolicy gains KernelRecordedAtHostMarks: the kernel performs the recording (update_equity_extremes + record_equity_point, the L2 code path) when the host marks a report point through the consumer's mark_script_report_point(engine, ts). The Pine host selects that policy in project() and marks its two cadence points (after the pending flushes on a published bar, and on a suppressed probe tail) instead of calling the engine's protected recording members itself; src/source/** no longer references update_equity_extremes / record_equity_point. The adapter's cadence (per published source slot, inside the callback, before the after-close fills), its bar.timestamp label and its own range-end producer and per-bar broker hash stay as they are — the kernel's KernelRecorded cadence cannot reproduce them, so the recording moved and the cadence did not. KernelRecordedAtHostMarks folds nothing into the continuation hash so every adapter per-bar hash is unchanged. Byte-identity: 312 corpus engine_trades.csv identical to main 06ef483 with the regenerated corpus, validation report identical, 24 cases' full equity curves (5,138,348 points, 105 metric fields) identical. tests/test_adapter_report_relower.cpp (421 checks: ordinary, COOF and suppressed-tail cadences against values harvested from the 06ef483 library). ci_verify release PASS (501). 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.
What
First lane of the adapter re-lowering wave (the Pine adapter uses the kernel's new native features instead of keeping parallel code): the equity curve is now recorded by the kernel under
NativeReportPolicy::KernelRecordedAtHostMarks; the Pine host selects that policy inproject()and marks its two cadence points throughmark_script_report_point();src/source/**no longer touches the engine's protected recording members.Why a third policy value: the adapter's cadence (per published source slot, inside the callback, before the after-close fills; suppressed probe tails; COOF double publishes) cannot be reproduced by the kernel's per-calculation
KernelRecordedcadence, so the recording moved to the kernel and the cadence stayed with the host. The value folds nothing into the continuation hash, so every adapter per-bar broker hash is unchanged.Evidence
engine_trades.csvidentical,validation_report.mdidentical, 24 cases' full equity curves (5,138,348 points, 105 metric fields) identical.tests/test_adapter_report_relower.cpp: 421 checks (ordinary / calc_on_order_fills / suppressed-tail cadences vs values harvested from the pre-change library).ci_verify releasePASS (504).exp-r5-r1-adapter-report-20260920on this tree: 4190 graded, coverage-lost 0, hard 0, band leavers 0, score 0 — no regression, net 0 (accepted).🤖 Generated with Claude Code
https://claude.ai/code/session_01CSmYixVAp4NqWpBZxkrLPT