Repository navigation
test: e2e native lane for real opencode (v1+v2) vs deterministic fake upstream (#1267) - #1272
Conversation
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1272Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1272.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Reviewing PR #1272 (opencode native e2e lane, fixes #1267). Initial checks done:
Now running local verification (typecheck + build + full unit suite, then the real opencode and pi lanes end-to-end) before giving a verdict. Will follow up with the full review. |
[bot] 🏷 Full review of PR #1272 complete. I checked out the branch ( ① Direction (original issue #1267)Correct and on-target. #1267 asked for an opencode native e2e lane reusing #1246's pi skeleton, asserting #1239's four acceptance items, gated env, CI mirror, ≥1 green lane. This delivers exactly that and exceeds the floor: both V1 and V2 lanes are green (not just one). It addresses the root goal (real-client coverage for a lane that previously had none) — not a symptom. ② Regression review (existing behaviors on touched paths)Touched surface is
③ Code reviewHigh quality, mirrors the proven pi lane's discipline:
④ Test validityReal teeth, not tautologies — it drives real ⑤ Diff cleanliness4 files, +913/−10, every line purpose-related. No whitespace churn, no lockfile/generated churn, no unrelated files. Clean. ⑥ Verification evidence (run by me on the PR branch, not taken on faith)
So both opencode generations are confirmed (V1 by my local run, V2 by CI), the pi lane is confirmed non-regressed in both local and CI, and the whole matrix is green. The only thing standing between this and merged is the human review/merge gate ( Minor observations (non-blocking)
中文摘要:为 opencode 宿主补上了与 pi lane 对等的原生 E2E lane(真客户端 + 真自生插件 vs 确定性假上游,零 token),四项验收全部以真执行断言;我独立复跑了 typecheck/build/全量单测(2501 过)以及真 opencode V1 与真 pi 两条 lane(各 4/4),GitHub CI 亦全绿(含新 V2 lane),共享 fake 改动确认无回归、无生产行为漂移——可以合并(由人来 merge)。 |
d3b55b8 to
58f1b6c
Compare
|
Independent deep review complete — and executed for real, locally: rebased onto current master (README docs conflict resolved by union, head Verified sound:
Gates on the rebased head: typecheck ✓ / build ✓ / suite 4/4 real-binary ✓. Ready to merge when CI is green. |
… upstream (#1267) Real opencode host (1.x bare-file plugin / 2.x wrapper-dir plugin) driven headless through bili's self-spawned proxy against the deterministic fake chat upstream; zero tokens. Asserts the four #1239 acceptance items: interception + plugin-mode claim on every request, ACP tool registration and acp_status round-trip, model-invoked compress really folding a block (persisted after graceful stop), and the live status endpoint answering ok for the bound conversation (/acp analog — the slash command is TUI-only and unreachable in run mode). Gated behind ACP_TEST_E2E_OC_NATIVE=1 (skip by default); E2E_CHECK=1 zero-cost preflight. CI workflow pins @opencode/cli@2.0.3.
58f1b6c to
f296268
Compare
[bot] 🏷 Follow-up after your rebase — I tracked the branch through both force-pushes and re-verified against the actual current-master target, not the head your report referenced. Verdict unchanged: mergeable (human merges). What changed while I was reviewingThe branch moved The one gap I closed: your run predated #1335Your report references head
Why #1335 is safe here (reasoning + empirical): #1335 gates README union scar — spotted & already fixedDuring the pass I found the intermediate head Notes
中文摘要:PR 已 rebase 到最新 master(含 #1335 attach 门禁)且可干净合并;我在「当前 master + 本 PR」的合并目标树上独立复跑了 typecheck / build / 全量单测(2646 过)/ 真 opencode V1(4/4)/ 真 pi(4/4),全绿——关键是你报告引用的头在 #1335 之前,我补验了含 #1335 的目标树确认附着门禁不影响这条 hermetic 自生代理 lane;顺带发现的 README union 重复行已在你的最终头里干净修掉。可以合并(由人来 merge)。 |
The opencode lane of the native-client e2e family (#1239, skeleton from #1246's pi lane): a REAL
opencodehost driven headless (opencode run) with bili's real self-spawned plugin (dist/agent/opencode-native.js) against the deterministic fake chat upstream — zero tokens — asserting all four #1239 acceptance items:plugin: "opencode"+ oneses_*conversation; requests reach the fake only through the proxyokatGET /__bili/plugin/status?conversationId=<ses>for the bound session (+ persistedmetadata.pluginAgent === "opencode"asserted in T1/T2)tools[]; the tool result is re-sent in history and matches the kernel report shape (both v1/v2 surfaces)[Compressed m… → N block(s), ~T tokens saved.], ≥1 block on disk after graceful stop); carrier = tool call+result pair in the follow-up historyDesign notes
tests/e2e/fake-upstream-chat.mjsfrom native pi e2e (#1239) + fix one-shot stamp race (#1243) #1246 with three ADDITIVE capabilities the opencode lane needs: a title-call guard (opencode's side-channel title generation shares the directive queue key with the main loop), balanced-brace directive JSON (请调用compress {"content":[…]}), and alastUserReforacle field so the suite pins an exact fold target instead of guessing among example tags embedded in kernel prompt text./acpslash command is TUI-only and unreachable underopencode run, so item 2 is asserted through the same backend endpoint the command panel consumes (documented in-test).preserveRecentTokens: 5000) a small synthetic session is entirely inside the protected zone and no explicit range can fold; the suite pins{"compress":{"preserveRecentTokens":0}}in the hermetic$XDG_CONFIG_HOME/billion-context/billion-context.json— test-local config, not a shipped default change.runrides a shared managed service on a fixed channel-derived port; the suite pinsservice.jsonto a unique free port per context (v1 ignores it).Behavior flags (per deliverables policy)
Pre-flight (rebased onto master 8e5eb58)
opencode1.14.46 — 4/4 pass (~150s)opencode2.0.3 (@opencode/cli) — 4/4 pass (~30s).github/workflows/ci-e2e-native-opencode.ymlmirrors ci-e2e-native.yml (PR trigger + dispatch, zero tokens), pinned @opencode/cli@2.0.3; the issue requires at least one fully-green lane in CI, V1 additionally verified locally above.Fixes #1267