Repository navigation
Incremental turns for opencode, omp, and pi-native hosts (#3248 phase 2) - #3292
Conversation
…#3248 phase 2) - opencode: http.request hook adapter callback swaps the request body after routing/stamping (replaceRequestPayload keeps url/method/headers); acks ride the fetch intercept's onResponse. - omp: no header events exist — beforeSend reads the extension-stamped prompt_cache_key body field as the conversation id and stamps the plugin headers directly on the request init (identity upgrade, never a fork: wire mode already resolves the same value via preferPromptCacheKeyIdentity). - pi-native: inherits the pi wiring unchanged (same extension factory). - shared: wireMessagesLookAnthropic gates non-Anthropic shapes (OpenAI tool_calls) to full resend; planned turns are single-in-flight per URL and age out after 30s (a network-dead request must not block the URL forever); native-intercept fires onResponse on the model-API path too. - test hygiene: omp origin discovery funnels through publishOrigin so a test-pinned base survives the async attach verify (it landed mid-suite and raced probes off to the real lane).
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3889-pr.3292.43c6942This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3292.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…letion point (#3248 phase 2 review) - routed-lane success fired onResponse with the post-reroute target while every ack consumer (dsh/omp/opencode) keys pending plans by the host-requested URL — a dead-origin reroute silently dropped the ack, so the next turn 409'd into the sticky full-resend fallback. - rewrite-lane recovery retry never fired onResponse at all — the same ack loss when the proxy blips mid-incremental-turn. - pin the URL identity in the NativeInterceptState.onResponse doc; regression assertions ride the existing #1130 reroute and respawn+retry intercept tests.
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复——本 PR 即 #3248 phase 2(native-host matrix 补齐),与 #3273(phase 1,已合入)相关但范围不同(本 PR 新增 opencode/omp/pi-native 三个 host + 共享 guard),不构成重复。 审核结论:可合并(待剩余 CI lane 转绿)。以下审核独立于 PR 描述重新做过,基于分支 head 审核过程摘要
八问
CI 状态(提交本回复时):head 判定:可合并——建议 owner 待剩余 CI lane 转绿后合并(merge 需人工执行,符合仓库规则)。 |
…tal-native-hosts # Conflicts: # CHANGELOG.md
(ai: vllm-qwen/qwen3.8-27b) 上游 PR 冲突已解决并推送——本 PR(#3292,#3248 phase 2)分支与 master 的合并冲突(dirty)已消除: 冲突成因与解法 master 在本分支上次合入点( 零代码级冲突:除 CHANGELOG 外,本 PR 的 11 个文件( 本地验证(定向,全量交给远程 CI):typecheck clean;build clean(commit=44710852e);定向测试 77/77(incremental-lane / native-intercept / omp-native-incremental / opencode-incremental);相邻回归 38/38(opencode-native / opencode-fork-adopt / issue1569 / issue1958 / issue2455 / native-intercept-selfheal)。 八问
判定:冲突已解决,push 后 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.480-master.ce4d60b # this exact build
npm install -g billion-context@master # always the newest merged build
|
Completes the native-host matrix for the incremental lane (#3248 phase 2, server side + pi/dsh-native landed in #3273):
before_provider_requestbefore_provider_headersafter_provider_responsex-bili-plugin-conversationbeforeSendheadersForonResponsee.sessionIDhttp.requesthookincrementalcallback →replaceRequestPayload(after routing/stamping so the marker rides the same request)onResponseprompt_cache_keybody field (omp emits no header events; the extension stamps it, wire mode already resolves the same value — identity upgrade, not a fork)beforeSendonResponseShared machinery:
wireMessagesLookAnthropic— non-Anthropic wire shapes (OpenAItool_calls/role:"tool") are detected and left on full resend (the lane ingests the anthropic wire).onResponseon the model-API path too (previously routed-only).publishOrigin, so a test-pinned base survives the async attach verify — it landed mid-suite and raced probes off to the REAL lane (flaky ~50% locally underBILLION_CONTEXT_PROXY).Tests:
tests/opencode-incremental.test.ts4 (seed swap + marker + auth preserved → ack → delta; probe disabled byte-untouched; OpenAI tool_calls untouched; 409-on-delta → dead → original body),tests/omp-native-incremental.test.ts3 (pck → conversation id + three headers on init + delta after ack; no pck untouched; probe off untouched),tests/incremental-lane.test.ts17 (+wire shape guard unit). Regressions: opencode-native 34, fork-adopt 4, issue1569 15, issue1958 4, issue2455 + native-intercept-selfheal 27 — all green; tsc clean; unused-export gate clean (4 waived).Known non-goals here: claude/codex CLI remain full-resend (pure proxy clients — no in-process hook exists; #3248 tracks host-side adoption), and omp native Cowork transport bypasses fetch (pre-existing limitation, same as #2583).
prepared by an agent under the local git identity (ranxianglei), human merge required