Skip to content

Commit 5b977f3

Browse files
luisleo526claude
andcommitted
Source-bounds records and documentation anchors follow the journal cut and the feed projection change
The reviewed site inventory and the bounds manifest return to main's entries for the ByteWriter owning buffer, the journal payload append and the ByteReader cursor, which the restored one-page journal path no longer changes: the ByteReader buffer and cursor assignments and their manifest entry are gone again, and the journal payload append is back in its function scope. The six site identities of build_native_day_partition (tz, stamps, the three projection builders and the late-open assignment) carry the new trailing scratch-directory parameter in their scope. Five documentation anchors into src/native_order.cpp (the successor-root row assertion and tail bound, index_committed, remaining_path_delivery, check_execution and apply_execution) point at the lines the cut leaves them on. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 9bd3390 commit 5b977f3

5 files changed

Lines changed: 13 additions & 44 deletions

File tree

‎ci/cr150-source-bounds.yaml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,12 +1422,12 @@ entries:
14221422
- {id: "U1370", file: "src/native_order.cpp", symbol: "<expr>", ops: ["grow"], container: "unresolved by the index: <expr>.push_back(...)", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 4406}
14231423
- {id: "U1371", file: "src/native_order.cpp", symbol: "<temp:const_iterator>", ops: ["temp"], container: "unresolved by the index: const_iterator", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 2630}
14241424
- {id: "U1372", file: "src/native_order.cpp", symbol: "<temp:vector>", ops: ["temp"], container: "unresolved by the index: std::vector<LiveRequest>", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 2633}
1425-
- {id: "U1375", file: "src/native_order.cpp", symbol: "buffer_", ops: ["assign", "decl", "grow"], container: "ByteWriter std::vector<unsigned char> and ByteReader pointer initialization", owner: "native-kernel", phase: "unclassified", state: "unreviewed", note: "Retain ByteWriter's owning variable-payload buffer declaration/insert. Add ByteReader's scalar buffer_=nullptr initializer, a cross-class spelling collision with no allocation. The default owning serializer can grow with serialized event bytes; fixed/chunked journal transfer storage does not establish a cap for every ByteWriter use. OPEN.", line: 1183}
1425+
- {id: "U1375", file: "src/native_order.cpp", symbol: "buffer_", ops: ["decl", "grow"], container: "std::vector<unsigned char>", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 1125}
14261426
- {id: "U1377", file: "src/native_order.cpp", symbol: "canonical", ops: ["assign", "decl"], container: "std::vector<RequestHandle>", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 576}
14271427
- {id: "U1378", file: "src/native_order.cpp", symbol: "chunks", ops: ["decl", "grow"], container: "std::vector<std::unique_ptr<Chunk>>", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 1751}
14281428
- {id: "U1379", file: "src/native_order.cpp", symbol: "codec_page", ops: ["decl", "grow"], container: "std::vector<std::byte>", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 1663}
14291429
- {id: "U1380", file: "src/native_order.cpp", symbol: "created", ops: ["alloc"], container: "unresolved by the index: make_shared", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 1301}
1430-
- {id: "U1381", file: "src/native_order.cpp", symbol: "data", ops: ["grow"], container: "ExtFile journal payload append", owner: "native-kernel", phase: "unclassified", state: "unreviewed", note: "The ordinary spill append moved into the non-continued else branch. This appends serialized event bytes to scratch; backing extent grows with retained events/payload, while transfer buffers are fixed. Large continued events use ByteWriter's file path. No event-count or byte bound is inferred from cache capacity; OPEN.", line: 1941}
1430+
- {id: "U1381", file: "src/native_order.cpp", symbol: "data", ops: ["grow"], container: "unresolved by the index: data.append(...)", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 1884}
14311431
- {id: "U1382", file: "src/native_order.cpp", symbol: "directory", ops: ["assign", "decl"], container: "std::string", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 2109}
14321432
- {id: "U1383", file: "src/native_order.cpp", symbol: "external", ops: ["alloc"], container: "unresolved by the index: make_shared", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 1442}
14331433
- {id: "U1384", file: "src/native_order.cpp", symbol: "external_openings", ops: ["alloc"], container: "unresolved by the index: make_shared", owner: "native-kernel", phase: "unclassified", state: "unreviewed", line: 1382}
@@ -1641,7 +1641,6 @@ entries:
16411641
- {id: "U1619", file: "include/pineforge/series.hpp", symbol: "stored", ops: ["alloc"], container: "std::shared_ptr<WindowValues<T>::Page>", owner: "ta-series", phase: "unclassified", state: "unreviewed", note: "Two write-path make_shared identities: first materialization and copy-on-write of one existing page. Each typed page holds min(1024, remaining logical values); all materialized resident pages together scale with logical window length. Non-arithmetic T can own additional payload bytes. Keep both occurrences OPEN, with page-vector bytes covered by U1620.", line: 150}
16421642
- {id: "U1620", file: "include/pineforge/series.hpp", symbol: "values", ops: ["decl"], container: "std::vector<T>", owner: "ta-series", phase: "unclassified", state: "unreviewed", note: "Each WindowValues::Page constructs its typed vector with 1..1024 elements and its initial value. This per-page element bound does not bound the number of owned pages or arbitrary T payloads; complete resident ownership can scale with logical window length. Member/header declarations are outside guarded bounded admission. OPEN.", line: 218}
16431643
- {id: "U1621", file: "src/engine_orders.cpp", symbol: "reset", ops: ["alloc"], container: "private optional ledger page directory and entry pages", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "Two nothrow array allocations: ensure_cache creates ceil(cache_rows/256) owning pointers at line 483; ensure_cache_entry creates min(256, cache_rows-256*p) decoded entries at line 497. The scanner assigns both new expressions to reset; their lexical scopes distinguish the sites. Host and standalone byte policies select the largest R with R*kLedgerEntryBytes+ceil(R/256)*sizeof(void*) <= capacity_bytes. Default 20,449,280 bytes for 65,536 rows on LP64. The ledger owns private pages, with no shared-cache instance or prepared reservation. Optional allocation failure permanently bypasses further allocation; backing reads, appends and replacements continue, with one typed allocation_bypass_count. Actual directory and page bytes are reported once above the fixed base. U1325's directory and U1642's page remain covered here; the old operator-new reservation site is gone. Instance policy/private paging is outside the literal-vector proof. OPEN.", line: 483}
1644-
- {id: "U1622", file: "src/native_order.cpp", symbol: "at_", ops: ["assign"], container: "ByteReader pointer refill cursor", owner: "native-kernel", phase: "unclassified", state: "unreviewed", note: "raw resets a borrowed byte cursor to its fixed caller transfer buffer after a backing read. This assignment allocates nothing and retains no event history; it is indexed because another file declares a container member named at_. The complete decoded value may still own variable payload elsewhere. Retain this lexical site OPEN.", line: 1237}
16451644
- {id: "U1623", file: "src/source/pine_security_eval.cpp", symbol: "builder", ops: ["grow"], container: "FeedProjectionBuilder<RecordedSeriesRow>", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "set_recorded_series_impl writes n paired timestamp/value rows during setup, replacing the separate open_ms/values vector assignments U1040/U1049. One fixed transfer page, one provider control and configured read lines; backing remains n*sizeof(RecordedSeriesRow). No cache parameter bounds n. OPEN.", line: 1556}
16461645
- {id: "U1624", file: "src/source/pine_ta_length.cpp", symbol: "values_", ops: ["assign"], container: "detail::WindowValues<double> move assignment", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "HeldHistory::ensure_slots replaces the owning history when required by keep. Logical slots=(ceil(keep/1024)+1)*1024; existing chunk retirement preserves the semantic lookback. Default typed-page ownership and finite-cache scratch backing are parameterized by keep, never by the resident allowance. Replaces U1103/U1106/U1107/U1110; U1616-U1620 cover the common storage allocations. OPEN.", line: 114}
16471646
- {id: "U1625", file: "src/timeframe.cpp", symbol: "month_opens", ops: ["grow"], container: "FeedProjectionBuilder<int64_t> month column", owner: "calendar-time", phase: "setup", state: "pending-flat-memory", inventory: "F14", grows_with: ["days"], note: "Replaces U1175's month_open reserve and two branch pushes with one append per input daily stamp. Fixed builder transfer and independently configured read-cache residency; scratch backing still stores 8 bytes per stamp, O(days). Keep the original F14 growth obligation OPEN.", line: 869}

