Repository navigation
adapter: read projected pending orders through one cached duplicate index - #599
Closed
luisleo526 wants to merge 7 commits into
Closed
luisleo526 wants to merge 7 commits into
luisleo526 wants to merge 7 commits into
Conversation
…ndex projected_pending_size and projected_pending_at dropped duplicate exit rows by re-scanning every earlier raw row for each candidate, and every reader called projected_pending_at in a loop, so a full read of m pending rows cost up to O(m^3). The raw pending view now builds one grouped index (earliest row of each exit group plus its later siblings) in a single pass and every size/row/level reader walks it. The index stores integers only and is invalidated by a version bumped at every writer of the raw pending view, including the same-bar command swap. Debug builds recompute the original quadratic answer for views of up to 256 rows and assert it equals the cached one, so a missed invalidation fails the adapter suites loudly. A counter-based scaling test enumerates 500 to 4000 projected rows and bounds the raw-row reads linearly; it also compares representatives and merged levels against an independent oracle and exercises reissue, cancel, materialization and run reuse. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ve the derived cache members in the state-hash coverage check The grouping key used the interned session key where a string view was expected, which did not compile. It now takes the interned string. The state-hash coverage check lists the new projected pending cache, its version stamps and its diagnostic counter as derived or diagnostic members, each with the reason it holds no decision state. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…cted pending index Writes to the raw pending view now go through one helper, so the sites that used to name each pending container are spelled with the helper and the old per-container entries no longer match any site. Those entries are folded into one entry for the helper, keeping its pending-flat-memory state. The cache members, the grouping locals and the successor vector get their own unreviewed entries, and the unreviewed ceiling rises by the net new entries. ci/cr150-source-sites.json is replaced by the gate's own generated inventory for this tree. No code or behaviour changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
luisleo526
added a commit
that referenced
this pull request
Oct 28, 2026
…aling, UDT graphs, metrics replay and the CI admission fix (#616) This lands twelve engine pull requests as one change, verified and measured once on the combined tree: - #593 scratch: a fixed write-through read cache for the adapter's id tables - #594 live runner: a delta report stream by default, and report-path work that does not rescan closed trades - #597 live runner: typed pre-growth stop for the ledger budget and flat pending counts - #608 run_json: reserve the report channel, so strategy output on fd 1 cannot corrupt a report - #586 Pine UDT object graphs on the paged object Store - #578 native order: dormant working book, flat per-point cost for never-filled orders - #579 adapter: skip roster passes and empty-family scans that cannot change anything - #599 adapter: read projected pending orders through one cached duplicate index - #563 adapter: gate the reversal exit cancel on candidate owners instead of every historical id - #591 report sink: retire sealed closed-trade rows on sink routes when the module opts in - #596 metrics: stream the bar Sharpe and Sortino through an ordered, packed return replay - #615 ci: accept release.yml's matrix runner under its fetched path in PR admission Fixes found while testing the combined tree are in the final commits: the retiring ledger's cache sizing, a residency witness that bounds sink-run heap by the declared cache cap and checks zero growth at 100k, 200k and 1M trades, a test fix for a descriptor reuse race, and a standing-orders timing grid whose 20,000-order point is tracked in #621. The member pull requests are closed as landed here.
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, stacked on the adapter roster PR. Reads projected pending orders through one cached duplicate index, replacing a repeated prior-row scan that grew cubically with the number of orders. Includes a Debug-only equivalence check against the original answer for small inputs and a scaling test (red on the unfixed base). Release and Debug/sanitizer legs pass.
🤖 Generated with Claude Code