Repository navigation
cr150 L8d: out-of-range trade accessor answers - #425
Merged
Merged
Conversation
Red-first witness: the static assertion requires BacktestEngine closed rows to be TradeLedger; the P00 base still stores std::vector<Trade>. Runtime cases cover the frozen API, global windows, ownership, tail rewrites, native reports and handle reuse. Expected failure is source-derived; no compile or test was run under the CORE-TOP Mac restriction.
Implement the frozen P00 ledger in engine_orders.cpp, swap the closed-row owner, and adapt digest/sort signatures without changing their folds or ordering. Keep production retention unchanged: no seal call is installed. Explicitly select kernel-recorded equity in the new native report witness. The out-of-row engine_execution.cpp reserve_effects vector caller and frozen oracle compatibility remain reported OPEN; no local compile or test was run.
Keep live helper references on the ledger and preserve snapshot copies through iterator ranges. Replace front reads with resident iteration and update the closed-row digest probe type. Keep numeric assertion literals, fixture values, oracle sources and hash pins unchanged. This is a mechanical caller migration under SCOPE-RULING-1818; no local compilation or tests were run.
Add a test-only vector snapshot accessor to OraclePineNativeHost and map trades_ only around the two affected non-frozen carrier includes. Refresh same-size snapshots in place to preserve row references across repeated reads. Leave frozen oracle bytes, pins and P00 declarations unchanged. No build, compilation, test or guard was run.
Add the CORE-TOP-approved TradeLedger overload immediately after the vector helper. Guard the logical end and reserve the resident count through the frozen API. Preserve both existing call sites, the vector helper and P00 declarations. No build, compilation, test or guard was run.
Repair the source citations shifted by the L8a header/include and allocation-overload edits. Search docs for all 70 changed-file basenames, covering 516 mentions in 18 documentation files, rather than only the 140 lab findings. Keep exact declaration/occurrence targets for ambiguous symbols, preserve the existing comment hash while shifting its range, and name the trail-peak carry sites explicitly. Identify archived deleted-source coordinates as historical records instead of shifting them onto unrelated live code. Preserve document line counts. Doc-revert/source-line attribution: the edited documentation lines were introduced or last re-anchored by the following commits; the prose sources of the rewritten passages are named as well: - 51a1989 - d093560 - 06d4107 - 44b17c1 - 868aa65 - 925f1c9 - a744bee - f48b7c8 - 0411892 - 47184e5 - 0d76a09 - 65c69b0 - b16e11f - caa65e4 - b97c409 - 3372b5d - b2a578c These include L14-A/Doxygen (51a1989), L11 archived notes (44b17c1, 06d4107), Q6 trail-peak discussion (b16e11f, caa65e4, 868aa65), and the archival paragraph's V19-A/DOCS-ENGINE history (3372b5d, b2a578c). No behavior ruling is reverted. No source/header/test or pin changes in this commit. No build, compilation, tests, documentation guards, preflight, parity or corpus command was run under the CORE-TOP Mac restriction.
L8d returns the existing 0/NULL/-1 sentinels below TradeLedger::base(). Reuse the close-cause validity query to keep the frozen header declarations unchanged. Refresh only the affected native-feature-parity content pin; no documentation sentence is removed or reverted.
Merge refs/heads/pf/cr150-p00-contracts at 0157156 without rewriting history. Keep both registration sets and the accepted L8d accessor/test code. Reconcile the doc anchors and preserve the merged c_abi.cpp content pin. Name and correct the slippage, L6, A.4, A.7 and A.8 citation rewrites: no contract or historical ruling is withdrawn.
The full integration ref advanced from 0157156 to d3eab70 during the requested merge round. Preserve that L6a work through a second merge rather than rewriting the completed merge. Keep both sink-format and L8d unit registrations after the pinned prefix, retain the merged doc citations and c_abi.cpp content pin, and leave accepted L8d code and assertions unchanged.
Merge refs/heads/pf/cr150-p00-contracts at 23834ff without rewriting history. Resolve only docs/design/native-feature-parity.md and docs/pages/pine-to-native.md: retain both sides of the L5/L6, A.4, A.7, A.8 and slippage citations at the merged source locations, and preserve the c_abi.cpp content pin. Keep the automatic registration merge and all accepted L8d source/test logic unchanged.
Merge refs/heads/pf/cr150-p00-contracts at 2d08085 without rewriting history. Resolve only the tests/CMakeLists.txt tail by retaining all integration registrations before the existing L8d row, after the evidence-pinned prefix. Carry the incoming metric doc re-anchors unchanged and preserve the c_abi.cpp content pin. No source or test logic is edited by conflict resolution.
Merge refs/heads/pf/cr150-p00-contracts at 69fdd0e without rewriting history. Resolve only the tests/CMakeLists.txt registration tail: retain the L7a accumulator row before L8d, beyond the pinned prefix. Carry incoming doc anchor/hash updates unchanged and preserve the c_abi.cpp content pin. No source file or test body is edited by conflict resolution.
Merge refs/heads/pf/cr150-p00-contracts at 06734b1 without rewriting history. Take all six L0b files entirely from integration. Keep its complete CMake registration tail once, then append only the existing L8d registration block after the pinned prefix. Preserve all accepted accessor source/test logic and documentation content.
Merge refs/heads/pf/cr150-p00-contracts at 5be8c54 without rewriting history. Take tests/CMakeLists.txt entirely from integration, including the final sorted cr150.d include block. Keep integration L0b and CMKD files unchanged. The unchanged L8d registration pair follows in a separate commit, as required by merge-m8-brief.md. Accepted source and test bodies are unchanged.
Add tests/cr150.d/core-cr150-l8d.cmake as the second m8 commit. Copy the original list(APPEND TEST_SOURCES ...) and pineforge_add_unit_test(...) pair byte for byte, one command per line. Keep the integration CMake tail, other lane files, README, guards, L0b files, accepted source and test body unchanged.
luisleo526
marked this pull request as ready for review
October 19, 2026 02:22
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.
CR-150 lane L8D, per DESIGN rev 6 and its PARALLEL-PLAN row (a streamed row answers 0/NULL/-1, never a throw); the lane's REPORT.md has the file:line detail. It's built on L8a (#419, merged); the base is the integration branch core/cr150-p00-contracts.
Lab: rj-20261018t155131-5b2eb8 green (preflight, release, debug, docs) on 554c935. The CMake wiring of the new test was checked before submit. The gating read by CORE-TOP comes before merge.
🤖 Generated with Claude Code