diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bc42e54c..56ae55b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ version number follows semantic versioning over the surfaces the ## Unreleased +- Corrected the parity grading for the historical population reported in [#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836) on 2026-11-11: counting unmatched trades net instead of gross overstated the excellent tier by 10 of 312 reference probes (311 instead of 301) and by 24 of 7,989 graded probes. The trade data is unchanged. Measured on 2026-11-19 on the pinned reference corpus (93d956a2): 303 excellent and 8 strong with one declared anomaly, where the net count gave 311 excellent and 0 strong; all 312 pinned trade outputs still match their baseline hashes. +- The corpus grader counts every unmatched gated trade on either side as a gross mismatch. One engine-only trade and one TradingView-only trade count as two mismatches, so equal list sizes cannot satisfy the excellent count gate. The same gross count, divided by the larger gated trade count (zero for two empty pools), supplies the percentage for strong-tier grading and fragmented-FIFO eligibility; thresholds are unchanged (#836). + +## 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). - On a chart aggregated from a lower timeframe, an order that a fill places or replaces at the bar's open now starts working at that fill, as it does on the plain chart: for example the exits of an entry that fills there, or the exits a pyramiding add re-arms. Before, such an order started at the bar's close, so an exit that the same bar crosses after its open could fill on a later bar or point, and the trade's drawdown and run-up could differ from the plain chart's. This affects confirmed runs on aggregated charts whose entries or adds place or replace orders when they fill; plain charts and every other path are unchanged. @@ -287,7 +292,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 diff --git a/README.md b/README.md index 4cd15efb2..c0fe588c8 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ the affected scripts and how to recognise it. An `engineErrors` entry (the "engine errors" count above) is not always an engine failure: it can also be a probe that was not graded because its reference data is incomplete. Release 1.13.0 records one such entry, the open corpus probe `validation/ta-stochastic-rsi-cross-01`. -Known issue ([#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836)): the parity scoreboard counts unmatched trades net instead of gross, so a probe with one engine-only and one TradingView-only trade still grades excellent; counted gross, 24 of the 7,989 graded probes (7,959 excellent and 30 strong instead of 7,983 and 6) and 10 of the 312 open reference probes (301 excellent instead of 311) grade one tier lower, with no trade list changed, and the corrected grader is planned for a release after 1.14.0. +The historical gross-count regrade recorded in [#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836) measured **7,959 excellent / 30 strong**: 24 probes moved from excellent to strong and none lower. That regrade and the dated scoreboard above describe their recorded pair and population; they are not a fresh measurement of this revision. The grader uses gross counting. Recorded release results remain historical measurements. Release **1.4.0 (2026-10-08)** maps to **7,983 excellent / 6 strong** on 7,989 graded probes (baseline `pineforge-parity-baseline-20261007-engine-b3192bfc`, promoted 2026-10-07 UTC), with 0 below strong and 0 engine errors. These are recorded grading outcomes for that pair and population. @@ -316,9 +316,11 @@ The quantities above render from the public [facts tokens](https://github.com/pi | Board | Test set | Result | |---|---|---| -| **Public** — [open corpus](https://github.com/pineforge-4pass/pineforge-corpus) | 312 reference strategies on BINANCE:ETHUSDT.P 15m, Apache-2.0, reproducible by anyone | this repository's sweep of the v1.0.1 library: **311 excellent + 1 declared anomaly**; the 309 of them in the measured population: **309 excellent** | +| **Public** — [open corpus](https://github.com/pineforge-4pass/pineforge-corpus) | 312 reference strategies on BINANCE:ETHUSDT.P 15m, Apache-2.0, reproducible by anyone | reference sweep **2026-11-19** ([#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836), [#883](https://github.com/pineforge-4pass/pineforge-engine/issues/883)): **303 excellent + 8 strong + 1 declared anomaly**; the 309 of them in the dated scoreboard above: **309 excellent** | | **Closed test** | 7,680 probes of 741 TradingView scripts across the 18 lanes: 680 community-shared scripts (7,179 probes), private under TradingView's Terms of Service, and 61 probe scripts the maintainers wrote (501 probes) | **7,674 excellent + 6 strong** | +Aggregate reference verification (`scripts/verify_corpus.py --all`) has no per-strategy exception ([#836](https://github.com/pineforge-4pass/pineforge-engine/issues/836)): it exits 1 and lists every strategy graded below Strong or missing an input, unless the strategy declares an anomaly or engine-only outcome. This reference measurement is separate from the dated scoreboard metadata above; baseline promotion requires its own verification. + ### Lane by lane @@ -340,10 +342,19 @@ The hard lane combines 309