Skip to content

Commit 59bd663

Browse files
luisleo526claude
andcommitted
Merge main into the limits branch
Takes the output series limit parameter that landed on main. The runner parser now parses through the output-series helper and then applies the compatibility defaults of the limit options; the changelog keeps both entries; the memory page keeps main's text with the run_json.py citations re-pinned to the merged file. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2 parents a334e0f + 78f369e commit 59bd663

48 files changed

Lines changed: 3201 additions & 242 deletions

Some content is hidden

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

‎CHANGELOG.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,34 @@ version number follows semantic versioning over the surfaces the
2424
`--t` also names `--tv-compat`, and `--m` and `--ma` also name
2525
`--max-symbol-feeds` and `--max-inventory-bytes`. The exit status, the code
2626
`run_request_invalid` and its args are unchanged.
27+
- Recorded output series are unlimited by default; 0 or omission of `--limit-output-series` means no limit, while a positive N is the operator's cap and any refusal reports that positive N as `max`. Report-window memory follows the declared count: 6 MiB + 64 KiB × S + a 64 KiB reader with the default I/O sizes.
28+
- Reading a map is cheaper: each map now keeps a fixed read cache of 8 slots
29+
for the keys and values it has just read, so a repeated `get` or `contains`
30+
of the same key no longer reads the Store again. The cache adds a fixed 528
31+
bytes per map identity for a `map<string, float>` whatever the number of
32+
pairs, is cleared by every mutation of the map and invalidated when the
33+
Store rolls back an outer transaction, and is never filled from an absent
34+
key. Results are unchanged. The internal `detail::o1::Store` interface gains
35+
a pure virtual `rollback_epoch()` for that invalidation; a Store
36+
implementation outside the engine tree must provide it.
37+
- Reading a script container (string, array, map or object store) is cheaper:
38+
each Store now keeps two fixed tables of 8 slots, one for decoded object
39+
headers and one for chunk lookup handles, so a repeated read of the same
40+
object or chunk no longer descends the scratch index again. The tables add a
41+
fixed 384 bytes per Store to `bytes_resident` whatever the number of objects
42+
or chunks, and are cleared before every scratch put, erase and rollback and
43+
on every scratch failure. Results are unchanged.
44+
- Creating an empty map now writes two header records; its arena and index
45+
data chunks are published on first write. The Store does this for every
46+
script container: an object is created with its header record only, so a
47+
string created with a bound and a UDT object made without a payload behave
48+
the same way. Declared sizes, the 50,000-pair
49+
capacity, iteration order and the refusal at the cap are unchanged. Scratch
50+
exhaustion from publishing a container's data chunks now surfaces at the
51+
first operation that publishes them (for a map `put`, `remove`, `clear`,
52+
`copy`, `snapshot` or `restore`) instead of at creation, with the same typed failure
53+
`report_sink_failed` and `reason: arena_exhausted`. Scripts that create maps
54+
they never fill can now run where they used to fail at `map.new`.
2755

