Repository navigation
[PR] fix(omp): identity register is NOT carriage evidence for compaction ownership - #7076
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10668-pr.7076.f037fcaThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7076.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…wnership (#7060) The omp lane's ownsCompaction used state.identityAt === sid as local evidence to claim compaction ownership directly, but the identity registration only populates registeredIds — it does NOT create a tracked session. So the plugin could cancel native compaction for a conversation the proxy never tracked, leading to 'no fold + no fallback' overflow. This is the #1383 evidence gate hole on the identity-stamp path: the gate was designed to prevent #1382 (cancelling compaction for a conversation the proxy doesn't carry), but the identity-stamp path bypassed the carriage check. Fix: remove the omp local-evidence short-circuit so the status probe always runs for omp. The probe (GET /__bili/plugin/status) is the authoritative carriage check — if the proxy reports the conversation unknown, the plugin does NOT claim ownership and native compaction proceeds. This restores the documented design intent ('carriage evidence still decides', pi.ts:1010) and the safety principle ('a wrong cancel overflows the session', pi.ts:1016). Regression test: updated test (H) in tests/plugin-agent.test.ts to assert the correct behavior (identity-registered session is NOT carried by construction — proxy reports unknown → native compaction proceeds).
92c5c6d to
48d2ca0
Compare
…7060) The #7076 probe-only fix still let ownsCompaction claim ownership on the status endpoint's no-session 200s: pre-first-request (runtime-info registered, no tracked session yet) and chain-advisory (content verdict only) both answer 200 with sessionId: null. In the exact #7060 bypass shape — proxy up, identity registered, runtime-info reported, but the conversation never tracked — the probe returned 200, the plugin claimed ownership, cancelled native compaction, and the session overflowed with no fold and no fallback. Carriage is a LIVE tracked session: require a non-null session id from the probe. A 200 without one is not carriage; native compaction proceeds. Test (H) now reproduces the real #7060 shape (200 pre-first-request, sessionId null → no claim) instead of the 404 "unknown" shape; the fake proxy status endpoint returns realistic full-session (sessionId set) and pre-first-request (sessionId null) responses.
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 —— 本 PR 是 #7060 的修复(方向:证据门,非 #2113 watchdog);检索 open issue/PR 无其他针对同一 omp 压缩所有权漏洞的条目(#6351 是 pi 车道折叠时序、#6803 是 omp 直发 prompt_cache_key,机制均不同)。 审核结论方向正确,但 PR 未闭合 #7060 的真实绕过形态 —— 已当场补上(additive commit
八问
判定:方向正确、残留漏洞已当场补上并推 commit( |
(ai: vllm-qwen/qwen3.8-27b) CI 更新:补修 commit 最终判定:方向正确、#7060 真实绕过形态(200 pre-first-request / chain-advisory 的无 session 200)已闭合,无回归、无缓存影响、无新配置。CI 绿,可合。proxy 侧折叠可靠性(nudge 饥饿 / fold 回滚 / preflight 超时)是 #2110 定的 owner 另行方向,不阻塞本 PR。 |
Summary
Fixes the omp-lane ownership evidence hole reported in #7060: the
ownsCompactionfunction usedstate.identityAt === sidas local evidence to claim compaction ownership directly, but the identity registration only populatesregisteredIds— it does NOT create a tracked session. So the plugin could cancel native compaction for a conversation the proxy never tracked, leading to "no fold + no fallback" overflow.This is the #1383 evidence gate hole on the identity-stamp path: the gate was designed to prevent #1382 (cancelling compaction for a conversation the proxy doesn't carry), but the identity-stamp path bypassed the carriage check.
Fix
Remove the omp local-evidence short-circuit so the status probe always runs for omp. The probe (
GET /__bili/plugin/status) is the authoritative carriage check — if the proxy reports the conversation unknown, the plugin does NOT claim ownership and native compaction proceeds.This restores the documented design intent ("carriage evidence still decides", pi.ts:1010) and the safety principle ("a wrong cancel overflows the session", pi.ts:1016).
Behavior change
Old: omp's
ownsCompactionreturnedtrue(claim ownership) whenstate.identityAt === sid, without probing the proxy.New: omp's
ownsCompactionalways probes the proxy (fetchStatus). If the proxy reports the conversation unknown, the plugin does NOT claim ownership and native compaction proceeds.Impact: omp sessions where the identity register succeeded but the proxy does NOT track the conversation will now let native compaction proceed (instead of cancelling it). This is the desired behavior — it prevents the "no fold + no fallback" overflow.
Safe fallback: if the proxy is temporarily down/hung, the probe fails → no evidence → native compaction proceeds (documented safe behavior, pi.ts:1014-1016).
Regression test
Updated test (H) in
tests/plugin-agent.test.tsto assert the correct behavior (identity-registered session is NOT carried by construction — proxy reports unknown → native compaction proceeds).Closes #7060