Skip to content

Benchmarks: 200-strategy refresh (100 corpus + 100 closed), every engine re-timed, README numbers - #274

Merged
luisleo526 merged 18 commits into
mainfrom
r5/BENCH1
Sep 22, 2026
Merged

luisleo526 merged 18 commits into
mainfrom
r5/BENCH1

Conversation

@luisleo526

@luisleo526 luisleo526 commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

What

The benchmark refresh the owner asked for: 200 strategies (100 corpus probes + 100 closed ETHUSDT.P/15 scraped scripts, seed 20260921, plus one replacement slot) through PineForge, PyneCore 6.10.2, PineTS 0.9.34 and vectorbt 0.28.2, graded against TradingView's own export with the canonical verify_corpus.analyze_strategy rubric, and every engine re-timed on a quiet host (1-min load < 6, no build/test process, load recorded per batch). README, benchmarks/README.md and the throughput README carry the new numbers; results/staged/ (the PyneCore half staged first, per the owner) is retired into results/.

Privacy: the closed 100's artifacts live only in the maintainers' evidence store (sha 6e938f9a…, gitignored benchmarks/assets-closed/); the public 100 are in the pineforge-benchmarks-assets submodule (gitlink 6aedbcf). The harness reproduces the public half alone with the closed root absent.

Numbers

Scope PineForge PyneCore
corpus 100 100 excellent 84 excellent / 12 strong / 3 weak / 1 minimal
closed 100 (+1) 100 excellent / 1 strong 49 / 30 / 8 moderate / 9 weak / 1 minimal / 4 n/a

Speed (quiet host, Apple M4 Max): PineForge median 88 ms per strategy in-process with the magnifier on (611k bars/s, quartiles 434k–726k); PyneCore median 1,475 ms per subprocess (36.6k bars/s); median 15× faster than PyneCore over the 196 strategies both time (p5 6×, p95 70×); vectorbt 1.3× on its 13 ports; throughput package 0.61 M bars/s magnifier-off (median of five quiet runs).

Why the headline fell from 162× to 15×: the same-host A/B in the report shows the current engine 12–20× slower per bar than the June engine ac011d8 on the probes both populations share (PyneCore is unchanged-to-faster). This is the known R5 cost bounded by scripts/check_runtime_budget.py (A40 rev 5: 15× ceiling over ab9714b, kernel floor ~5.7× by design). BENCH2's hot-loop sample attributes ~32% to NativeExecutionConsumer::continuation_hash() called from PineStrategyHost::on_native_bar every bar; wave-E lane E24 chases it.

Engine src//include/ untouched; bench CMake options default OFF (proved by a plain configure). Doc guards clean (anchors 1555/1555, lint 0), preflight 25 stages, release 566/566.

Campaign sweep on this head: exp-r5-bench2-readme-20260922, execution pineforge-experiment-run-9vhh4, 72/72 cases, 0 failed; candidate bc069a60…; offline band1 +0/−0 band2 +0/−0 (score 0, hard regressions 0, coverage lost 0); pr_gate pineforge-pr-gate-9fhqm → target.not-positive (neutral, accepted at net 0). Supervisor verify: preflight 25 stages, release 566/566.