2856
## 1.9.1 — 2026-10-31
2957

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ The separate PineForge compiler, [`pineforge-codegen`](https://github.com/pinefo
3333
- **Open runtime.** The engine and native live runner are Apache-2.0. The separately distributed [PineForge compiler](https://github.com/pineforge-4pass/pineforge-codegen-oss/blob/main/LICENSE) is source-available under the PineForge Source License 1.2 from its release 1.3.0 (release 1.2.0 keeps the PineForge Source License 1.1, and releases up to 1.1.0 keep the PolyForm Noncommercial terms they shipped with); personal trading is free, and commercial use requires a separate license; the capital in an account a proprietary-trading firm or funded-trader program provides or allocates, including a challenge, evaluation or simulated account, is investment capital. Public reference strategies, benchmarks and validation tooling are available in their respective repositories; the community-script test set is not redistributed.
3434
- **Fast.** In-process, no interpreter: median **36× faster than PyneCore** on the 200 strategies both engines time (100 corpus probes and 100 held-out private strategies), measured at engine `35db01c8` on 2026-09-29 on an AWS c7a.8xlarge with PyneCore timed as a subprocess, its interpreter start-up included (PineForge runs a median 807k bars/s per strategy over its 201 slots with the bar magnifier on; [method](benchmarks/results/speed.md)). Parameter sweeps re-run a loaded `.so` with new inputs — no recompile, no fork.
3535
- **Deterministic to the bit.** Two runs with the same inputs produce identical trade lists.
36-
- **Yours to embed.** 163 `PF_API` declarations across six installed headers — `pineforge.h`'s 107 (87 of the 98 runtime exports and up to 20 per-strategy functions a generated module defines), eleven more runtime declarations in `execution_observer.h`, `selected_window.h` and `report_sink.h` (three, three and five), `native_c_api.h`'s 43 native-host declarations and `selected_window_plan.h`'s two planner declarations — an ABI that is append-only within a major version from 1.0 on. Call it from C, Python, Rust, Go, Node, Julia — or let an AI agent drive it over MCP.
36+
- **Yours to embed.** 165 `PF_API` declarations across six installed headers — `pineforge.h`'s 109 (89 of the 100 runtime exports and up to 20 per-strategy functions a generated module defines), eleven more runtime declarations in `execution_observer.h`, `selected_window.h` and `report_sink.h` (three, three and five), `native_c_api.h`'s 43 native-host declarations and `selected_window_plan.h`'s two planner declarations — an ABI that is append-only within a major version from 1.0 on. Call it from C, Python, Rust, Go, Node, Julia — or let an AI agent drive it over MCP.
3737

3838
Recorded outputs and their additional API declarations described here are
3939
part of **1.5.0**.
@@ -543,7 +543,7 @@ is in [CHANGELOG.md](CHANGELOG.md).
543543
The counts below describe the current API, including recorded outputs, the report sink and scratch-table selection; recorded outputs are not part of 1.4.0.
544544

545545
A newly generated strategy `.so` exposes 114 compiled-strategy `PF_API` declarations
546-
(98 runtime implementations plus sixteen generated exports) plus 43 native-host
546+
(100 runtime implementations plus sixteen generated exports) plus 43 native-host
547547
declarations: 157 `PF_API` exports in total; `use_bar_magnifier = true` adds
548548
`strategy_declares_bar_magnifier` and a module that records [outputs](docs/outputs.md) its
549549
three outputs exports, bringing the inventories to at most 118 and 161. Older modules lack the six opt-in

‎ci/cr150-source-bounds.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@ entries:
15661566
- {id: "U1524", file: "include/pineforge/map.hpp", symbol: "<temp:vector>", ops: ["temp"], container: "unresolved by the index: std::vector<Elem>", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-27 (A5T strings/maps): conversion-operator type spelling for MapSequence's explicit std::vector<Elem> materialization; the local result reserves count_ and pushes each decoded element, then returns to the caller; claimed bound: at most 50,000 elements for map-produced sequences but no decoded string-byte cap, verified by reading: yes, include/pineforge/map.hpp:492-496,560,886-926", line: 492}
15671567
- {id: "U1525", file: "include/pineforge/map.hpp", symbol: "begin", ops: ["decl"], container: "const_iterator", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-27 (A5T strings/maps): begin return declaration for a function-local MapSequence iterator; construction copies the sequence pointer and zero index, without allocating payload; claimed bound: fixed-size iterator, verified by reading: yes, include/pineforge/map.hpp:460-474", line: 473}
15681568
- {id: "U1526", file: "include/pineforge/map.hpp", symbol: "end", ops: ["decl"], container: "const_iterator", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-27 (A5T strings/maps): end return declaration for a function-local MapSequence iterator; construction copies the sequence pointer and count_ index, without allocating payload; claimed bound: fixed-size iterator, verified by reading: yes, include/pineforge/map.hpp:460-474", line: 474}
1569-
- {id: "U1527", file: "include/pineforge/map.hpp", symbol: "heap_values", ops: ["assign", "decl", "grow"], container: "std::vector<Value>", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-27 (A5T strings/maps): persistent Storage::heap_values vector for legacy opaque handles, reserved at map creation, resized by slot insertion and assigned on map copy; claimed bound: 50,000 slots from max_pairs/kCapacity and put_locked's refusal, not a bound on values' nested payloads, verified by reading: yes, include/pineforge/map.hpp:560,617,947,1027,1156-1158,1207-1226", line: 617}
1569+
- {id: "U1527", file: "include/pineforge/map.hpp", symbol: "heap_values", ops: ["assign", "decl", "grow"], container: "std::vector<Value>", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-27 (A5T strings/maps): persistent Storage::heap_values vector for legacy opaque handles, no longer reserved at map creation (the empty-map change removed the reserve in create_objects), resized by slot insertion and assigned on map copy; claimed bound: 50,000 slots from max_pairs/kCapacity and put_locked's refusal, not a bound on values' nested payloads, verified by reading: yes, include/pineforge/map.hpp:560,617,947,1027,1156-1158,1207-1226", line: 617}
15701570
- {id: "U1528", file: "include/pineforge/map.hpp", symbol: "holder", ops: ["alloc"], container: "unresolved by the index: make_shared", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-27 (A5T strings/maps): one shared MapStoreHolder allocation on the ambient-store path; the local shared_ptr escapes to maps, snapshots and enumerations, with a weak ambient reference allowing reclamation; claimed bound: fixed-size holder per allocation, no global cap on independently opened stores, verified by reading: yes, include/pineforge/map.hpp:131-166", line: 162}
15711571
- {id: "U1529", file: "include/pineforge/map.hpp", symbol: "make_shared", ops: ["alloc"], container: "unresolved by the index: make_shared", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-27 (A5T strings/maps): one persistent shared MapImage metadata object per enumeration or snapshot, returned by make_image after its payload object is created in Store; claimed bound: fixed metadata per image and per-store object admission, not a whole-program image/store count; candidate for bounded_by_design: page size and the 1,048,576 object cap; verified by reading: yes, include/pineforge/map.hpp:383-417,1311-1313, src/detail/o1_store.cpp:513-521", line: 1313}
15721572
- {id: "U1530", file: "include/pineforge/map.hpp", symbol: "map_string_decode", ops: ["decl"], container: "std::string", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "CR150-CX 10-27 (A5T strings/maps): map_string_decode return declaration for a per-call legacy std::string; decoding materializes rep.length bytes and returns them to the caller; claimed bound: no fixed payload-byte cap, verified by reading: no, include/pineforge/map.hpp:265-278", line: 265}

‎ci/cr150-source-sites.json‎

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5711,18 +5711,6 @@
57115711
"spelling": "PineMap",
57125712
"ordinal": 4
57135713
},
5714-
{
5715-
"file": "include/pineforge/map.hpp",
5716-
"symbol": "heap_values",
5717-
"scope": [
5718-
"namespace pineforge #1",
5719-
"template < typename Key , typename Value > class PineMap #1",
5720-
"static void create_objects ( Storage & storage ) #1"
5721-
],
5722-
"cls": "grow",
5723-
"spelling": "heap_values . reserve ( . . . )",
5724-
"ordinal": 1
5725-
},
57265714
{
57275715
"file": "include/pineforge/map.hpp",
57285716
"symbol": "heap_values",
@@ -5741,9 +5729,10 @@
57415729
"scope": [
57425730
"namespace pineforge #1",
57435731
"template < typename Key , typename Value > class PineMap #1",
5744-
"static Located locate ( Storage & storage , const detail :: MapHeader & header , const Key & key , std :: uint64_t hash ) #1",
5732+
"template < bool WithValue = false > static Located locate ( Storage & storage , const detail :: MapHeader & header , const Key & key , std :: uint64_t hash ) #1",
57455733
"while ( at ! = 0 && at < = header . high_water ) #1",
5746-
"if ( links . hash = = hash && key_matches ( storage . store ( ) , load_key_rep ( storage , at - 1 ) , key ) ) #1"
5734+
"if ( links . hash = = hash ) #1",
5735+
"if ( key_matches ( storage . store ( ) , found . key , key ) ) #1"
57475736
],
57485737
"cls": "assign",
57495738
"spelling": "previous = . . .",
@@ -30222,7 +30211,7 @@
3022230211
"scope": [
3022330212
":: pineforge :: source :: detail :: PositionTailDiagnostics :: pineforge :: source :: detail :: PositionTailNoDiagnostics namespace pineforge :: source #1",
3022430213
"void PineExecutionAdapter :: release_closed_cohort_origins ( ) #1",
30225-
"for ( const auto & roster : core . cohorts ( ) ) #1"
30214+
"for ( const auto & [ key , roster ] : core . nonempty_cohorts ( ) ) #2"
3022630215
],
3022730216
"cls": "grow",
3022830217
"spelling": "roster_roots . push_back ( . . . )",
@@ -30247,7 +30236,7 @@
3024730236
"scope": [
3024830237
":: pineforge :: source :: detail :: PositionTailDiagnostics :: pineforge :: source :: detail :: PositionTailNoDiagnostics namespace pineforge :: source #1",
3024930238
"void PineExecutionAdapter :: release_closed_cohort_origins ( ) #1",
30250-
"for ( const auto & roster : core . cohorts ( ) ) #2"
30239+
"for ( const auto & [ key , roster ] : core . nonempty_cohorts ( ) ) #3"
3025130240
],
3025230241
"cls": "assign",
3025330242
"spelling": "origins = . . .",
@@ -30259,7 +30248,7 @@
3025930248
"scope": [
3026030249
":: pineforge :: source :: detail :: PositionTailDiagnostics :: pineforge :: source :: detail :: PositionTailNoDiagnostics namespace pineforge :: source #1",
3026130250
"void PineExecutionAdapter :: release_closed_cohort_origins ( ) #1",
30262-
"for ( const auto & roster : core . cohorts ( ) ) #2",
30251+
"for ( const auto & [ key , roster ] : core . nonempty_cohorts ( ) ) #3",
3026330252
"for ( const auto & origin : origins ) #1"
3026430253
],
3026530254
"cls": "grow",

0 commit comments

Comments
 (0)