Skip to content

Commit 5dbe91c

Browse files
luisleo526claude
andcommitted
Merge batch-B and the consumed-key fold fix (583c221) into the O(1) integration base 6cfcff0
Resolution of 70 conflict hunks in 14 files by lane o1w-merge0 (Codex gpt-6.1-sol), read and committed by the supervisor. Keeps both sides: the ram-lane id-pair store (slab binding, admission, collisions, iteration, failure classification) with the ordered-fold structure of WL-PTAILFIX (incremental disk fold, fold_sorted), batch-B (L17e seal/streaming, L7c SpillCurve, L9s selected sink assembly, L19k, L18 position-tail spill), jailed manifests with selected sinks in run_json.py. Generated files (run_failure_codes_diff.json, run_failure_registry.inc, run-failure-codes.md) derived from the merged catalog, not hand-merged. Two files outside the conflict list were repaired: id_pair_scratch_file.hpp (scratch_io_failed kept with the fold I/O instrumentation) and test_id_pair_ordered_fold.cpp (failure expectation updated, folded-slab coverage added). NOT YET VERIFIED: no build or test has run on this commit. Open for the lab: preflight generated-file, doc-anchor and doc-lint stages first, then test_id_pair_store, test_id_pair_store_ram, test_id_pair_ordered_fold, test_adapter_auxiliary_disk, test_adapter_idpair_ram, then release and debug. First code review: the slab fold (quadratic key comparisons while mutating, fixed buffers). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2 parents 6cfcff0 + 583c221 commit 5dbe91c

67 files changed

Lines changed: 10703 additions & 904 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CMakeLists.txt‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ set(PINEFORGE_SOURCE_LAYER_SOURCES
9898
src/source/magnifier_intrabars.cpp
9999
src/source/market_admission.cpp
100100
src/source/pine_adapter.cpp
101+
src/source/pine_position_tail.cpp
101102
src/source/pine_path_resolve.cpp
102103
src/source/pine_scheduler_native.cpp
103104
src/source/pine_scheduler.cpp
@@ -155,9 +156,10 @@ set(PINEFORGE_KERNEL_SOURCES
155156
src/native_bar_views.cpp
156157
src/selected_report_view.cpp
157158
src/selected_window_plan.cpp
159+
src/metrics_spill_curve.cpp
160+
src/report_scratch.cpp
158161
)
159-
# The kernel-only archive. Same objects, same flags as the kernel half of
160-
# libpineforge.a — a consumer that never speaks Pine links this one.
162+
# The kernel-only archive: libpineforge.a's kernel objects and flags, for consumers that never speak Pine.
161163
add_library(pineforge_kernel STATIC ${PINEFORGE_KERNEL_SOURCES})
162164
add_library(PineForge::kernel ALIAS pineforge_kernel)
163165
# So a find_package(PineForge) consumer spells it the same way an in-tree one

‎docker/run_failure_codes.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,10 @@
11701170
"magnifier_volume_weighted",
11711171
"bench",
11721172
"ohlcv_bin",
1173-
"verify_bin"
1173+
"verify_bin",
1174+
"report_sink",
1175+
"run_id",
1176+
"spill_dir"
11741177
]
11751178
}
11761179
},

‎docker/run_failure_codes_diff.json‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"to": {
99
"version": null,
1010
"unreleased": true,
11-
"catalogSha256": "1aad8236944b723ee1b1393af517aba2052c0c2a2fb0ec516c95ff1ebd9b37d3"
11+
"catalogSha256": "550d56baebc7986a7bc2a5a33fb979a4b7774cca3c88b22668b3806ad7297852"
1212
},
1313
"catalogSchema": {
1414
"before": "pineforge-run-failure-catalog/v1",
@@ -238,7 +238,10 @@
238238
"magnifier_volume_weighted",
239239
"bench",
240240
"ohlcv_bin",
241-
"verify_bin"
241+
"verify_bin",
242+
"report_sink",
243+
"run_id",
244+
"spill_dir"
242245
]
243246
}
244247
]

‎docker/run_json.py‎

Lines changed: 147 additions & 58 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Preflight entry for the CR-150 L9S selected report regression tests."""
2+
from pathlib import Path
3+
import sys
4+
5+
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tests"))
6+
7+
from test_run_json_selected_sink import * # noqa: F401,F403,E402
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""CR-150 L9B preflight discovery for the named-sink summary contract tests."""
2+
from pathlib import Path
3+
import sys
4+
5+
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tests"))
6+
7+
from test_run_json_sink_summary import * # noqa: F401,F403,E402

‎docker/selected_window_report.py‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"SelectedWindowCountsC", "SelectedWindowError", "WIRE_VERSION", "WindowRequest",
4343
"build_report_window", "calendar_record", "calendar_session", "calendar_timezone",
4444
"canonical_timeframe", "capabilities_record", "check_native_counts",
45-
"check_report_placements", "check_selected_curve", "check_unsupported_options",
45+
"check_report_placements", "check_selected_curve", "check_selected_sink_curve",
46+
"check_unsupported_options",
4647
"refusal_for_plan", "report_shape_full",
4748
"retained_rows", "support_policy", "timeframe_seconds", "update_rows_hash",
4849
"validate_request",
@@ -626,7 +627,30 @@ def check_selected_curve(curve: Sequence[Mapping[str, Any]], start_ms: int,
626627
if set(point) != {"time_ms", "equity", "open_profit"}:
627628
raise _invariant(f"point {position} of the selected curve does not have exactly "
628629
"time_ms, equity and open_profit")
629-
anchor = curve[0]
630+
_check_selected_anchor(curve[0], start_ms, initial_capital)
631+
632+
633+
def check_selected_sink_curve(anchor: Optional[Mapping[str, Any]], equity_points: int,
634+
start_ms: int, window_script_bars: int,
635+
initial_capital: Any) -> None:
636+
"""Check a verified sink's E count and first E, without retaining its curve.
637+
638+
The fixed v1 reader has already checked every point's fields and types and
639+
the trailer; the engine's selected latches own pre-roll, contiguity and
640+
observation-count checks. Anchor semantics, including unresolved capital,
641+
are shared with the array path.
642+
"""
643+
if equity_points != window_script_bars + 1:
644+
raise _invariant(f"the selected curve has {equity_points} points, the plan says "
645+
f"{window_script_bars + 1}")
646+
if anchor is None or set(anchor) != {"time_ms", "equity", "open_profit"}:
647+
raise _invariant("point 0 of the selected curve does not have exactly "
648+
"time_ms, equity and open_profit")
649+
_check_selected_anchor(anchor, start_ms, initial_capital)
650+
651+
652+
def _check_selected_anchor(anchor: Mapping[str, Any], start_ms: int,
653+
initial_capital: Any) -> None:
630654
if anchor["time_ms"] != start_ms or anchor["open_profit"] != 0:
631655
raise _invariant("the selected curve does not start with the window anchor at T with "
632656
"open profit 0")

0 commit comments

Comments
 (0)