BENCH3 (re-timed at engine 063e446 after wave E, per the owner's ruling): all 201 trade lists byte-identical to BENCH2; PineForge median 89 ms / 603k bars/s (quartiles 425k–731k), median 15× vs PyneCore (p5 6×, p95 68×), throughput package 0.64 M bars/s (five quiet runs); paired A/B 063e446 = 0.94× the time of e9ad37d. Sweep exp-r5-bench3-readme-20260922 on head 4412a34: execution pineforge-experiment-run-v7gww, 72/72, candidate c4879eaa…, offline band1 +0/−0 band2 +0/−0 (score 0, hard regressions 0, coverage lost 0), pr_gate pineforge-pr-gate-wnjhn → target.not-positive (neutral). Supervisor verify: preflight 25 stages, release 571/571.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lg1KP7RXkwcEP2wFxXooy9

Comment on lines +220 to +221
"Timing is valid only on a quiet host: 1-minute load average below 6.0 and no "
"`cmake --build` / `ctest` / `ci_verify` process, re-checked before every batch.",
Comment on lines +267 to +268
"| Strategy | PF median (ms) | PF bars/s | PC median (ms) | PC p95 (ms) | PC bars/s | "
"vbt median (ms) | Speedup PF vs PC | Speedup PF vs vbt |",
Comment thread benchmarks/compare.py
Comment on lines +281 to +286
"Each strategy runs through PineForge, PyneCore and (where a `strategy_vbt.py` port exists) "
"vectorbt on the same 53,929-bar Binance ETH/USDT-USDT 15m feed and is graded against its "
"TradingView tape by the canonical corpus rubric, `scripts/verify_corpus.py::analyze_strategy` "
"(align-then-trim common window, fragment consolidation, range-end mark pairing, exact-count "
"and ≥99% coverage gates for *excellent*, strict/production threshold profiles, `inputs.json` "
"overrides). PineTS has no strategy backtester upstream and is excluded here.\n",
Comment thread benchmarks/compare.py
Comment on lines +294 to +296
"Match degree per the canonical corpus rubric (`scripts/verify_corpus.py::analyze_strategy`). "
"Cells: tier (engine trades / TV trades inside the gated common window). ⚪ n/a = the engine "
"produced no trade list for that strategy (reason in the cell).\n",
Comment thread benchmarks/compare.py
Comment on lines +345 to +346
"| Strategy | Group | Tier | Failing gates / reason | count Δ (abs) | entry p90 | "
"exit p90 | PnL p90 | coverage |",
Comment on lines +421 to +425
"- **Corpus 100:** probes under `corpus/validation/` with ≥ 5 closed TV trades, a TV window inside the "
"bench feed and no dependency on the 1m corpus feed; classified into mechanism families by probe name "
"(first matching rule in `FAMILY_RULES`); slots allocated per family in proportion to family size with "
"at least one each (largest remainder); within a family, members sorted by TV trade count are cut into "
"as many contiguous quantile bins as the family has slots and one member is drawn per bin.",
Comment on lines +426 to +432
"- **Closed 100:** population probes with `source == \"scrapper\"`, `symbol == \"BINANCE:ETHUSDT.P\"`, "
"`timeframe == \"15\"` — the only dataset the bench feed (Binance ETH/USDT-USDT perp 15m) and the TV "
"tapes agree on; symbols are not mixed. Anomaly surface excluded; tape bytes must hash to the "
"population pin; excluded when the TV window is not inside the bench feed or the campaign runs the "
"script on the 1m feed (the 15m bench feed cannot serve finer-TF or `request.security_lower_tf` bars). "
"Slots allocated to `hard`/`target` in their population proportion, then drawn by TV trade-count "
"quantile bins as above.",
Comment on lines +433 to +434
"- **Replacements:** each slot lists the other members of its bin in seeded order; a slot lost to a "
"PyneSys compile rejection is backed by the first compilable entry of that queue.",
luisleo526 and others added 18 commits September 22, 2026 19:50
…0 closed ETH@15 scraped scripts (lane BENCH1, step 1)

benchmarks/select_population.py draws the new benchmark population
deterministically (seed 20260921):

- corpus 100 from corpus/validation at gitlink 442d497: 310 eligible of 312
  probes (2 need the 1m corpus feed the 15m bench feed cannot serve),
  stratified over 19 mechanism families named by the probe names (at least
  one slot per family, largest remainder), then by TV trade-count quantile
  bins inside each family;
- closed 100 from population 3d72f815 (document dd8841c9): source scrapper,
  BINANCE:ETHUSDT.P, timeframe 15 -- the only dataset the bench feed and the
  TV tapes agree on -- tape bytes checked against the registry pins, anomaly
  surface excluded (18), 1m-feed scripts excluded (16, per the campaign's
  latest verify reports, experiment exp-r5-p2c-abi-aliases-20260921),
  379 eligible, all hard surface, drawn by trade-count quantile bins.

Each slot carries its replacement queue (the rest of its bin, seeded order).
The manifest is results/selection.json + selection.md; the private inputs
(population document, verify-report export) live under the gitignored
benchmarks/assets-closed/ root.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… time (lane BENCH1, step 2)

The benchmark population now lives in two roots: the public assets
submodule (the 100 corpus slots) and a maintainer-local closed root,
benchmarks/assets-closed/strategies (100 TradingView-scraped scripts that
are never published; gitignored since step 1). Every consumer discovers
both, additively, and a public checkout without the closed root runs the
public slots alone:

- paths.py: CLOSED_STRATEGIES + STRATEGY_ROOTS;
- CMakeLists.txt: the bench section adds the closed root's CMakeLists when
  present (its targets join bench_strategies); the bench options stay OFF
  in every CI profile;
- speed/pineforge_bench.cpp + speed/CMakeLists.txt: GBench enumerates
  BENCH_STRATEGIES_DIR then BENCH_CLOSED_STRATEGIES_DIR;
- run_all.sh: slot loops over both roots (the PyneCore glob no longer drops
  3-digit slots), JOBS-parallel parity runs, per-slot run_strategy.args,
  per-slot _<engine>_error.log, an optional vectorbt step, the PineForge
  canonical indicator run gated by SKIP_PINEFORGE, and quiet_gate: the
  1-min load (optionally waited below QUIET_LOAD_MAX, no cmake --build /
  ctest / ci_verify) recorded before every timing batch;
- compare.py grades every engine with the canonical rubric itself,
  scripts/verify_corpus.py::analyze_strategy (the old copy of the rubric
  was stale and could not parse the current tape schema), reports n/a
  reasons, tallies per root, and --engines/--pending/--out-dir/--*-name
  stage one engine's grades without touching results/summary.md;
- compare_indicators.py: --out and --pending-pineforge;
- speed/time_pynecore.py: both roots, --slots chunks, --out;
- speed/aggregate.py: PineForge optional (pending), the GBench
  with_magnifier entries selected explicitly, host loads, dynamic
  header (date, engine, PyneCore/PineTS versions, feed bars), bars/s for
  every engine (Q1/median/Q3), speedup p5/p95, --out.

No engine source changes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…hly security contexts; runs chunk by slot (lane BENCH1, step 2)

- runners/run_pynecore.py maps D/W/M (and the 1D/1W/1M spellings) to the
  chart feed with pyne run --security: PyneCore 6.10 serves intraday HTFs
  from the chart data but needs an explicit base file for D/W/M, which it
  resamples -- the bars PineForge aggregates its own HTF series from.
  Without it every script with a daily request.security failed with "No
  OHLCV data found for security context"; an unused mapping leaves the
  output byte-identical (checked on a non-MTF slot).
- run_all.sh: SLOTS narrows the parity loops to slot-number ranges (runs
  can be chunked), SKIP_INDICATORS skips the three canonical indicator
  runs, and quiet_gate counts build/test processes by executable name
  (cmake --build, ctest, python ci_verify.py) -- a full-command grep also
  matched agent processes whose arguments merely quote those commands.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… stays 0.28.2 (lane BENCH1, step 3)

- benchmarks/pyproject.toml + uv.lock: pynesys-pynecore[cli] >= 6.10.2
  (locked 6.10.2, the current release; the runner's --security mapping
  needs it). The venv is built on CPython 3.12.12, the interpreter of the
  2026-06-11 sweep.
- benchmarks/package.json: pinets ^0.9.34 (the current release; the
  previous refresh ran 0.9.16 under ^0.9.13). The canonical indicator run
  reproduces the committed canonical_pinets.csv byte-for-byte.
- vectorbt stays pinned at 0.28.2: it still installs and runs on the 3.12
  venv (1.1.0 is the current release and was not needed).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… run reports and finishes (lane BENCH1, step 2)

slot_dirs() ended on the last in_slots() test, so under set -e/pipefail a
SLOTS-narrowed run exited right after its first parity loop: the runs had
happened, but the failure warning and the rest of the script never ran.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…ir may sit outside the repo (lane BENCH1, step 2)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…uota, one rejection replaced (lane BENCH1, staged step 1)

pineforge-utils/bench-maintenance/cloud_compile_ratelimited.py (a wrapper
around cloud_compile.py's pyne compile command) sent 203 compile requests
and 1 usage probe in three batches: 13:36-13:44Z (1 + 89), 14:36-14:44Z
(90), 15:36-15:40Z (24) -- never more than 90 in any rolling hour, one at a
time 5 s apart, zero HTTP 429. Every request is in
results/staged/pynesys-compile-log.md (timestamps and outcomes; no key).

199 of the 200 selected slots compiled (PyneComp v6.0.68). Slot 192's
source carries //@Version=6 then two //@Version=5 lines and PyneSys
rejects it ("Empty document."); the slot is kept -- its PyneCore cell reads
n/a with that error -- and select_population.py --replace appends the
first member of its bin's queue as slot 201 (hard surface, bin 21, 154 TV
trades), compiled ok. The canonical indicator script was recompiled too.
The selection manifest moves to results/staged/ with the staged results
and regenerates byte-identically from its inputs and the recorded
rejection.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… against TradingView by the canonical rubric (lane BENCH1, staged step 2)

run_all.sh (SKIP_BUILD/PINEFORGE/PINETS/SPEED/REPORTS/VECTORBT, JOBS=8,
SLOTS chunks) ran runners/run_pynecore.py (PyneCore 6.10.2) on all 201
slots of both roots; compare.py --engines PyneCore graded every
pynecore_trades.csv against its tape with verify_corpus.analyze_strategy
into results/staged/pynecore_summary.md (+ per-row metrics in
pynecore_trade_comparison.md); the PineForge column reads "pending wave D
(BENCH2)" and vectorbt "runs in BENCH2". compare.py's summary now lists
every non-excellent row with its failing gates.

PyneCore vs TV: corpus 100 = 84 excellent / 12 strong / 3 weak /
1 minimal; closed 101 = 49 excellent / 30 strong / 8 moderate / 9 weak /
1 minimal / 4 n/a (192 PyneSys compile rejection; 140, 166, 197 PyneCore
security-context RuntimeError on the feed's first, partial daily period).
Trades emitted 371,598 over the whole feed vs 266,451 TV trades.

The canonical indicators: PineTS 0.9.34 reproduces the committed
canonical_pinets.csv byte-for-byte; PyneCore (recompiled canonical_pyne.py)
now covers the 53,929-bar feed; PyneCore <-> PineTS max relative delta
3.45e-07 (results/staged/indicator_comparison_pynecore_pinets.md). The
PineForge pairs are pending wave D.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… 4794c69 (lane BENCH1, staged step 5)

benchmarks/assets now points at pineforge-4pass/pineforge-benchmarks-assets
refs/heads/r5/BENCH1 = 4794c69f4ebe63c84d2e6878873b30db8b3468d2 (pushed):
the 100 corpus slots 001-100 with strategy.pine, tv_trades.csv, inputs.json,
generated.cpp, strategy_pyne.py and pynecore_trades.csv, and the refreshed
PyneCore canonical indicator files. The previous gitlink, bb97c51 (the
retired 100-slot suite), stays reachable on the assets main branch.

The 101 closed slots (100 selected + replacement 201) are not public: their
tarball is in the maintainers' evidence store as
sha256/6e938f9a9160eeae6bda5c7c2d02078f1b9795d767a48d125fa68245f69ca539
(14,696,398 bytes; lab evidence get <sha> --out <path>).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…et in four hours; the staged README (lane BENCH1, staged steps 3-4)

results/staged/pynecore_speed.md: the PyneCore timing gate (1-min load
< 6.0, no cmake --build / ctest / ci_verify process) was polled every
~5 minutes from 2026-09-21 15:49:00Z to 19:49:13Z -- 100 probes, none
passed (1-min load min 7.74 with 8 build/test processes, median 97.0,
max 233.2; 5-16 such processes at every probe, other lanes' ci_verify
runs). No timing was taken and no pynecore_speed.json is staged;
quiet_host_polls.tsv holds all 120 probes of the lane.

results/staged/README.md: what is staged and where (assets gitlink
4794c69, closed tarball sha256 6e938f9a...), the PyneSys request counts,
the PyneCore tier table and its mechanisms, and the exact commands lane
BENCH2 runs for the PineForge half (and the PyneCore timing) from cold.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…us 100/100 excellent, closed 100 excellent + 1 strong (lane BENCH2, step 3)

Engine main e9ad37d runs the committed generated.cpp (codegen 89645d6,
unchanged since BENCH1) on the 53,929-bar bench feed; compare.py grades
PineForge, PyneCore (the staged outputs) and vectorbt against the TV
tapes with the canonical verify_corpus.analyze_strategy rubric.

- PineForge: corpus 100 excellent; closed (101 slots) 100 excellent +
  1 strong (181-roi10x-shiva-lt-ls-blend, one extra trade at the window's
  opening bars, count delta 1 of 2,411).
- PyneCore 6.10.2: 133/42/8/12/2 + 4 n/a, byte-identical to the staged
  BENCH1 table.
- vectorbt 0.28.2: 13 of the 14 carried-over ports load (4/6/2/1).
- indicator_comparison.md: 53,909 common bars; PF<->PC p99 <= 4.3e-10,
  max-rel carries the documented EMA-seeding warmup divergence.

benchmarks/assets 4794c69 -> 6aedbcf (assets r5/BENCH1, pushed): the 100
public pineforge_trades.csv, 13 vectorbt_trades.csv, the canonical
PineForge indicator CSV, and the assets README.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…yneCore 36.6k, median 15x; throughput package re-measured (lane BENCH2, step 4)

All batches gated on 1-min load < 6 with no cmake --build / ctest /
ci_verify process (by executable name); every batch passed at load
3.79-5.93 with zero such processes, recorded per batch in speed.md.

- PineForge GBench /throughput/with_magnifier, 201 slots: median
  88.31 ms, bars/s Q1 433.7k / median 610.7k / Q3 725.8k.
- PyneCore time_pynecore.py --n 20 --workers 8 in slot chunks: 196 of
  201 timed (192 no source; 140/166/197 RuntimeError; 143 the same error,
  intermittent), median 1,475 ms, 36.6k bars/s; slots 162 and 178
  outlived a chunk and were re-timed with time_one's own loop.
- Median speedup PineForge vs PyneCore 15x (p5 6x, p95 70x, n=196);
  vs vectorbt 1.3x (n=13); PineTS canonical 485.8 ms.
- throughput/reproduce.sh x5 (no-magnifier hot loop, N=201): run
  medians 0.604/0.615/0.606/0.620/0.614 M bars/s; the median run (5)
  is kept as benchmark_results.json + throughput_quartiles.png.

aggregate.py gains --engine-label and --provenance (speed.md's closing
section: the BENCH1 "never quiet" record, every deviation, and the
same-host check: engine ac011d8 still times its June figures on this
host, e9ad37d is 12-20x slower per bar on the three shared probes).
grid_search_repro.py sweeps 021-composite-scalping-integration-01 (the
retired 19-scalping-wunder-bots is gone), plot_quartile.py titles the
real N, and reproduce.sh now builds the GBench harness it runs.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…e to results/, the staged PyneCore reports are superseded (lane BENCH2, step 5)

selection.{json,md} and pynesys-compile-log.md move to results/ (and
select_population.py writes there by default); pynecore_summary.md,
pynecore_trade_comparison.md and indicator_comparison_pynecore_pinets.md
are superseded by results/{summary,trade_comparison,indicator_comparison}.md,
pynecore_speed.md's "not measured" record and quiet_host_polls.tsv fold
into speed.md's provenance, and the staged README's cold-start recipe
becomes benchmarks/README.md's "Reproduce" section.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… per group, the PyneCore mechanisms, median 15x vs PyneCore (lane BENCH2, step 5)

README.md: the Speed badge and the "Fast." bullet (median 15x on 196
timed strategies), and the Cross-engine comparison section rewritten
for the new population (100 corpus probes + 100 closed ETHUSDT.P/15
scraped scripts whose artifacts stay in the maintainers' evidence
store, sha 6e938f9a...), the tier table per engine per group, the
PyneCore paragraph (feed-window carry, request.security, grid and
str.match rows; 1 compile rejection, 3 runtime errors), the speed and
throughput figures, why neither is comparable to the 2026-06-11 table,
and the Last refresh line. benchmarks/README.md and the throughput
package README likewise, with the Reproduce recipe.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…oot bench lines (lane BENCH2, step 7)

BENCH1's five closed-root lines in the bench-strategies block shift
`if(PINEFORGE_BUILD_LIVE_RUNNER)` from 422 to 427;
check_doc_anchors.py reports the stale CMakeLists.txt:422-423 citation
(ambiguous, so not auto-fixed). One line.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…forge.a is newer (lane BENCH3)

The runner links libpineforge.a statically, but run_all.sh rebuilt it only when
run_pineforge_canonical.cpp changed. After an engine change the indicator column
came from a binary linked against an old library (the committed one dated from
2026-09-21, before wave D). The rebuilt runner reproduces canonical_pineforge.csv
byte for byte at 063e446.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…201 trade lists unchanged, 89 ms / 603k bars/s, 15x vs PyneCore (lane BENCH3)

Parity: every dylib and the GBench harness rebuilt on main 063e446; all 201
pineforge_trades.csv are byte-identical to the e9ad37d refresh, so summary.md,
trade_comparison.md and indicator_comparison.md regenerate unchanged (corpus
100/100 excellent, closed 100 excellent + 1 strong, slot 181 unchanged).

Speed: PineForge re-timed in two GBench batches (slots 001-100 at load 5.41,
101-201 at 5.90): median 89.45 ms, 603k bars/s (Q1 425k, Q3 731k), median
1.02x the e9ad37d time per strategy. PyneCore, PineTS and vectorbt are not
re-measured; their timing files reproduce the e9ad37d report byte for byte.
The throughput package is not re-timed: the host was never quiet.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… over five quiet runs; June-engine A/B re-measured beside e9ad37d (lane BENCH3)

Throughput: five gate-checked reproduce.sh runs (run medians 0.621, 0.638,
0.611, 0.646, 0.640 M bars/s); the package publishes run 2, the median run
(e9ad37d measured 0.614). Two runs were discarded: one saw another project's
load spike to 16.8 before its benchmark began, one recompiled the bench tree
inside the run after a commit moved the version header.

A/B, one window, alternating: 063e446 takes 0.94x the time of e9ad37d per
strategy on 26 public slots (22 of 26 faster), and 10-18x the June engine
ac011d8 on the three probes both populations share (e9ad37d: 11-19x). The
published PineForge column stays the sweep at load 5.41/5.90; its cross-window
comparison with the e9ad37d sweep (1.02x) is the weaker one and is labelled so.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@luisleo526
luisleo526 marked this pull request as ready for review September 22, 2026 14:53
@luisleo526
luisleo526 merged commit 0ad1e8e into main Sep 22, 2026
13 checks passed
luisleo526 added a commit that referenced this pull request Sep 26, 2026
…blings its leg had (R5 lane INT26, round 2: the gate sweep's leaver)

INT26's gate sweep (exp-r5-int26-20260926 against rebaseline e69aa1f7)
refused the merge on one leaver,
scrapper:data-BINANCE-BTCUSDT/standard/vasudevshenoy-manoj-betrayed-me
(BTCUSDT 15m, process_orders_on_close, pyramiding 0; stop entries
'Buy'/'Sell' with strategy.exit stop/limit brackets, a pending entry
cancelled when the next bar does not trigger it): 821 of TradingView's 821
trades on main 0d76a09, 820 on ebe6748 (canonical 100 -> 99.9).

Bisect (the probe's own feed, spark, one build per pick boundary): a6e6a00
and 2922ade book 821, e1d7a98 -- R5 lane PAR-ORDERS, H-MEASURE Finding 6b,
a process_orders_on_close stop entry its placing close already reached
fills at that close -- books 820, and so does every later pick.

Mechanism, on 2025-08-03 10:00 UTC. The 09:45 close cancels its pending
'Buy', places it again (stop 113689.29) and re-issues 'Buy Exit' (limit
113771.41); the re-issued legs keep their older book slot, so on the 10:00
bar the pre-script drain settles the limit on its parent's touch bar --
after that bar's receipt read. The 10:00 bar closes at its high 113771.47;
its body cancels 'Buy' again and places it at that high with a fresh 'Buy
Exit' (limit 114004.53), and since e1d7a98 the close pass fills that
re-entry at the close, as TradingView does (#274), so the fresh legs are
working when 10:15 opens. The first limit's terminal receipt is read only
then, and observe_terminal_receipts' sibling cancel withdrew every working
leg of the same exit id, from_entry and origin -- the fresh bracket's
included, both legs at origin 0. The re-entry ran on to the 15:15 session
close and swallowed TradingView's #275 (11:45). Before e1d7a98 the
re-entry rested to 10:15, its legs still staged, so the late read found no
sibling to take. The pick is right; the sibling cancel was not.

Fix, adapter only: cancel_bracket_siblings takes the ordinal the terminal
receipt executed at when the observer reads it, and skips a matching leg of
a later strategy.exit call (another command_sequence) that the kernel
accepted after that ordinal (its Birth::acceptance_ordinal, read through
native_working_requests() only when such a leg is among the matches): that
leg is the same id's later order. A leg of the filled leg's own call is its
sibling however late it was accepted -- the drain submits a bracket's legs
one at a time, executing each, so a stop can be accepted after its limit
filled -- and goes as before (a review of the first form, which skipped
every leg accepted after the fill, found that case). The close passes that
call it synchronously pass nothing and are unchanged. No state is added.

The probe (spark, generated.cpp of codegen a4259656, the lane feed
6b54c44a): 821 trades, canonical rubric excellent, countAbsDelta 0 (820 /
strong before). TradingView's #273-#275 exact: 10:00 113689.29 -> 10:00
113771.41; 10:00 113771.47 -> 11:00 114004.53; 11:45 114005.84 -> 15:15
113844.70. 819 of 821 trades exact to the minute and cent on both legs
(main: 771; the two others, #1 and #3, differ on main too).

Witness: tests/test_pooc_stop_reentry_bracket_tapes.cpp replays three `lab
tv --no-note` tapes of synthetic scripts of the same shape on NYSE:F 15m
(tests/fixtures/pooc_stop_reentry_bracket; tv_trades e0447b53 / b7e89ce1 /
efbd25e3): three flat signal closes that each cancel and place again a stop
entry with its bracket, 10c beyond the close, then 1c (the next bar fills
the entry and then the limit and closes flat), then at that close (filled
there), long on bars 39-41 and short on bars 44-46; TradingView books the
same four rows on the chart and under the magnifier. Every row is compared
field by field, with the end book and its working bracket legs.
- int26-reentry-bracket-chart: all four rows, flat; the short is the
  leaver's shape.
- int26-reentry-bracket-mag records a divergence the fix does not touch
  (the same before and after): there the drain leaves the short's retained
  limit to the flush below the body, whose book still holds the short, so
  the re-entry is never placed -- rows 1-3 exact, both books flat.
- int26-reentry-noexit-chart, the control: the short's re-entry places no
  strategy.exit (TradingView's row 4 still open at the end); the short
  bracket's stop, accepted after its limit filled, must still be withdrawn.
Fail-before: against ebe6748 2 of 27 checks fail (the chart tape: 3 rows
against 4, short 100 against flat); against the first form of the rule 1 of
28 (the control's stop left working); after, 28 of 28.

Floors: one source-bound row. RELEASE_MIN_TESTS 702 -> 703,
EXCLUDED_REGISTERED_MIN 683/683/692 -> 684/684/693 (and
test_ci_verify's expectation, docs/ci.md). KERNEL_MIN_TESTS unchanged.
docs/ci.md's sentence "The PR registration floors at INT26 are 683 for
Debug and sanitizers and 692 for native" is rewritten with the new counts.

Docs: the design page's PAR-ORDERS paragraph records the rule and the
magnified divergence; the CHANGELOG 1.0.0 entry's process_orders_on_close
item adds it for a user. Every doc anchor carried onto this tree by the
exact line map from ebe6748 (135 moved); the three citations of
ci_verify.py's RELEASE_MIN_TESTS line (CONTRIBUTING.md, contributing-llm.md
twice) set by hand, 390 -> 393.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@luisleo526
luisleo526 deleted the r5/BENCH1 branch October 5, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant