Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Serving duplex 编排规则"
created: 2026-09-05
updated: 2026-10-06
updated: 2026-12-02
type: rule
tags: [vllm-omni, components, serving]
sources: ["PR #6529", vllm_omni/engine/orchestrator.py, tests/engine/test_orchestrator_segment_stage_keying.py, tests/engine/test_orchestrator_stage_input_bridge.py, "PR #8489"]
sources: ["PR #6529", vllm_omni/engine/orchestrator.py, tests/engine/test_orchestrator_segment_stage_keying.py, tests/engine/test_orchestrator_stage_input_bridge.py, "PR #8489", "PR #11312", vllm_omni/engine/duplex/session/manager.py, tests/engine/duplex/test_session_manager.py]
confidence: high
---

Expand Down Expand Up @@ -35,3 +35,11 @@ confidence: high
- 验收:generic与两model-specific runner suites使用相同公开open/drain合同,旧代码重现fixture
error/失败后修复通过;核对正常events与teardown,test-only修复不证明新模型或全transport能力。
原source在同allocation A/B得到64通过;目标CI证据仍须按真实source/hardware单独资格化。^[PR #8489]

## SERV-6l — native duplex admission 等待真实释放,不把 terminal event 当作空闲容量

- 触发:修改 native `DuplexSessionManager` 的 admission、关闭回收、Stage 0 窗口释放、补偿 close,或解释 MiniCPM-o 并发补位失败。适用于含 #11312 的版本。
- 强制:容量计入 active runner、仍持有资源的 closing session 和已预留的 in-flight open。terminal event 可以在首次清理失败后发出,不等于 Stage 0 资源已释放。达到上限且存在 closing session 时,新增等候者只在现有等候数小于 closing session 数时排队,单次最多 15 秒;清理重试真正释放名额后唤醒并重新检查上限。补偿 close 标记仍在控制队列中的 open 为已放弃,并唤醒正在等候容量的同一 open;两者都应在预留资源前停止。如果 open 已通过容量检查并进入 admitting,不能假设 close 会阻止随后建立 Stage 0 请求或启动 runner;应完成 teardown 并归还真实占用的资源和名额。无等候名额或超时后仍满,则保持 retryable `resource_exhausted`;单独保留 stage/replica 可用性检查。
- 禁止:提前释放或借用 closing 的名额、增加配置容量来掩盖清理延迟、把无 closing 的真饱和改为无条件等待,或把服务端等候与客户端收到 retryable pre-admission 错误后重连混作同一机制。
- 验收:在固定 session cap 下模拟 Stage 0 首次释放超时,断言 replacement 必须等到资源真的释放才成功;覆盖等候上界、到期仍满、补偿 close 在排队/等候时阻止预留、在已进入 admitting 时最终归还名额与 duplicate open 隔离。#11312 的 120/120 是作者在两张 L20X 上对指定 C8 工作负载的结果,不证明清理不再超时、其他设备达到阈值或任意并发都能完成。^[PR #11312]
- 版本证据:[合入树的容量等候与唤醒](https://github.com/vllm-project/vllm-omni/blob/35a84d83987a68253c4be747bf693878c6b187db/vllm_omni/engine/duplex/session/manager.py#L663-L702)、[合入树的 open recheck 与错误](https://github.com/vllm-project/vllm-omni/blob/35a84d83987a68253c4be747bf693878c6b187db/vllm_omni/engine/duplex/session/manager.py#L742-L758)、[排队与等候的补偿 close](https://github.com/vllm-project/vllm-omni/blob/35a84d83987a68253c4be747bf693878c6b187db/vllm_omni/engine/duplex/session/manager.py#L255-L285)、[已进入 admitting 的资源预留与回收](https://github.com/vllm-project/vllm-omni/blob/35a84d83987a68253c4be747bf693878c6b187db/vllm_omni/engine/duplex/session/manager.py#L755-L803)、[超时补偿与替补入场回归](https://github.com/vllm-project/vllm-omni/blob/35a84d83987a68253c4be747bf693878c6b187db/tests/engine/duplex/test_session_manager.py#L1665-L1695)。
2 changes: 1 addition & 1 deletion knowledge/repos/vllm-omni/components/serving/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ confidence: high
| `chat-multimodal-contract` | chat template kwargs、SDK flatten、text/audio response shape | `SERV-4c`(见 [请求输入合同](rules-request-input.md))+ 命中模型规则 |
| `endpoint-capability` | endpoint restriction、route/app-state guard、公开 400 | `SERV-4c`, `SERV-4d` 见 [请求输入合同](rules-request-input.md);`SERV-5d` 见 engine lifecycle;`SERV-5s` 见 [app assembly](rules-app-assembly.md) |
| `engine-lifecycle` | pause/resume、sleep/wake、partial stage/tag、ACK、generation admission、abort cleanup/shutdown race、streaming raw terminal、event-driven orchestration、factory 状态矩阵、TTS adapter detection、replica membership/fault isolation | `SERV-5a`、`SERV-5c`–`SERV-5e`、`SERV-5g`–`SERV-5r`(`SERV-5m` 见 [sleep control](rules-sleep-control.md),其余见 [engine 生命周期规则](rules-engine-lifecycle.md))、[SERV-5t](rules-abort-lifecycle.md#serv-5t-acknowledged-abort-在-shutdown-边界只忽略已识别的-transport-closure),`SERV-5f` |
| `full-duplex` | duplex opt-in、stage prewarm/fence、async-chunk、CFG companion、stage-keyed segment lifecycle,adapter-owned deferred cognition/session cleanup,或 startup warmup/realtime admission | `SERV-6a`–`SERV-6f` 见 [engine 生命周期规则](rules-engine-lifecycle.md);`SERV-6g` 见 [duplex 编排规则](rules-duplex-orchestration.md);`SERV-6h`、`SERV-6i` 见 [session lifecycle](rules-session-lifecycle.md) |
| `full-duplex` | duplex opt-in、stage prewarm/fence、async-chunk、CFG companion、stage-keyed segment lifecycle,adapter-owned deferred cognition/session cleanup,或 startup warmup/native duplex 关闭与补位 admission | `SERV-6a`–`SERV-6f` 见 [engine 生命周期规则](rules-engine-lifecycle.md);`SERV-6g`、`SERV-6l` 见 [duplex 编排规则](rules-duplex-orchestration.md);`SERV-6h`、`SERV-6i` 见 [session lifecycle](rules-session-lifecycle.md) |
| `request-contract` | 请求字段、来源、冲突、dispatcher、consumer view、stage sampling constraints、serialization bounds、transform artifact ownership | `SERV-4a`–`4h`, `SERV-4l`–`4q`,全部见 [请求输入合同](rules-request-input.md) |
| `batch-chat-contract` | frontend fan-out、identity、choice cardinality、error/cancellation | `SERV-4i`–`4k`,见 [batch chat rules](rules-batch-chat.md) |
| `author-routing` | 只供 Direct reviewer 导航,不作为 finding 规则 | `SERV-0a`, `SERV-0b` |
Expand Down
Loading