‎ci/cr150-source-sites.json‎

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21122,35 +21122,6 @@
2112221122
"spelling": "std :: vector < unsigned char >",
2112321123
"ordinal": 1
2112421124
},
21125-
{
21126-
"file": "src/native_order.cpp",
21127-
"symbol": "at_",
21128-
"scope": [
21129-
"namespace pineforge :: native_order #1",
21130-
"inline namespace native_order_v8 #1",
21131-
"namespace #3",
21132-
"class ByteReader #1",
21133-
"void raw ( void * out , std :: size_t length ) #1",
21134-
"while ( length ) #1",
21135-
"if ( at_ = = end_ ) #1"
21136-
],
21137-
"cls": "assign",
21138-
"spelling": "at_ = . . .",
21139-
"ordinal": 1
21140-
},
21141-
{
21142-
"file": "src/native_order.cpp",
21143-
"symbol": "buffer_",
21144-
"scope": [
21145-
"namespace pineforge :: native_order #1",
21146-
"inline namespace native_order_v8 #1",
21147-
"namespace #3",
21148-
"class ByteReader #1"
21149-
],
21150-
"cls": "assign",
21151-
"spelling": "buffer_ = . . .",
21152-
"ordinal": 1
21153-
},
2115421125
{
2115521126
"file": "src/native_order.cpp",
2115621127
"symbol": "text",
@@ -21466,8 +21437,7 @@
2146621437
"namespace pineforge :: native_order #1",
2146721438
"inline namespace native_order_v8 #1",
2146821439
"struct WorkingRequestCore :: JournalStore #1",
21469-
"void spill_front_chunk ( ) #1",
21470-
"else #1"
21440+
"void spill_front_chunk ( ) #1"
2147121441
],
2147221442
"cls": "grow",
2147321443
"spelling": "data . append ( . . . )",
@@ -44373,7 +44343,7 @@
4437344343
"symbol": "tz",
4437444344
"scope": [
4437544345
"namespace pineforge #1",
44376-
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes ) #1"
44346+
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes , const std :: string & scratch_directory ) #1"
4437744347
],
4437844348
"cls": "assign",
4437944349
"spelling": "tz = . . .",
@@ -44384,7 +44354,7 @@
4438444354
"symbol": "stamps",
4438544355
"scope": [
4438644356
"namespace pineforge #1",
44387-
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes ) #1"
44357+
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes , const std :: string & scratch_directory ) #1"
4438844358
],
4438944359
"cls": "assign",
4439044360
"spelling": "stamps = . . .",
@@ -44395,7 +44365,7 @@
4439544365
"symbol": "trade_days",
4439644366
"scope": [
4439744367
"namespace pineforge #1",
44398-
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes ) #1",
44368+
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes , const std :: string & scratch_directory ) #1",
4439944369
"+ + k ) #2"
4440044370
],
4440144371
"cls": "grow",
@@ -44407,7 +44377,7 @@
4440744377
"symbol": "week_opens",
4440844378
"scope": [
4440944379
"namespace pineforge #1",
44410-
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes ) #1",
44380+
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes , const std :: string & scratch_directory ) #1",
4441144381
"+ + k ) #2"
4441244382
],
4441344383
"cls": "grow",
@@ -44419,7 +44389,7 @@
4441944389
"symbol": "month_opens",
4442044390
"scope": [
4442144391
"namespace pineforge #1",
44422-
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes ) #1",
44392+
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes , const std :: string & scratch_directory ) #1",
4442344393
"+ + k ) #2"
4442444394
],
4442544395
"cls": "grow",
@@ -44431,7 +44401,7 @@
4443144401
"symbol": "late_opens",
4443244402
"scope": [
4443344403
"namespace pineforge #1",
44434-
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes ) #1"
44404+
"bool build_native_day_partition ( NativeDayPartition & out , const std :: string & tz , const std :: string & session , const std :: vector < int64_t > & stamps , const Bar * input_bars , int n_input , std :: size_t projection_cache_bytes , const std :: string & scratch_directory ) #1"
4443544405
],
4443644406
"cls": "assign",
4443744407
"spelling": "late_opens = . . .",

