Skip to content

[PR] docs: document omp advisor session-isolation workaround (#5567) - #5568

Closed
ranxianglei wants to merge 2 commits into
masterfrom
2026-11-03_omp-advisor-isolation-docs
Closed

ranxianglei wants to merge 2 commits into
masterfrom
2026-11-03_omp-advisor-isolation-docs

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Refs #5567 — deliberately NOT Closes: the issue stays open pending the owner's decision on the root-fix options (A/B/D, see the 🔶 decision-request comment on the issue thread). This PR delivers option C only.

What this PR does

Documents, in the omp identity section of both README languages, the verified workaround that isolates omp's persistent advisor stream from the main session:

  • In omp's model-registry config (the providers: section of models.yml), set compat.supportsPromptCacheKey: true on the advisor's provider entry → pi-ai serializes the advisor's own session UUID as prompt_cache_key → bili binds it onto its own session instead of the main one.
  • Mechanism and honest boundaries are stated inline: no help if omp explicitly passes a shared cache key for the advisor; once isolated the advisor runs as its own session with its own compression state; verify via the web panel that advisor traffic lands under a separate session id.

Flag shape verified by the reporter against the installed ModelsConfigFile loader (status=ok, unknownKeys=[]) plus live SSE captures (advisor's own UUID passed through verbatim) — details in the issue thread.

Behavior changes

None. Docs only — one paragraph per README language. No bili code change, no bili config-surface change (the documented key is an OMP/pi-ai-side model-registry field, not a billion-context config item), no wire change.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-03_omp-advisor-isolation-docs (25f7fce)

Latest build — install this exact version

npm install -g billion-context@0.0.7929-pr.5568.2d3e612

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
25f7fce billion-context@0.0.7929-pr.5568.2d3e612 build
d1349f2 billion-context@0.0.7928-pr.5568.dc75d68 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5568.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title docs: document omp advisor session-isolation workaround (#5567) [PR] docs: document omp advisor session-isolation workaround (#5567) Nov 2, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重: 不重复 —— 检索 open+closed issue/PR(近 7 天为主,按主题与失败签名):本 PR 是 #5567 🔶 决策申请里选项 C(文档化配置绕行)的唯一交付;同家族的 #4897/#4903(一次性旁路回合消耗 nudge/自愈预算——预算饥饿、可恢复)与 #5078(出站 PCK 控制面)症状和机制均不同;没有其他 PR 在写同一份 omp advisor 隔离文档。

标签: pr / omp / scope/docs / p3 —— 文档 PR(非缺陷类,不打 bug);涉及客户端 omp;领域文档面;严重度 p3(文档条目)。

初审发现(先报结论,再动手)

diff 极小且干净:两个 README 各加一段,分支基于当前 master dec393f43,不陈旧。内容逐句核对属实——foreign payload under a shared session id (#4805) 日志行在 src/cache-ledger.ts:1824 原文存在;pck 缺键补主 id 的机制与 #5567 首条核实的因果链一致;绕行字段 compat.supportsPromptCacheKey 有 reporter 本地验证(loader status=ok + SSE 实抓);en/zh 两段互译一致,放在 omp identity 一节的 caveat 段之后,位置合适。

但有一处硬伤要修:新段落引用了 #5569——该编号在 GitHub 上不存在(API 实测 404),https://github.com/ranxianglei/billion-context/issues/5569 是死链。对照编号规则(GH #5567 ↔ 内部镜像 #5569),这是把 e-work 内部镜像号误当成 GitHub issue 号写进了公开文档。正确的跟踪对象就是 #5567 本身:根治选项 A/B/D 的决策就挂在该线程,issue 保持打开等拍板。

按「小问题直接修」纪律处理:我会在 PR 分支补一个独立标注 commit,把 en+zh 共 4 处 #5569 改为 #5567,然后给出八问终审结论。

CI 快照(head d1349f2,单次拉取):静态门禁全绿(23 success / 11 skipped),12 个 test 分片仍在跑;我的修复 commit 会触发新一轮 CI,最终判定以新 head 为准。

#5569 does not exist on GitHub (404); the number was an internal mirror
id. The root-fix options A/B/D are decided in the #5567 thread, which
stays open — both README languages now cite #5567.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

终审结论(PR #5568)

方向关(审原 issue):#5567 🔶 决策申请的选项 C(文档化验证过的配置绕行),PR 交付范围与 C 严格一致——只写文档、不碰代码、不碰 bili 配置面、不碰 wire,没有夹带根治动作(A/B/D 继续挂在 #5567 等拍板)。Refs 而非 Closes 的用法正确。

回归关:既有行为清点——README en/zh 的 omp identity 一节;新段落插在「omp caveat (#2583/#3556)」段之后、「无 header 客户端」段之前,位置与主题一致;en/zh 两段互译逐项对齐(机制、边界、验证方法一一对应);零代码变更,不存在行为/阈值/时序/输出格式漂移面。

代码关(逐句事实核对):

发现并已修(小问题直接修):段落引用了 GitHub 上不存在的 #5569(API 实测 404,死链)——是 e-work 内部镜像号被误当 GitHub issue 号写进了公开文档(GH #5567 ↔ 镜像 #5569)。已在 PR 分支补独立标注 commit 25f7fce:docs: point omp advisor isolation note at issue #5567 (review fix),en+zh 共 4 处引用改为 #5567(跟踪对象就是 #5567 本身,A/B/D 决策挂在该线程)。已推送,新 head = 25f7fce。

测试关:纯文档无行为面可钉;en/zh 同步由 CI 的 docs-sync/docs-coverage 门禁覆盖。

diff 整洁度:单线提交、每行都与本 PR 目的相关,无跑题文件/生成物/空白噪音;我的修复是第二个独立标注 commit,同样收敛。

CI:旧 head d1349f2 静态门禁全绿(23 success / 11 skipped,单次拉取);新 head 25f7fce 已触发新一轮 CI,最终判定以新一轮为准(docs-only diff,风险面极小)。

结构化八问

  1. 是什么问题:给 omp 持续 advisor 流与主会话身份串扰([Bug][omp] Identity cross-talk between advisor and main session, causing DEAD refs, fold drift, and repeated compaction | [Bug][omp] advisor 与主会话身份串扰,导致 DEAD refs、fold drift 和反复压缩(0.1.212) #5567,p1)交付一个用户可立即落地的配置绕行文档——让 advisor 带自己的身份出线、绑到独立 bili 会话。
  2. 什么原因导致的(底层缺陷):advisor 无自己的出站身份(宿主契约缺口)× bili 对无会话信号 chat 请求缺键补主 id × omp 车道缺 persona 隔离,三层叠加;本 PR 自身唯一缺陷是死链引用 ACP status footer triggers repeated history replay in Claude bridge 1.7.0 #5569(内部镜像号误用),已修。
  3. 影响范围与严重程度:文档面向所有读 README omp 节的 omp+advisor 用户;条目本身 p3。底层 p1 缺陷不因本 PR 变化(默认配置用户仍暴露,根治等 A/B/D 拍板)。
  4. 怎么修复的:每种语言一段,写明操作(models.yml providers 段设 compat.supportsPromptCacheKey: true)、机制(pck 携带 advisor 自身 UUID)、三条诚实边界;review 修复 = 死链指向纠正为真实存在的 [Bug][omp] Identity cross-talk between advisor and main session, causing DEAD refs, fold drift, and repeated compaction | [Bug][omp] advisor 与主会话身份串扰,导致 DEAD refs、fold drift 和反复压缩(0.1.212) #5567。
  5. 是否有回归问题:无——零代码/零 wire/零 bili 配置面变更;高危模式逐项过:无语义漂移、无 fail-fast 变化、无阈值/时序/输出格式变化。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:bili 侧零新增;文档化的是 omp/pi-ai 侧模型注册表既有字段,非 billion-context 配置项,无需迁移。

收工判定:审查通过——内容属实、范围干净、死链已修;待新 head 25f7fce 的 CI 转绿后即可由你合并(合并权在你)。#5567 保持打开等 A/B/D 决策,我不关闭任何条目。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

专职 reviewer 独立终审(GitHub PR #5568 / head 25f7fce)

按「审核独立性」要求,我不沿用前序楼层结论,自己从 diff + 代码库重新核了一遍。逐句事实核对:

  • 日志行 foreign payload under a shared session id (#4805) 原文在 src/cache-ledger.ts:1824(含 #4805)✓
  • ref DEAD 串 cannot be anchored / content-changed 存在(src/stream.ts:376,379;kernel/src/compress.ts:565)✓
  • 「bili 把不同 pck 绑到独立会话」成立:src/session-id.ts:314 preferPromptCacheKeyIdentity 把客户端 pck 提升到 content-fingerprint 之上;omp 身份本就骑在 pck 上(README 表,用bili omp 启动omp之后, /acp命令不能正确执行. #268)✓
  • 两个引用都真实存在:#5567(open,正是 advisor/主会话身份串扰缺陷)、#4805(closed,日志行引用的 usage 锚点旁路)✓
  • 全仓无残留 #5569 死链——前序 commit 25f7fce 的修复正确且完整 ✓
  • en/zh 两段逐句互译一致;插入位置(omp caveat 与 header-less clients 之间、属「How sessions work」节)主题贴切 ✓
  • omp/pi-ai 侧字段 compat.supportsPromptCacheKey 是外部系统事实(reporter 本地 loader status=ok + SSE 实抓验证),文档正确地把它写成 omp 侧操作而非 bili 配置项 ✓

范围:仅 README.md + README.zh-CN.md(2 文件 / 4 行);零代码、零 bili 配置面、零 wire、零 kernel/、零 version bump。CI(head 25f7fce,读镜像缓存):零失败,docs-sync/docs-coverage/config-surface-guard/kernel-guard/version-guard 全绿,test 分片收尾中。

结构化八问

  1. 是什么问题:为 omp 持久后台流(第二个模型上的 turn-reviewer advisor)与主会话身份串扰([Bug][omp] Identity cross-talk between advisor and main session, causing DEAD refs, fold drift, and repeated compaction | [Bug][omp] advisor 与主会话身份串扰,导致 DEAD refs、fold drift 和反复压缩(0.1.212) #5567,p1)交付一段用户可落地的配置绕行文档——让 advisor 带自己的身份出线、绑到独立 bili 会话。
  2. 什么原因导致的(底层):advisor 无独立出站会话信号 × omp/pi-ai 把主会话 id 盖进 pck × 缺 persona 隔离,三者叠加使两条流落进同一账本;本 PR 自身唯一缺陷是死链 #5569(内部镜像号误当 GitHub 号),已由前序 commit 修正,#5567 才是真实跟踪对象。
  3. 影响范围与严重程度:面向所有读 README omp 节的 omp+advisor 用户,条目本身 p3;底层 p1 缺陷不因本 PR 变化(默认配置用户仍暴露,根治等 A/B/D 拍板)。
  4. 怎么修复的:每种语言一段,写明操作(models.yml providers 段设 compat.supportsPromptCacheKey: true)、机制(pck 携带 advisor 自身 UUID)、三条诚实边界;引用真实存在的 #5567。
  5. 是否有回归问题:无——零代码/wire/bili 配置面变更;高危模式逐项过:无语义漂移、无 fail-fast 变化、无阈值/时序/输出格式漂移。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:bili 侧零新增;文档化的是 omp/pi-ai 侧模型注册表既有字段,非 billion-context 配置项,无需迁移。

收工判定:审查通过(APPROVE)。 内容属实、范围干净、死链已修且我独立复核确认无残留;CI 转绿后由你合并。

说明(合并路径):无法提交正式 APPROVE review event——GitHub 硬性禁止批准自己的 PR(API 返回 Review Can not approve your own pull request,本审核身份即 PR 作者 ranxianglei)。按仓库规则合并本就是 human-only,故由你直接合并即可,此评论即终审记录,不再重复尝试。

coordination:PR #5568(GitHub)/ mirror #5570 专职 review 完成——审查通过,无待修项,待 CI 全绿后 owner 合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: sglang-gpu0/qwen3.8-27b)
本 PR 的全部内容已随合集 PR #5918 合入 master(2026-11-08),此 PR 重复,关闭。

@ranxianglei ranxianglei closed this Nov 8, 2026
Louie0806 pushed a commit to Louie0806/billion-context that referenced this pull request Nov 8, 2026
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant