Repository navigation
cr150: freeze the four 1.7.0 contracts (P00: report sink ABI + writer, TradeLedger, metric accumulator/point source, bar views) - #413
Draft
luisleo526 wants to merge 40 commits into
Draft
luisleo526 wants to merge 40 commits into
luisleo526 wants to merge 40 commits into
Conversation
Refresh citation prose from d0fd21c and 131852f, including All DESIGN line numbers below refer to that revision, to identify the final rev 6 text and correct its DESIGN line ranges. Update only citation numbers in the contract headers and compile-witness comments; declarations, assertions, source anchors and CMake registration remain unchanged.
Apply CORE-TOP's 10-18 16:04 rev 6 amendment. Resolve S1 and T1 wording from 57857a5, c0c879c and 9f01fbc; the four other OPEN items remain unchanged. Add declaration-only ledger clear/reserve/at/empty contracts and receipt-query initialization/return rules; extend only compile-time checks for the new method types.
Apply the CORE-TOP rev 6 amendment recorded at 10-18 19:24: adopt the V1/V2 proposal with all nine required changes and the eager-at-configure component-digest ruling. Supersede OPEN/forward-only prose from d0fd21c, 54acd1c, 9f01fbc and a6abb14. Refresh the scope wording from 57857a5 and extend the source inventory from 131852f with projection validation. Freeze declarations and contracts only: pending staging and active query on the private consumer, explicit feed context/accessor, four-operation provider, and static assertions. Existing execution paths and CMake line pins are unchanged.
This was referenced Oct 18, 2026
* feat(cr150): resolve contract OPEN items V1 and V2 Apply the CORE-TOP rev 6 amendment recorded at 10-18 19:24: adopt the V1/V2 proposal with all nine required changes and the eager-at-configure component-digest ruling. Supersede OPEN/forward-only prose from d0fd21c, 54acd1c, 9f01fbc and a6abb14. Refresh the scope wording from 57857a5 and extend the source inventory from 131852f with projection validation. Freeze declarations and contracts only: pending staging and active query on the private consumer, explicit feed context/accessor, four-operation provider, and static assertions. Existing execution paths and CMake line pins are unchanged. * test(cr150): add L15a view binding red witness * feat(cr150): implement L15a pending bar view bindings Implement the frozen ee3083d V1/V2 contract and the 19:24 eager-component ruling. Preserve v3 layouts, owned fallbacks and digest bytes; add no borrowed production export or concrete lower provider. Update read-inventory claims introduced by d0fd21c and amended by a6abb14 and ee3083d; other documentation edits only carry source coordinates. Reword the EntryExitGuard explanation introduced by 47184e5 to include unconditional outer-run binding detachment. Red witness committed first as 100a605. Builds, compilation, tests and source guards were not run on this Mac, per CORE-TOP brief; lab verification remains pending. * fix(cr150): list L15a kernel sources on separate lines Round 3 item 1, lab rj-20261018t115236-b4aba1: repair the shared source line introduced by 2539102 so the detached-comment reader sees separate translation units. Carry every affected root-CMake documentation coordinate by one line; tests/CMakeLists.txt and its private_fixture_reads.evidence pin stay unchanged, following the line-pin discipline of P00 fix4 (25e4491). The documentation source claims came from 47184e5 and 868aa65; only their coordinates change. No builds, tests or guards executed on the Mac. * docs(cr150): carry all L15a source citations to the new tree Round 3 item 2, lab rj-20261018t115236-b4aba1: carry 302 source-coordinate spans from ee3083d to the unchanged 2539102 engine sources, including all 288 anchors listed in lab-doc-anchors.log and 14 additional affected references. Handle basenames, full paths and shorthand lists while retaining the backticked claims and the intended occurrence of repeated symbols. Preserve citations already moved in Round 2. Doc source-claim provenance: 47184e5, 65c69b0, f48b7c8 and 868aa65. Only citation coordinates change; no policy, numeric assertion, frozen declaration or engine behavior is reworded. Repair source drift introduced by 2539102. No builds, compilation, tests or guards executed here. CORE-TOP must rerun the two failed preflight stages and required verification on the lab. * test(cr150): keep FX index pins and expect the L15a tail Round 4, lab rj-20261018t124444-007ef1: update only NativeFxCurveVersions.test_new_paths_append_without_reindexing_existing_pins. Retain FX at FILES[12:14], the identity pin at 11 and both uniqueness checks; expect the seven L15a paths in FILES[14:]. Comparison with core/cr150-p00-contracts (ee3083d) confirms its full 14-entry FILES prefix is already unchanged, so do not reorder or rewrite the guard list. Follow the FX append precedent from e7cdf05 without preserving its stale newest-tail assertion. No build, compilation, test or guard executed here.
* test(cr150): pin L8a ledger and retaining native behavior 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. * feat(cr150): implement the retaining TradeLedger container 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. * test(cr150): adapt non-frozen helpers to TradeLedger 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. * test(cr150): adapt frozen oracle carriers through snapshots 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. * fix(cr150): reserve settlement effects through TradeLedger 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. * docs(cr150): refresh every L8a source citation 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.
…er (L1) (#414) * test(cr150): add red pf_bar file and csv2bin contract proofs * feat(cr150): add durable streaming csv2bin converter * test(cr150): gate corpus identity on materialized fixtures * fix(cr150): report unexpected csv2bin faults as JSON * test(cr150): pin amended chart refusal contract * fix(cr150): apply amended chart timeframe and timestamp refusals
…, trailer, SHA-256, reader) (#416) * test(cr150): pin L6a sink wire format before implementation Add the P00-only runtime witness, 1,000,000 checked-in Python repr samples and all 2,098 binary64 powers of two, UTF-8 cases, writer artifacts and strict-reader refusals. Expected red on a6abb14: undefined report_sink formatting and LineWriter implementations; pf_sink is also absent. Compilation and execution are reserved for CORE-TOP lab per the lane brief; no observed red diagnostic is claimed. * feat(cr150): add dependency-free streaming SHA-256 for L6a Implement the FIPS 180-4 block schedule, streaming updates, copy-on-finalize digest and lowercase hex encoding. Extend the already-red format unit with NIST vectors and every two-part split of the short messages. Lab compilation and execution remain pending per the executor brief. * feat(cr150): implement isolated P00 report sink writer Add Python repr-compatible binary64 rendering, byte-validating UTF-8 escaping, the seven fixed descriptors, E/T serialization and SHA-counted trailers. Buffer checked writes in 64 KiB and latch validation or I/O failure before publication. Keep P00 declarations unchanged. S2 uses internal WriterError and cached repeated finalization, with runtime error-code mapping reserved for L6b-1. No build or tests were run on this machine. * feat(cr150): add strict streaming report sink reference reader Validate fixed ordered v1 descriptors, typed records, exact Python f64 lexemes, bounded UTF-8 JSON lines and the final counts/SHA receipt. Yield immutable typed rows in one pass and expose completion only after EOF. Extend the format witness with an exact 1 MiB boundary, zero/nonzero descriptor shapes, finalization lifecycle and malformed-stream cases. Execution is deferred to CORE-TOP lab as required. * test(cr150): isolate the L6a reader proof from host settings Keep Python assertions enabled regardless of PYTHONOPTIMIZE, suppress bytecode artifacts and retry an interrupted child wait. This only strengthens the pending lab witness; no build or test was executed here. * fix(cr150): wire L6a sink sources and format unit into CMake Apply CORE-TOP wave1 and the Fable gating read: add report_sink_writer.cpp and sha256.cpp to PINEFORGE_KERNEL_SOURCES, one per line, and append the format unit inventory/registration after the pinned test lines. Mechanically re-anchor only shifted top-level CMake citations. Preserve the prose and claims recorded by 47184e5 and 868aa65; no sentence is reworded. Keep all C++/Python bodies, P00 declarations, fixture evidence and other lines unchanged. No configuration, compilation, tests or guards run in this fix round per the executor brief. Commit hooks are disabled for this invocation to honor that instruction; lab proof remains with CORE-TOP.
* test(cr150): add L15a view binding red witness * feat(cr150): implement L15a pending bar view bindings Implement the frozen ee3083d V1/V2 contract and the 19:24 eager-component ruling. Preserve v3 layouts, owned fallbacks and digest bytes; add no borrowed production export or concrete lower provider. Update read-inventory claims introduced by d0fd21c and amended by a6abb14 and ee3083d; other documentation edits only carry source coordinates. Reword the EntryExitGuard explanation introduced by 47184e5 to include unconditional outer-run binding detachment. Red witness committed first as 100a605. Builds, compilation, tests and source guards were not run on this Mac, per CORE-TOP brief; lab verification remains pending. * fix(cr150): list L15a kernel sources on separate lines Round 3 item 1, lab rj-20261018t115236-b4aba1: repair the shared source line introduced by 2539102 so the detached-comment reader sees separate translation units. Carry every affected root-CMake documentation coordinate by one line; tests/CMakeLists.txt and its private_fixture_reads.evidence pin stay unchanged, following the line-pin discipline of P00 fix4 (25e4491). The documentation source claims came from 47184e5 and 868aa65; only their coordinates change. No builds, tests or guards executed on the Mac. * docs(cr150): carry all L15a source citations to the new tree Round 3 item 2, lab rj-20261018t115236-b4aba1: carry 302 source-coordinate spans from ee3083d to the unchanged 2539102 engine sources, including all 288 anchors listed in lab-doc-anchors.log and 14 additional affected references. Handle basenames, full paths and shorthand lists while retaining the backticked claims and the intended occurrence of repeated symbols. Preserve citations already moved in Round 2. Doc source-claim provenance: 47184e5, 65c69b0, f48b7c8 and 868aa65. Only citation coordinates change; no policy, numeric assertion, frozen declaration or engine behavior is reworded. Repair source drift introduced by 2539102. No builds, compilation, tests or guards executed here. CORE-TOP must rerun the two failed preflight stages and required verification on the lab. * test(cr150): keep FX index pins and expect the L15a tail Round 4, lab rj-20261018t124444-007ef1: update only NativeFxCurveVersions.test_new_paths_append_without_reindexing_existing_pins. Retain FX at FILES[12:14], the identity pin at 11 and both uniqueness checks; expect the seven L15a paths in FILES[14:]. Comparison with core/cr150-p00-contracts (ee3083d) confirms its full 14-entry FILES prefix is already unchanged, so do not reorder or rewrite the guard list. Follow the FX append precedent from e7cdf05 without preserving its stale newest-tail assertion. No build, compilation, test or guard executed here. * test(cr150): add L16 lower-path provider red witness * feat(cr150): stream magnifier lower paths through bounded providers Implement L16 on the L15a side channel: preserve the vector reference, decide whole-input fallback before generation, cache count, and publish monotone overlapping segments with separate look-ahead. Route kernel preflight and delivery plus scheduler reads through the bound provider. Keep metadata and count-first digests identical. Update the guard reader inventory and route requirements for these callers. Add synthetic path, execution/report/hash, preflight-boundary and provider heap witnesses. No compilation, test, guard or corpus command was executed on this machine; CORE-TOP owns the lab proof. * docs(cr150): refresh source coordinates shifted by L16 Carry 306 affected published source-coordinate spans from ddc9c94 to 411e48e, including shorthand lists and the relocated scheduler next_open. Preserve the existing claims and content pins; no policy or numeric assertion is reworded. Refresh only coordinates shifted by this lane. Doc source-claim provenance: ae868d6, 2539102, 9f01fbc, 47184e5, 65c69b0, f48b7c8 and 868aa65. This repairs source drift introduced by 411e48e; it does not revert those claims. No doc guard or other verification was executed here; CORE-TOP must run check_doc_anchors in the lab. * test(cr150): pin lower-provider hash after input release Strengthen the L16 execution differential by releasing the borrowed input after the public run exit, then querying the retained continuation hash. This exercises the eager component digest and provider detachment rather than relying on live caller storage. Lab execution remains pending under the no-run instruction.
* test(cr150-l8b): pin sealed trade percent prefix identity 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. * feat(cr150-l8b): seed percent averages from sealed trade rows 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. * fix(cr150-l8b): waive derived trade percent prefix state 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. * test(cr150-l8b): register trade percent prefix unit 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.
* test(cr150-l7b): add point-source equity metrics witness * feat(cr150-l7b): stream equity metrics from array points * docs(cr150-l7b): record lane handoff * docs(cr150-l7b): clarify handoff diff scope * chore(cr150-l7b): move handoff artifacts out of engine * fix(cr150-l7b): define ordinary point-source metrics entry
* test(metrics): add isolated CR-150 trade accumulator red test Reuse the L0 fixed/random trade fixtures and unchanged reference. Exercise copy snapshots and repeatable finish without sink dependencies. The base declares the accumulator but provides no method definitions; CORE-TOP must record its link failure on the lab because this lane cannot compile or execute locally. * refactor(metrics): fold trade stats through the P00 accumulator Keep the existing per-row arithmetic and final formulas in one implementation, deep-copy prefix state, and make finish a const read. Route the array entry point through the fold and refresh the shifted documentation anchors. No broker state or P00 declarations change. Lab compilation, byte comparisons and repository verification remain pending under the no-local-execution brief.
* test: specify CR-150 heap census and unique-id controls * test: add live CR-150 heap census and lane inventory * fix: attribute heap growth using demangled allocation frames * fix: select the run chart and map probe feed tapes
Each CR-150 lane registers its tests in tests/cr150.d/<lane>.cmake, included in sorted order; scripts/check_cr150_cmake_d.py enforces the lane-file rules (R1). Lab rj-20261019t001911-c8ee68, all four steps passed on e721eec.
CR-150 lane L3. Lab rj-20261019t024640-12bc42, all four steps passed on 4b60d7b (contains 5e167bd). Merged as 9fe4034 (merge of the integration head abfa69f), which differs from the proved tree only by L19a's four files, none of which L3 touches; the next integration batch proof covers the combination. Fable read wave 6: ACCEPT.
CR-150 lane L6b-1. Squash proof 7718f30c4 (one parent, the integration head 09a8a45; tree == the lane head da0d434): lab rj-20261019t064129-afeb0b, all four steps passed; test_report_sink_l6b1 / _format / test_cr150_cmake_d(+controls) passed in Release AND Debug. Doc reverts: this lane's lineage deletes the sentence 'The counts below include recorded outputs and describe the released 1.5.0 API.' from README.md and docs/pages/index.md, introduced by 4c78f39.
CR-150 L17a: report sink selected mode (proof 8892d2e19 on 39a718b, lab rj-20261019t075059-af2427 4/4). Lab proof commit, never pushed. Its tree equals the lane merge commit; its single parent is the integration head, as the GitHub squash will write it. Documentation sentence this squash removes on purpose, named for check_doc_reverts (README.md and docs/pages/index.md): "The counts below include recorded outputs and describe the released 1.5.0 API." introduced by 4c78f39, which the released-1.6 counts wording replaces.
CR-150 BATCH2: L19e + L19h + L15b (proof 0c9fa8fc9 on 4d168c0: preflight + docs; full code proof rj-20261019t075150-df09fd on 39a718b). Lab proof commit, never pushed. Its tree equals the batch merge commit; its single parent is the integration head 4d168c0 (L17a #432 merged), as the GitHub squash will write it. The batch's code was proved with all four steps as lab job rj-20261019t075150-df09fd on 39a718b (squash proof 0b79b501d); this round only merges L17a and resolves docs/design/cr150-contracts.md (both lanes' rows kept, native_run_spec_digest coordinates from L17a's side), so this proof runs preflight and docs only. Lanes in this squash (each lane's own code is unchanged; shared documentation pages were resolved once; three scripts combine both sides: scripts/broker_state_hash_waivers.txt, scripts/check_c_abi_runtime.py, scripts/test_ci_verify.py, public C ABI declarations 104 and runtime implementations 84): - L19e: physical admission-journal retirement, test_admission_journal_window; removes the lane-authored cadence assertion under CORE-TOP's F0a ruling of 09:48. - L19h: exit_cancel_bracket never-issued incarnation for non-working members; transcript pins re-harvested under CORE-TOP's fixture authority of 07:49 (lab job rj-20261019t010941-4bc9d7). - L15b: native bar views. Documentation sentences this squash removes on purpose, named for check_doc_reverts: - docs/pages/native-engine.md: the sentence "No epoch bump or reordering occurs: the borrowed symbol-feed setter is an additive compiled-strategy runtime symbol" introduced by 0d8b203 is replaced by the L15b wording. - docs/pages/native-engine.md: the sentence "No new virtual, no epoch bump, and nothing about the established C ABI moves: the compiled-strategy runtime symbols and their counts are untouched" introduced by 70ddaa3 is replaced by the L15b wording. - README.md and docs/pages/index.md: the sentence "The counts below include recorded outputs and describe the released 1.5.0 API." introduced by 4c78f39 stays replaced by the released-1.6 counts wording that the integration side carries.
CR-150 L9a: run_json sink (proof 7f7570047 on 4d168c0, lab rj-20261019t091807-8cc11e 4/4; no shared file with BATCH2). Lab proof commit, never pushed. Its tree equals the lane merge commit; its single parent is the integration head, as the GitHub squash will write it. Documentation sentence this squash removes on purpose, named for check_doc_reverts (README.md and docs/pages/index.md): "The counts below include recorded outputs and describe the released 1.5.0 API." introduced by 4c78f39, which the released-1.6 counts wording replaces.
| return bars, n, feed_hasher.hexdigest() | ||
|
|
||
|
|
||
| class _MappedBars(dict): |
| lib.strategy_free(st) | ||
| finally: | ||
| if sink is not None: | ||
| sink.close() |
|
|
||
| sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tests")) | ||
|
|
||
| from test_run_json_bin import * # noqa: F401,F403,E402 |
| if not same: | ||
| try: | ||
| same = os.path.samefile(args.ohlcv_bin, chart) | ||
| except OSError: |
CR-150 L19b: group receipt retirement (code proof rj-20261019t091808-c4e6f9 4/4 on 420acd1; fence re-merge onto 0d05bfa proved by preflight rj-20261019t103829-f98b79, squash proof 6be2aa77a). Lab proof commit, never pushed. Its tree equals the lane merge commit b1f0fe7; its single parent is the integration head 0d05bfa (L9a #442 merged), as the GitHub squash will write it. The lane's code and tests were proved with all four steps as lab job rj-20261019t091808-c4e6f9 on 420acd1 (a branch containing 4d168c0); this round only re-places the lane's tests/CMakeLists.txt fence after L9a's fence, so this proof runs preflight only (the fence checker and the CMake wiring check live there). L19b: receipt-retirement and native-order fold changes with test_group_receipt_retirement; its Debug-mode compile definition lives in the fence core-cr150-l19b.
CR-150 L6b-3: report sink (code proof rj-20261019t094017-5e9f62 4/4 on 5a20514; fence re-merge onto 366489c proved by preflight rj-20261019t110311-b8eccc, squash proof ecec8baf9). Lab proof commit, never pushed. Its tree equals the lane merge commit; its single parent is the integration head 366489c (L19b #430 merged), as the GitHub squash will write it. The lane's code and tests were proved with all four steps as lab job rj-20261019t094017-5e9f62 on 5a20514 (a branch containing 2fff630); this round only re-places the lane's tests/CMakeLists.txt fence after L9a's fence, so this proof runs preflight only (the fence checker and the CMake wiring check live there). L6b-3: report sink records; its compile definitions for test_report_sink_l6b3 live in the fence core-cr150-l6b3.
CR-150 L6b-2: report sink equity tail, ruling (a) with L17a (full proof rj-20261019t120725-b21ae2 4/4 on abe9899, squash proof 6813e2889; Fable read core-cr150-read-l6b2 ACCEPT). Lab proof commit, never pushed. Its tree equals the lane merge commit; its single parent is the integration head, as the GitHub squash will write it. Documentation sentence this squash removes on purpose, named for check_doc_reverts (README.md and docs/pages/index.md): "The counts below include recorded outputs and describe the released 1.5.0 API." introduced by 4c78f39, which the released-1.6 counts wording replaces.
CR-150 L19g: K1 origin retention at exact base parity (proof a9a1eb47d on 76e2310, lab rj-20261019t141823-15589c 5/5 incl. parity 312/312; Fable delta read core-cr150-read-l19g3 ACCEPT). Lab proof commit, never pushed. Its tree equals the lane merge commit 8f085fa; its single parent is the integration head 76e2310 (L6b-2 #435 merged), as the GitHub squash will write it. This is the full five-step proof (preflight, release, debug, docs, parity). L19g: K1 lifecycle retention keeps a closed-origin exit row while its whole open cycle still holds the side (placement_cycle >= cycle and not withdrawn), with the audit mirror aligned; fixtures test_k1_origin_pin_bound, test_k1_closed_origin_margin_revival and test_k1_global_origin_margin_revival; quiet_bar pins equal the integration pins.
* test: specify CR-150 heap census and unique-id controls * test: add live CR-150 heap census and lane inventory * test: specify K5 retirement in script-bar space * fix: retire K5 placements by their script-bar birth * test: cover late K5 placements with preserved command births * fix: age K5 evidence by script placement timestamps * fix: harden K5 clock per core-cr150-read-l19f Use the prior script open already stored in last_broker_open_ms_ as required by core-cr150-read-l19f E3 and CORE-TOP ruling 05:50. This avoids first-input labels aging previous-bar placements early. * test: re-pin F0b aggregates per core-cr150-read-l19f Authority: CORE-TOP fixture authority 10-19 05:50 and core-cr150-read-l19f E3. Values copied from harvest-output.txt, the saved post-hardening c6b52c1 lab harvest rj-20261018t220229-07a5eb. All nine non-aggregated arrays match byte for byte and remain unchanged. k_aggregated[1]: 12041604811111138262 -> 18293691538757856047 k_aggregated[2]: 16843987575962729789 -> 13524955674396934022 k_aggregated[4]: 16843987575962729789 -> 13524955674396934022 k_aggregated_magnifier[1]: 1121975842132629243 -> 10754984951218339308 k_aggregated_magnifier[2]: 980215841112202357 -> 8581611433610258972 k_aggregated_magnifier[4]: 980215841112202357 -> 8581611433610258972
…y-bin) (#429) * test(cr150): add red pf_bar file and csv2bin contract proofs * feat(cr150): add durable streaming csv2bin converter * test(cr150): gate corpus identity on materialized fixtures * fix(cr150): report unexpected csv2bin faults as JSON * test(cr150): pin amended chart refusal contract * fix(cr150): apply amended chart timeframe and timestamp refusals * test(cr150): pin binary chart and feed load contract * feat(cr150): map binary charts and borrowed symbol feeds * test(cr150): cover binary verification and partial-load cleanup * test(cr150): capture parser refusals in binary CLI helper * fix(cr150): synchronize binary failure registry and docs by hand * fix(cr150): preserve the empty-request argparse refusal * fix(cr150): register the binary driver in the mirrored tests tree --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
…224095) (#455) Lab proof commit, never pushed. Its tree equals the lane head; its single parent is the integration head 9224095 (L2 #429 merged), as the GitHub squash will write it. CR-150 lane: see the lane REPORT.md for design, tests and wiring. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* cr150 l19lb: executor result for CR-150 lane l19lb (supervisor commit) Edit-only Codex executor output committed by the supervisor on integration b3c3923. Design, tests, wiring and the compile audit are in the lane's REPORT.md. Not yet proven on the lab; the four-step proof and any parity sweep follow on a squash proof commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l19lc: executor result for CR-150 lane l19lc (supervisor commit) Edit-only Codex executor output committed by the supervisor on integration b3c3923. Design, tests, wiring and the compile audit are in the lane's REPORT.md. Not yet proven on the lab; the four-step proof and any parity sweep follow on a squash proof commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l9c: executor result for CR-150 lane l9c (supervisor commit) Edit-only Codex executor output committed by the supervisor on integration b3c3923. Design, tests, wiring and the compile audit are in the lane's REPORT.md. Not yet proven on the lab; the four-step proof and any parity sweep follow on a squash proof commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l19l: executor result for CR-150 lane l19l (supervisor commit) Edit-only Codex executor output committed by the supervisor on integration b3c3923. Design, tests, wiring and the compile audit are in the lane's REPORT.md. Not yet proven on the lab; the four-step proof and any parity sweep follow on a squash proof commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l9c: portable report sink (named temp file, per-reader offsets), sink canary line, keep-sink switch (fix round 1) The temporary report sink is a named mode-0600 file unlinked at close, so every SinkReader opens its own descriptor on Linux and Darwin (no /proc/self/fd or /dev/fd branch). run_strategy.py prints `sink_canary: probe=<id> bytes=<n> records=<n> trades=<n> ok` per probe and PINEFORGE_KEEP_REPORT_SINK keeps the sink file of the named probes (or all). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l19m: exit-phase store on disk, release empty cohort maps and rosters (executor result) The closed-trade exit phase byte vector (one byte per closed-trade index) moves to a ScratchFile-backed ExitPhaseStore with one fixed 4 KiB page. The cohort live_units_by_origin map (104 B per distinct entry id) and the opened roster vector (24 B per id) are released as soon as they are empty. Written on the old base; merged onto the L19l head in the next commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l19n: kernel calendar memo and certified-cycle ring reserve their span buffers once (executor result) The session-day memo (64 direct-mapped slots) and the certified-cycle ring (4 entries) were already fixed-size; what grew was the heap each slot owned, one span buffer per new day until the table filled. Every slot's buffer is now reserved once to a proven per-day bound (session_day_span_bound) and only assign()ed afterwards, so live heap is constant. Table geometry, slot function and eviction rule are unchanged. Two new source-free tests compare against the memo-free calendar. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l9c: per-run canary log for full and subset sweeps, canary also checks the E records against the engine receipt (fix round 2) scripts/run_corpus.sh and scripts/check_corpus_parity.sh keep the sink_canary:/sink_kept: lines of every probe, passing or failing, in one PINEFORGE_CANARY_LOG (unset: no log I/O, behaviour unchanged). New scripts/check_sink_canary_log.py requires exactly one well-formed ok canary per probe of the sweep's own list. run_strategy.py reads the engine's receipt count_e from the live handle and the canary compares the E records a fresh strict read decodes against it; the line gains `equity=<n>` before the verdict. The DESIGN 3.11 wording for the named temporary sink is in the design folder, outside this tree. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l19l+l19m: round-2 fixes: exit-phase store and kernel roster store removed, coded throws, portable fault injection, comments restored, citations refreshed The exit-phase byte vector returns to its base form (its windowing is L8c's); KernelRosterStore is removed (cohort_exists is a range check plus the map); the two uncoded throws in pine_adapter.cpp now carry run-failure codes (report_sink_failed for a corrupt scratch cohort record, engine_invariant for a fixture backend selected after use); the fixture lifecycle is explicit and tested; the Pine prefix of 18 literals in id_pair_store.hpp (kernel-residuals check) is removed; fault injection opens the file by path instead of /dev/fd; the orphan fixture and a stale process comment are removed; the four deleted comment sentences of the base are restored; two witnesses (live settlement capacity release, part C typed failure) are added; 426 doc citations across seven documents are refreshed (digits only). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs: re-anchor file:line citations after merging integration 5022017 Digits only, no prose changed: every citation into a file this lane or L8c changed was recomputed from the final tree. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * cr150 l19l: reversal cancels exits of every known cohort id again, not only the resident ones (behaviour fix, witness test) L19l-A's disk-resident cohort table made the reversal cancellation loop (on_applied, full close) visit resident rows only, while a spilled cohort with no exposure can still own queued exits; cancellation is an action over the id, so spilling an eligible row suppressed it and changed command events, pending requests, hashes and later trades. The loop now snapshots the same two exemptions as the base (the applied snapshot's source id and any live entry opening on the new side) and streams every logical id in lexicographic order through the new DiskResidentIdTable::for_each_sorted_id, without restoring facts or building a history-sized vector. tests/test_adapter_reversal_storage.cpp runs a live reversal fixture with capacity release and cohort eviction on and off against the retained-storage run, comparing every trade field, recorded and callback hashes and the final hash. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
| raise IndexError("sink row index out of range") | ||
|
|
||
|
|
||
| class _SinkReport(dict): |
| docker_dir = str(REPO_ROOT / "docker") | ||
| if docker_dir not in sys.path: | ||
| sys.path.insert(0, docker_dir) | ||
| import run_json |
|
|
||
| sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tests")) | ||
|
|
||
| from test_run_json_sink import * # noqa: F401,F403,E402 |
| if not self.keep: | ||
| try: | ||
| os.unlink(self.path) | ||
| except FileNotFoundError: |
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 P00, per DESIGN rev 6 (sha256 68bda6e3…) sections 2.2, 3.3, 3.4 and 3.7. Declarations and doc comments only; no existing call path changes.
include/pineforge/report_sink.h(C ABI) andreport_sink_writer.hpp: the sink and its line writer. S1 receipt-query behaviour as ruled.include/pineforge/trade_ledger.hpp: the ledger API. T1 addsclear/reserve/at/emptyand vector-style invalidation.include/pineforge/metrics_stream.hpp: the accumulator and point source.include/pineforge/native_bar_views.hpp: the views header.docs/design/cr150-contracts.md: maps each declaration to its DESIGN section.tests/test_cr150_contract_headers{.cpp,_c.c}: a compile-only test with static_asserts on the frozen facts.Gating read (Fable): accepted, with the docs and the S1/T1 fixes applied. Lab: rj-20261018t093110-9b52e1 (preflight, release, debug, docs) green on a6abb14.
Not to merge before the 1.6.2-rc.1 cut (1.6.2 is EN-115 only).
🤖 Generated with Claude Code