Skip to content

cr150 L8b: three avg_*_percent prefix sums from sealed trade rows - #417

Merged
luisleo526 merged 7 commits into
core/cr150-p00-contractsfrom
core/cr150-l8b
Oct 18, 2026
Merged

luisleo526 merged 7 commits into
core/cr150-p00-contractsfrom
core/cr150-l8b

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

CR-150 lane L8b, per DESIGN rev 6 §3.4 and its row. The base is core/cr150-p00-contracts, so this diff shows L8b only.

  • 826e74d: a red test pins the sealed-trade percent prefix identity.
  • 2bbd96d: seeds the three percent averages from the sealed trade rows.
  • 381964a: trade_percent_prefix_ is classified as DERIVED state (recomputable from the hashed sealed rows). It gets a reasoned waiver in check_broker_state_hash_coverage instead of a hash fold.

Lab: rj-20261018t130832-3d5d6a green (preflight, release, debug, docs) on 381964a. The Fable gating read checks the waiver classification before merge. Not to merge before the 1.6.2-rc.1 cut, and only after #413.

🤖 Generated with Claude Code

Add the standalone PINEFORGE_TEST_TRADE_PERCENT_PREFIX proof in the lane-owned metric source. It covers every sealed/resident split, left-fold rounding, pnl-based filters, zero guards, mutable tails and reset.

Red by source inspection against a6abb14: fold_trade_percent_prefix and reset_trade_percent_prefix do not exist. No build, compilation or tests were run on CORE-TOP as instructed; the lab must record the first compiler diagnostic.
Keep all/winning/losing percentage sums and counts at the sealed prefix. Continue each original left fold over resident rows, preserving pnl filters, signed loss percentages and existing win/loss guards. Add protected fold/reset operations for L8c; do not install streaming or change P00 declarations.

OPEN for supervisor: hash coverage for trade_percent_prefix_ needs an out-of-row hash/waiver change; the member remains inside a broker-state region so the guard can report it. L8c must wire fold-before-retire and new-run reset. No build, compilation or tests were run on this machine.
DESIGN rev 6 section 3.4 requires the same left folds over sealed rows followed by the resident tail, while retaining the existing closed-row digest hash. The six prefix values are reconstructible from those immutable already-hashed rows and add no independent decision state.

Add an explicit reasoned waiver for trade_percent_prefix_ rather than new seal-dependent hash bytes. Addresses the coverage failure in lab rj-20261018t125021-5a52a9. No build, test, guard or verification command was run here.
Apply the L8B FIXES from core-cr150-read-wave1. Move the unit introduced by 826e74d out of engine_metrics.cpp into tests/test_trade_percent_prefix.cpp, preserving its body and assertions, removing only the compile-mode wrapper and adding standalone includes.

Append the TEST_SOURCES entry and pineforge_add_unit_test call after all existing test CMake lines, preserving the private-fixture evidence pins. Existing metric definitions and published source anchors retain their line numbers. No build, test, guard or verification command was run here.
Merge 72e34d4 (L15a squash), including P00 V1/V2 commit ee3083d, without rewriting the existing L8B history.

Resolve the sole conflict at the tail of tests/CMakeLists.txt by preserving the incoming L15a unit and guard registrations at their original coordinates, then appending the L8B prefix unit registration. Re-read the private-fixture evidence pins in the merged file; the 3267 condition and the other cited coordinates are intact.

Retain incoming documentation from 72e34d4 and ee3083d unchanged. L8B accessor anchors keep their existing coordinates, and both lanes runtime code stays unchanged from its respective parent. No builds, tests, checkers or verification scripts were run; no push.
Merge integration commit 0faaf06 (L8a #419 squash) without rewriting existing L8B or earlier merge history. Keep the integration TradeLedger implementation and mechanical test adapters, alongside the three L8B avg_*_percent prefix folds, state and derived waiver.

Resolve the sole conflict at the tail of tests/CMakeLists.txt by keeping the incoming ledger test registration at its coordinates and appending the prefix test afterward. Both lanes registrations remain beyond the manually re-read private-fixture evidence pins. Retain the incoming documentation and its symbol/range attributions from 0faaf06; shared accessor coordinates are 986, 999 and 1008 in the merged header.

No build, test, generator, guard or verification script was run here. No push.
@luisleo526
luisleo526 marked this pull request as ready for review October 18, 2026 18:17
Merge integration head d3eab70, including L6a #416 and L1 commit 0157156, without rewriting the accepted L8B history.

Resolve only the shared tests/CMakeLists.txt append region: retain the integration report-format rows and append the L8B prefix unit after them. All registrations remain after the manually re-read private-fixture pins. No source file, test body, guard or documentation sentence was edited in the resolution; incoming code and citation updates are retained unchanged.

No build, test, generator, checker or verification script was run here. No push.
@luisleo526
luisleo526 merged commit 9464717 into core/cr150-p00-contracts Oct 18, 2026
1 check passed
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