Skip to content

Commit 86a44b5

Browse files
luisleo526claude
andcommitted
Source-bounds records for the feed projection builder's resident mode
The builder now creates its scratch provider either in its constructor (the default, file-backed mode) or in a spill helper once a resident projection passes its one transfer page, publishes a resident provider holding a copy of at most that page, and keeps the scratch directory it was given. The reviewed site inventory records the two provider allocation sites, the resident provider allocation and the directory string, and the bounds manifest gains an entry for each of the last two; the existing provider entry points at its new line. Every entry stays open: nothing here claims a total-row bound. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 5b977f3 commit 86a44b5

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

‎ci/cr150-source-bounds.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,9 @@ entries:
16341634
- {id: "U1612", file: "include/pineforge/detail/id_table_read_cache.hpp", symbol: "cache_", ops: ["grow"], container: "in-place optional shared-cache control", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "std::optional::emplace constructs one nonmovable ReadThroughCache control in the adapter itself. It allocates no control or growing directory. Slot payload and metadata use the single prepared block; moves reconstruct lazily and preserve no tags. OPEN because the lexical grow scanner treats every emplace alike. Tests: test_id_table_cache_policy, test_id_table_cache_shared.", line: 233}
16351635
- {id: "U1613", file: "include/pineforge/detail/feed_projection.hpp", symbol: "builder", ops: ["grow"], container: "FeedProjectionBuilder<Row> initializer-list append", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "Setup convenience constructor writes every initializer row through one fixed transfer page into scratch. Backing is O(rows * sizeof(Row)); the resulting optional read allowance does not cap input length. One provider control per builder, covered by U1615. OPEN.", line: 327}
16361636
- {id: "U1614", file: "include/pineforge/detail/feed_projection.hpp", symbol: "cache_", ops: ["grow"], container: "in-place std::optional<ReadThroughCache> control", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "Setup/reconfiguration emplaces a fixed control, with N=min(floor(capacity_bytes/page_bytes()), ceil(rows/kRows)) lines. N*page_bytes() includes tags and is at most configured capacity_bytes; small populations may use fewer lines. Transfer workspace is one fixed whole-record page. No directory grows with read keys; optional allocation failure bypasses. OPEN because instance-sized caches are outside the supported local-vector proof.", line: 181}
1637-
- {id: "U1615", file: "include/pineforge/detail/feed_projection.hpp", symbol: "reader_", ops: ["alloc"], container: "std::shared_ptr<ScratchFeedReader<Row>>", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "Setup allocates one provider/control per builder, holding a ScratchFile, row count and I/O counters. Builder transfer storage is an inline 4096/sizeof(Row)-row array. finish publishes the immutable provider after flush. The scratch file grows with appended rows; no total-row bound is claimed. OPEN.", line: 289}
1637+
- {id: "U1615", file: "include/pineforge/detail/feed_projection.hpp", symbol: "reader_", ops: ["alloc"], container: "std::shared_ptr<ScratchFeedReader<Row>>", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "Setup allocates one provider/control per builder, holding a ScratchFile, row count and I/O counters. Builder transfer storage is an inline 4096/sizeof(Row)-row array. finish publishes the immutable provider after flush. The scratch file grows with appended rows; no total-row bound is claimed. OPEN.", line: 324}
1638+
- {id: "U1647", file: "include/pineforge/detail/feed_projection.hpp", symbol: "provider", ops: ["alloc"], container: "std::shared_ptr<ResidentFeedReader<Row>>", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "finish publishes a production projection that never passed its one transfer page as one provider holding a copy of that page, an inline 4096/sizeof(Row)-row array: a fixed size that is a function of Row only and does not grow with input. OPEN.", line: 352}
1639+
- {id: "U1648", file: "include/pineforge/detail/feed_projection.hpp", symbol: "directory_", ops: ["decl"], container: "std::string", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "The builder keeps the scratch directory it was given so a later spill opens its file there. Payload length follows the caller's string; no byte bound is proved. OPEN.", line: 374}
16381640
- {id: "U1616", file: "include/pineforge/series.hpp", symbol: "cache_", ops: ["grow"], container: "in-place std::optional<ReadThroughCache> control", owner: "ta-series", phase: "unclassified", state: "unreviewed", note: "Numeric scratch-backed WindowValues lazily emplaces one fixed control. With P=1024*sizeof(T), slots=min(requested cache pages, ceil(logical size/1024), representable line count); inclusive slot bytes are slots*ReadThroughCache::line_bytes(P). A fixed 1024-value transfer is separate. Logical window/backing extent is independent of resident allowance. OPEN; member emplace/instance policy is outside the supported bounded form.", line: 236}
16391641
- {id: "U1617", file: "include/pineforge/series.hpp", symbol: "pages_", ops: ["assign", "decl", "grow"], container: "std::vector<std::shared_ptr<Page>>", owner: "ta-series", phase: "unclassified", state: "unreviewed", note: "WindowValues owns ceil(logical size/1024) page references on its default-resident and non-arithmetic paths; reset resizes this directory, and move assignment transfers it. Numeric windows with a smaller finite cache instead use scratch. Owning directory/page storage remains O(logical window length), including copies/checkpoints; no population-independent bound is claimed. OPEN.", line: 102}
16401642
- {id: "U1618", file: "include/pineforge/series.hpp", symbol: "replacement", ops: ["alloc"], container: "std::shared_ptr<WindowValues<T>::Backing>", owner: "ta-series", phase: "unclassified", state: "unreviewed", note: "First numeric write or a write to shared checkpoint backing creates one replacement ScratchFile/mutex control and copies all logical window pages through one fixed 1024-value transfer. Control count is fixed per clone; backing bytes and copy work scale with logical window size, with old snapshots retained by their owners. No bar/trade-independent whole-history bound. OPEN.", line: 306}

