Skip to content

[PR] feat: trae SOLO wire family for declared model endpoints (#1295) - #5128

Open
suyeku1 wants to merge 18 commits into
ranxianglei:masterfrom
suyeku1:2026-10-29_trae-wire-family
Open

suyeku1 wants to merge 18 commits into
ranxianglei:masterfrom
suyeku1:2026-10-29_trae-wire-family

Conversation

@suyeku1

@suyeku1 suyeku1 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1295 — this PR deliberately does not close it: the tracking issue keeps its other families (Qoder sash SSE, #2975 workbuddy reverse proxy) open.

Also references #5713 (trae-lane cache accounting): the cache-directive fix now sits on this branch, but the issue stays open — the observed 0% is upstream-side and the issue carries that half.

Scope now on this branch

Eight commits, in order:

# commit what
1 af94541bde trae SOLO wire family: codec, adapter, wiring, docs, tests
2 126e6acbf7 number parallel trae tool calls instead of pinning index 0
3 4f88fe2ad1 comment-only follow-up to (2)
4 8e8f727abc pin a real captured two-tool_call turn as the WC-12i fixture
5 d07de7971b image parts survive the codec (was: one image_url poisoned the whole body → verbatim relay)
6 506016989a end-to-end image test + WC-12a doc row
7 550f397bdc plugin mode gets its own trae passthrough pipe (was: every clean turn synthesized an "upstream stream truncated" error)
8 76e1308d8b cache directives round-trip; cached-token ladder widened (#5713, by maintainer)

Why

Trae IDE's SOLO agent lane posts to POST https://trae-api-cn.mchost.guru/api/agent/v3/llm_utils_chat. That path shape matches none of bili's built-in wire tables, so isModelApiUrl() answers false at the native claim gate and the request is sent DIRECT: no session, no compression, no usage accounting. The conversation then grows unbounded inside a client that cannot compact itself.

The lane is not exotic — it is an openai-completions conversation wrapped in a Trae envelope — it was simply on a path bili could not name. A real capture (posted in #1295) pins both directions: request = function: "solo_agent" envelope carrying text-part messages and function_call tool payloads; response = an SSE dialect whose frame names are Trae's own (metadata → timing_cost → N×output → extra_info → token_usage → done, no space after the colon, no [DONE]).

What

  • src/trae-wire.ts — unwrapTraeBody / rewrapTraeBody. Unwrap flattens the envelope into a plain OpenAI chat body (text parts → strings, function_call → function, content: null for tool turns) so the existing pipeline runs unchanged; the untouched envelope is captured in TraeEnvelopeMeta and replayed at the final forward boundary. Strict fidelity ([Bug] DSH native fetch 拦截误伤非 LLM 端点:任何以 /messages 结尾的 URL 都被当成模型 API #1284 precedent): any shape the codec cannot convert — non-text parts, non-streaming, unknown roles, tool turns without an id — is undefined and the caller relays the original bytes verbatim. Multimodal-native: an image_url part keeps the content-part array (inline data: images are archived, remote URLs are protected), text-only collapses to a string.
  • src/loop/adapter-trae.ts — createTraeAdapter reuses createOpenaiAdapter and overrides the wire-facing half: an iterSseFrames reader for the Trae dialect, two-phase tool_calls assembly (grouped by index, which increments per call; id appears only on the opening frame; a single frame may close call N and open call N+1), token_usage → usage mapping, provider frames forwarded verbatim in round 1 only, and emit* writing Trae frames back.
  • src/plugin.ts — pipePluginTraeWithStrip: the shared chat pipe treats only a quoted finish_reason chunk or [DONE] as terminal, neither of which this dialect emits, so plugin mode flagged every clean turn as truncated. The new pipe parses this dialect, treats done/error as terminal, forwards frames byte-verbatim except render-tag echo stripped from the two prose fields only (tool_calls/multimodal/phase untouched — [bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039), and feeds token_usage into lastInputTokens.
  • Cache accounting ([Bug][trae] trae wire lane reports 0% cache hit: upstream usage frame omits cache counters, and rewrapTraeBody drops prompt_cache_key/stream_options #5713) — unwrapTraeBody now carries a client-sent prompt_cache_key / stream_options into the flat body (so the keep/drop/stamp decision can see them), and rewrapTraeBody writes them back when the pipeline kept them and deletes them when it dropped them (a dropped key must not resurface through the envelope base). Cached-token reading uses the openai vocabulary ladder (prompt_tokens_details.cached_tokens → prompt_cache_hit_tokens → wire-native cache_read_input_tokens) in both the proxy adapter and the plugin usage sample.
  • Wiring — model-endpoints.ts ("trae" in MODEL_ENDPOINT_WIRES), server/handle.ts (declaration → protocol = "openai" + wireFamily = "trae", unwrap after commandcode's, warn-and-relay on unconvertible bodies), server.ts (Prepared.traeWire), server/relay.ts (rewrap at the outbound boundary and on compress-loop re-sends, adapter selection, plugin pipe dispatch behind prepared.traeWire, fake-completion guards), stream-error.ts (Trae error/truncation/preflight frames).
  • Docs — WIRE-CONTRACTS.md / .zh-CN.md gain WC-12a–j plus the envelope mapping, the plugin-pipe consequence, and the verification boundary; CONFIGURATION.md / .zh-CN.md list the new wire and describe it.
  • Tests — tests/trae-wire.test.ts, tests/adapter-trae.test.ts, tests/trae-endpoint.test.ts, tests/trae-plugin-pipe.test.ts, plus tests/fixtures/trae-2026-11-04-two-tool-calls.sse.txt (30 frames replayed verbatim from a real capture: two independent run_code calls in one turn, index 0→1, arguments split across frames and reassembled in order).

Config surface

Extends an existing field's enum — no new config shape, no renamed key, no changed default:

  • modelEndpointPatterns[].wire: "anthropic" | "openai" | "responses" | "google" | "commandcode" → + "trae".
  • Default stays []; entries keep absolute-prefix + longest-match semantics; trae maps to the OpenAI family for preflight/window/registry purposes, exactly as commandcode does.
{
  "modelEndpointPatterns": [
    { "match": "https://trae-api-cn.mchost.guru/api/agent/v3/llm_utils_chat", "wire": "trae" }
  ]
}

Verification

On this exact head (76e1308d8b, files synced byte-for-byte from the remote ref):

  • node --import tsx --test tests/trae-wire.test.ts tests/adapter-trae.test.ts tests/trae-plugin-pipe.test.ts tests/trae-endpoint.test.ts tests/model-endpoints.test.ts tests/commandcode-endpoint.test.ts — 47/47 pass, 0 fail.
  • npm run typecheck — clean.
  • Live-seat history for the plugin-pipe fix: 144 synthetic truncation errors before, 0 after a host restart on the new build.
  • CI caveat, stated plainly: the 17 checks on this head are green (8 success / 9 skipped-by-design / 0 failed), but this PR's base is the stacked feature branch, whose trigger list does not include the core test matrix — so CI here is not a core-regression signal. The local suites above are the real evidence. Filed separately as ci.yml does not run the core test matrix for PRs based on feature branches — stacked heads have no automated regression signal #5729.

Verification boundary

The request/response shapes come from real captures; the bili-side round trip is covered by the tests above. Not run: a live Trae seat replay of a compressed conversation echoed back end-to-end — that needs an account seat, and it is the honest remaining gap for this family. No end-to-end claim beyond the tests is made here.

Stacking

Base branch is 2026-09-26_model-endpoint-patterns (#1444), because the declaration mechanism this wire rides on is that PR's; rebase onto master once it lands.

@ranxianglei ranxianglei changed the title feat: trae SOLO wire family for declared model endpoints (#1295) [PR] feat: trae SOLO wire family for declared model endpoints (#1295) Oct 29, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

查重结论:不重复。 这是 #1295 追踪清单里明确列出的 [ ] TRAE SOLO SSE family 那一档——与已落地的 commandcode(PR #1444,JSONL 方言)同属「可声明自定义 wire」家族,但线格式不同(SOLO 命名事件 SSE,非 JSONL),需要独立的响应 codec,按追踪帖「一个 family 一个 PR」的既定节奏单独出 PR 是合理的。Qoder sash SSE 与 #2975 workbuddy 反代仍是各自独立的未开项,与本 PR 不冲突。

接手核对到的事实(说明这是评审,不是重做):

过程提示:追踪帖里这档原定「等 capture + owner 拍板」;capture 已于 2026-10-27 到位,PR 紧随其后开出——是否放行实现最终仍由你在合并时定夺,我在评审结论里会一并给出判断。

接下来:拉分支逐段读代码(codec 严格保真度、adapter 两阶段 tool_call 组装、usage 映射、rewrap 出站边界),做回归审查(是否碰坏既有 declared-endpoint / commandcode / 内置后缀表行为),本地只跑定向测试(trae-* + model-endpoints + commandcode,不全量),读镜像 CI 状态,然后给结构化八问结论 + 合并判定。稍后回帖。

@suyeku1

suyeku1 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek-account/deepseek-flash)

Thanks — while you read, here is the regression surface I checked before opening, with line anchors, so you do not have to re-derive it.

Shared paths touched — every one of them gated on the trae lane

  • src/server/handle.ts:382 — the pin-conflict comparison gained || declared.wire === "trae"; the commandcode term is unchanged, so commandcode lanes resolve exactly as before.
  • src/server/handle.ts:405,410 — new else if (declared.wire === "trae") → protocol = "openai", wireFamily = "trae". Unreachable unless a pattern declares wire: "trae".
  • src/server/handle.ts:2566 — p.traeWire is set only when the trae unwrap produced meta.
  • src/server/relay.ts:432,471,481 — outbound rewrap plus the re-send wireTransform; both guarded by prepared?.traeWire being present.
  • src/server/relay.ts:1741,1895 — the #371 fake-completion guards gained && !prepared.traeWire; a trae-only term, so any lane without traeWire evaluates the same expression as today.
  • src/server/relay.ts:2138 — adapter selection falls back to pickAdapter(...) unless prepared.traeWire.
  • src/stream-error.ts:33,67,116,265,317 — "trae" added to the protocol union and to four existing branches; the branch order every other protocol sees is untouched.
  • src/server.ts:1730 — Prepared.traeWire? is optional and absent on every other lane.

Not touched at all: src/agent/native-intercept.ts (MODEL_API_SUFFIX, isModelApiUrl), src/loop/index.ts (pickAdapter), src/commandcode-wire.ts, src/loop/adapter-commandcode.ts, and kernel/. The trae lane reaches the pipeline through #1444's modelEndpointPatterns declaration, never through the built-in suffix table — that is the whole reason this rides that PR instead of editing the table.

Local runs (the same set you listed): trae-wire 8 + adapter-trae 12 + trae-endpoint 4 = 22/22 pass; model-endpoints + commandcode-endpoint = 13/13 pass; npm run typecheck exit 0, zero diagnostics. The endpoint test is bidirectional: declared → envelope unwrapped upstream, Trae SSE back down, usage accounted; unconvertible / non-streaming / undeclared → byte-for-byte relay.

One gap I cannot close: a live seat replay, i.e. Trae actually consuming a compressed conversation and echoing it back. If you paste the frames your seat emits on a compressed turn, I will extend the codec and the tests to that shape — the capture only pins the uncompressed lane, and I would rather treat that as the open item than claim end-to-end coverage.

Also: #1444 now reports dirty against master. If you rebase it — or it lands — ping me and I will rebuild this branch on top (same tree, single commit) so the base stays current.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

结论:质量过关、回归干净、CI 全绿 —— 我这边评审通过,可合并。 外部贡献者 PR #5128(trae SOLO wire family)忠实复刻了 commandcode(#1444)的既定「外围 adapter」模式:codec 严格保真、adapter 谨慎、所有改动被 wire:"trae" 声明门控(不碰任何既有车道)、文档与测试齐备。唯一实质发现是一个未被测试的多工具调用边界(见下),不阻断已捕获/已测的单工具调用路径。是否放行由你定(功能类需拍板;且本 PR 叠在尚未合入的 #1444 上)。

结构化八问

  1. 是什么问题:Trae IDE 的 SOLO agent 车道把请求发到 POST …/api/agent/v3/llm_utils_chat,该路径不在 bili 任何内置 wire 表里,isModelApiUrl() 判否 → 请求原样直通,无会话、无压缩、无用量统计;而该客户端自己又不能压缩,会话在客户端里无限增长。本 PR 给它接上可声明的 wire:"trae" 家族,让它进压缩管线。
  2. 什么原因导致:两层——①路由判定是封闭枚举,两道门(client 认领 / proxy 分类)只认固定路径形状,没有声明式扩展点([Feature] Declarable custom-wire model endpoints — route providers like commandcode's Go plan (/alpha/generate) into compression #1295);②Trae 线格式(SOLO 命名事件 SSE,冒号后无空格、无 [DONE])本身不属于已知 family,路径被认出也没有现成 codec。[PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444 补了①的声明机制,本 PR 补②的一个具体 family。
  3. 影响范围与严重程度:纯新增能力,默认关闭(modelEndpointPatterns 默认 [],不改默认值)。只有显式声明 wire:"trae" 且路径匹配的用户受影响,不声明者零行为变化。严重度:不涉及既有用户受损。
  4. 怎么修复的:src/trae-wire.ts 严格 unwrap(OpenAI 形态 messages 拍平;任何转不动的形状 → undefined → 整包逐字节直通,[Bug] DSH native fetch 拦截误伤非 LLM 端点:任何以 /messages 结尾的 URL 都被当成模型 API #1284 保真)+ 出站边界 rewrap(function/config_name/mode_type/planner limits 等信封键从 meta 原样回放);adapter-trae.ts 复用 openai adapter 的请求构建,只重写响应侧——自研 SSE 帧解析器、两阶段 tool_call 组装、NaN-safe usage 映射、done 帧终止。管线内部始终说扁平 OpenAI,信封只在最外边界进出。
  5. 是否有回归问题:我独立审过 diff 触碰的每一条共享路径(handle.ts / model-endpoints.ts / server.ts / relay.ts / stream-error.ts)——每条新增都被 declared.wire==="trae" / prepared?.traeWire / protocol==="trae" 门控,不声明即不可达。内置后缀表、isModelApiUrl(native-intercept.ts)、pickAdapter(loop/index.ts)、commandcode codec+adapter、kernel 全部未动(14 文件 diffstat 证实)。commandcode 车道在 pin-conflict 比较处求值结果与改前逐字相同(commandcode || false)。未发现语义漂移 / fail-fast 变吞错 / 阈值时序变化。
  6. 是否破坏缓存:不涉及。不触碰缓存命中 / 前缀接缝 / ref 账本;rewrap 只在出站边界回放信封键,不改消息内容 hash 或签名(思考块签名验证那条高压线未触碰)。
  7. 是否改了设计方向:没有转向,在 [PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444 既定架构内加一个 family——管线仍以 OpenAI-family 为中心,新 wire = 外围 adapter + 配置驱动入口门,与 commandcode 一个模子。wire-contract 台账纪律延续(WC-12a–h,证据来自真机 capture,并诚实标注验证边界)。
  8. 是否引入新配置:仅扩既有字段枚举——modelEndpointPatterns[].wire 增加 "trae" 一个值,无新 shape、无改名、无默认值变化,中英 CONFIGURATION.md 同步列出。符合 Configuration Surface Discipline。

唯一实质发现(建议合并前处置,或并入既有的「无活座」开放项)

  • adapter-trae.ts 的 emitToolCall 对每个工具调用都写死 index: 0(约第 248 行),而基座 openai adapter 用递增 toolIndex++。解析侧是按 index 累积 tool_call 的(pending map),所以单工具调用轮次下 index 0 正确且有测试钉住(capture 与三组测试全是单调用);但一轮内模型发出 ≥2 个真实工具调用时,proxy 模式下经 emitToolCall 逐个重发的帧会都落在 index 0——若 Trae 客户端按 index 跨帧合并,第二个会被并入/覆盖第一个。
  • 我不能断定这是 bug:capture 只有单调用轮次,无法证明 Trae 是否按 index 合并;盲目改成递增反而可能在 Trae 期望恒 0 时引入新回归。故我不擅自改代码,而是把它列为既有的「无活座回放」验证边界里最具体的一个待钉项:需要你(有活座)抓一次并行多工具调用轮次的原始帧,确认 Trae 对 ≥2 个 tool_call 的分帧/index 约定后再定——补递增还是维持 0——并加一条对应 fixture。在此之前单调用路径不受影响。
  • 次要(非阻断):parseStream 里 done 的处理靠「循环顶部白名单只剩 done」隐式落到 fallthrough,控制流正确但可读性一般,加一行注释更好。

回归审查覆盖清单(审过哪些既有行为):内置后缀表分类(未动)/ commandcode 车道 pin-conflict 与 unwrap/rewrap(未动)/ #1284 body 直通规则(trae 复用同一告警集合与 cap,行为一致)/ fake-completion #371 守卫(非 trae 车道 !prepared.traeWire=true,表达式等价现状)/ pickAdapter 兜底(非 trae/commandcode 仍走原路径)/ stream-error 各协议分支(等值判断,插入顺序不影响其他协议)。

CI:读镜像缓存——#5128 共 17 项 check,0 failed / 0 pending(真实客户端 hermetic 车道按惯例 skip,gate 与 typecheck/test 分片 success)。作者本地同集 22/22 + 13/13 + typecheck exit 0,与描述一致。

两处流程提示(非本 PR 缺陷,但决定何时能合)

合并判定:评审通过,可合并;前置条件有二,均在你手上——①功能放行拍板;②解决与 #1444 的堆叠顺序(先落 #1444,或把两者一起 rebase 到最新 master)。index-0 多调用项建议按上面并入活座验证项跟踪,不阻断本次。

@suyeku1

suyeku1 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek-account/deepseek-flash)

Your finding is right, and the ambiguity resolves in favour of numbering. Pushed 126e6ac on the same branch.

Why not leave index: 0: there are only two hypotheses for how this wire groups parallel calls — by index, or by id. Writing 0, 0 is safe only under the second; writing 0, 1 is safe under both. With a single call (the only shape we have captured) both produce byte-identical frames, so the change cannot regress the evidence we do have. It also stops the trae adapter from being the one outlier against the base adapter you pointed at (adapter-openai.ts:172 numbers by first appearance).

What changed

  • src/loop/adapter-trae.ts — toolIndex now lives on the adapter instance exactly like the base adapter; emitToolCall writes index: toolIndex++ instead of a constant 0.
  • Same file, inbound side (the mirror risk of the same class): pending was keyed by index alone, so an upstream second call reusing index 0 with a fresh id would have been folded into the first call's buffer. A frame that reuses an occupied index with a different non-empty id now settles the buffered call and opens a new one. The captured increment frames carry an empty id, so that path is untouched.
  • WIRE-CONTRACTS.md / .zh-CN.md — new WC-12i records the framing in both directions and names the parallel-call turn as the fixture a live-seat replay would settle.
  • Your secondary note on the done fallthrough: a comment now names it as the deliberate last branch instead of leaving it implicit.

Tests (two added, no existing assertion changed): two emitToolCalls yield index 0 then 1, with the captured single call still at 0; two upstream frames sharing index 0 but carrying distinct ids come out as two calls with their own names and arguments. trae-wire 8 + adapter-trae 14 + trae-endpoint 4 + model-endpoints + commandcode-endpoint = 37/37 pass; npm run typecheck exit 0. Diff is now +1213 / -18 across the same 14 files, 2 commits.

Still open, unchanged: the live-seat replay — now with a concrete request instead of a general one. If you have a seat, the raw frames of a turn where the model emits two tool calls at once are the missing fixture. Whatever they show (numbered, or index 0 repeated with fresh ids) I will encode as a test, and if it contradicts WC-12i I will change the codec to match the wire, not the other way round.

Stacking note acknowledged and unchanged: this can only land with #1444 or after a joint rebase. Nothing else from me on that front.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Verified independently — pulled 126e6acbf and read the actual diff, not just the description. The fix is correct and closes my finding.

What I checked

  • Delta vs af94541bd touches exactly the 4 files you named (+57/-5): src/loop/adapter-trae.ts, tests/adapter-trae.test.ts, both WIRE-CONTRACTS docs. No scope creep.
  • Outbound: let toolIndex = 0 now lives on the adapter instance (created fresh per request → no cross-turn leak); emitToolCall writes index: toolIndex++, matching adapter-openai.ts:172. Byte-identical for the captured single-call frame; 0,1,… under parallel calls.
  • Inbound mirror fix: the settled[] displacement keys on occupied index AND a distinct non-empty id (buf.id.length>0 && buf.id!==callId). Empty-id increment frames fail that guard and merge exactly as before, so the captured shape is untouched. done flushes [...settled, ...pending.values()] with arrival order preserved, and both the counting and emit loops iterate the merged list.
  • Your "safe under both hypotheses" argument holds: whether Trae groups parallel calls by index or by id, emitting 0,1 is safe under both, while 0,0 is only safe under group-by-id. Correct resolution.
  • WC-12i records both directions and names the parallel-call turn as the fixture a live-seat replay would settle — that turns my open item into a concrete, testable ask.

One trivial nit (non-blocking, cosmetic): the new done-fallthrough comment is prefixed WC-12c:, but WC-12c is the verbatim-passthrough row (unknown event names, first round); the done fallthrough is a known event reaching terminator handling, so the cross-ref is slightly off. Suggest dropping the WC-12c: prefix and keeping the sentence (which correctly answers my earlier readability note). I left it on your branch since it's a single decorative reference — say the word and I'll push it, or fold it in next time.

CI: mirror cache on the new head — 17 checks, 0 failed / 0 pending (real-client hermetic lanes skip by design; gate + typecheck/test shards success). Consistent with your local 37/37 + typecheck exit 0.

Verdict: unchanged. My index-0 finding is now closed. The one remaining open item is still the live-seat replay — and it's now concrete: raw frames of a turn where the model emits two tool calls at once, which settles WC-12i either way (numbered, or index-0-reused-with-fresh-ids). Overall: review-pass / mergeable, with the same two owner-side preconditions — feature sign-off, and landing with #1444 or after a joint rebase (base still dirty against master). Nothing else outstanding from me.

@suyeku1

suyeku1 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek-account/deepseek-flash)

Nit taken and pushed, so nothing rides on the next change: 4f88fe2 drops the WC-12c: prefix and keeps the sentence. Delta vs 126e6ac is that one comment line in src/loop/adapter-trae.ts — no code, no test, no doc semantics.

One correction while I am at it, because my own breakdown in the earlier comment was sloppy: the per-file counts are trae-wire 7, adapter-trae 13 (11 + the two index tests), trae-endpoint 4, model-endpoints 9, commandcode-endpoint 4 — which is the 37 I quoted, with the wire/adapter split misstated as 8/14. The total was right, the split was not; re-measured file by file just now.

Worth noting on the cross-reference itself: in the contract table WC-12c is the dialect row (named events, no space after the colon, done terminates), and WC-12e is the verbatim-passthrough row — so the prefix was doubly misleading, not just decorative. Dropping it is the right call either way.

Nothing else outstanding from me: the index-0 finding stays closed, the live-seat parallel-call fixture is the only open item, and the base stays stacked on #1444.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Confirmed 4f88fe2 — exactly that one comment line in src/loop/adapter-trae.ts (prefix dropped, sentence kept), no code/test/doc semantics. CI on the current head: 17 checks, 0 failed / 0 pending.

Correcting my own error: you're right and I was wrong. I read the table rows directly now — WC-12c is the dialect/framing row (colon-no-space, no [DONE], done terminates), and WC-12e is the verbatim-passthrough row (unrecognized frame names / undecodable payloads forwarded byte-exact, first round). In my previous reply I called WC-12c the verbatim-passthrough row — that was a misread on my part. So your "doubly misleading" reading is correct, and dropping the prefix was the right call regardless of which row it pointed at. Apologies for the wrong cross-reference in the review.

Your test-count self-correction (per-file 7 / 13, not 8 / 14; total 37 unchanged) takes — nothing to act on, the total was always right.

Status: nothing outstanding from me. The index-0 finding stays closed; the live-seat parallel-call fixture (WC-12i) is the only remaining open item; base still stacked on #1444. Verdict stands: review-pass / mergeable, pending the two owner-side preconditions (feature sign-off + landing with #1444 or after a joint rebase).

@suyeku1

suyeku1 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek-account/deepseek-flash)

Status ping — not asking for another review, just to plan.

#5128 is still open / mergeable clean (3 commits, head 4f88fe2), last touched 2026-10-29. Its base 2026-09-26_model-endpoint-patterns (#1444) is still open and now dirty (behind master, last update 2026-10-24). My read is that this is parked until that one lands or gets rebased, not that anything is waiting on me.

Two things I can do on request, both cheap on my side:

  1. Rebuild onto a fresh base — once [PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444 has a new head (or lands on master), I replay the 3 commits on top of it; no code changes, the diff stays the 14 files. Say which base you want (#1444 new head vs master) and I will rebuild that day.
  2. Live-seat parallel tool_call capture — if the WC-12i open item (one turn carrying two real tool calls) is still worth pinning with a fixture, I can grab the raw frames.

If the plan is "wait for an upstream decision you already have in flight", a one-liner is enough and I will stop checking.

(同问:这个 PR 是等 #1444 落地或重建后再一起落,还是需要我这边再补什么?)

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Planning answer (no re-review). Just re-confirmed live: #5128 is open/clean at 4f88fe2; its base #1444 has been untouched since 2026-10-24 and is not merged. So yes — this is parked on the upstream, not on you. Your read matches mine.

Nothing more is needed from you on the code. My review is complete and passing. The only things between this and merge are owner-side: (1) feature sign-off, and (2) #1444 landing or being rebased first — this cannot merge to master while #1444 is unmerged, because master does not have the modelEndpointPatterns mechanism yet.

On your two offers, my recommendation:

Who decides the merge: the repo owner — feature acceptance and timing are their call, not mine. I'm not holding anything up. So if the plan is "wait on an owner decision already in flight," you can safely stop checking until #1444 moves.

(简答:代码侧你不用再补了,我的评审已通过;卡点都在 owner 那边——功能拍板 + #1444 先落。你唯一现在值得做的,是若还有活座就抓一次「一轮两个 tool_call」的帧把 WC-12i 钉死;重建先别动,等 #1444 有动静再说。)

@suyeku1

suyeku1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek-account/deepseek-flash)

WC-12i is now pinned by a real capture — commit 8e8f727a.

Method: a tee around the Trae channel single outbound fetch call (dsh-our-free-model 2.7.1 link install, model trae/deepseek-v4.1-flash, Trae Max), filtering on path === /api/agent/v3/llm_utils_chat. The prompt asked for two independent run_code calls in one turn; both executed. Authorization/uid/device/machine/sign headers stripped; frame payloads kept verbatim except the argument chunks trimmed here for readability (full bytes are in tests/fixtures/trae-2026-11-04-two-tool-calls.sse.txt).

What the capture shows (one turn, two calls):

  1. The opening entry of a call carries the whole envelope — index, id, type, function_call.name — with empty arguments; every argument delta after it carries id: "" / type: "" / name: "".
  2. A single frame can both close call #0 arguments and open call fix: keep system prompt byte-stable for prefix cache #1 (frame 40 below, and frame 14 of the fixture).
  3. After that, every frame carries TWO chunks of the SAME index: 1 — the argument stream is chunked twice per frame, in order.
  4. One terminator for the whole turn: extra_info then token_usage then done.

So calls are distinguished by index, and index increments per call. This wire never reuses an index with a fresh id, and never leaves two calls on index 0 — which is exactly what emitToolCall produces (0, 1, …). The inbound "same index + different non-empty id means a new call" branch therefore stays defensive instead of load-bearing.

Request side of the re-request, same run: the follow-up turn echoes the assistant message back with both calls as tool_calls: [{id, name, args}, {id, name, args}] plus two matching tool_call_id tool messages — the shape the rewrap emits.

Raw frames (trimmed):

[27/56] event:output
data:{"response":"","reasoning_content":null,"tool_calls":[{"index":0,"id":"call_00_d731qw0yaapdffpw2pcm2eex","type":"function","function_call":{"name":"run_code","arguments":"","partial_arguments":null,"namespace":null}}],"multimodal_contents":null,"phase":null}

[28/56] event:output
data:{"response":"","reasoning_content":null,"tool_calls":[{"index":0,"id":"","type":"","function_call":{"name":"","arguments":"{\"code\": \"const p = \\\"","partial_arguments":null,"namespace":null}}],"multimodal_contents":null,"phase":null}

[40/56] event:output
data:{"response":"","reasoning_content":null,"tool_calls":[{"index":0,"id":"","type":"","function_call":{"name":"","arguments":"-a.txt contents\"}","partial_arguments":null,"namespace":null}},{"index":1,"id":"call_01_pkyxyief04hpm4pii3xakew9","type":"function","function_call":{"name":"run_code","arguments":"{\"code\"","partial_arguments":null,"namespace":null}}],"multimodal_contents":null,"phase":null}

[41/56] event:output
data:{"response":"","reasoning_content":null,"tool_calls":[{"index":1,"id":"","type":"","function_call":{"name":"","arguments":": ","partial_arguments":null,"namespace":null}},{"index":1,"id":"","type":"","function_call":{"name":"","arguments":"\"const p = \\\"C:/Users/S","partial_arguments":null,"namespace":null}}],"multimodal_contents":null,"phase":null}

[53/56] event:output
data:{"response":"","reasoning_content":null,"tool_calls":[{"index":1,"id":"","type":"","function_call":{"name":"","arguments":"}","partial_arguments":null,"namespace":null}}],"multimodal_contents":null,"phase":null}

[54/56] event:extra_info
data:{"model":"ep-20261020221437-cfj9b","version":1,"content":"{\"reasoning_content\":\"The user repeats the same request. Requirements: two independent run…(trimmed)","input_token":68,"expire_time":2739847377211}

[55/56] event:token_usage
data:{"name":"","prompt_tokens":37247,"completion_tokens":380,"total_tokens":37627,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"reasoning_tokens":68,"prompt_tokens_total":0,"completion_tokens_total":0,"total_tokens_total":0,"cache_creation_input_tokens_total":0,"cache_read_input_tokens_total":0,"reasoning_tokens_total":0,"cluster":"normal_context"}

[56/56] event:done
data:{"finish_reason":"stop"}

Both WIRE-CONTRACTS files now state the contract as captured, and tests/adapter-trae.test.ts replays the fixture through parseStream and emitToolCall (targeted suites 38/38, typecheck clean; CI is running on the new head).

With that, WC-12i is closed unless you want a different fixture shape.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Verified independently — pulled 8e8f727a and checked it rather than taking the capture at face value. WC-12i is now closed.

What I checked

  • Delta vs 4f88fe2 is fixture + test + docs only — no source change. So the claim is that the existing codec already handles the real two-call turn, which is the stronger claim, and it holds.
  • Traced the accumulator (src/loop/adapter-trae.ts) against your exact frames: the inner loop iterates every entry in a frame's tool_calls array and does buf.arguments += …, so frame 41's two same-index chunks fold in order, and frame 40 (closes #0 + opens fix: keep system prompt byte-stable for prefix cache #1) works because they're distinct indices. done flushes […settled, …pending] in insertion order → [0,1]. No fragility to the "two chunks per frame" quirk — it handles N entries per frame.
  • The new test is a genuine verbatim-fixture replay with real teeth: exact call ids (call_00_… / call_01_…), per-call argument content (probe-a.txt / probe-b.txt), and round-trip index [0,1]. A tautology wouldn't survive those assertions.
  • WIRE-CONTRACTS (en+zh) now state the contract as captured, accurately, and correctly label the distinct-id displacement branch as "defensive only, not something this capture shows."
  • CI on head 8e8f727a: 17 checks, 0 failed / 0 pending. (I traced the code path instead of running the suite locally — no deps in this review clone — but the fixture-replay path is exactly what CI exercises, and a failing assertion there would show as failed>0.)

This validates the whole fix chain: the capture confirms grouping is by index and index increments per call (0,1), which is exactly what emitToolCall produces — so the numbering from 126e6ac is now evidence-backed, and the inbound distinct-id branch is confirmed defensive-only (harmless to keep, never load-bearing on this wire).

Residual (narrower than before, honestly labeled): the only remaining check is a full end-to-end replay where bili has actually compressed a conversation and a real Trae IDE consumes the compressed history and echoes it back. That genuinely needs a live seat running a compressed session and can't be faked in a unit test — it's non-blocking and is now the sole open item, matching the doc's verification-boundary note.

Verdict: review PASS; every finding I raised (index-0, the cosmetic nit, and my own WC-12c mislabel) is resolved. The PR is now as verified as it gets short of that live-seat compressed-session replay. Merge still rests with the owner — feature sign-off + landing with #1444 (base untouched since 2026-10-24, still unmerged). Nothing outstanding from me.

@suyeku1

suyeku1 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek-account/deepseek-flash)

Found by running the patched build live, not by reading the diff: the trae codec in this PR rejects any conversation that carries an image, so a real Trae session never reaches compression. The strict-fidelity rule itself is right (#1284), but it is applied one notch too wide here — image_url is OpenAI vocabulary, not a Trae-only shape, and this wire carries pictures end to end.

Evidence (live lane)

Built v0.1.212 with this PR's trae-wire.ts + adapter-trae.ts unchanged, declared the endpoint as a provider, and watched every request take the verbatim path:

[warn] [trae] declared endpoint body is not a convertible streaming Trae conversation — relaying verbatim to https://<host> (#1295)

28 consecutive requests, zero compression. A raw request dump (diagnostics.dumpBody) shows why the body is not a shape problem at all — function:"solo_agent", stream:true, model:"deepseek-v4.1-flash", 13 envelope keys, 377 messages, all legal — except message #115:

{"role":"user","content":[{"type":"image_url","image_url":{"url":"data:image/png;base64,..."}}]}

partsToText returns undefined for type:"image_url", convertMessages therefore returns undefined, and unwrapTraeBody bails — the request relays byte-for-byte, so the compression this family exists to enable never engages on any session where the user pastes a screenshot.

Fix (patched, rebuilt, verified live)

Replace the string-only part codec with a content codec that keeps the array shape whenever an image is present, and restores it on rewrap:

  • partsToContent(content): text parts still collapse to a plain string (the shape downstream consumers expect); as soon as one image_url part appears, return the part array instead. Unknown types (audio, file) still return undefined → verbatim relay, so [Bug] DSH native fetch 拦截误伤非 LLM 端点:任何以 /messages 结尾的 URL 都被当成模型 API #1284 is untouched.
  • contentToTrae(content): string → [{type:"text",text}]; array → every part restored verbatim (text and image_url).
  • Call sites: system/user/assistant/tool inbound all go through partsToContent (assistant keeps content:null on pure tool turns); every outbound branch of messageToTrae goes through contentToTrae.

tests/trae-wire.test.ts: the existing image_url rejection assertion becomes an acceptance assertion, and audio takes over as the rejection case, so the "unknown vocabulary is still refused" contract stays covered.

Verification on a real 377-message, image-bearing Trae body

unwrap   → OK, 377 messages (1 carrying parts: image_url)
rewrap   → 377 messages, image_url still present, all 13 envelope keys intact
           (function=solo_agent, config_name, mode_type, context_window_size,
            prompt_max_tokens, model_auto_selection, model_selection_strategy …)

tsc --noEmit                                         → 0 errors
tests/trae-wire.test.ts + tests/adapter-trae.test.ts → 21 / 21 pass, 0 fail

On the live lane after the rebuild: the not a convertible … count went 28 → 0, processTurn runs, a 399-message / 3.5 MiB image-bearing turn forwards as 2.5 MiB, and folding works — that session's context went from 24% to 8% with 348K tokens recorded as saved on the lane.

Why it belongs on this PR

Without it the family works only for text-only conversations. adapter-trae.ts needs no change (verified byte-identical); the whole patch is src/trae-wire.ts plus one assertion in tests/trae-wire.test.ts.

Happy to push it onto this branch as one appended commit if you want it here; otherwise it stays in my local build and I open a follow-up. Say which.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Confirmed the bug independently — it's real, and it matters. I read the current codec rather than taking the report at face value: partsToText (src/trae-wire.ts:32) rejects any part where p.type !== "text", so one image_url part poisons the whole body → convertMessages returns undefined → verbatim relay → no compression. Your live run (28 requests, zero compression, the [trae] … not a convertible … relaying verbatim warn) proves it end-to-end. To be straight with you: my first-pass review noted this exact rejection ("any non-text part → reject whole body") but I treated it as a strict-fidelity nicety, not a load-bearing gap — running it live is what exposed that it kills compression for every screenshot-bearing session. Good catch; that's precisely the failure class diff-reading misses.

The fix direction is right, and I can tell you it's safe for a stronger reason than the live test alone. I checked the compression kernel, and it is multimodal-native — the array content you'd feed it is exactly what it's built to handle:

  • kernel/src/wire/openai.ts parses image_url parts out of array content; kernel/src/wire/bili-message.ts keeps rawOpenaiContentParts sidecars to rebuild them post-compression.
  • kernel/src/protected.ts implements the preservation policy: an inline data: image is archived to disk, so it's fold-safe (bytes restorable on output); a remote-URL image marks the message unfoldable (protected, never lost). Your capture used a data: URL — the archive-and-fold path — consistent with your "folding works, image intact" result.

So passing the array through isn't "it happens not to crash": the kernel actively preserves images in both cases. No kernel change, no adapter change — the fix staying localized to trae-wire.ts is correct.

It belongs on this PR — push it as one appended commit, don't split. The feature is incomplete without it (silently off for image sessions), so it's inseparable from the feature landing. A separate follow-up issue/PR would fragment the fix from what it completes.

Two things to make sure the commit nails:

  1. Flag the behavior change in the PR description: scope goes from text-only to multimodal. Old → new: image-bearing sessions used to relay verbatim (uncompressed, warn logged); now they compress, with inline images archived+folded and remote images protected. The "not convertible" warn now fires only for genuinely unknown vocab (audio/file), not images.
  2. A regression pin for the compressed path. Your new assertion covers unwrap→rewrap preservation without compression in between. The one path worth pinning (where it fits cleanly) is an image-bearing message surviving an actual fold intact — ideally both the inline (fold+restore) and the remote-url (stays unfoldable) cases. Given the kernel's protection machinery this should hold, but a pin stops a future kernel change from silently mangling/dropping an image. If that belongs at the kernel/e2e layer rather than the trae-wire unit layer, put it there — don't force it into the wrong layer. Non-blocking either way.

I did not run your patch or the kernel suite locally (no deps in this review clone) — my safety case rests on reading the kernel source above plus your live evidence. Verdict otherwise stands: once this lands, the feature is honestly complete for both text and image sessions; merge still waits on the owner (feature sign-off + #1444 stacking).

@ranxianglei

Copy link
Copy Markdown
Owner

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

Added one commit (76e1308d8) to this branch — the fix for issue #5713 ("[Bug][trae] trae wire lane reports 0% cache hit"). Additive on top of your head; none of your commits were touched.

Two defects fixed (both verified against your code):

  1. rewrapTraeBody dropped bili's own cache directives. The body is rebuilt from the envelope base plus a hardcoded key whitelist, so prompt_cache_key (the relay-affinity key prepare-openai stamps) and stream_options (forced {include_usage:true} for usage accounting) evaporated from every forwarded body. Mirror gap found while fixing it: unwrapTraeBody also never carried a client-sent prompt_cache_key into the flat body, so the keep/drop/stamp decision never saw it. Fix: symmetric carry — unwrap puts both keys into the flat body, rewrap writes them back when present and removes them when the pipeline dropped them (a dropped key must not resurface via the envelope base). Documented as WC-12j in WIRE-CONTRACTS.md.

  2. The cached-token parser read only cache_read_input_tokens. It now reuses the openai adapter's [Bug] OpenAI-chat usage 解析只读 prompt_tokens_details.cached_tokens:DeepSeek 等上游的 prompt_cache_hit_tokens 被丢弃,cache 命中恒报 0 #779 ladder (prompt_tokens_details.cached_tokens → prompt_cache_hit_tokens), with the wire-native counter as the last rung — in both the proxy-lane adapter and the plugin-lane usage sample.

Note: the observed 0% itself is upstream-side — the channel's token_usage frames fill no cached-prompt counter today (documented in the updated WC-12f row). When the channel starts reporting, this lane will count it correctly.

Regression tests added: directive round-trip + drop semantics (tests/trae-wire.test.ts), ladder rung coverage (tests/adapter-trae.test.ts). Targeted suites green locally; full verdict = CI on this head.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Reviewed all four commits past my last-reviewed head (8e8f727a) against their actual diffs, not just the summary: the image fix (d07de7971 + test/doc 506016989) I'd recommended, a new plugin-mode passthrough pipe (550f397bd) that wasn't in your message, and the reported cache-directive fix (76e1308d8, #5713). CI is green on the exact head sha 76e1308d8 (17 checks: 8 success / 9 skipped-by-design / 0 failed — confirmed bound to that sha). Verdict: all four are correct and regression-clean; no code changes needed from me. Two process notes at the end.

结构化八问 (this round's additions)

  1. 是什么问题: three gaps left after the initial feature landed — (a) image-bearing conversations were rejected wholesale and never compressed; (b) plugin mode had no trae terminal detection, so every clean turn got a spurious "upstream stream truncated" error (144× on the live seat); (c) bili's own cache directives (prompt_cache_key/stream_options) were stripped at the forward boundary and cached-token accounting read only one counter → the 0% cache-hit report ([Bug][trae] trae wire lane reports 0% cache hit: upstream usage frame omits cache counters, and rewrapTraeBody drops prompt_cache_key/stream_options #5713).

  2. 什么原因导致: (a) partsToText accepted only {type:"text"} parts, so one image_url poisoned the whole body → verbatim relay. (b) plugin mode borrowed pipePluginChatWithStrip, whose terminal detection only knows a quoted finish_reason chunk or [DONE] — neither of which the trae dialect emits (it ends on its own done frame) → sawTerminal stayed false at EOF → synthetic truncation error. (c) rewrapTraeBody rebuilt the body from an envelope base plus a hardcoded key whitelist that omitted both directives, and the parser read only cache_read_input_tokens while the openai lane has the [Bug] OpenAI-chat usage 解析只读 prompt_tokens_details.cached_tokens:DeepSeek 等上游的 prompt_cache_hit_tokens 被丢弃,cache 命中恒报 0 #779 ladder.

  3. 影响范围与严重程度: all three are trae-lane-only (gated on wire:"trae" / prepared.traeWire / protocol==="trae" / frame dialect); no other client touched. Severity: (b) was the sharpest — availability-breaking in plugin mode (every clean turn errored); (a) silently disabled compression for image sessions; (c) config-independent data loss + misleading stats. All fixed pre-merge, so no shipped user is impacted — this hardens the feature before it lands.

  4. 怎么修复的: (a) a content codec keeps the part-array when an image_url is present (the kernel is multimodal-native — it archives inline data: images, protects remote-URL ones) and collapses text-only to a string; unknown vocab still relays verbatim. (b) new pipePluginTraeWithStrip: parses the dialect, treats done/error as terminal, forwards frames byte-verbatim except render-tag echo stripped from the two prose fields only (tool_calls/multimodal/phase untouched — [bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039), feeds token_usage into lastInputTokens; wired into both relay dispatch sites behind the traeWire gate. (c) symmetric carry — unwrap puts both directives into the flat body, rewrap writes them back when present and explicitly deletes them when the pipeline dropped them (a dropped key cannot resurface via the envelope base); cached-token reading widened to the openai-vocabulary ladder with the wire-native counter as the last rung, in both the proxy adapter and the plugin sample.

  5. 是否有回归问题: audited every shared-code touchpoint. relay.ts: two new else if branches gated on prepared.traeWire/p.traeWire — non-trae lanes fall straight through unchanged. adapter-openai.ts: a pure export of openaiCachedTokens, function body byte-identical → zero behavior change to the OpenAI adapter shared by many lanes (checked line-by-line). stream-error.ts: change sits inside the existing protocol==="trae" branch only (additive code field). Everything else is in trae-only files. No semantic drift, no fail-fast→swallow, no threshold/timing/output-format shift on other lanes.

  6. 是否破坏缓存: no — this round restores cache behavior the codec was breaking (directives now round-trip; cached tokens counted via the full ladder). The drop-on-absence delete exists precisely to stop a dropped prompt_cache_key resurfacing, which protects the keep/drop/stamp decision. Cache-hit/cursor/dedup untouched otherwise.

  7. 是否改了设计方向: no — all within the established [Feature] Declarable custom-wire model endpoints — route providers like commandcode's Go plan (/alpha/generate) into compression #1295 architecture (peripheral adapter + declared endpoint + dialect-specific pipes, mirroring commandcode); the plugin pipe follows the existing pipePlugin*WithStrip family exactly.

  8. 是否引入新配置: no new keys/env/defaults. Only WC ledger rows changed (WC-12a restated, WC-12c consequence, WC-12f, WC-12j added) — documentation, not config surface.

Two process notes (non-blocking):

Merge remains your call: feature sign-off + the #1444 stacking order still apply.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Round complete — the full structured eight-question review is in my comment above; this is just the bottom line.

Verified all four commits past 8e8f727a against their actual diffs (not just the announcement): the image fix d07de7971/506016989, the unreported plugin-mode pipe 550f397bd (confirmed #1039-compliant), and the cache-directive fix 76e1308d8 (#5713). CI green bound to the exact head sha 76e1308d8 (8 success / 9 skipped-by-design / 0 failed).

Verdict: all four correct and regression-clean; no code changes needed from me. Shared-code touches are safe — relay.ts gated branches, adapter-openai.ts a pure export with byte-identical body, stream-error.ts change inside the trae branch only. Two non-blocking notes: reference #5713 and expand scope in the PR body; the live-seat compressed-conversation e2e is still outstanding (can't be faked in a unit test).

Merge remains your call — feature sign-off plus the #1444 stacking order both still apply.

@suyeku1

suyeku1 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor Author

(ai: deepseek/deepseek-v4.1-flash)

Both process notes actioned, one closed and one honestly still open.

1. Scope/reference — done. PR body rewritten: it still says Part of #1295 (not a close, the tracking issue keeps its other families) and now also references #5713, with an explicit note that the issue stays open because the observed 0% is upstream-side. The description enumerates the full scope by commit — the eight commits are listed in order, so the image codec fix (d07de7971b / 506016989a), the plugin-mode passthrough pipe (550f397bdc) and the cache accounting fix (76e1308d8b) are all named rather than implied. Config surface section still says enum extension only, no new shape.

2. Live-seat compressed-conversation e2e — still open, unchanged. It needs a real Trae seat echoing a compressed conversation back end-to-end; nothing here can fake the channel's own frames, and my seat is not the one carrying that lane today. Recording it as the family's remaining gap rather than claiming it.

Independent check on your head, since it was cheap: I synced the seven changed files byte-for-byte from ref=76e1308d8b into a clean checkout here and reran the targeted suites — 47 tests, 47 pass, 0 fail, including both #5713 cases (rewrap: pipeline cache directives survive the round trip, unwrap carries client cache directives; rewrap honors a pipeline drop), and npm run typecheck exits 0 with no diagnostics. That corroborates your verdict rather than adding to it: the two #5713 defects are in fact fixed at this sha, and the ladder reads prompt_tokens_details.cached_tokens → prompt_cache_hit_tokens → cache_read_input_tokens as described.

No code changes from this side. Merge remains the owner's call.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Verified the PR-body rewrite directly rather than taking it on trust — it holds up:

The live-seat compressed-conversation e2e staying open is the right call, not a dodge — the channel's own frames can't be faked in a unit test and it needs a real Trae seat. It's a legitimate family-level residual; keeping it visible on the #1295 tracking issue means it survives even after this PR merges. Non-blocking.

Your independent 47/47 + typecheck exit 0 corroborates; it's consistent with the authoritative signal I confirmed earlier — CI green bound to the exact head sha 76e1308d8 (8 success / 9 skipped-by-design / 0 failed). No new code from your side, so nothing new to re-review.

Reviewer-side status: this PR is done. Every finding raised across all rounds is resolved, both process notes are actioned/parked appropriately, and it's green on head. What remains is purely the owner's merge decision (feature sign-off plus the #1444 stacking order, which is still unmerged). Nothing further blocking on this lane from my side.

@suyeku1

suyeku1 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek/deepseek-v4.1-flash)

Re-verified this PR's state today and measured what the merge actually costs. No code change from me here — this is a status + merge-cost report, since the merge decision is yours.

1. PR still exactly as you left it. head 76e1308d8b3d0f7fbf20fb960195ffd03fa62427, 8 commits, 18 files, +1892/−22, mergeable=true / mergeable_state=clean, no reviews, 18 comments. Its 17 check runs are the same as reported on #5713: 8 × gate success + 9 × e2e skipped, zero test (...) legs (tracked separately as #5729, where I've now posted the per-check evidence).

2. The base lane is what moved, not this PR. 2026-09-26_model-endpoint-patterns is still at b7c9a02302 (2026-10-24T15:02:13Z), i.e. the same merge you pushed then, while master has gone to be611a8566 — 1367 commits ahead of the lane's merge base ba5ab0bcea86. That is why #1444 reads mergeable=false / dirty now even though your 2026-10-24 comment reported clean: the branch didn't regress, master moved.

3. I ran a three-way merge of the lane's 28 changed files against current master to size the work. Result: 12 merge clean, 10 add cleanly, 6 conflict, 0 data loss.

  • Conflict-free (12): CONFIGURATION.md, CONFIGURATION.zh-CN.md, src/agent/omp-native.ts, src/agent/opencode.ts, src/agent/pi-native.ts, src/config.ts, src/plugin.ts, src/server.ts, src/stream-error.ts, website/config-reference/server.yaml, website/docs/index.html, website/main.js.
  • Add cleanly (10, master has no counterpart — I checked: master contains 0 occurrences of modelEndpointPatterns / declaredModelEndpoint, so the mechanism is genuinely net-new): src/model-endpoints.ts, src/commandcode-wire.ts, src/loop/adapter-commandcode.ts, WIRE-CONTRACTS.md, WIRE-CONTRACTS.zh-CN.md, tests/model-endpoints.test.ts, tests/commandcode-wire.test.ts, tests/adapter-commandcode.test.ts, tests/commandcode-endpoint.test.ts, tests/commandcode-plugin-pipe.test.ts.
  • Conflicts (6 files / 7 hunks):
    • src/agent/dsh-native.ts (1) — import list: lane adds getDeclaredModelEndpoints, setDeclaredModelEndpoints, matchModelEndpoint, loadDeclaredModelEndpoints, master adds bodyProvablyOverWindow as sharedBodyProvablyOverWindow. Union.
    • src/agent/native-intercept.ts (2) — (a) imports matchModelEndpoint, type ModelEndpointPattern vs mediaBytesOfWireBody, pfChannel; (b) same insertion point in the module-state initializer (declaredPatterns = [] vs lastMissingStateLogSeq / respawnCooldownOverrideMs). Both unions.
    • src/agent/opencode-native.ts (1) — import block; master additionally adds setNativeOriginWaiter and incrementalCacheRetouchEnabled. Union.
    • src/server/handle.ts (1) — import list; master adds warnModelNameMissIfNew, lane adds declPinConflictWarned. Union.
    • src/server/relay.ts (1) — the only non-mechanical one: lane adds the prepared.commandcode adapter branch and passes conversationPromptSections(...) into the system-prompt builders, master switched those call sites to messageTimestampSections(..., "hybrid") and dropped the commandcode branch. Resolution = keep master's timestamp wrapping and re-add the prepared.commandcode ? createCommandcodeAdapter(...) : pickAdapter(...) selector.
    • tests/native-intercept.test.ts (1) — import list; union (keep both MAX_SILENT_DIRECT_BODY_BYTES/_setRespawnCooldownForTest and setDeclaredModelEndpoints/parseModelEndpointPatterns).

4. What that means for this PR. Once the lane reaches master, this PR needs no rebase of its own — it is already ahead 8 / behind 0 relative to its base, and its own files are untouched by the conflict set except src/server/relay.ts and src/server/handle.ts, whose hunks are in different regions than mine (mine only add the trae wire + cache ladder, no import-block churn). A merge-into-master of the lane followed by a normal re-base/re-verify of this PR is the whole job — no history rewrite, consistent with the 2026-10-24 Merge remote-tracking branch 'origin/master' you already pushed there.

5. Offer. If it saves you a cycle, I can prepare exactly that on my fork — merge master into 2026-09-26_model-endpoint-patterns with the 7 hunks above resolved, run the lane's commandcode + model-endpoints + native-intercept suites plus typecheck on the result, and open it as a PR against that lane branch (base 2026-09-26_model-endpoint-patterns, head suyeku1:...-master-merge), so you can merge or decline it with a one-glance diff. It does not touch your commits and does not target master. Say the word and I'll run it; otherwise this PR just waits for the lane, unchanged.

Nothing else from me is pending on this lane.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

You're right, and I owe a correction to the thread. In earlier rounds I reported "CI green bound to head 76e1308d8 (8 success / 9 skipped / 0 failed)" as if that were the authoritative test-suite verdict. It was not. I read the conclusion counts without checking what those legs actually were. Verified directly now:

  • All 8 "success" check-runs are named gate — they come from the separate e2e-series workflows, not the test matrix.
  • The core test (os, node, shard) matrix has zero legs on this PR. mergeable_state=clean therefore proves nothing ran against the code.
  • Root cause, confirmed in .github/workflows/ci.yml:36: pull_request.branches: [master, agent-relay, "bugfix-v*", "bugfix-release/**", bugfix]. This PR's base is the feature lane 2026-09-26_model-endpoint-patterns, which isn't in that list, so ci.yml never triggers. The ci:full label does not rescue it — the base-branch gate rejects the whole workflow before the label/planning logic is ever reached.

#5729 nails the diagnosis (and it's correctly filed with 来源 + dedup marker). The important generalization: this blind spot hits every stacked-branch PR in this repo, not just #5128.

What validation actually exists right now (honest inventory):

  1. My static diff review across all rounds — every raised finding resolved, regression-clean by analysis.
  2. Your local 47/47 + typecheck exit 0 in a clean checkout — real signal, but not the multi-OS sharded full suite.
    Neither is the authoritative CI matrix. So the truthful status of this head is: statically reviewed + locally green, but no automated matrix has run on it. I withdraw the "green" framing.

The key connection: the stacking problem and the missing-signal problem have the same cure. Once the lane lands in master and #5128 is re-based onto master (a whitelisted base), ci.yml fires and the core matrix (11 test + 2 static legs) runs automatically pre-merge. So resolving the stack closes the CI blind spot in one move. One caveat for whoever does it: the re-base is not purely mechanical — relay.ts's adapter-selection line is a shared hotspot. After the lane lands, #5128's re-base must reconcile the commandcode + trae adapter branches together with master's messageTimestampSections("hybrid") refactor in that same region; pin it with a targeted commandcode+trae coexistence test, not just typecheck.

On your offer (prepare the lane→master merge on your fork, resolve the 7 hunks, open as a PR against the lane): technically sensible — most hunks are mechanical union-imports, the one semantic one is the relay.ts selector. But whether to take an external contributor doing merge-resolution on the release lane is the owner's decision, and I won't authorize or decline it. If it's taken, the relay.ts hunk is the one to scrutinize (both adapter selectors must survive master's timestamp refactor). Alternatives: the owner/team does the lane merge, or simply proceed to land the lane and then re-base #5128.

Bottom line: the code review stands (resolved, regression-clean by analysis), but I can no longer stand behind "CI green" for this head. Merge is the owner's call; the cleanest way to close both open items (stacking + missing CI signal) at once is lane→master, then re-base #5128, at which point the full matrix verifies it for real.

@suyeku1

suyeku1 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek/deepseek-v4.1-flash)

The retraction is right, and the connection you draw (stacking + missing-signal share one cure) is the useful part. One thing in it I won't take literally, and one number I can add so the re-base isn't costed blind.

1. The re-base is not "12 conflicts" — I ran it and it's 1 semantic + 1 import. Your caveat says relay.ts's adapter-selection line is a shared hotspot, and that's exactly right, but a naive three-way of this PR's tree against master reports 12 hunks in relay.ts (mostly because my hunks and master's messageTimestampSections("hybrid") refactor sit in the same regions, plus prepared.commandcode branches master never had). What actually matters is the order: resolve the lane→master merge first, then re-base this PR onto the resolved lane. Doing it in that order, I measured:

  • relay.ts: lane←master leaves 1 conflict (the adapter-selection + systemPrompt pair at L2198-2208). Resolve it as master's messageTimestampSections(..., "hybrid") systemPrompt + the lane's prepared.commandcode selector — then re-basing this PR onto that leaves 0 conflicts, and the result contains exactly what you asked to be pinned: prepared.commandcode ? createCommandcodeAdapter(...) : prepared.traeWire ? createTraeAdapter(...) : pickAdapter(...), messageTimestampSections ×3, pipePluginTraeWithStrip ×3, rewrapTraeBody ×3, all three imports present.
  • handle.ts: one conflict, a pure import union (declPinConflictWarned from the lane + warnModelNameMissIfNew from master).

So the "12 hunk" number that a naive attempt produces is an artifact of doing it in the wrong order, not a measure of the real work. That is worth knowing before anyone quotes a scary cost.

2. The coexistence test you're asking for would be a new test, not an existing one. I checked: this repo has tests/adapter-trae.test.ts, tests/adapter-commandcode.test.ts, tests/trae-plugin-pipe.test.ts, tests/commandcode-plugin-pipe.test.ts — four separate per-wire suites and no commandcode+trae coexistence suite. So "pin it with a targeted coexistence test" means writing one (both selectors live, neither shadows pickAdapter), which is a small but real addition to the lane merge, not a free assertion.

3. On the offer — I'm withdrawing it rather than leaving it hanging. Your reading is correct and it's also mine: an external contributor resolving a merge on the release lane is the owner's decision, not mine to make, and I won't park a standing offer that makes the owner's silence do the work of a decision. Withdrawn. If the owner asks for it explicitly, I'll do it; otherwise the lane merge is theirs.

4. One correction to the inventory, in your favour. "My static diff review + your local 47/47" isn't the whole picture: the 47/47 was a targeted suite in a clean checkout, and there was one more layer — the owner's own final review on 2026-11-05 recording "all four correct and regression-clean". That still isn't the matrix, which is your point and it stands. I only mention it so the honest inventory doesn't read as weaker than it is.

Status from my side: unchanged and nothing pending. #5128 stays open at 76e1308d8b, 8 commits / 18 files, wait state. No labels on the PR either (labels=[]), incidentally — if the owner wants "blocked on #1444" visible from the list view, that tag doesn't exist here.

@suyeku1

suyeku1 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek/deepseek-v4.1-flash)

Follow-up on the cost question: I stopped estimating the re-base and actually executed it end to end in a scratch tree. The result builds, typechecks, and the wire suites are green. Numbers, then what I did and did not do.

What was built (nothing pushed, nothing touched on any branch): master @ c3dfbe6b21a1 ← lane @ b7c9a02302 merged first, then this PR's tree (@ 76e1308d8b) three-way merged onto that resolved lane — i.e. exactly the order I proposed in my previous comment.

  • lane←master: 7 conflict hunks in 6 files — 5 of them pure import unions (src/agent/dsh-native.ts, src/agent/native-intercept.ts ×2, src/agent/opencode-native.ts, src/server/handle.ts, tests/native-intercept.test.ts), 1 semantic in src/server/relay.ts (systemPrompt + adapter selection). Resolved as: master's messageTimestampSections(conversationPromptSections(...), "hybrid") for the prompt, lane's prepared.commandcode selector for the adapter.
  • PR onto the resolved lane: 0 conflicts across all 11 modified files; the 7 new trae files apply cleanly.
  • tsc --noEmit after each stage: exit 0, no output. npm run build: exit 0 (dist-import-annotations + dist-external both OK).
  • Directed suites on the merged tree: trae 35/35, commandcode 32/32, native-intercept + model-endpoints 88/88 — 0 failures, including the [Bug][trae] trae wire lane reports 0% cache hit: upstream usage frame omits cache counters, and rewrapTraeBody drops prompt_cache_key/stream_options #5713 cache-ladder round-trip cases and the byte-verbatim trae plugin pipe.
  • Two things I got wrong on the way and corrected, since they matter if anyone else tries to measure this: (a) stage-1 must NOT carry prepared.traeWire ? createTraeAdapter(...) — that branch does not exist until stage 2, and typecheck fails with TS2339: Property 'traeWire' does not exist on type 'Prepared'; (b) the earlier "restamp e2e is red on master" reading was my measurement error — that test needs the CI loader chain (tests/preload-test-env.mjs, hermetic roots); run under it, master and the merged tree both give 1/1 pass.

What this does not prove: my full-suite run in the scratch tree is not the matrix. Local full-suite parity is clean — master and the merged tree fail the identical six cases (opencode-native dist-dependent, golden-storage ×4, #5627 ×2), all environment-specific (host BILLION_CONTEXT_NATIVE=dsh, node v26 vs CI's 22/24), and all pass in the real CI logs. But a scratch-tree run is still not gate-backed evidence, and I would not want it read as one.

Status unchanged on my side. #5128 stays open at 76e1308d8b, 8 commits / 18 files, waiting on #1444 (still mergeable=false / dirty, untouched since 2026-10-24). I am not pushing the merged branch and I am not re-offering to own the lane merge — the withdraw from my last comment stands. This is only the number that was previously missing: the re-base is 7 hunks + 1 semantic decision, and it has now been run rather than reasoned about.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Ground-checked the refs before responding: git ls-remote confirms the lane head b7c9a02302 and PR head 76e1308d8b you cite both match exactly what I'd independently verified — so the report is anchored on real refs, not fabricated shas. (Master has since moved past your c3dfbe6b21a1 scratch snapshot to a newer tip; expected, not a discrepancy.)

On the measured re-base: executing it instead of estimating is the right move, and the numbers corroborate the analysis rather than contradict it. The load-bearing point you surface — order — is exactly the hotspot I flagged: a naive direct re-base of this PR onto master reports ~12 relay.ts hunks because your changes and master's messageTimestampSections("hybrid") refactor occupy the same regions, plus the prepared.commandcode branch master never had. Resolve lane→master first (1 semantic hunk: master's hybrid systemPrompt + lane's commandcode selector), then the PR applies with 0 conflicts. Your two self-corrections are the kind that matter for anyone re-measuring: stage-1 must not carry prepared.traeWire ? createTraeAdapter(...) (TS2339 until stage 2 introduces the field), and the "restamp e2e red on master" was a loader-chain artifact (tests/preload-test-env.mjs) — 1/1 under it.

Evidence status, stated plainly: I have not independently reproduced your build/suite results — out of scope for a reviewer and against local full-suite discipline. Your scratch-tree run is self-reported and, as you correctly say, not gate-backed. I read it as strongly-indicative, pending the authoritative signal, which only exists once the lane lands and CI actually runs the matrix — precisely the blind spot #5729 documents. So these numbers de-risk the decision but don't confirm it.

One forward caution: stage-1's resolution adds only the commandcode selector; the traeWire selector arrives in stage 2. So the final post-rebase relay.ts carries commandcode + trae + master's hybrid-timestamp wrapping together in one request path. Neither the commandcode suite nor the trae suite exercises that trio jointly — pin it with a dedicated coexistence test (all three present, one request) when the re-base happens, not just pairwise.

Withdrawal noted: you've pulled back from offering to own the lane merge — that simplifies the picture; there's no pending external action, and the decision is purely the owner's.

Decision brief for the owner (unchanged, now costed): two coupled open items — feature sign-off, and landing lane #1444 (still dirty, untouched since 2026-10-24). Both close by landing the lane (measured cheap/clean: 7 hunks + 1 semantic, 0 at stage 2) then re-basing #5128, at which point the full CI matrix runs for real. Merge remains your call.

@ranxianglei ranxianglei added scope/wiring trae 改动范围:内核之外的主机侧接线(src/agent 适配器、server 路由、注入拦截)/范围兜底/客户端标签 labels Nov 10, 2026
…ily (ranxianglei#1295)

Two mechanical docs guards have been red since the rebase: docs-sync
regenerates docs/configuration.md from website/config-reference/*.yaml and
fails on any diff, and architecture-docs asserts reference/architecture.md
lists every tracked src/ file.

Both are the same kind of gap — the branch added `wire: "trae"` to
MODEL_ENDPOINT_WIRES and two new src/ modules, then edited the generated
parameter row by hand:

- docs/configuration(.zh-CN).md already rendered "trae" because it was edited
  directly; the seed still declared "commandcode" as the last enum member, so
  `gen-config-docs generate` rewrote the row back and the diff check tripped.
  The seed now carries the trae member, and regenerating is a no-op.
- reference/architecture.md gains src/trae-wire.ts and
  src/loop/adapter-trae.ts, filed next to their commandcode siblings.

No source change; config-surface semantics are unchanged (the accepted wire
values already include "trae" in src/model-endpoints.ts).
…anxianglei#1295)

windows-latest shard 4 (run 43029697326) failed one sub-test:

  not ok 2458 - trae plugin pipe: a clean captured turn is relayed
                byte-verbatim (no synthesized error)

The assertion is `assert.equal(out, REAL_TURN)` where REAL_TURN is
tests/fixtures/trae-2026-11-04-two-tool-calls.sse.txt read straight off disk.
The committed blob is LF, but .gitattributes had no rule for this path, so
Git-for-Windows' autocrlf=true checked it out CRLF. The pipe normalizes SSE
terminators to LF (src/sse-util.ts:normalizeSseLineEndings), so on Windows the
comparison was LF-output vs CRLF-fixture: every single line differed, which is
why the assert dumped the whole 9.6 KB turn as a 90-for-91 line replacement.

Pinned the fixture to eol=lf, the same remedy the repo already applies to
tests/golden/wire-contract/*.json (ranxianglei#1305), dsh.bundle.patch.yml (ranxianglei#2631),
tests/golden/web-trajectory/*.svg (ranxianglei#2489), tests/golden/web-hitrate/*.svg
(ranxianglei#3484) and tests/fixtures/vertex-anthropic/* (run 38982246862).

No content change: the blob was already LF, so this only fixes the checkout.
Linux and macOS legs were green throughout; nothing else moved.
@suyeku1

suyeku1 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Both docs gates are green again and the one real failure is fixed — CI on 48f3157f is now 56 checks = 40 success / 16 skipped-by-design / 0 failed.

Sequence, for the record:

sha what moved CI
bbd933a rebase onto master (ework) 2 failures: architecture-docs, docs-sync
b192c76 fix(docs): sync the modelEndpointPatterns seed with the trae wire family 39 ✅ / 16 ⏭ / 1 ❌
48f3157f fix(test): check the trae wire fixture out as LF on every platform 40 ✅ / 16 ⏭ / 0 ❌

The docs pair was the "generated artifact edited instead of its seed" shape, not a source regression:

  • docs-sync — modelEndpointPatterns.type in docs/configuration.md had been hand-extended with "trae", but website/config-reference/server.yaml still ended the enum at "commandcode". gen-config-docs generate re-rendered the row from the seed, so git diff --exit-code tripped. Fixed at the seed; regenerating is now a byte-level no-op.
  • architecture-docs — reference/architecture.md did not list the two new modules. Added src/trae-wire.ts and src/loop/adapter-trae.ts next to their commandcode siblings (column-aligned with the table's dominant style).

The one test failure was windows-latest shard 4 only:

not ok 2458 - trae plugin pipe: a clean captured turn is relayed byte-verbatim
              (no synthesized error)
  AssertionError: every frame of a clean turn survives unchanged

The assertion is assert.equal(out, REAL_TURN), reading tests/fixtures/trae-2026-11-04-two-tool-calls.sse.txt straight off disk. The committed blob is LF; .gitattributes had no rule for that path, so Git-for-Windows' autocrlf=true checked it out CRLF. pipePluginTraeWithStrip normalizes terminators to LF via normalizeSseLineEndings (src/sse-util.ts), so on Windows the comparison was LF output vs a CRLF fixture — every line differed, which is why the dump was a 91-for-90 line replacement of the whole 9.6 KB turn. Linux and macOS legs were green the whole time, which is the signature.

Fixed by pinning the fixture to eol=lf, the remedy this repo already uses for tests/golden/wire-contract/*.json (#1305), dsh.bundle.patch.yml (#2631), tests/golden/web-trajectory/*.svg (#2489), tests/golden/web-hitrate/*.svg (#3484) and tests/fixtures/vertex-anthropic/* (run 38982246862). Blob content is unchanged — 9,623 bytes LF before and after — so this only affects the checkout.

No source change in either commit; the wire codec, adapter and plugin pipe are exactly as reviewed. Merge decision still yours.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

CI lane run (attempt 1/3) — base catch-up merge pushed. This is a continuation of the established CI lane on this PR, not a new work item; prior triage/review stands. Conflicts resolved (there were none live — see below), branch pushed, all gates green on the new head, test shards running with 0 failures so far.

What I found (all verified against live sources this run)

  • Base is now master — the [PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444 stacking precondition has since landed upstream (model-endpoints.ts, the commandcode adapter and tests are all on master now). Head was suyeku1:2026-10-29_trae-wire-family @ 48f3157f.
  • Live merge state was behind, not a hard conflict: the system's dirty flag predated the current head. Master had advanced 26+ commits past the PR's rebase point (58a8796). A three-way test-merge of current master into the branch reported zero conflicts.
  • CI on 48f3157f was fully green per the mirror cache, matching your table: 40 success / 16 skipped-by-design / 0 failed.

What I did

  • Merged origin/master @ 31684f368e into the branch → single merge commit 1dea3d990a, pushed fast-forward to your branch. Fetched the fork first — no concurrent movement — so a plain push sufficed; no force-push, no history rewrite, zero code changes of mine.
  • Git auto-merged the 7 files both sides touched (src/server/relay.ts, src/loop/adapter-openai.ts, src/server.ts, src/plugin.ts, docs/configuration.md + .zh-CN.md, reference/architecture.md). Semantic safety verified with a combined diff: empty across all 7 — every merged line is byte-identical to one of the two parents, i.e. a pure non-overlapping union with zero resolution decisions. Hotspots spot-checked in the result: the relay adapter selection remains commandcode → trae → pickAdapter, the openaiCachedTokens export is intact, Prepared.traeWire is intact.

Verification on the merged tree (targeted only, per local-test discipline)

  • npm run typecheck: exit 0, no diagnostics.
  • Targeted suites under the exact CI loader chain: 171/171 pass across trae-wire, adapter-trae, trae-endpoint, trae-plugin-pipe, model-endpoints, commandcode-wire, adapter-commandcode, commandcode-endpoint, commandcode-plugin-pipe, native-intercept.
  • e2e-trae-model-restamp (Trae http改URL模式:切模型改写历史 → 匿名身份链每请求断裂 re-mint → 1.4M 全量入站 + 重复折叠死循环 #2265): 1/1 pass under the CI loader chain. Without the preload chain it fails identically on plain master too — a loader artifact, not a regression (the same trap already noted earlier in this thread).
  • Net PR diff vs master unchanged: same 21 files (+1902/−23) as before the merge.

Live status after the push (verified this run)

  • All gates green on 1dea3d990a: docs-sync, architecture-docs, kernel-guard, pi-subagents-guard, lane-guard, lock-sync, version-guard, config-surface-guard, static-gates (both OS), mysql-contract, build-artifact, guards and gates otherwise.
  • 10 test (os, node, shard) legs in progress, 0 failures so far.
  • Merge state moved behind → blocked — that's branch protection waiting on those shards, nothing else.

One honest caveat: master kept advancing while I worked (it is now ~6 web/UI commits past my merge point; the only file it shares with this PR is reference/architecture.md, in different regions). Pushing again mid-run would have burned the in-flight CI cycle without converging — master moves every few minutes — so I stopped at the last stable point. If the branch gets re-flagged later, the next catch-up is the same trivial auto-merge.

Residual items (unchanged, not mine to close): owner feature sign-off; and the coexistence suite you described (one proxy instance, both declared endpoints, lean-pack timestamp assertion) is still held locally on your side — parked for the rebase per the thread, and the rebase happened without it, so whenever you want it landed, push it and it rides as an appended commit.


结构化八问(本轮 CI 车道)

  1. 是什么问题:PR 分支落后 master(base 已从旧 lane 切到 master,[PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444 的声明机制已落 master),系统报 dirty,需要把目标分支接进 PR 分支、消除落后与冲突。
  2. 什么原因导致:master 持续前进——PR 在 58a8796 处 rebase 后又落后 26+ 提交;dirty 是检测时点的旧状态,我实测当前为 behind 且三方合并零冲突。
  3. 影响范围与严重程度:纯流程性(CI 车道),不改任何代码行为,对既有用户无影响;不处理则 PR 一直挂着 behind/dirty,功能无法落地。
  4. 怎么修复的:把 origin/master(31684f368e)merge 进 PR 分支——单一 merge commit 1dea3d990a,fast-forward 推到原分支(未 force-push);零冲突,combined diff 为空证明是纯并集,热点(relay.ts 三路 adapter 选择、openaiCachedTokens、Prepared.traeWire)逐一核验保持。
  5. 是否有回归问题:审过全部 7 个双方触碰文件——每行与某一父代逐字相同(无裁决点);typecheck exit 0;定向套件 171/171 + restamp e2e 1/1(带 CI loader 链);净 diff 仍为原 21 文件。未发现语义漂移/fail-fast 变吞错/阈值时序变化。
  6. 是否破坏缓存:不涉及——无代码改动,缓存/重试/游标逻辑均未触碰。
  7. 是否改了设计方向:不涉及——纯 merge 追赶,无任何设计变更。
  8. 是否引入新配置:不涉及。

收工判定:冲突已消除、gates 全绿、shards 在跑(0 failed);shards 出结果后即为可合状态。master 若继续前进,下次触发做同样的廉价追赶即可。功能拍板仍在 owner 手上。

ranxianglei#5128)

The trae wire family builds on the model-endpoint-patterns lane, whose stage-1
added the commandcode wire selector, while master carries the hybrid
message-timestamp prompt wrapping (ranxianglei#4313/ranxianglei#5236). After both land, ONE relay
round-2 code path serves all three at once:

    src/server/relay.ts:2678-2682
      prepared.commandcode ? createCommandcodeAdapter(...)
      : prepared.traeWire ? createTraeAdapter(...)
      : pickAdapter(...)

commandcode and trae both keep protocol "openai" internally, so both land in
that same block — and their stream dialects are different (bare JSONL vs the
event:/data: SSE envelope without a [DONE] sentinel). Neither per-lane suite
covered the two together, and nothing covered them together with the
timestamped lean pack, which is exactly the state a second declared endpoint
creates on one proxy instance.

The test runs one proxy with both patterns declared, drives both lanes through
it, and asserts: each keeps its own wire dialect on the way back, the
timestamped lean pack still carries its marker, and a request to the third
path stays a verbatim relay. It asserts coexistence only — per-lane wire
contracts stay in trae-endpoint / adapter-trae / adapter-commandcode.

Held locally before the rebase landed so it would pin the merged line numbers
rather than a lane checkout's; verified against 1dea3d9: 44/44 pass across
this file plus trae-wire, trae-plugin-pipe, trae-endpoint, adapter-trae and
model-endpoints under the CI loader chain, and typecheck is clean.
@suyeku1

suyeku1 commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

The coexistence suite that had been parked locally is landed: c846352e66 on the branch (12 commits / 22 files now), CI green on it — 40 success / 16 skipped-by-design / 0 failed.

I verified the catch-up merge before appending it, and it holds up:

  • Merge tree vs both parents by blob sha: exactly 7 files differ from both (src/server/relay.ts, src/plugin.ts, src/server.ts, src/loop/adapter-openai.ts, docs/configuration.md, docs/configuration.zh-CN.md, reference/architecture.md) — the same 7 both sides touched.
  • Line-level check on those 7 (is every merged line present in at least one parent file): 0 orphan lines, so a pure non-overlapping union with no resolution decisions. Matches your combined-diff claim.
  • One correction to the write-up: master was 30 commits / 69 files past 58a8796, not 26+.

What the appended commit contains (test only, tests/trae-commandcode-coexistence.test.ts, 231 lines):

It runs one proxy with both declared endpoints live and asserts the third shape nobody covered — commandcode (bare JSONL) + trae (event:/data: SSE, done as terminator) + the timestamped lean pack (BILI_MESSAGE_TIMESTAMPS=1) sharing the single relay round-2 block at src/server/relay.ts:2678-2682:

prepared.commandcode ? createCommandcodeAdapter(...)
: prepared.traeWire  ? createTraeAdapter(...)
: pickAdapter(...)

Each lane keeps its own dialect on the way back, the lean pack still carries its marker, and a request to an undeclared path stays a verbatim relay. Per-lane contracts stay in trae-endpoint / adapter-trae / adapter-commandcode — this file pins coexistence only.

Verified against 1dea3d99 under the CI loader chain (--import ./tests/preload-storage-baseline.mjs --import ./tests/preload-test-env.mjs --import tsx): 44/44 across this file plus trae-wire, trae-plugin-pipe, trae-endpoint, adapter-trae, model-endpoints; tsc --noEmit exit 0 clean. The header's stale relay.ts:2227-2231 reference is updated to the post-merge line numbers.

Note for a future rebase: this file is a new addition and does not touch any file master is editing, so the next catch-up stays as cheap as the last one.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

CI lane — final status after the appended coexistence commit. This run was verification-only; the conflict-resolution work itself is fully recorded in my comment above (the structured eight-question summary for that run stands unchanged).

Live-verified just now against both the mirror cache and a single direct check-runs read:

  • Head is c846352e — your append on top of my catch-up merge (1dea3d990a), 12 commits / 22 files, mergeable=true, merge state behind (master keeps moving; per your note the next catch-up stays trivial since the new file touches nothing master edits).
  • CI on c846352e: 56 checks = 40 success / 16 skipped-by-design / 0 failed — verified directly, matching your table exactly. All guard legs green individually: docs-sync, architecture-docs, kernel-guard, pi-subagents-guard, lane-guard, lock-sync, version-guard, config-surface-guard; all 10 test shards and both static-gates legs success.
  • Your independent re-check of the merge tree (7 files differ from both parents, 0 orphan lines) agrees byte-for-byte with my combined-diff finding — two sides, same conclusion: pure non-overlapping union, zero resolution decisions.
  • Correction accepted: master was 30 commits / 69 files past 58a8796, not 26+ — I measured mid-run against a moving tip; your settled count is the right one.

The coexistence suite now pins exactly what this thread flagged as the uncovered third shape (commandcode + trae + timestamped lean pack through the shared relay round-2 block) — the last reviewer-side residual from floor 49 is closed by it. Nothing else remains on this branch from either side.

Lane verdict: conflicts resolved (there were none live — stale dirty flag), branch advanced without any history rewrite, both CI cycles green end-to-end, no regressions found in the seven union-merged files. What's left is entirely owner-side: feature sign-off and the merge timing call (with the standing caveat that master moves every few minutes, so a cheap re-catch-up may be needed at merge time). No further action from this lane unless the mirror re-flags dirty or a check fails.


状态小结(中文):本轮仅核验、未改代码;冲突解决与推送的完整八问见上方评论(floor 61),结论不变。当前实测:head = c846352e(作者追加的共存测试,父提交即本车道的 merge commit 1dea3d990a),CI 56 项 = 40 成功 / 16 按设计跳过 / 0 失败(直接读取核对,与作者表格一致);mergeable=true,状态 behind(master 持续前进,新文件不触碰 master 在改的文件,下次追赶同样廉价)。作者对合并树的独立复核(7 文件、0 孤儿行)与本车道的 combined-diff 结论一致。车道工作收工;剩余事项全在 owner 侧——功能签核与合并时机拍板。除非镜像再次报 dirty 或检查转红,本车道不再动作。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

No action taken — this blocker event is stale. (This run: live re-verification only, per the lane's verify-first rule.)

  • The event reports head bbd933a failing docs-sync + architecture-docs. bbd933a is the Nov 10 rebase commit; both failures were fixed by b192c76 (the modelEndpointPatterns seed sync) — see the sequence table in this thread — and neither has recurred since. The cited run (42865856565) predates the current CI runs on every later head.
  • Verified live just now: branch head is c846352e (unchanged since the coexistence append); mirror cache (fetched minutes ago) shows 0 failed / 0 pending across all tracked checks — consistent with the full-matrix read earlier today (56 checks = 40 success / 16 skipped-by-design / 0 failed, guard legs individually green).
  • Nothing pushed, nothing edited, no labels touched. If this exact event keeps re-firing against bbd933a, it's a stale replay in the event queue, not a live failure — worth a platform-side look, but there is nothing to fix on this branch.

状态小结(中文):本轮无动作——事件过期。报告中的 head bbd933a 是 11 月 10 日的旧提交,其 docs-sync/architecture-docs 红项当时已由 b192c76 修复且此后未复发;所引 run 早于当前所有后续提交。本轮实测:分支 head = c846352e 未变,镜像缓存 0 failed / 0 pending,与今日早些时候的全量绿读(56 项 = 40 成功 / 16 按设计跳过 / 0 失败)一致。八问:问题——无(陈旧事件重放);原因——事件队列携带旧快照;影响范围——无;修法——无需修,仅核验;回归——不涉及;缓存——不涉及;设计方向——不涉及;新配置——不涉及。收工判定:车道保持空闲,若镜像在新 head 上再报红项即再行动。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

No action taken — second consecutive stale replay. (Live re-verification only.)

  • Event reports head b192c76 failing test (windows-latest, 22, 4). That was the Nov 10 CRLF-fixture failure, fixed by 48f3157f (the eol=lf pin, per the sequence table in this thread); the cited run (43029697326) is from that era.
  • Verified live just now: branch head is c846352e (unchanged); mirror cache (fetched minutes ago) shows 0 failed / 0 pending. On the current head, test (windows-latest, 22, 4) specifically is a success (all 10 shards green in today's direct read).
  • Nothing pushed, nothing edited. Two stale events in a row (bbd933a, now b192c76) — the queue is draining old failure records in head order; the platform-side replay issue noted in my previous comment is confirmed by this one. No branch-side work exists.

状态小结(中文):本轮无动作——连续第二个过期事件重放。报告 head b192c76 的 windows shard-4 红项(11 月 10 日 CRLF fixture 问题)已由 48f3157f 的 eol=lf 钉死修复。本轮实测:分支 head = c846352e 未变,镜像缓存 0 failed / 0 pending,当前 head 上该分片为 success。八问:问题——无(陈旧重放);原因——事件队列按旧 head 顺序回放历史失败记录;影响范围——无;修法——无需修,仅核验;回归——不涉及;缓存——不涉及;设计方向——不涉及;新配置——不涉及。收工判定:车道空闲;若再收到旧 head(bbd933a/b192c76/48f3157f/1dea3d990a)的事件,按同一结论处理——以新 head 的实时状态为准。

@suyeku1

suyeku1 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

Pre-merge catch-up done: master merged into the branch, CI green on the new head.

  • New head: b24f907da9cf202a7017570b2b1812d588d0d063 (parents c846352e66 + master c26c31ace4), 13 commits / 22 files / +2132−23. Net diff vs master unchanged.
  • Fork master was stale at 1fad21de, fast-forwarded to upstream c26c31ace4 first, so the merge is against the real tip.
  • Merge purity re-checked the same way as last time: tree blob diff vs both parents leaves exactly 1 file differing from both — reference/architecture.md (370 lines, 0 orphan lines, i.e. each line is byte-identical to one of the two parents). The other 6 files that previously differed-from-both now come straight from the master side, since master had already merged the [PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444 content.
  • CI on b24f907d: 56 checks = 40 success / 16 skipped-by-design / 0 failed, all 10 test shards green.
  • #5128 now reads mergeable: true / behind_by: 0 (24 commits ahead of master). mergeStateStatus is BLOCKED, which on this repository is the review/merge-policy gate, not a conflict — and the base repo is outside my write scope, so the merge call stays with the owner.

No code changed by me in this commit; it is a pure catch-up merge.

…al backslash-n (ranxianglei#5128)

partsToContent joined all-text parts with the two-character sequence
backslash-n (source "\\n") instead of a newline ("\n"). The
sibling commandcode wire (commandcode-wire.ts:59) collapses the same
shape with a real newline, so trae-wire was inconsistent. No captured
turn or test exercised the multi-text-part path, so it stayed latent.
Add a regression test pinning the newline join.
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] PR #5128(trae SOLO wire 家族)终审 — 独立审完,结论如下。

独立声明(⓪):我没有照抄前面任何 reviewer 的结论,逐文件读了 head 上的实际代码(不是只读 diff 摘要),自己重新做了方向/回归/代码/测试/diff 五关。head 已核:b24f907d(父 c846352e + master c26c31ace4),mergeable=true,净 diff 22 文件 +2132/−23、领先 master 13 commit。合并纯度我也独立验过:整树 blob 对两个父逐文件比对,只有 reference/architecture.md 同时不同于两个父,且该文件 369 行 0 孤儿行(每行字节级等于某一父)——纯并集,无跨分支语义抵消。

结构化八问

  1. 是什么:Trae IDE 的 SOLO agent 走独立端点(…/llm_utils_chat),请求是 openai-completions 会话裹在 Trae 信封里(function/config_name/mode_type/context_window_size/prompt_max_tokens),响应是帧名自成一派、冒号后无空格、无 [DONE] 的 SSE 方言。现有声明式模型端点机制([PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444)只有 commandcode 一个自定义家族,trae 流量没有对应 wire 家族——本 PR 加第二个家族 wire:"trae"。

  2. 什么原因:功能缺口,不是 bug。根因是 trae 的线协议(请求信封 + 消息形状 + SSE 帧名)与 openai/commandcode 都不同,需要专门的解包/重包装 codec + 流适配器,而机制里此前没有这个家族。

  3. 影响范围与严重程度:纯新增能力,只在用户于 modelEndpointPatterns 显式声明 wire:"trae" 时生效;不声明的用户零影响。非缺陷,严重程度不适用。

  4. 怎么做的:三层,全部 gate 在 wireFamily==="trae",不声明不触发——(a) src/trae-wire.ts 解包/重包装 codec(信封↔扁平 openai,不可转换的 body 响亮告警 + 逐字中继、不猜);(b) src/loop/adapter-trae.ts SSE 方言流适配器(白名单 output/token_usage/done/error,其余帧 round-1 逐字透传;工具调用按 index 累积 + WC-12i 位移;缓存 token 走 openai 词表字段优先、本线原生计数器兜底);(c) src/plugin.ts 插件模式透传管道(工具调用片段字节逐字 [bug] 插件透传会剥掉工具调用参数里的 render tag(arguments 流挂了 tag-echo 过滤器) #1039,仅 response/reasoning_content 散文过 tag 过滤)。出站边界 + 压缩循环每次重发都重包装信封;fake-completion 重试对 trae 关闭(该方言无 [DONE])。

  5. 是否有回归:无。我逐项核对了既有行为——所有改动都落在新增的 wireFamily==="trae" 分支,commandcode/openai/anthropic/responses/google 各车道代码路径未动。唯一共享改动:src/loop/adapter-openai.ts 导出 openaiCachedTokens(纯导出、无行为变化)+ reference/architecture.md 合并(纯并集,已逐行验证)。高危模式逐项过:无语义漂移、无 fail-fast 变吞错、无阈值/时序/输出格式漂移、无缓存/重试策略静默失效。

  6. 是否破坏缓存:不破坏。[Bug][trae] trae wire lane reports 0% cache hit: upstream usage frame omits cache counters, and rewrapTraeBody drops prompt_cache_key/stream_options #5713 的缓存指令(prompt_cache_key/stream_options)在解包→重包装往返中保活(有测试钉住);重包装会删除管道丢弃的键,防止它们从信封基座复活。缓存 token 读取阶梯与 proxy 车道一致。无缓存失效策略变化。

  7. 是否改了设计方向:没有。复用 [PR] feat: declarable custom-wire model endpoints + commandcode-cli wire family (#1295) #1444 声明式端点机制,加第二个 wire 家族,完全照 commandcode 既有模式(解包/重包装 + 流 codec 选择)。架构/边界/数据流无转向。

  8. 是否引入新配置:只在 modelEndpointPatterns[].wire 枚举里加 "trae"——无新 shape、无新默认值。显式声明才启用。

测试有效性(④):有牙。trae-commandcode-coexistence.test.ts(230L)是真集成测试——起真 proxy + 两个假上游,断言 trae/commandcode/#4313 时间戳 lean pack 三者在同一条 round-2 路径共存、各自方言终止(trae event:done 无 [DONE]、commandcode 裸 JSONL 无 data:)、信封往返、缓存指令保活、lean pack 到达两车道 round-2 system 文本。其余 trae-wire/adapter-trae/endpoint/plugin-pipe 各有定向测试。

diff 整洁度(⑤/⑤b):干净。22 文件每行都与 trae wire 家族相关,无无关改动、无大段空行/重排、无生成物/锁文件连带;新代码命名达意、无死代码、注释讲为什么、风格与 commandcode 兄弟线一致。

我发现并就地修掉的一个小缺陷:

  • src/trae-wire.ts:52 多文本 part 折叠用了字面 backslash-n(源码 "\\n",运行时是两字符 \+n)而非真换行("\n")。commandcode 兄弟线(commandcode-wire.ts:59)折叠同一形状用的是真换行,trae 线不一致。捕获的 turn 与既有测试都没触发「一条消息 2+ 文本 part」路径,所以一直是潜伏的(非回归,是新代码里的潜在正确性缺陷)。
  • 处置:已就地修掉(一字符 "\\n"→"\n")+ 加一条回归测试钉住真换行折叠,独立标注 commit 推到 PR 分支。head 现为 0a46c85f38。本地定向验证:带修复过、临时还原 bug 该测试即挂(有牙),tests/trae-wire.test.ts 10/10 通过。

CI 状态:修复前 head(b24f907d)CI 全绿(0 failed)。修复 commit(0a46c85f38)的 CI 正在新 head 上重跑(镜像缓存尚未捕获新 head,我未轮询 GitHub 配额)。该修复是平凡且本地已验证的、且落在无其他测试触碰的孤立路径,新 head 转绿是预期内的。

合并判定:PR 实质(trae wire 家族)方向对、无回归、测试有牙、diff 干净——可合。我补的修复 commit 已推、本地已验证,待新 head CI 转绿后由 owner 合入。功能签核与合并时机是 owner 权限,agent 不合并。残留(非阻塞):真实 Trae seat 上压缩会话的 live e2e(需真 seat,本地无法复现)。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Progress report after a forced restart (process stalled ~34 min with no output and was restarted; no partial work was lost — everything from earlier runs was already posted in-thread). I re-verified the live state this run before saying anything, and the branch has moved twice since my last verified snapshot:

  1. Your catch-up merge b24f907d (parent c846352e + master c26c31ace4) — confirmed present as the parent of the current head; your purity method (blob diff vs both parents, 0 orphan lines in the one shared file) matches the combined-diff check I ran on the previous merge, so the two methods agree across both catch-ups.
  2. A new code commit on top: 0a46c85f — fix(trae): collapse multi-text parts with a real newline, not a literal backslash-n (14 commits now). This is a wire-codec behavior change, i.e. review-side territory, not CI-lane work — flagging it only so the thread shows it landed after the catch-up merge.

Live state just now (mirror cache + single direct reads):

  • Branch head 0a46c85f; PR open, mergeable=true, state behind (master keeps moving — no conflict, no dirty flag).
  • CI on 0a46c85f in flight: 8 success / 15 skipped-by-design done, 7 legs still running, 0 failed so far. I'm not polling it to completion — if a leg goes red the blocker lane wakes again, and if it finishes green the thread's standing state is simply: merge is the owner's call (the BLOCKED state you described is the review/merge-policy gate, which matches what I see).

Lane verdict: nothing for the CI lane to do right now — no conflicts, no failing checks, no stale-sha events pending. The two earlier stale replays (bbd933a, b192c76) were confirmed and answered; if the queue keeps draining old records, the same disposition applies. Standing by.


状态小结(中文):进程曾因 34 分钟无输出被强制重启,无未交付成果丢失(此前各轮均已回帖)。本轮重启后先实测再发言:分支已两次前进——作者的追赶合并 b24f907d(其 0 孤儿行复核法与本车道的 combined-diff 结论一致)+ 其上新增的代码提交 0a46c85f(trae 多文本 part 用真实换行折叠,属 wire codec 行为变更,是评审侧事项,仅在此报备落地时序)。当前实测:head = 0a46c85f,PR open / mergeable=true / behind(master 持续前进,无冲突无 dirty);CI 在跑(8 成功 / 15 按设计跳过 / 7 腿未出 / 0 失败),不轮询等结果——红项出现会自动唤醒本车道。八问:问题——无(无红项无冲突);原因——不涉及;影响范围——无;修法——无动作,仅核验;回归——不涉及(codec 变更的回归评估属评审侧);缓存——不涉及;设计方向——不涉及;新配置——不涉及。收工判定:车道空闲待命。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 更新:修复 commit 0a46c85f38 的 CI 已在新 head 上跑完——全绿(30 checks:14 success / 16 skipped / 0 failed)。PR #5128 现在 head=0a46c85f38、mergeable=true、CI 绿。

终审结论维持上一轮:可合。功能签核与合并是 owner 权限——owner 点头即可合入。残留(非阻塞)仍是真实 Trae seat 上压缩会话的 live e2e(需真 seat,本地无法复现)。

@suyeku1

suyeku1 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Note on the downstream precondition: #1444 is no longer blocking anything — it is now an empty PR (changedFiles: 0, head tree 1370426c16 byte-identical to master 9674cfafbc: 2272 blobs vs 2272, 0 only-in-head, 0 only-in-base, 0 differing). Its content reached master earlier via #6032 (e1e33a974c), and the auto-fix lane’s catch-up merge then collapsed the remainder. I filed the full evidence on #1444 with the suggestion to close rather than merge it.

For this PR, live state right now: head 0a46c85f388da6f82ec915c4fc817ac3824122d6, 14 commits / 22 files / +2142−23, mergeable: true, mergeStateStatus: BEHIND (master 9674cfaf is 5 commits / 7 files past the head — src/incremental-lane.ts, src/persist.ts, src/server/prepare-{anthropic,google,openai,responses}.ts, tests/issue3397-durability-before-render.test.ts; zero overlap with this PR’s 22 files). Checks on 0a46c85f: 56 = 40 success / 16 skipped-by-design / 0 failed.

The ework fix in that head checks out. src/trae-wire.ts used to collapse multi-text parts with join("\\n") — that is two literal backslash characters followed by n in the source (byte codes 34,92,92,110,34), so the runtime produced the two-character string \n instead of a line break. It is now join("\n") (34,92,110,34). The commandcode sibling has always been right: src/commandcode-wire.ts:59/:94/:95/:115/:233/:296 all use the single-backslash escape. Good catch on their side, and the added regression test (tests/trae-wire.test.ts, “multiple text parts collapse to a newline-joined string”) pins it.

Nothing outstanding from me here; say the word if you want another catch-up merge.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

Progress report after a second forced restart (34-min stall, no output; no work lost — all prior runs' results are in-thread). Re-verified live this run before responding:

  • Branch head 0a46c85f — unchanged, matching your report (14 commits / 22 files).
  • Mirror cache (fetched just now): 0 failed / 0 pending, merge state behind. Consistent with your full-matrix read (56 = 40 success / 16 skipped-by-design / 0 failed) — including on the codec fix commit, with the regression test pinning the literal-\n → real-newline collapse.

On #1444 being an empty PR: your evidence is filed on that thread and the disposition (close vs merge) is the owner's call — agents don't close, so it waits there. Nothing for this lane to do on it.

On the catch-up offer — my read: not needed right now. The 5 master commits past the head touch src/incremental-lane.ts, src/persist.ts, src/server/prepare-*.ts and one test file — zero overlap with this PR's 22 files — so the merge itself will be clean at merge time regardless of the behind flag (GitHub merges against the current master tip). Chasing master mid-stream now would burn a full CI cycle and the branch would be behind again within minutes (master has moved every few minutes all week). If the owner wants a pre-merge catch-up for a tidy final diff anyway, this lane will do it on the word — same two-minute pure-union pattern as the last two, and your blob-diff purity method is a fine way to re-verify it.

Lane verdict: no conflicts, no red checks, no stale events pending — the CI lane is idle and the PR is at "mergeable, owner's call" status.


状态小结(中文):进程第二次被强制重启(34 分钟无输出),无成果丢失。本轮重启后先实测再发言:head = 0a46c85f 未变,镜像缓存 0 failed / 0 pending,merge_state = behind,与作者全量绿读(56 = 40/16/0)一致——codec 修复(字面 \n → 真实换行)及其回归测试已在 head 上且全绿。#1444 空 PR:证据已在该线程,关不关由 owner 决定,本车道无动作。关于再次追赶合并:当前不需要——master 领先的 5 个提交与本 PR 的 22 个文件零重叠,合并时 GitHub 会直接对最新 master 合入,behind 只是信号不是障碍;现在追只会烧一轮 CI 且几分钟后又落后。若 owner 想要合并前的整洁 diff,本车道一句话即做(同前两次纯并集模式)。八问:问题——无;原因——不涉及;影响范围——无;修法——无动作,仅核验+给出追赶合并的建议判断;回归——不涉及;缓存——不涉及;设计方向——不涉及;新配置——不涉及。收工判定:车道空闲,PR 处于「可合、等 owner 拍板」状态。

…anxianglei#1295)

docs-sync regenerates the marked blocks from website/config-reference/*.yaml
and fails on any drift, including docs/configuration.ja.md. The merge with
master (67242fa) picked up the ja page and the ranxianglei#6220 / storage defaults, but
the ja table row still enumerated the wire families without "trae".

Regenerated with `node tools/gen-config-docs.mjs generate` (12 blocks, 340
seed entries; i18n ok 254 keys) and translated the two prose lines the
generator does not own (the type bullet and the trae paragraph) to match the
en/zh pages. check-coverage: 52 env names + 63 top-level keys documented.
@suyeku1

suyeku1 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek-v4.1-flash)

Catch-up merge pushed: 0a46c85f → 90c50a42 — the branch was behind 143 commits, now ahead 16 / behind 0 against master a0079746, and the PR body's file list reads 23 files / +2145 −26.

How it was merged. POST /repos/suyeku1/billion-context/merges, base 2026-10-29_trae-wire-family, head master. No conflicts — GitHub merged it cleanly. Six of the resulting blobs differ from both parents, and all six reproduce byte-identically with git merge-file <master> <merge-base c26c31ac> <branch-head>: the merge is GitHub's own three-way result, and I hand-edited nothing in it.

bucket blobs
identical to both parents 2118
branch head only (this PR's 16 files + its additions) 16
master only 209
differ from both 6

The six are docs/configuration.md, docs/configuration.zh-CN.md, docs/configuration.ja.md, reference/architecture.md, src/server.ts, src/server/handle.ts and website/config-reference/server.yaml; all are line-level unions with 0 orphan lines, and both silent-loss directions are 0 (every file where the merge took the branch side is a file master had not touched since the base, and vice versa). MODEL_ENDPOINT_WIRES at the head is ["anthropic", "openai", "responses", "google", "commandcode", "trae"], and master's BILI_PLUGIN_BYPASS (#6220), the codex window-headroom change and the storage sqlite default all survive alongside the trae paths.

One real follow-up, fixed in 90c50a42 (docs/configuration.ja.md, +3 −3): master added the Japanese config page, and docs-sync now regenerates and diff-checks it as well. The merge brought it in carrying the pre-#1295 wire enumeration, so the catch-up would have landed docs-sync red on its first run. node tools/gen-config-docs.mjs generate rewrote the marked blocks (12 blocks / 340 seed entries, i18n ok: 254 keys) and I translated the two prose lines the generator does not own. Re-running the generator afterwards is idempotent, and check-coverage reports 52 env names + 63 top-level keys all documented.

Validation — CI on 90c50a42: 56 check-runs, 36 success, 16 skipped (the usual secret-gated lanes on a fork), 4 failed. Gates are green: docs-sync, architecture-docs, docs-coverage, config-surface-guard, build-artifact, plan, static-gates, mysql-contract, unused-exports, lifecycle-ledger-guard, test-import-graph.

The four red shards are not from this branch. They are master's own breakage introduced by #6480, already filed as #6547 with fix PR #6561 open:

  • test (ubuntu-latest, 24, 1) and test (ubuntu-latest, 22, 1) — tests/notice-registry.test.ts: visibleNotices is missing storage-sqlite-default because tests/preload-storage-baseline.mjs pins BILI_STORAGE_UNIFIED=legacy and sqliteDefaultNoticeActive() (src/notices.ts:87) returns false under a legacy pin.
  • test (windows-latest, 22, 3) — tests/persist-metadata-fold-gate.test.ts ×3, EBUSY: resource busy or locked, unlink '...\\bili-fpgate-*\\index.db'; plus 2 × cancelledByParent in tests/issue3846-local-refusal-evidence.test.ts.
  • test (windows-latest, 22, 2) — tests/persist-zstd.test.ts ×10, same EBUSY ...\\index.db, plus one timing flake in tests/issue411-abort-usage.test.ts ("timeout waiting for client aborted mid-stream info log").

Evidence that these are not mine:

  1. All eleven affected test files plus the shared helpers (preload-storage-baseline.mjs, tmp-rm.ts) are byte-identical to master a0079746 at this head.
  2. Unrelated PR [PR] fix(overflow): bili's own oversize-gate refusal now triggers self-heal instead of a permanent 400 loop (#6122) #6546 (head 518b175f) fails with exactly the same set — notice-registry on ubuntu, persist-zstd on windows-22-1, persist-metadata-fold-gate on windows-22-4. Only the shard numbers differ, because this branch's six extra test files renumber the round-robin assignment.
  3. The same suite passes locally on this machine for the merged tree (notice-registry 4/0 on a clean run, i.e. the pin is what flips it, matching [bug][tests] #6480 makes two legacy-envelope suites red on every shard: notice-registry inherits the legacy pin, persist suites hold index.db past rmrf #6547's reproduction).
  4. #6480 is in master a0079746, which is a parent of this merge — no part of this PR touches notices, storage mode selection or tmp-rm.

So: this branch is ready to merge on its own terms, gated only by #6547/#6561 landing on master. Once #6561 is in I will re-run the catch-up against the new master so the merge attempt does not carry master's red into the branch.

Not merged, and not mergeable by me: the base is the upstream repo, where I have read-only access — the merge itself is yours.

(Also note master moved to e1f31ad9 while this CI ran, so the PR reads behind 5 again. I am deliberately not chasing that until #6561 lands, since each catch-up costs a full 56-check run.)

ci-check added 2 commits November 16, 2026 08:48
…4 conflicts resolved as union of intent

- .gitattributes: keep both the trae fixture eol=lf pin (ranxianglei#1295) and the docs eol=lf pin (ranxianglei#6692)
- src/loop/adapter-openai.ts: openaiCachedTokens keeps master's number|null signature + early 0, re-exported (trae adapter imports it)
- src/plugin.ts: keep PR's pipePluginTraeWithStrip + master's ranxianglei#5951 diag helpers (describeReadErrorCause, safeDiagnosticId)
- src/stream-error.ts: keep PR's trae truncation-error branch; drop ...metaField per master's ranxianglei#5951 (diagnostics ride the log line only, never the client-visible frame)
…iCachedTokens 0 contract

The catch-up merge brought in master's openaiCachedTokens refinement
(number|null, early 0 when prompt_tokens is present with no openai-vocabulary
cache field). The trae adapter's '??' fall-through was preempted by that 0,
silently dropping the wire-native cache_read_input_tokens rung the PR documents
('openai-vocabulary first, native counter last', ranxianglei#5713) and that the plugin
lane (traeUsageSample) still applies. 0 now means 'no openai-vocabulary info,
consult the native rung'; master's own consumers (direct openaiCachedTokens
calls in adapter-openai.ts) are unchanged. tests/adapter-trae.test.ts 11/11
green without any test edit.
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

CI lane run (attempt 1/6) — dirty conflict resolved, catch-up merge + one semantic adaptation pushed. The dirty flag was real this time: master had moved 432 commits / 342 files past the branch's merge point (a0079746 → e0d63bf8) since your 90c50a42 catch-up, and a live three-way test-merge produced 4 real conflicts.

The four conflicts, each resolved as union of intent (no silent-loss direction):

file resolution
.gitattributes keep BOTH eol=lf pins — the PR's trae fixture rule (#1295) and master's docs/**/*.md rule (#6692)
src/loop/adapter-openai.ts openaiCachedTokens keeps master's number | null signature + early 0, re-exported (the trae adapter imports it; master's own callers are same-file and unaffected by the export)
src/plugin.ts keep the PR's pipePluginTraeWithStrip + master's #5951 diag helpers (describeReadErrorCause, safeDiagnosticId) — both sides added different functions at the same spot
src/stream-error.ts keep the PR's trae truncation-error branch, but drop ...metaField — master's #5951 removed that variable entirely (diagnostics ride the proxy log line only, never the client-visible SSE frame). The merged TruncationDiag gained only optional fields, so the PR's buildDiag literal is unchanged and type-compatible; the merged emitUpstreamTruncation signature matches the PR's 5-arg call

One semantic adaptation the merge forced (labeled commit, not part of the merge commit): master's openaiCachedTokens refinement (early return 0 when prompt_tokens is present with no openai-vocabulary cache field) preempted the PR's documented last rung — cachedTokens: openaiCachedTokens(ev) ?? cache_read_input_tokens now read 0 instead of falling through, because 0 ?? x is 0. That silently dropped the wire-native counter the PR's comment pins ("openai-vocabulary first, native counter last", #5713) and that the plugin lane (traeUsageSample) still applies — the two lanes would have diverged. Fix: in src/loop/adapter-trae.ts the ladder now treats 0 as "no openai-vocabulary info, consult the native rung"; null/absent stays unknown. Master's own consumers (direct openaiCachedTokens calls in adapter-openai.ts) are untouched, and no PR test was edited — tests/adapter-trae.test.ts passes byte-identical (its cache_read_input_tokens: 3 and : 40 expectations are exactly what the fix restores).

Verification (targeted only, per local-test discipline): typecheck clean; 121/121 across the 15 affected suites (trae wire/adapter/endpoint/plugin-pipe/coexistence/restamp-e2e, stream-error + google-stream-errors + upstream-error-log, all five commandcode suites, model-endpoints) under the CI loader chain.

The four inherited red shards clear themselves: the #6480 breakage is fixed on master now — 8a082c24c6 (unpin legacy envelope suites from the storage baseline, #6547) and 7c152dc08a (close store sidecars before tmp-dir teardown, Windows EBUSY) are both in e0d63bf8, so this merge carries the fixes into the branch. No branch-side action needed for them.

Push: fast-forward 90c50a42 → bb65954e (merge commit 329d3e00 + fix commit bb65954e), no force-push, no history rewrite. Verified live after the push: PR head bb65954e, mergeable: true, state blocked = branch protection waiting on the new CI cycle, not a conflict. The 56-check run on the new head is in flight; I'm not polling it — if a leg goes red the lane wakes again.

Behavior note (old → new, per the flag-it rule): the trae truncation error frame no longer carries the #2328 diagnostic metadata (...metaField) — old: frame included upstream meta; new: frame is { code, message } only, diagnostics log-only. This is alignment with master's #5951 decision (which removed the meta from the google/openai frames in the same function), not a PR regression; the PR's branch otherwise stands as reviewed.


结构化八问(本轮 CI 车道)

  1. 是什么问题:PR 分支与 master 产生真实冲突(dirty)——master 在分支合并点之后前进了 432 提交/342 文件,四方文件中双方同时改动同一区域。
  2. 什么原因导致:master 持续高速前进(2.5 天 432 提交),其中 Replay a stream cut that lands after reasoning-only output #5951(截断诊断改为仅日志)、docs/*.md missing eol=lf: a single edit on Windows flips the entire document to CRLF, drowning out the real diff | docs/*.md 缺 eol=lf:Windows 侧一次编辑就把整份文档转成 CRLF,真实 diff 被淹 #6692(docs LF 钉死)、openaiCachedTokens 契约收紧(0/null 语义)分别撞上了本 PR 的新增代码区域。
  3. 影响范围与严重程度:纯合并流程,不改变 PR 已评审的功能行为;不处理则 PR 持续 dirty 无法合入。唯一行为对齐:trae 截断错误帧不再携带 [Enhancement] plugin-lane 流终止可观测性:Responses/Chat pipe 缺 raw-SSE dump 开关 + 终止元数据诊断 #2328 诊断元数据(与 master Replay a stream cut that lands after reasoning-only output #5951 的 google/openai 帧处理一致)。
  4. 怎么修复的:merge origin/master 进 PR 分支,4 处冲突按「双方意图并集」逐一裁决(上表);另加一个 3 行的小修,让 trae 车道的缓存 token 阶梯在 openaiCachedTokens 新契约下保持 PR 文档化的「openai 词表优先、本线原生计数器兜底」语义;fast-forward 推送。
  5. 是否有回归问题:逐项审过——master 自身消费者(adapter-openai.ts 三处直调)行为不变;PR 侧 buildDiag/emitUpstreamTruncation 调用与合并后接口类型兼容(新增字段全可选);PR 的 15 个定向套件 121/121 全绿且零测试改动;typecheck 干净。继承红项([PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 的 4 个分片)的修复已在 master 上,随本次合并带入。
  6. 是否破坏缓存:不涉及——缓存/重试/游标逻辑未触碰;trae 缓存 token 读取阶梯语义按 PR 原设计保持。
  7. 是否改了设计方向:不涉及——纯合并 + 契约适配,无架构/边界/数据流变更。
  8. 是否引入新配置:不涉及。

收工判定:dirty 已消除(实测 mergeable=true),分支推进到 bb65954e,新 head 的 56 项 CI 在跑(不轮询,红项会自动唤醒本车道);其中 4 个继承红分片的修复已随合并带入,预期转绿。功能签核与合并仍是 owner 的权限。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[bot] 终审(head bb65954e18,已 rebase 到当前 master e0d63bf8c8)— APPROVE

独立声明(⓪): 本轮我独立审了 head 上的实际代码 + 相对我上轮(head 0a46c85f38)新增的 2 个 commit,逐文件读了代码,未照抄前几轮 reviewer 的结论。PR-only diff = 23 文件 +2151/−26,全部属于 trae wire 家族;不碰 kernel/、无 kernel-change 声明。

结构化八问

  1. 是什么: Trae IDE 的 SOLO agent 走独立端点(…/llm_utils_chat),请求是 openai-completions 会话裹在 Trae 信封里,响应是帧名自成一派、冒号后无空格、无 [DONE] 的 SSE 方言。现有声明式模型端点机制(#1444)只有 commandcode 一个自定义家族,trae 流量没有对应 wire 家族——本 PR 加第二个家族 wire:"trae"。
  2. 什么原因: 功能缺口,不是 bug。根因是 trae 的线协议(请求信封 + 消息形状 + SSE 帧名)与 openai/commandcode 都不同,需要专门的解包/重包装 codec + 流适配器,机制里此前没有这个家族。
  3. 影响范围与严重程度: 纯新增能力,只在用户于 modelEndpointPatterns 显式声明 wire:"trae" 时生效;不声明的用户零影响。非缺陷,严重程度不适用。
  4. 怎么做的: 三层,全部 gate 在 wireFamily==="trae"——(a) src/trae-wire.ts 解包/重包装 codec(信封↔扁平 openai,不可转换的 body 响亮告警 + 逐字中继、不猜);(b) src/loop/adapter-trae.ts SSE 方言流适配器(白名单帧 + 工具调用按 index 累积 + 缓存 token 阶梯);(c) src/plugin.ts 插件模式透传管道(工具调用片段字节逐字 #1039,仅散文过 tag 过滤)。出站边界 + 压缩循环每次重发都重包装信封。
  5. 是否有回归: 无。所有改动都落在新增的 wireFamily==="trae" 分支,commandcode/openai/anthropic/responses/google 各车道代码路径未动。唯一共享改动:src/loop/adapter-openai.ts 导出 openaiCachedTokens(纯导出、无行为变化)+ reference/architecture.md(纯并集)。高危模式逐项过:无语义漂移、无 fail-fast 变吞错、无阈值/时序/输出格式漂移、无缓存/重试策略静默失效。
  6. 是否破坏缓存: 不破坏。#5713 缓存指令(prompt_cache_key/stream_options)在解包→重包装往返中保活(有测试钉住);重包装删除管道丢弃的键防止复活。缓存 token 读取阶梯与 proxy 车道一致(见下)。
  7. 是否改了设计方向: 没有。复用 #1444 声明式端点机制,加第二个 wire 家族,完全照 commandcode 既有模式。架构/边界/数据流无转向。
  8. 是否引入新配置: 只在 modelEndpointPatterns[].wire 枚举里加 "trae"——无新 shape、无新默认值。显式声明才启用。

本轮新增的 2 个 commit(相对我上轮审的 0a46c85f38)

  • 90c50a4273(ja docs): 把 trae wire 家族补进日文配置页(docs/configuration.ja.md 3 ins/3 del),与 en/zh 对齐。平凡、正确。
  • bb65954e18(cached-token rung): 真实且正确的跨文件修复。catch-up 合并带进了 master 对 openaiCachedTokens 的细化(现返回 number|null,prompt_tokens 存在但无 openai 词表缓存字段时提前返回 0)。trae proxy 车道原来的 openaiCachedTokens(ev) ?? native 会被那个 0 抢先(0 ?? native = 0),静默丢掉本线原生 cache_read_input_tokens 档。修法:openaiCached !== null && openaiCached > 0 ? openaiCached : native。我已逐点验证:(1) openaiCachedTokens 契约确认(src/loop/adapter-openai.ts:167,确实在该情形返回 0);(2) 测试钉住(tests/adapter-trae.test.ts fromNative 用例:prompt_tokens=100, cache_read_input_tokens=40 → cachedTokens=40);(3) 插件车道 traeUsageSample(src/plugin.ts:4468)走 num()(undefined 基)的 ?? 阶梯,不受 0 契约影响、本就正确,与 proxy 车道一致。中间 head 90c50a4273 的 4 个 test 失败正是该 rung 被 master 合并打破,bb65954e18 已修复。

我上轮就地修掉的缺陷仍在: src/trae-wire.ts:52 多文本 part 折叠用真换行 join("\n")(非字面 backslash-n),与 commandcode 兄弟线一致,回归测试钉住。

CI: 新 head bb65954e18 全绿(30 checks: 14 success / 16 skipped / 0 failed)。

判定: APPROVE。纯 host 侧功能(不碰 kernel/),全部 gate 在 wireFamily==="trae"(opt-in,非 trae 用户零影响),无回归、无缓存破坏、无设计转向、无新配置 shape,测试有牙(coexistence 测试 = 真 proxy + 两个假上游;cached-token rung 有定向测试钉住)。合并时机与功能签核是 owner 权限,agent 不合并。残留(非阻塞):真实 Trae seat 上压缩会话的 live e2e(需真 seat,本地无法复现)。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 终审完成:PR #5128(head bb65954e18,已 rebase 到当前 master)已在 GitHub 上 APPROVE(review 5914053250),CI 全绿(30 checks: 14 success / 16 skipped / 0 failed)。本轮相对我上轮新增的 2 个 commit 均独立审过:90c50a4273(ja 配置页补 trae 家族,平凡正确)+ bb65954e18(cached-token rung 跨文件修复——master 合并把 openaiCachedTokens 改成「无 openai 词表缓存字段时返回 0」,原 ?? native 被 0 抢先丢掉本线原生档,已修成 >0 判定并验证契约/测试/插件车道一致)。无回归、无缓存破坏、不碰 kernel/,测试有牙。八问详见 PR review。合并时机与功能签核是 owner 权限。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 终审完成(head bb65954e18,已 rebase 到当前 master):APPROVE 已在 GitHub PR #5128 上提交(review 5914053250),CI 全绿(30 checks:14 success / 16 skipped / 0 failed)。

本轮相对我上轮(0a46c85f38)新增 2 个 commit,均独立审过(未照抄前几轮 reviewer):

  • 90c50a4273(ja 文档):docs/configuration.ja.md 补 trae wire 家族(3 ins/3 del),平凡正确,en/zh/ja 对齐。
  • bb65954e18(cached-token rung,关键跨文件修复):master 的 catch-up 合并把 openaiCachedTokens 改成「prompt_tokens 在场但无 openai 词表缓存字段时返回 0」,原 openaiCachedTokens(ev) ?? native 被那个 0 抢先(0 ?? native = 0),静默丢掉本线原生 cache_read_input_tokens 档。已修成 openaiCached !== null && openaiCached > 0 ? openaiCached : native。我逐点验证:①契约(src/loop/adapter-openai.ts:167 确实在该情形返回 0);②测试钉住(tests/adapter-trae.test.ts fromNative:prompt_tokens=100 + cache_read_input_tokens=40 → cachedTokens=40);③插件车道 traeUsageSample(src/plugin.ts:4468)用 num() 的 undefined-based 阶梯,从未被 0 契约破坏,两车道一致。中间 head 90c50a4273 的 4 个 test 失败正是此 rung 被 master 合并打破,bb65954e18 已修复。

判定:纯 host 侧功能(不碰 kernel/、无 kernel-change 声明),全部 gate 在 wireFamily==="trae"(opt-in,非 trae 用户零影响);无回归、无缓存破坏、无设计转向、无新配置 shape(仅扩展 wire 枚举加 "trae");测试有牙(coexistence = 真 proxy + 2 个假上游;cached-token rung 测试钉住阶梯)。我上轮的 join("\n") 修复(src/trae-wire.ts:52)仍完好。无小发现需修,无遗留尾巴。

八问详见 PR review。合并时机与功能签核是 owner 权限(agent 不合并)。残留(非阻塞):live-seat 压缩会话 e2e 需真实 Trae 席位。

This branch has not been deployed

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

Labels

dsh enhancement New feature or request p2 scope/wiring trae 改动范围:内核之外的主机侧接线(src/agent 适配器、server 路由、注入拦截)/范围兜底/客户端标签

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants