Skip to content

Commit 3b6aa07

Browse files
luisleo526claude
andcommitted
cr150 source gate: refresh the o1_store entries for the fix head (one StoreTx site, throw_status in the class); header contract clause
Applies CR150-CX's re-authored gate data (runner/CR150-CX/gate-patch-p2-a5s2-76fceda8ad.patch, sha256 eb3f0a9fa1f326b4bdb839d31a5e06d7629ff03078b28f67a07a58566a350b64): the <temp:string> record takes the scope of throw_status as a StoreImpl member, the two new:StoreTx records become one record with the symbol `transaction` (begin() now allocates its handle once, before the ScratchStore transaction opens), the notes carry the current lines and the page-COUNT wording of the resident cap (resident = (resident_pages + 6 work pages + metadata pages) x page_bytes, at most about 1 GiB at ScratchStore's 1 MiB page limit), and the OPEN pin follows the gate's own count (1429 -> 1428). Data authored by CR150-CX; no gate script logic changes. o1_store.hpp: the contract now says that a backing failure in any call, including a read-only one, makes the open outer transaction rollback-only (REV-CX P3). Comment only; the cap lines 54-55 and every o1_store.cpp line stay where they were. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 76fceda commit 3b6aa07

4 files changed

Lines changed: 11 additions & 23 deletions

File tree

