Repository navigation
fix(wire): pin acp-kernel 0.0.95 — Copilot-Gemini-portable compress schema (#1414) - #1423
Conversation
…chema (#1414) Kernel #448 (acp-kernel 0.0.95) replaced the compress tool's union type arrays and untyped anyOf fragments with explicit typed alternatives; Bili bundles that schema at build time, so the exact dev-dependency pin is the delivery path. Adds tests/wire-schema-portable.test.ts walking Bili's full outgoing ACP tool surface on all four wires (anthropic/openai/responses/google, including withRangeParams rewrites): no union type arrays, every anyOf alternative declares an explicit scalar type, top level stays a plain object. Red against 0.0.93 (3/4 wires fail), green against 0.0.95. Fixes #1414
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1423Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1423.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Reviewing PR #1423 now (the follow-up pin-bump promised in the #1414 thread): verifying the 0.0.93→0.0.95 pin + lockfile, re-running typecheck/tests/build on the PR head, auditing the full 0.0.95 delta (not just the schema fix), and checking the new |
- wire-contract goldens regenerated for acp-kernel 0.0.93→0.0.95 via scripts/update-wire-contract-goldens.ts: compress/decompress/search schemas gain explicit typed anyOf alternatives (kernel #448, the Copilot-Gemini portability fix). Reviewed: no unrelated drift. - preflight e2e windows 10_600 → 12_000: the typed-alternative schema grew tool definitions by ~1.4KB (~340 tokens of wireOverhead, which every fit decision adds per #470). At 10_600 the recent zone no longer fit after folding — fold-all is correct behavior for a tight window, but these tests pin 'recent messages survive', so they need the headroom the pre-#448 schema size had. Payload still overflows 12k (~13k-token history), so the preflight-fire premise is intact.
|
CI failures diagnosed and fixed (8afedf0). The 6 red tests were two distinct classes: 1. Wire-contract goldens (4×, expected) — the pin bump changes every tool schema (that's the point of the PR). Regenerated via the sanctioned 2. Preflight e2e (2×, real behavioral edge — investigated to root cause):
Real-world note: small-window (≤12k) sessions now carry ~340 more overhead tokens per request. If that matters, a kernel follow-up could slim the schema (dedupe shared fragment descriptions); not blocking here — correctness is unaffected and larger windows don't notice. |
Review complete — verified against the fixed head (8afedf0). Verdict: mergeable. ① Original issue (#1414) — direction correct. Root cause lived in the kernel (union ② Regression audit — existing behaviors touched by the bundled delta:
③ Code. Two clean commits: pin + new test, then goldens + test windows — each labeled, no ④ Test validity — ⑤ Diff cleanliness. Clean — six files, every line serves #1414. Verification evidence. CI on head 8afedf0: all runs green, including E2E (real codex), e2e-fake-codex, e2e-local-registry, Windows overlay. Local re-run: typecheck clean, build OK, full suite 2812 tests / 2800 pass / 0 fail / 12 skipped (by design). Both previously-red classes confirmed fixed, with correct root causes — the preflight one in particular is a genuine behavioral edge handled properly (test adjusted to preserve its pinned contract, real-world impact disclosed). One gap to close (not blocking this PR): per the wire-constraint-ledger rule (AGENTS.md §7.3), the Gemini constraint should become a permanent 中文一句话摘要: 核实了 acp-kernel 0.0.95 钉版修复了 Copilot-Gemini 的 compress 工具 schema 400(新增四线路可移植性测试在 0.0.93 红/0.0.95 绿),golden 重生成仅含 #448 结构变更无漂移,preflight 两例失败的根因(schema 增大 ~340 tokens 挤爆小窗口 fit 判定)已独立复现且测试窗口调整保留了原断言意图,CI(含真实 codex e2e)全绿,可以合并;建议随后合入 #1415 补上 WC-008 台账条目。 |
Kernel 0.0.95 (acp-kernel #448/#454, published) replaced the compress tool schema's union
typearrays and untypedanyOffragments with explicit typed alternatives — Copilot Gemini stops 400ing withinvalid_request_bodyon requests carrying the ACP compress tool.Bili bundles the kernel schema at build time, so this PR:
npm install acp-kernel@0.0.95 --save-exact).tests/wire-schema-portable.test.ts— the Bili wire-contract regression Copilot Gemini rejects ACP compress schema with invalid_request_body #1414 asks for: walks the full outgoing ACP tool surface on all four wires (anthropic/openai/responses/google), including Bili's ownwithRangeParamsrewrites, asserting:typearrays anywhere,anyOfalternative declares an explicit scalartype,A/B verified: red against 0.0.93 (3/4 wires fail on
content.type: ["array","string"]), green against 0.0.95 (4/4). Also carries everything else in 0.0.95: nested-image stripping (#437), open-objectives carry-forward (#443), shared segmentation + turn-aware status (#415), prettier baseline tooling.Local: typecheck clean, new suite 4/4.
Fixes #1414