Skip to content

[PR] test(e2e): scripted compress calls must use the single-string form (#4823 follow-up) - #4873

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-26_e2e-compress-string-form
Oct 26, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-26_e2e-compress-string-form

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

这是啥问题

master 上两条 e2e 流水线红着(e2e-native-opencode、e2e-pi-codex-ws):#4823 把 compress 工具的对外 schema 收窄成单一字符串形态后,这些测试里脚本化的假模型还在用旧的数组形态发起 compress 调用。opencode/pi 宿主会按声明出来的 schema 在客户端校验参数,数组还没到 bili 的宽容解析器就被挡下:"Invalid arguments for tool compress: content: Expected string",测试断言 compress 成功折叠,于是挂掉。

根因

#4823 只改了 schema 和提示词,没改这些 e2e 的脚本调用(它们当时没跑到/没红)。

改动

三处脚本改用规范字符串形态——首行 <start>–<end> 主题,摘要写在后续行:

  • tests/e2e/fake-upstream-chat.mjs(opencode native / pi native 共用)
  • tests/e2e/e2e-pi-codex-ws.test.ts(3 处)
  • tests/e2e/e2e-opencode-responses-ws.test.ts(V2 WS 车道)

dsh-persona 故意保留数组形态:dsh 不做客户端校验,正好用它守住旧数组形态的宽容解析回归。

验证

  • 本地: real opencode native lane 4/4 全绿(修复前挂"Expected string")
  • 本地: real pi codex-responses WS lane 6/6 全绿
  • 本地: real pi package-native 7/8(唯一失败是本机 ~/.pi/acp.json 泄进隔离环境的弃用告警,与本次改动无关;CI 干净环境该测试绿——master 上该流水线本就是绿的)
  • OpenCode V2 WS 本地缺 v2 二进制跳过,CI 会跑到

关联

#4823(schema 收窄)。本 PR 合并后,#4863/#4866 需要 rebase 拿到这份修复,它们的 e2e 才会绿。

#4823 narrowed the advertised compress schema to the single string form
(content: string). Hosts validate tool arguments against the advertised
schema client-side, so the scripted array-form calls die before reaching
bili's lenient parser:

- opencode native lane: 'Invalid arguments for tool compress: content:
  Expected string' -> e2e-native-opencode red on master
- pi codex-responses WS lane: same family -> e2e-pi-codex-ws red on master
- OpenCode V2 Responses WS lane: same scripted shape

Switch the scripted calls to the canonical '<start>–<end> topic' header
line with the summary on the following line (the format the parser
requires). dsh-native keeps the array form on purpose: dsh does not
client-validate, so that lane now doubles as coverage for the legacy
array acceptance path.
@ranxianglei ranxianglei added the ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR label Oct 26, 2026
@ranxianglei
ranxianglei merged commit 23158db into master Oct 26, 2026
56 of 92 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-26_e2e-compress-string-form (f0629dd)

Latest build — install this exact version

npm install -g billion-context@0.0.6307-pr.4873.9571686

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
f0629dd billion-context@0.0.6307-pr.4873.9571686 build

Download artifact

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

Install instructions are refreshed on each push.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.865-master.23158db (rolling master tag).

npm install -g billion-context@0.0.865-master.23158db  # 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.

@ranxianglei ranxianglei changed the title test(e2e): scripted compress calls must use the single-string form (#4823 follow-up) [PR] test(e2e): scripted compress calls must use the single-string form (#4823 follow-up) Oct 26, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复。 open+closed issue/PR 检索「compress Expected string / 数组形态 / e2e 脚本调用」无命中。相关条目各自独立:#4823(根因,schema 收窄,已合)、#4863/#4866(需要 rebase 拿本修复的下游 PR,非重复)。

标签: bug / opencode / pi / scope/ci / p2(CI 红缺陷,影响两条 e2e 流水线,对终端用户零影响,确定性噪音类)。

PR 已由 owner 于 16:22 UTC 合并(merge sha 23158db38,发布为 0.0.865-master.23158db),issue 已关闭。以下为合并后的独立核验(逐项重查,未照抄 PR 正文):

  1. 是什么问题:[PR] The compress tool only teaches a single invocation format, to prevent the model from mixing up multiple formats. | compress 工具只教一种调用格式,防止模型把几种格式混着用 #4823 把 compress 工具对外 schema 收窄成单一字符串形态后,几条 e2e 车道里脚本化的假模型还在用旧数组形态发起 compress 调用;opencode/pi 宿主按声明的 schema 在客户端校验参数,数组形态到不了 bili 的宽容解析器就被挡下(Invalid arguments for tool compress: content: Expected string),master 上 e2e-native-opencode、e2e-pi-codex-ws 两条流水线红。
  2. 什么原因导致的:[PR] The compress tool only teaches a single invocation format, to prevent the model from mixing up multiple formats. | compress 工具只教一种调用格式,防止模型把几种格式混着用 #4823 只改了 schema 和提示词,没同步改这些 e2e 的脚本调用(当时那些车道没跑到/没红)。
  3. 影响范围与严重程度:仅影响本仓库自己的 CI(两条 e2e 流水线红),终端用户功能零影响;严重度 = 确定性噪音/成本类——红的流水线会掩盖真实回归并阻塞合并。
  4. 怎么修复的:三文件共 5 处脚本调用改为规范字符串形态(首行 <start>–<end> 主题,摘要写在后续行):tests/e2e/fake-upstream-chat.mjs 的 compressArgs()(opencode native / pi native 共用的裸指令路径)、tests/e2e/e2e-pi-codex-ws.test.ts(3 处)、tests/e2e/e2e-opencode-responses-ws.test.ts(V2 WS 车道)。diff 逐行核对与描述一致(3 文件,+9/−5,en dash 分隔符)。dsh-persona 故意保留数组形态(tests/e2e/e2e-native-dsh-persona.test.ts:144,245)——dsh 不做客户端校验,用它守住旧数组形态的宽容解析回归。kernel 解析路径确认接受该字符串形态(kernel/src/parse-compress-input.ts parseLineEntry:头行 mNNNNN–mNNNNN optional topic + 摘要在后续行,另有 compress: literal backslash-n in string content still fails as kind=content-not-array, hiding the real missing-summary reason #3780 双重转义救援路径)。
  5. 是否有回归问题:无。改动仅限测试脚本,src 零改动、行为面零变化。一处观察:tests/e2e/e2e-native-opencode.test.ts:714-718 的显式参数调用点本次未改、仍是数组形态(fake upstream 对显式参数指令原样透传,只有裸指令走修好的 compressArgs());该车道实测绿,所以这处目前充当 opencode 车道上一个顺带的「数组形态宽容」覆盖点——与 dsh-persona 守卫同角色,只是 PR 正文没声明它。不是缺陷,是否对齐或声明留给 owner 定夺。
  6. 是否破坏缓存:不涉及(不触碰缓存/重试/增量游标/去重键逻辑)。
  7. 是否改了设计方向:无。
  8. 是否引入新配置:无。

CI 终态(PR head f0629ddce 即合并后树):此前红的两条流水线 e2e-native-opencode ✅ success、e2e-pi-codex-ws ✅ success;其余全绿——e2e-native-pi、e2e-native-dsh、e2e-codex-persona、e2e-fake-codex、e2e-local-registry、E2E(real codex)、主 CI、Windows codex overlay(cancelled 批为相隔 2 秒的重复触发被取代,正常)。另确认 #4863/#4866 需 rebase 拿这份修复,否则它们的 e2e 仍会红。

判定:修复方向正确、范围干净、CI 全绿,已合并并发布;收工。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:full Run the FULL CI matrix (all e2e lanes + 12-leg test matrix) on this PR opencode p2 pi scope/ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant