Skip CRTC router-hint allocation on root misses
perfloop/dynamo · ALLOCATION HOT LOOP
https://perfloop.ai/t/oss/case_pjzwwq381k
Verdict
PROPOSED · opened 2026-09-07
Hypothesis
`find_details_from_seq` already has the root-child snapshot that controls whether `walk_match_path` can enter any node. Today it reserves capacity for every nonempty retained-hint request before that walk, although a missing root child makes the walker exit immediately and the empty chain is discarded by candidate retention. The proposed guard removes only that provably unused root-miss allocation. It is a narrow per-request allocation-policy change rather than a locking or routing-policy change. Its benefit is conditional, not assumed: long root misses can avoid allocator work and temporary capacity, while the root-hit path deliberately retains the current pre-reserve behavior and avoids moving growth under the node-state read guard.
Run a retained-details CRTC A/B with the same event-built tree and request corpus, recording block-hash length, root-child hit/miss, allocation calls/bytes, and p50/p99 lookup time. Reject the premise if root misses or avoided bytes are negligible, if p99 regresses, or if any root-miss differential changes overlap scores, last-matched hashes, `None` versus candidate presence, ordered hashes, owner-prefix pairs, or selected routing outcome.
Architecture-independent. Limit the change to the local exact/event-driven CRTC retained-hint path. Preserve the existing full reservation on root hits; do not replace it with lazy growth, add a second traversal, change lock/version/split/remove semantics, or alter router-hint selection or wire behavior.
This anchor crosses `PreprocessedRouting` binds the concrete preprocessor `generate` implementation to a KV-mode `RoutingHost` ServiceBackend; this generated runtime binding is not a direct static call., an index-invisible edge the agent declared; the static analysis could not confirm the edge, so confidence rests on the benchmark and verdict, not the code index.
Change to test: Gate the existing `Vec::with_capacity(sequence.len())` for `router_hint_root_chain` on `next_child.is_some()` in `find_details_from_seq`, so a retained-hint CRTC root miss does not allocate a chain that the unchanged walk cannot append to.
Where it lives
perfloop/dynamo · lib/llm/src/http/service/openai.rs
Evidence
No usable result yet.
Timeline
2026-09-07· Case opened