‎docs/design/arena-bound.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ indexPeak(k) = 24 * slots(k) # k > 32
347347
| Consumed partial-cycle data | (41+2*L)*Q | `include/pineforge/source/pine_adapter.hpp:2834`; joined key at `src/source/pine_adapter.cpp:25477` |
348348
| Consumed partial-cycle index | indexPeak(Q) | `include/pineforge/detail/id_pair_store.hpp:642` |
349349
| Ordered consumed-cycle fold | 136*leaves + 2088*branches + 2096*savedPath | `include/pineforge/detail/id_pair_ordered_fold.hpp:161`, `:165`, `:172`, size assertion for `Leaf`, `Branch` and `Snapshot` at `:183` |
350-
| Successor-root rows | 16*R | `src/native_order.cpp:8220`, row assertion for `Row` at `:8224`, 64-row tail bound `kTailRows` at `:8225` |
350+
| Successor-root rows | 16*R | `src/native_order.cpp:8220`, row assertion for `Row` at `:8141`, 64-row tail bound `kTailRows` at `:8146` |
351351
| Frozen external openings | **0 in this certified profile** | Stock source builds owned `BindOpenings` vectors at `src/source/pine_adapter.cpp:7058`, `:7051`, `:9745-9761`; generic external owners are excluded below |
352352

353353
The AVL node is seven uint64 words = 56 bytes, then its value and exact key
@@ -376,7 +376,7 @@ exit_time (8), qty (8), entry_incarnation (8), side (1), margin flag (1)
376376
and ID length (4), after the ID bytes. This is not sizeof(Row).
377377

378378
Successor rows are two uint64 values. The WorkingRequestCore method `index_committed`
379-
defined at `src/native_order.cpp:3152` omits kept-handle replacements and appends a
379+
defined at `src/native_order.cpp:3073` omits kept-handle replacements and appends a
380380
root only when a newly issued definition has one. The 64-row RAM tail makes
381381
charging every issued row conservative. Partial closes create one trade
382382
row per affected lot: `src/engine_execution.cpp:1241`. Bracket definitions

0 commit comments

Comments
 (0)