mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-19 21:52:21 +03:00
Combo and fusion fan out N targets without ever consulting the adaptive-admission layer: the parent request holds one lease, but each fan-out target is dispatched unconditionally. With virtual lanes enabled (OMNIROUTE_CHAT_VIRTUAL_LANES=1), a connection whose lane queue is full now SKIPS additional fan-out targets instead of piling more queued work onto an already-congested session. Adds PerTargetAdmissionHook (admission/types.ts) + createPerTargetAdmissionHook factory (chatAdmission.ts): strictly non-blocking (maxWaitMs 0 - skip, never queue), a no-op when virtual lanes are off, keyed to the parent tenantKey, and release-on-admit so the probe is a capacity gate, not a hold. Threaded through every parallel fan-out path: - priority/weighted executeTarget + round-robin skip chains (combo.ts) - fusion panel before fan-out (fusion.ts), judge fallback prefers survivors - chaos parallel panel (autoCombo/chaosEngine.ts) - tryFusionDispatch / tryRuntimeUnitDispatch / buildBaseOptions (dispatchPrelude.ts) - chat.ts primary + safety-net redirect call sites Snapshot exposes virtualLanes so the no-op gate is cheap and honest. Tests: tests/unit/combo-lane-awareness-9654.test.ts (10 tests) - factory semantics, priority/RR skip, fusion panel drop + all-skipped 503, no-hook backward-compat baseline.