You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f10f0cc
Browse filesBrowse the repository at this point in the historyBrowse files
integration: V19-E's K3 pin keeps the first re-issue of each revival candidate, not every one -- a flat cycle that re-issues its exits every bar no longer grows the placement table or the bar-open sweep
The Cloud Run sweep of f6e69e56 timed out on seven population probes that
main, INT20, C7 and INT19 grade excellent (2 engine / 2 TV trades each). They
share one shape: after a trade closes the script keeps calling strategy.exit
every bar, at a stop and a limit taken from the close, for entries that are not
open, so one flat position cycle runs to the end of the feed. Reproduced on
spark with the probe transpiled and run on the 53,929-bar 15-minute ETH feed:
main 1.23 s, this tree before the fix 65.71 s, the same 13 trades.
Mechanism, from a perf profile and an instrumented copy of the sweep:
erase_retired_rows was 62% self time plus its binary searches and string
compares, the full pass ran at 11,985 of 12,000 bars, and the table retained
thousands of exit-leg rows of the current cycle with no lifecycle target, every
one kept by K3. The legs the cycle placed on its first bar keep their target
(the re-issues that follow carry no projection link to them), so they stay
candidates (K1) for the whole cycle, and K3 pinned every later same-id re-issue
at another stop: two rows per exit per bar, each walked by the pre-pass, the
full pass and K3's comparison against the candidates at every bar open --
O(bars^2) in the cycle's length.
Fix, in the owning mechanism: the revival's superseded test
(revive_brackets_after_margin) asks whether ANY current-cycle re-issue of the
candidate exists at a later bar and another stop, and a row's family, ids,
placement bar and stop never change once placed, so the lowest-incarnation such
re-issue answers for every later one. K3 now pins exactly that one per
candidate (computed once per sweep into RetiredRowScratch::first_reissues);
every later re-issue is erased once nothing else holds it. K2 is unchanged.
The tombstone audit at the revival counts its scan as the existence test it
is: an erased supersessor is a hit only when no retained row answers first
(the unrefined predicate also gives 0 hits over the battery; no battery
revival reaches an erased second re-issue).
Witness: tests/test_adapter_live_state_scaling.cpp gains a third workload of
that shape on a daily chart -- one trade whose take-profit fills early, then
two exits (one for that entry, one for an entry that never opens) re-issued
every bar -- gated without recording (the backtest path; the sweep is the cost
it holds) at 4,000 and 16,000 bars, its two sizes timed in turn:
fail-before, this TU against f6e69e56: 0.2906 s / 5.3903 s (ratio 18.55),
7,748 / 31,024 rows retained -- three FAILs (both row bounds, the ratio);
after: 0.0133 s / 0.0541 s (ratio 4.07; 3.89 on a rerun), 12 rows retained.
The straddle at 64,000 and 256,000 bars: 0.205 s and 0.890 s, 12 rows.
Nothing a run shows moves: the equivalence battery holds all 108
configurations equal with rows retained and erased and to their pinned
transcripts (328 checks, 0 failures; 46,918 rows erased, was 46,861); the
100-slot fingerprint sweep, magnifier off and on, is byte-identical to this
tree before the fix, broker-state hash included, and its trade fields to
main's; the tombstone build reports 0 sites hit over the full ctest (378
processes), the battery and the 200 fingerprint runs (up to 45,131 tombstones).
Two pinned tests read hashes that fold the retained rows and move: they are
re-pinned in the next commit.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
0 commit comments