‎ci/cr150-source-bounds.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,10 +563,10 @@ entries:
563563
- {id: "U0494", file: "src/compat/pine/exit_lifecycle.cpp", symbol: "retire", ops: ["decl", "grow"], container: "std::vector<exit_legs::Leg>", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 19}
564564
- {id: "U0495", file: "src/compat/pine/reservation_expansion.cpp", symbol: "select_reservation_growth_sources", ops: ["decl"], container: "std::vector<std::uint64_t>", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 9}
565565
- {id: "U0496", file: "src/compat/pine/reservation_expansion.cpp", symbol: "selected", ops: ["decl", "grow"], container: "std::vector<std::uint64_t>", owner: "source-layer", phase: "unclassified", state: "unreviewed", line: 17}
566-
- {id: "U1483", file: "src/detail/o1_store.cpp", symbol: "<temp:string>", ops: ["temp"], container: "unresolved by the index: std::string", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-25 (a5s2 head 72ac625bc7), class: error path, fixed text. Site src/detail/o1_store.cpp:80 builds the message of a std::runtime_error in throw_status; size = a fixed literal + status_text(status) (a fixed set of literals); runs only when a store call fails, never per bar. No growth axis. OPEN only because the gate has no class for a fixed-size error-path string.", line: 80}
567-
- {id: "U1484", file: "src/detail/o1_store.cpp", symbol: "new:StoreImpl", ops: ["alloc"], container: "unresolved by the index: new StoreImpl", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-25 (a5s2 head 72ac625bc7), class: one object per open. Site :607 Store::open allocates one StoreImpl per call; its size is sizeof(StoreImpl); the number of stores is the number of open() calls the owner makes (a5 layers: one per object kind, none yet in production). No bar/trade term. OPEN: the gate has no class for a per-open fixed object.", line: 607}
568-
- {id: "U1485", file: "src/detail/o1_store.cpp", symbol: "new:StoreTx", ops: ["alloc"], container: "unresolved by the index: new StoreTx", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-25 (a5s2 head 72ac625bc7), class: one small handle per begin(), caller-held. Sites :541 (nested begin, flattened onto the outer transaction) and :546 (outer begin) each allocate one fixed-size StoreTx returned in a unique_ptr and freed at commit, rollback or destruction. Live handles = the begin() nesting depth the CALLER holds; the store itself does not cap it (no kMax on nesting), so this is bounded by call nesting, not by bars or trades, and is NOT declared bounded. OPEN.", line: 541}
569-
- {id: "U1486", file: "src/detail/o1_store.cpp", symbol: "reset", ops: ["alloc"], container: "unresolved by the index: new std::byte / new CommandScratchStore", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-25 (a5s2 head 72ac625bc7), class: one-shot allocations sized by the Shape fixed at open, capped. Site :268 chunk_buffer_ = kHeaderBytes + shape.chunk_bytes bytes; site :279 one CommandScratchStore whose resident pages = shape.resident_pages. The constructor refuses chunk_bytes > kMaxChunkBytes (64 KiB, include/pineforge/detail/o1_store.hpp:52, check src/detail/o1_store.cpp:257-258) and resident_pages > kMaxResidentPages (1024, hpp:53, check cpp:253-254) before either allocation; lab proof: ctest o1_store rj-20261025t130712-bb6e52 GREEN, mutation shape-cap-removed rj-20261025t130721-003492 RED. Resident bytes = page_bytes x resident_pages (4 MiB at page_bytes 4096); page_bytes is not capped by the store, it must equal the backing's page size (fixed by the ScratchBacking the caller built). Fixed at open, not growing with bars or trades. OPEN: the gate's bounded form is only a size-guarded push on a local vector, so a capped one-shot allocation cannot be PASS(bounded).", line: 268}
566+
- {id: "U1483", file: "src/detail/o1_store.cpp", symbol: "<temp:string>", ops: ["temp"], container: "unresolved by the index: std::string", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-26 (a5s2 head 76fceda8ad), class: error path, fixed text. Site src/detail/o1_store.cpp:349 builds the message of a std::runtime_error in StoreImpl::throw_status (a const member since 76fceda8ad; it first marks the open outer transaction rollback-only, then throws); size = a fixed literal + the caller's fixed `what` literal + status_text(status) (a fixed set of literals); runs only when a store call fails, never per bar. No growth axis. OPEN only because the gate has no class for a fixed-size error-path string.", line: 349}
567+
- {id: "U1484", file: "src/detail/o1_store.cpp", symbol: "new:StoreImpl", ops: ["alloc"], container: "unresolved by the index: new StoreImpl", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-26 (a5s2 head 76fceda8ad), class: one object per open. Site :616 Store::open allocates one StoreImpl per call; its size is sizeof(StoreImpl); the number of stores is the number of open() calls the owner makes (a5 layers: one per object kind, none yet in production). No bar/trade term. OPEN: the gate has no class for a per-open fixed object.", line: 616}
568+
- {id: "U1485", file: "src/detail/o1_store.cpp", symbol: "transaction", ops: ["alloc"], container: "unresolved by the index: new StoreTx", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-26 (a5s2 head 76fceda8ad), class: one small handle per begin(), caller-held. ONE site, :549 in StoreImpl::begin: `std::unique_ptr<Tx> transaction(new StoreTx(this, outer))` allocates one fixed-size StoreTx (nested and outer begin share it since 76fceda8ad; it is allocated BEFORE the ScratchStore transaction opens, so a failed allocation leaves no open transaction). It is returned in a unique_ptr and freed at commit, rollback or destruction. Live handles = the begin() nesting depth the CALLER holds; the store itself does not cap it (no kMax on nesting), so this is bounded by call nesting, not by bars or trades, and is NOT declared bounded. The symbol is the local variable name `transaction` the gate reports for this site. OPEN.", line: 549}
569+
- {id: "U1486", file: "src/detail/o1_store.cpp", symbol: "reset", ops: ["alloc"], container: "unresolved by the index: new std::byte / new CommandScratchStore", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-26 (a5s2 head 76fceda8ad), class: one-shot allocations sized by the Shape fixed at open, capped. Site :265 chunk_buffer_ = kHeaderBytes + shape.chunk_bytes bytes; site :276 one CommandScratchStore whose resident pages = shape.resident_pages. The constructor refuses resident_pages > kMaxResidentPages (1024, include/pineforge/detail/o1_store.hpp:55, check src/detail/o1_store.cpp:250-251) and chunk_bytes > kMaxChunkBytes (64 KiB, hpp:54, check cpp:254-255) before either allocation; lab proof of the cap row: mutation shape-cap-removed RED at the Store::open throws_invalid_argument row (P2-CX's 01:00 message, lab rows on 76fceda8ad). The cap on resident_pages is a page-COUNT cap, not a byte cap: ScratchStore resident = (resident_pages + 6 work pages + metadata pages) x page_bytes, at most about 1 GiB at ScratchStore's own 1 MiB page-size limit (REV-CX 10-25 P3-3); page_bytes is not capped by the store, it must equal the backing's page size (fixed by the ScratchBacking the caller built; the common 4096 B gives about 4 MiB for 1024 pages plus the work and metadata pages). Fixed at open, not growing with bars or trades. OPEN: the gate's bounded form is only a size-guarded push on a local vector, so a capped one-shot allocation cannot be PASS(bounded).", line: 265}
570570
- {id: "U0497", file: "src/engine_aux_security.cpp", symbol: "bars", ops: ["grow"], container: "unresolved by the index: bars.assign(...)", owner: "engine-core", phase: "setup", state: "pending-flat-memory", inventory: "F07", grows_with: ["feed-rows"], line: 125}
571571
- {id: "U0498", file: "src/engine_aux_security.cpp", symbol: "late_day_opens", ops: ["assign", "decl"], container: "std::vector<int64_t>", owner: "engine-core", phase: "unclassified", state: "unreviewed", line: 232}
572572
- {id: "U0499", file: "src/engine_aux_security.cpp", symbol: "native_bars_by_label", ops: ["grow"], container: "unresolved by the index: native_bars_by_label.reserve(...)", owner: "engine-core", phase: "setup", state: "pending-flat-memory", inventory: "F11", grows_with: ["feed-rows"], line: 280}

‎ci/cr150-source-sites.json‎

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12203,7 +12203,7 @@
1220312203
},
1220412204
{
1220512205
"file": "src/detail/o1_store.cpp",
12206-
"symbol": "new:StoreTx",
12206+
"symbol": "transaction",
1220712207
"scope": [
1220812208
"namespace pineforge #1",
1220912209
"namespace detail #1",
@@ -12214,19 +12214,6 @@
1221412214
"spelling": "new StoreTx",
1221512215
"ordinal": 1
1221612216
},
12217-
{
12218-
"file": "src/detail/o1_store.cpp",
12219-
"symbol": "new:StoreTx",
12220-
"scope": [
12221-
"namespace pineforge #1",
12222-
"namespace detail #1",
12223-
"namespace o1 #1",
12224-
"std :: unique_ptr < Tx > StoreImpl :: begin ( ) #1"
12225-
],
12226-
"cls": "alloc",
12227-
"spelling": "new StoreTx",
12228-
"ordinal": 2
12229-
},
1223012217
{
1223112218
"file": "src/detail/o1_store.cpp",
1223212219
"symbol": "new:StoreImpl",
@@ -12247,8 +12234,7 @@
1224712234
"namespace pineforge #1",
1224812235
"namespace detail #1",
1224912236
"namespace o1 #1",
12250-
"namespace #1",
12251-
"[ [ noreturn ] ] void throw_status ( const char * what , ScratchStatus status ) #1"
12237+
"[ [ noreturn ] ] void StoreImpl :: throw_status ( const char * what , ScratchStatus status ) const #1"
1225212238
],
1225312239
"cls": "temp",
1225412240
"spelling": "std::string",

‎include/pineforge/detail/o1_store.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ struct Stats {
8585
// the outer transaction rollback-only too. While rollback-only begin() and every
8686
// mutation throw std::logic_error; the outer commit() performs the real rollback
8787
// and then throws the same error; the outer rollback() always works. There is no
88-
// savepoint. Destroy all Tx handles before the next outer begin(): destroying an
89-
// unfinished stale outer handle later can roll that NEW transaction back.
88+
// savepoint. A backing failure in any call, including a read-only one, makes the
89+
// open outer transaction rollback-only. Destroy all Tx handles before the next
90+
// outer begin(): destroying an unfinished stale outer handle later can roll that
91+
// NEW transaction back.
9092
class Tx {
9193
public:
9294
virtual ~Tx();

‎scripts/test_cr150_source_gate.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ def test_real_tree_scans_files_and_sites_and_is_not_a_pass_by_construction(self)
12151215
self.assertGreater(c['entries_matched'], 0)
12161216
self.assertEqual(c['findings'], 0)
12171217
self.assertEqual(c['PASS(bounded)'], 0)
1218-
self.assertEqual(c['OPEN'], 1429)
1218+
self.assertEqual(c['OPEN'], 1428)
12191219
# Every matched entry is exactly one of PASS(bounded) / OPEN.
12201220
self.assertEqual(c['PASS(bounded)'] + c['OPEN'], c['entries_matched'])
12211221
strict = run_gate(ROOT, '--strict')

0 commit comments

Comments
 (0)