‎ci/cr150-source-sites.json‎

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,12 +1314,49 @@
13141314
"symbol": "reader_",
13151315
"scope": [
13161316
"namespace pineforge :: detail #1",
1317-
"template < class Row > class FeedProjectionBuilder #1"
1317+
"template < class Row > class FeedProjectionBuilder #1",
1318+
", bool resident_if_single_page = false ) : directory_ ( directory ) , resident_if_single_page_ ( resident_if_single_page ) #1"
1319+
],
1320+
"cls": "alloc",
1321+
"spelling": "make_shared",
1322+
"ordinal": 1
1323+
},
1324+
{
1325+
"file": "include/pineforge/detail/feed_projection.hpp",
1326+
"symbol": "reader_",
1327+
"scope": [
1328+
"namespace pineforge :: detail #1",
1329+
"template < class Row > class FeedProjectionBuilder #1",
1330+
"private : void spill_to_scratch ( ) #1"
1331+
],
1332+
"cls": "alloc",
1333+
"spelling": "make_shared",
1334+
"ordinal": 1
1335+
},
1336+
{
1337+
"file": "include/pineforge/detail/feed_projection.hpp",
1338+
"symbol": "provider",
1339+
"scope": [
1340+
"namespace pineforge :: detail #1",
1341+
"template < class Row > class FeedProjectionBuilder #1",
1342+
"FeedProjection < Row > finish ( std :: size_t capacity_bytes = kFeedProjectionCacheBytes ) #1",
1343+
"else #1"
13181344
],
13191345
"cls": "alloc",
13201346
"spelling": "make_shared",
13211347
"ordinal": 1
13221348
},
1349+
{
1350+
"file": "include/pineforge/detail/feed_projection.hpp",
1351+
"symbol": "directory_",
1352+
"scope": [
1353+
"namespace pineforge :: detail #1",
1354+
"template < class Row > class FeedProjectionBuilder #1"
1355+
],
1356+
"cls": "decl",
1357+
"spelling": "std :: string",
1358+
"ordinal": 1
1359+
},
13231360
{
13241361
"file": "include/pineforge/detail/feed_projection.hpp",
13251362
"symbol": "builder",

0 commit comments

Comments
 (0)