Skip to content

adapter: skip roster passes and empty-family scans that cannot change anything - #579

Closed
luisleo526 wants to merge 7 commits into
dormant-working-bookfrom
adapter-roster-walks
Closed

luisleo526 wants to merge 7 commits into
dormant-working-bookfrom
adapter-roster-walks

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

adapter: skip roster passes and empty-family scans that cannot change anything

With many standing (never filled) orders the Pine adapter walked every cohort root on each bar: the origin release pass rebuilt and sorted all roots, prefix retirement visited every retained front, and a dozen family and policy scans looped over all live handles though no row of the family existed. The cost grew with the square of the order count.

The release pass now runs only after a non-Accepted command or an applied fill, because a newly accepted entry can neither release a root nor retire a prefix. Prefix retirement returns at once while every retained origin front is pinned by its own placement. Per-family live counters, kept at the single writer of live membership, let the family and policy scans return when their family is empty; Debug builds recount them at every use and assert they agree.

A standing-orders probe asserts the mechanism counters (cohort iterations, disk reads per order, native scan count) scale linearly across 2,500 to 10,000 orders. The Pine l8c qualification probe now adds its extra live row through the same writer so the recount holds. test_standing_orders_wall is added to the pinned slow rows.

🤖 Generated with Claude Code

luisleo526 and others added 7 commits October 28, 2026 05:53
… anything

With many standing (never filled) orders the Pine adapter walked every cohort root on each bar: the origin release pass rebuilt and sorted all roots, prefix retirement visited every retained front, and a dozen family and policy scans looped over all live handles though no row of the family existed. The cost grew with the square of the order count.

The release pass now runs only after a non-Accepted command or an applied fill, because a newly accepted entry can neither release a root nor retire a prefix. Prefix retirement returns at once while every retained origin front is pinned by its own placement. Per-family live counters, kept at the single writer of live membership, let the family and policy scans return when their family is empty; Debug builds recount them at every use and assert they agree.

A standing-orders probe asserts the mechanism counters (cohort iterations, disk reads per order, native scan count) scale linearly across 2,500 to 10,000 orders. The Pine l8c qualification probe now adds its extra live row through the same writer so the recount holds. test_standing_orders_wall is added to the pinned slow rows.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ive-counter change

The roster-walk change moves and adds a few adapter sites (the live-handle and placement counters and their callers), so the inventory taken from the working-book tree no longer matched exactly. ci/cr150-source-sites.json is replaced by the gate's own generated inventory for this tree; the manifest needs no new entry. 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.
@luisleo526

Copy link
Copy Markdown
Collaborator Author

Landed in #616 (squash a991b4e on main), which carries this change with one verify and one parity run on the combined tree.

@luisleo526 luisleo526 closed this Oct 28, 2026
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