Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9339bb9
Make the system-error host rows independent of the process time zone
luisleo526 Nov 20, 2026
ebbea4f
Say stream layout 5 where three pages said 4 (#923)
luisleo526 Nov 20, 2026
384fa92
Keep the equity curve in memory when the ledger's directory cannot ho…
luisleo526 Nov 20, 2026
1a98496
Apply the window event retention option only to modules with the engi…
luisleo526 Nov 20, 2026
f702ad1
Stream a large report checkpoint of a window run at every cursor
luisleo526 Nov 21, 2026
9ec75d1
Document window checkpoint streaming at every cursor and the engine's…
luisleo526 Nov 21, 2026
c72dbbe
Warn when the report spool fails during the ledger's startup recovery…
luisleo526 Nov 20, 2026
43aee5c
Treat a failed unlink of the named fallback spool file as a refusal t…
luisleo526 Nov 20, 2026
0a95abd
Report a refused unlink of the temporary service file instead of leav…
luisleo526 Nov 20, 2026
c885dd4
Name the service unlink test's source from the project directory
luisleo526 Nov 21, 2026
f082445
Test that the calendar exporter rejects an invalid final session befo…
luisleo526 Nov 20, 2026
c92e98f
Reject an invalid final session before the calendar exporter writes i…
luisleo526 Nov 20, 2026
07b3a6e
Test timeframe detection across timestamps of opposite extreme sign
luisleo526 Nov 21, 2026
7ee1c4d
Compute timestamp gaps in unsigned arithmetic when detecting the time…
luisleo526 Nov 21, 2026
f7bd31d
Note the timeframe detection fix for distant timestamps in the changelog
luisleo526 Nov 21, 2026
aaa3862
Test series-length ta.sma against fixed-length ta.sma on the same win…
luisleo526 Nov 20, 2026
f8f3c2b
Round the exact window sum in series-length ta.sma as the fixed lengt…
luisleo526 Nov 20, 2026
61c94cc
Test the EMA SimpleAverage seed against the exact sum of its window (…
luisleo526 Nov 20, 2026
dc040a0
Round the exact sum of the opt-in EMA SimpleAverage seed once, as ser…
luisleo526 Nov 20, 2026
1444671
Test the prefix of errors raised before the first bar (#933)
luisleo526 Nov 20, 2026
211fc0a
Prefix errors raised before the first bar consistently (#933)
luisleo526 Nov 20, 2026
f72ab12
Test the pre-bar error prefix for Keltner channels, native startup an…
luisleo526 Nov 20, 2026
9f9f8ea
Apply the pre-bar error prefix to Keltner channels and native startup…
luisleo526 Nov 20, 2026
6c7e93b
Test the version commit id of a build without Git metadata (#929)
luisleo526 Nov 20, 2026
b0f4c04
Return an empty commit id when the build has no Git metadata (#929)
luisleo526 Nov 20, 2026
6cb4177
Describe the build commit id accurately in the version header comment…
luisleo526 Nov 20, 2026
590e8b1
Test that str.format_time raw %s does not depend on the process timezone
luisleo526 Nov 21, 2026
5cf2d8c
Keep str.format_time raw %s as the timestamp's Unix seconds
luisleo526 Nov 21, 2026
a0bb31d
Test that the accepted-input lookup resolves a clipped session openin…
luisleo526 Nov 20, 2026
df60a38
Accept either label of the latest accepted input in the accepted-inpu…
luisleo526 Nov 20, 2026
8d48657
Note the native accepted-input lookup change in the changelog (#718)
luisleo526 Nov 21, 2026
1b1497e
Test timeframe counts whose seconds overflow int
luisleo526 Nov 20, 2026
7d29dd7
Refuse timeframe counts whose seconds overflow int
luisleo526 Nov 20, 2026
f9ba87f
Say in the runner README that windowed checkpoint streaming needs the…
luisleo526 Nov 21, 2026
8997ffb
Open the changelog section for the next release and record the behavi…
luisleo526 Nov 21, 2026
9262641
Move the documentation line citations that the folded changes shifted
luisleo526 Nov 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,24 @@ README's *Releases* section and on the GitHub releases page. From 1.0.0 the
version number follows semantic versioning over the surfaces the
[public contract](docs/pages/public-contract.md) lists.

## Unreleased
## Unreleased (1.15.0)

- `detect_timeframe` now measures the gap between consecutive bars without overflowing when their timestamps lie far apart on opposite sides of zero; such pairs could give a wrong timeframe. Pairs that are equal or out of order are still skipped.
- TA length and Keltner Channel argument errors without a bar context now begin `Error before the first bar: `. Map capacity errors use the same prefix and report `bar_index: -1` without a bar context, including during native run preparation and startup. (#933)
- `pf_version_get().commit_sha` now returns an empty string when the build's Git SHA is unavailable (#929).
- The native accepted-input lookup now returns the completed input interval for every bar label the native calendar admits as confirmed, not only for an exact match on the bar's open or eligible open (#718).
- A timeframe whose count of minutes, days or weeks has more seconds than a 32-bit `int` holds no longer overflows into a wrong length. A minute count from `35791395` (about 68 years) up, and a negative count past the same limit, are now refused like a count past the `int` range: the timeframe parser stops the run with `pine_invalid_argument` (argument `timeframe`, rule `unparseable`), and the `request.security` registration check maps that to `request_timeframe_invalid`, as it already did for such a count. A week count from `3551W` up is calendar-only, as a day count from `24856D` up already is. Before, `time()` and `time_close()` could read `71582789` as a 44-second timeframe, and `request.security` could take `-35791395` for a 68-year one.
- With `--native-event-retention window`, the runner's equity-curve scratch file no longer goes to the system temporary directory when the ledger's directory cannot hold an unnamed file: the curve stays in memory and the runner says so (#925).
- `--native-event-retention window` on a module that does not declare the engine layout stamp now prints a warning that the option is not applied, and the checkpoints are stored as they are without the option (#926).
- A report spool failure while the runner rebuilds a report checkpoint at startup now prints the warning that the settled rows stay in memory (#927).
- A failed unlink of the fallback spool file is treated like a spool that cannot be created: the rows stay in memory and the runner warns once, and no named spool file is left behind (#928).
- The runner's atomic service file writer now retries a refused unlink of its temporary `.new.` file once and reports it once on stderr, instead of leaving the file behind without a message; an install that succeeded stays a success (#946).
- With `--native-event-retention window`, a report checkpoint at cursor 512 or below is no longer built as a whole JSON tree: every checkpoint of such a run is folded through the spooled arrays, so a payload above 1 MiB is written into its row in pieces, stored as a BLOB with the same bytes, at any cursor (1.14.0 did that only above cursor 512). In the measured case (512 inputs of 1,000 bars, a 26.7 MiB checkpoint) the checkpoint raised the runner's peak resident memory by 441 MiB before and by 0.66 MiB now. A run without the option, and a payload of 1 MiB or less, are unchanged (#961).
- The calendar exporter `scripts/symbol_calendar.py` now checks the calendar document before it writes its destination file, so a calendar whose final session is invalid is refused without leaving a file behind that the reader would reject (#952).
- With a series length, `ta.sma` now rounds the exact sum of the selected window before dividing by its length, as fixed-length `ta.sma` does. The optional simple-average seed for `ta.ema` uses the same rounding. Small terms are preserved when larger terms cancel (#935).
- The documentation pages `docs/pages/abi-stability.md` and `docs/pages/report-schema.md` now say stream layout 5, the value the header defines, where three sentences said 4 (#923).

## 1.14.0 — 2026-11-20

- The engine layout stamp that `pineforge-live` checks, `PF_STREAM_ENGINE_LAYOUT_VERSION`, is now 5. A strategy module built against 1.13.x headers declares stamp 4 and is refused by a 1.14.0 `pineforge-live` before it is created (`strategy engine layout mismatch: module=4 runtime=5`): rebuild such modules against the matching 1.14.0 headers. The earlier miss, disclosed: 1.13.0 changed the same internal layout without raising the stamp, so a module built against 1.12.x headers and loaded into a 1.13.x `pineforge-live` was not refused; rebuild such modules against matching headers too. `PF_ABI_VERSION` stays 5, and the C API and its caller-allocated structures are unchanged.
- A new host helper, `strategy_convert_identity_or_warn`, lets generated code report `strategy.convert_to_account` and `strategy.convert_to_symbol` calls that had no account-currency rate: the value still comes back unchanged, and the run's warnings now list `currency_conversion_rate_unavailable` once for each such call site (#376).
Expand Down Expand Up @@ -287,7 +304,7 @@ version number follows semantic versioning over the surfaces the
- `strategy_pending_order_fill_qty` reported a wrong `close_only` for some entries: 1 where the fill opens or reverses the position (a market entry followed by a priced stop on the same bar and a short-seed percent entry, #905; a pyramiding entry after a same-bar close; an entry probed inside the callback that queued it) and 0 where the fill only closes (a priced entry that replaced a same-id market order, a frozen reversal, whose reported quantity is now the frozen transaction, and a host-sized `strategy.order` against an opposite position). It now applies the fill's prior-cycle rule and shape rules for these cases. A `strategy.order` with its own quantity against an opposite position now reports the quantity its fill transacts, and `close_only` 1 exactly when that fill opens nothing. While a close the script placed on the same bar is still waiting to fill ahead of the order, the report instead gives the quantity as written, with `close_only` 0, or 1 when the order is in an OCA cancel group. That answer can differ from the fill: in an OCA cancel group it says `close_only` 1 although the fill opens if the close leaves the position flat; otherwise it says `close_only` 0 although the fill only closes if the close leaves a position at least as large as what the order transacts; and the fill can transact less than the quantity as written, for example when the quantity is floored to the quantity step, or when an OCA cancel-group order closes no more than the close leaves. The report is made before the fill and does not account for checks the fill makes at fill time against equity, price and margin (for example, an entry the account cannot afford in whole units). In those cases the fill can differ from the report. Not modelled: fill-time money guards (whole-lot tie, low-value or fractional lot), affordability, margin-call surplus, the close quantity a reversal keeps when a margin call was booked after the script, a refused signal price, an admission refusal, earlier fills of the same pass, and an entry that names its own quantity or a row whose request cannot be read, such as a row held in the source's shadow queue (judged by the prior-cycle rule alone). Fills are unchanged. (#905, #910)
- The C header and docs documented partition 2 for a pure percent-of-equity stop; the engine returns 1 (measured on 1.13.0). The documentation now matches the returned value; behaviour and ABI are unchanged.

## 1.13.0
## 1.13.0 — 2026-11-18

### Changed

Expand Down
8 changes: 4 additions & 4 deletions ci/cr150-source-bounds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ ceilings:
# sense: no fixed input is declared for them. Each says what limits it:
# U1878 prefix: the list a whole-report read of a window run builds from the
# points the window had taken, O(points taken); it exists only with window
# retention (src/live_report.cpp:102-111, runner/README.md:189-192), and a
# retention (src/live_report.cpp:102-111, runner/README.md:194-197), and a
# default run never takes a point, so it never reaches it.
# U1879 scratch_curve and U1880 writer: the curve scratch writer and its
# append. The writer holds one fixed array of 2,730 points, 65,520 bytes
Expand Down Expand Up @@ -1906,8 +1906,8 @@ entries:
- {id: "U1875", file: "src/source/pine_adapter.cpp", symbol: "covered", ops: ["decl", "grow"], container: "std::vector<native_order::RequestHandle>", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "The handles of the market adds of one fill's bar that have no order of their own, built by PineExecutionAdapter::on_applied while it decides what the cover fill closes: one handle for each such add, so at most the lots the entry id opened on that bar, and freed when the call returns. No fixed input bounds the lot count. OPEN.", line: 28153}
- {id: "U1876", file: "src/source/pine_adapter.cpp", symbol: "definitions", ops: ["decl", "grow"], container: "std::vector<Definition>", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "The exits standing on the book for an opening that fills, built by PineExecutionAdapter::arm_standing_exits_for_opening from one scan of the placement table: one record for each distinct exit id that has a leg there, freed when the function returns. It follows the exits the script has working, which no fixed input bounds. OPEN.", line: 12042}
- {id: "U1877", file: "src/source/pine_adapter.cpp", symbol: "oca_name", ops: ["assign", "decl"], container: "std::string", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "An order's OCA group name. The group holds the copies of that text from one record to another: the standing-exit record of PineExecutionAdapter::arm_standing_exits_for_opening (one string for each distinct exit id with a leg on the placement table, copied from the leg and freed when the function returns) and the file's field-to-field copies of a placed order's OCA name (request.oca_name = snapshot.oca_name and the like). The text's size is the script's; no fixed input bounds it. OPEN.", line: 1486}
- {id: "U1878", file: "src/live_report.cpp", symbol: "prefix", ops: ["decl"], container: "std::vector<pf_equity_point_t>", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "The points a whole-report read puts back in front of the engine's curve when the report window had taken them (src/live_report.cpp:102-111, the list declared at :105): a local list of the retired points, read back from the scratch file, inserted before the points the engine still holds and freed when that block ends (:111). Its size is the number of points taken, so that read is O(all points taken); no fixed input bounds it. It exists only with window retention (runner/README.md:189-192): a default run never retires a point and the branch at :102 is not taken. OPEN.", line: 105}
- {id: "U1879", file: "src/live_report.cpp", symbol: "scratch_curve", ops: ["alloc"], container: "unresolved by the index: make_unique", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "The curve scratch writer of a report accumulator that keeps its curve points in a scratch file (window retention): one writer for the life of the accumulator, created in the State constructor (src/live_report.cpp:49) so that a directory that cannot back it is refused before any read; the runner then falls back to the resident accumulator (runner/main.cpp:1283-1293). The writer holds one fixed array of 2,730 points (64 KiB divided by the 24-byte point, rounded down), 65,520 bytes (src/report_scratch.hpp:20-22; the array is src/report_scratch.cpp:162, described at src/report_scratch.hpp:71-72). The points go to a file on disk, which grows with the points taken; no fixed input bounds its size. OPEN.", line: 49}
- {id: "U1880", file: "src/live_report.cpp", symbol: "writer", ops: ["grow"], container: "unresolved by the index: writer.append(...)", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "Appends one curve point to the scratch file of the report accumulator (src/live_report.cpp:54): the point goes into the writer's RAM batch, and a full batch is written to the file before the next point is accepted (src/report_scratch.cpp:181, which flushes when the array is full; src/report_scratch.hpp:71-72), so the writer holds at most one batch of 2,730 points (65,520 bytes); the file grows by one 24-byte record for each point taken, and no fixed input bounds its size. OPEN.", line: 54}
- {id: "U1878", file: "src/live_report.cpp", symbol: "prefix", ops: ["decl"], container: "std::vector<pf_equity_point_t>", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "The points a whole-report read puts back in front of the engine's curve when the report window had taken them (src/live_report.cpp:102-111, the list declared at :105): a local list of the retired points, read back from the scratch file, inserted before the points the engine still holds and freed when that block ends (:111). Its size is the number of points taken, so that read is O(all points taken); no fixed input bounds it. It exists only with window retention (runner/README.md:194-197): a default run never retires a point and the branch at :102 is not taken. OPEN.", line: 105}
- {id: "U1879", file: "src/live_report.cpp", symbol: "scratch_curve", ops: ["alloc"], container: "unresolved by the index: make_unique", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "One curve scratch writer for the life of a window report accumulator, created in the State constructor (src/live_report.cpp:49) to open the scratch storage before any read; if the open fails, the runner falls back to the resident accumulator (runner/main.cpp:1283-1293). The writer holds one fixed array of 2,730 points (64 KiB divided by the 24-byte point, rounded down), 65,520 bytes (src/report_scratch.hpp:20-22; the array is src/report_scratch.cpp:162, described at src/report_scratch.hpp:71-72). The points go to a region in the attached scratch arena, or to a file on disk when no arena is attached (include/pineforge/detail/scratch_file.hpp:370-380). The logical curve grows with the points taken; no fixed input bounds the number of points staged. OPEN.", line: 49}
- {id: "U1880", file: "src/live_report.cpp", symbol: "writer", ops: ["grow"], container: "unresolved by the index: writer.append(...)", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "Stages one curve point in the report accumulator's scratch writer batch (src/live_report.cpp:54). A full batch is written to the scratch backing before the next point is accepted (src/report_scratch.cpp:181; src/report_scratch.hpp:71-72), so the writer holds at most one batch of 2,730 points (65,520 bytes). The backing is a region in the attached scratch arena or a scratch file when no arena is attached (include/pineforge/detail/scratch_file.hpp:370-380). The logical curve grows by one 24-byte record per appended point, subject to the backing's capacity. No fixed input bounds the number of points staged. OPEN.", line: 54}
- {id: "U1910", file: "include/pineforge/engine.hpp", symbol: "evaluator_input_tf", ops: ["decl"], container: "std::string", owner: "engine-core", phase: "unclassified", state: "unreviewed", note: "The input timeframe text one request.security evaluator keeps (BacktestEngine::SecurityEvalState, include/pineforge/engine.hpp:1499): a copy of the input timeframe spelling of the run, assigned when the evaluator is registered (src/engine_security.cpp:54) and again at every run begin (src/source/pine_scheduler.cpp:14). The fixed-period request clock reads it (src/engine_security.cpp:106 and src/engine_aux_security.cpp:248-256) and the state hash folds it in (src/engine_state_hash.cpp:33). One string for each registered evaluator; its size is that of one timeframe spelling and does not follow the length of the run. No fixed input is declared for it. OPEN.", line: 1499}
- {id: "U1931", file: "src/source/pine_adapter.cpp", symbol: "unranked", ops: ["decl", "grow"], container: "std::vector<std::size_t>", owner: "source-layer", phase: "unclassified", state: "unreviewed", note: "The positions, in pending_bracket_legs_, of the queued exit legs that one strategy.exit call gives a queue slot: the local list of the helper rank_queued_explicit_legs of PineExecutionAdapter::exit_with_reservation_sequence, declared at src/source/pine_adapter.cpp:13013 and filled at :13022. The helper returns before the list is declared unless the call is a full exit of a named entry placed at once (:12997-13004), so an exit of a named quantity or of a share below the whole never builds it. It takes one position for each waiting leg that names its quantity, has not been submitted and belongs to an opening the entry holds (:13016-13021): at most one for each leg in pending_bracket_legs_ at that call. The strategy.exit calls of the calculation put those legs there, and the end of the calculation submits them and empties that list. The local list is sorted and read once (:13046-13054) and freed when the helper returns (:13055); nothing retains it, and its size does not follow the length of the run. No fixed input is declared for it. OPEN.", line: 13013}
3 changes: 2 additions & 1 deletion docker/run_failure_codes.json
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,8 @@
"class": "strategy_limit",
"description": "A distinct map insertion exceeds that map's configured pair limit. Zero or omitted selects no limit. Counts and bar index are engine-owned context; code is the fixed TradingView identifier RE10070.",
"english": [
"Error on bar {bar_index}: A map cannot have more than {maxSize} key-value pairs. The current size is {currSize}."
"Error on bar {bar_index}: A map cannot have more than {maxSize} key-value pairs. The current size is {currSize}.",
"Error before the first bar: A map cannot have more than {maxSize} key-value pairs. The current size is {currSize}."
],
"retryable": false,
"since": "1.11.0"
Expand Down
23 changes: 21 additions & 2 deletions docker/run_failure_codes_diff.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,34 @@
"to": {
"version": null,
"unreleased": true,
"catalogSha256": "716fa77785ced515d1ed4da68f5b0a4b26126b77d910daaa302b48d7a84db346"
"catalogSha256": "5b52b97d388f156b939457eff9c815174619798f2c8a376de6029fe6f3e9d82b"
},
"catalogSchema": {
"before": "pineforge-run-failure-catalog/v1",
"after": "pineforge-run-failure-catalog/v1"
},
"metadataChanges": [],
"added": [],
"changed": [],
"changed": [
{
"code": "pine_map_capacity_exceeded",
"collection": "codes",
"fields": [
{
"path": "english",
"beforePresent": true,
"afterPresent": true,
"before": [
"Error on bar {bar_index}: A map cannot have more than {maxSize} key-value pairs. The current size is {currSize}."
],
"after": [
"Error on bar {bar_index}: A map cannot have more than {maxSize} key-value pairs. The current size is {currSize}.",
"Error before the first bar: A map cannot have more than {maxSize} key-value pairs. The current size is {currSize}."
]
}
]
}
],
"removed": [],
"deprecated": []
}
Loading
Loading