Skip to content

[PR] Every surface self-identifies its lane: origin on status/overview, web sys.lane row, /acp via <origin> - #4698

Merged
ranxianglei merged 2 commits into
masterfrom
2026-10-25_lane-self-id
Oct 25, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-10-25_lane-self-id

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

问题

多 lane 并存(生产 lane + per-agent 测试 lane)时,各面板只报 version,而不同 lane 常常同版本号(如三条 lane 都叫 0.1.206,只有一条带被测 commit)——用户分不清流量落在谁家(#4323 拓扑排查时靠日志归属,面板不自报)。

改动

  • /__bili/status 与 /__bili/overview 新增 origin 字段 = 本 lane 被客户端实际寻址的 host:port(req.headers.host,relay 后面也对)。
  • web 概览卡新增「运行实例 / Running lane」行(sys.lane),zh/en i18n。
  • /acp 面板(plugin status panel)版本行追加 · via <webOrigin>(deps.webOrigin 既有字段)。
  • 空闲提示统一:pi / dsh(dsh-acp)/ dsh-native / opencode 的 armed-idle 行改 proxy connected via <lane>, compression armed(armedIdleNotice(version, base?) 共享单源,`billion-context@${version} — proxy connected, no ACP session yet. Send a model request 被到处复制无统一实现 #883 纪律)。

验证

  • 单测:dsh-acp 11/11(正则随 via 更新)、hermes-native 38/38、opencode-acp-command+web-sessions+web-admin-api 38/38;tsc 0;unused-export gate clean。
  • 真机:临时 lane(18890)实测 status 与 overview 均 "origin": "127.0.0.1:18890";renderPage 快照含 sys-lane 行;header 已带 v0.1.207 (commit)。

kernel-change: none

… field, web sys.lane row, /acp panels via <origin>

Multi-lane machines (proxy lane + per-agent test lanes) made version-only
surfaces ambiguous: three lanes can share 0.1.206 while only one carries the
commit under test. Now /__bili/status and /__bili/overview expose origin
(the host:port this lane was addressed by), the web Overview card shows a
running-lane row, the /acp panel version line appends '· via <origin>', and
the pi / dsh / dsh-native / opencode armed-idle notices say 'via <lane>'
(armedIdleNotice grows an optional base argument).
@ranxianglei ranxianglei changed the title Every surface self-identifies its lane: origin on status/overview, web sys.lane row, /acp via <origin> [PR] Every surface self-identifies its lane: origin on status/overview, web sys.lane row, /acp via <origin> Oct 25, 2026
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-25_lane-self-id (18c4d5d)

Latest build — install this exact version

npm install -g billion-context@0.0.5741-pr.4698.399867b

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
18c4d5d billion-context@0.0.5741-pr.4698.399867b build
3dae5d4 billion-context@0.0.5729-pr.4698.fe9a5e8 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复。 本 PR 是「多 lane 自报身份」的新实现;相关但不同的既有工作:

标签: pi dsh opencode scope/ui p3 —— 功能类改动,横跨 pi/dsh/opencode 三车道 idle 通知与 web/status 展示面;纯可观测性增强、无功能缺陷,不打 bug。

审查进行中:分支已拉取、diff 已通读(11 文件 +23/−16,单 commit),正在做回归清点与定向测试,CI 状态确认后按八问给完整结论。

…, opencode-v2)

Review of PR #4698 found its "every surface self-identifies its lane" goal
missed two surfaces that carry their own idle notices instead of routing
through armedIdleNotice():

- hermes-plugin /acp + /acp-cache idle lines now say "proxy connected via
  <origin>, compression armed" (origin was already in scope at both sites,
  guarded by the existing !origin early-return)
- opencode-v2 /acp idle lines now say "proxy connected via <base>, no ACP
  session yet" (base = state.proxyBase ?? proxyBaseFromEnv(), guarded by
  the existing !base early-error)

Test pins updated to assert the via clause against the real fake-proxy
origin (http://127.0.0.1:<port>).

Targeted verification: hermes-native + opencode-v2 + dsh-acp +
opencode-acp-command + plugin-agent + acp-panel + web-sessions +
advisory-endpoint-parity + storage-mode-label + dsh-native + build-info
= 297 pass / 0 fail / 1 skip; tsc clean; unused-export gate clean.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Review 完成:方向正确、实现干净;发现并当场补齐 PR 漏掉的 2 个面(hermes、opencode-v2),已推修复 commit 18c4d5d27 到本分支。结论:可合(CI 转绿后)。

审核过程(独立重做,非复读 issue):

  • 全仓 grep「proxy connected」清点全部自报面:PR 覆盖了 pi / dsh-acp / dsh-native / opencode-acp-command 四个走 armedIdleNotice 的面,但 hermes-plugin 的 /acp+/acp-cache 空闲行(hermes-plugin/__init__.py:1208/1233)和 opencode-v2 的 /acp 空闲行(src/agent/opencode-v2.ts:556/564)各自内联了旧文案、不走共享函数——与 PR 标题「Every surface」的目标不符,且两处 scope 里本来就有现成的 origin/base 变量。按小问题直接修纪律已在分支上补掉(独立标注 commit,6 行改动 + 2 个测试钉更新为断言真实 fake-proxy origin)。
  • 回归清点:sendStatus/sendOverview 签名变更为纯追加可选参,两个调用点都已更新;advisory-endpoint-parity 只断言 advisory 字段两侧一致,加 origin 不破;i18n common.none(「—」)两语言表均存在;plugin-agent.test.ts 只钉 billion-context@9.9.9+compression armed 两段,新文案仍匹配;storage-mode-label 直传字面量给 buildStatusPanel,不经 handlePluginStatus,不受影响;无其他调用方/测试钉遗漏。
  • 本地定向验证(新 head 18c4d5d27):hermes-native + opencode-v2 + dsh-acp + opencode-acp-command + plugin-agent + acp-panel + web-sessions + advisory-endpoint-parity + storage-mode-label + dsh-native + build-info 共 297 pass / 0 fail / 1 skip;tsc 0;unused-export gate clean (6 waived,与 master 基线同)。
  • CI:旧 head 上 1 个红 test 分片 + 主 CI run 被取消;对照 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599(今日 13:04Z floor 153):master ac844fa 自身即红(plugin-fork ×3、storage-engine-proofs ×4、orphan-recovery ×3、web-blogfeed ×1 born-red 集群,逐条在 master 自己 CI 复现),红分片判继承性失败,不在本 PR 追。分支与 master 零落后、零文件重叠,无需 rebase;等新 head 的 CI。

八问:

  1. 是什么问题:多 lane 并存且同版本号时,面板只报 version 不报归属——用户分不清流量落在哪条 lane(After idling for one hour, the fold override is lost: the client resends byte-for-byte identical content, and the previo | 闲置一小时后折叠覆盖丢失:客户端重发逐字节不变,已折叠的 ~240K token 内容自己回到上下文 #4323 排查时只能靠日志归属)。
  2. 什么原因导致的:status/overview 响应体没有承载寻址信息的字段;各 lane 的 /acp 空闲提示是各自内联的字符串(未统一进 `billion-context@${version} — proxy connected, no ACP session yet. Send a model request 被到处复制无统一实现 #883 单源),且从未带 lane 信息;web 概览卡也没有 lane 行。
  3. 影响范围与严重程度:纯可观测性/排障体验问题,功能全部正常;触发条件=多 lane 并存 + 同版本号(生产 + per-agent 测试 lane 场景)。p3。
  4. 怎么修复的:三层自报——服务端 /__bili/status+/__bili/overview 新增 origin(= req.headers.host,客户端实际寻址地址,relay 后面也对);web 概览卡渲染「运行实例 / Running lane」行(zh/en i18n);/acp 面板版本行追加 · via <webOrigin>(既有字段);空闲提示统一到 proxy connected via <lane>, compression armed。我补的两处(hermes、opencode-v2)沿用同一措辞与同一守卫模式(origin/base 缺失时走原有降级文案,不显示 via)。
  5. 是否有回归问题:审过的既有行为逐项——状态端点响应体(纯加字段,缺 host 头时 origin: null,不改变既有字段);空闲通知文本(见下方行为变更披露,测试钉同步更新);web 渲染(sys-lane 行为纯新增行,无既有行位移);i18n 目录(纯增键,无死键)。无 fail-fast 变吞错、无阈值/时序漂移。行为变更披露(旧→新):① 六个面的空闲行由 proxy connected, … 变为 proxy connected via <url>, …(pi/dsh-acp/dsh-native/opencode-acp-command 由 PR 改,hermes/opencode-v2 由我补);② status/overview JSON 新增 origin 字段;③ /acp 面板版本行追加 · via <webOrigin>;④ web 卡片新增 lane 行。格式分层说明:服务端 origin 是裸 host:port(客户端寻址视角),agent 侧 via 是完整 URL(客户端配置的 BILLION_CONTEXT_PROXY 视角)——两层语义各自正确。
  6. 是否破坏缓存:不涉及(纯展示/通知文本,无缓存键、重试、游标、去重逻辑触碰)。
  7. 是否改了设计方向:没有;只加观测维度,请求管道/数据流不变。kernel-change: none 属实(kernel/ 零触碰)。
  8. 是否引入新的配置:没有(无新 env/config/CLI;origin 取自请求头,webOrigin 为既有字段)。

判定:可合——代码与测试质量达标,方向无误;等 18c4d5d27 的 CI 转绿(master 继承红除外,归 #4599 总控)。

@ranxianglei
ranxianglei merged commit 16ecf9f into master Oct 25, 2026
44 of 50 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.836-master.16ecf9f (rolling master tag).

npm install -g billion-context@0.0.836-master.16ecf9f  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

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