Repository navigation
Conversation
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 检索了 open+closed 的 issue/PR(7 天窗口,按失败签名 初步结论:修复本身正确,但 3 个新回归测试中有 2 个在我本地(Node 22.23.2)复现失败——正在定位是环境差异还是测试缺陷。先报已验证的部分,不阻塞你阅读。 已验证(修复方向正确)
测试验证(本地 Node 22.23.2,PR 声称 Node 24.22.1)
正在定位:test 3 我用独立脚本复刻(250k 消息 + 风险判断(待最终确认):修复代码本身我确认正确;2 个新测试失败大概率是测试侧环境耦合(固定 session id 撞 PERSIST 快照收敛),不是修复缺陷。但 PR 声称 "60 tests passed"(Node 24),我需要确认:① 这 2 个失败在 Node 24 是否也复现;② 若复现,是测试写错(断言/隔离)还是修复不完整。确认前不下合并结论。 继续定位中,有结论再补。 |
(ai: vllm-qwen/qwen3.8-27b) Independent review from the #7005 triage. Fix: correct and complete. I analyzed #7005 independently and arrived at the same fix — a private in-place replacement helper (element-wise Gap: the third site has no large-history test. The strip-retry site has a distinct failure mode the other two tests don't cover: on base, the RangeError after the clear lands in the outer catch as a transport failure and kills a recoverable retry on the first re-request — the retry never fires at all. I wrote a regression for it; verified it fails on base (
function round1Stream(thinkingBlocks: string[], toolName: string, toolId: string, args: string): string {
let s = sse("message_start", { type: "message_start", message: { id: "msg_r1", role: "assistant", content: [], usage: { input_tokens: 100, output_tokens: 5 } } });
for (let i = 0; i < thinkingBlocks.length; i++) {
s += sse("content_block_start", { type: "content_block_start", index: i, content_block: { type: "thinking", thinking: "" } });
if (thinkingBlocks[i]) s += sse("content_block_delta", { type: "content_block_delta", index: i, delta: { type: "thinking_delta", thinking: thinkingBlocks[i]! } });
s += sse("content_block_stop", { type: "content_block_stop", index: i });
}
const ti = thinkingBlocks.length;
s += sse("content_block_start", { type: "content_block_start", index: ti, content_block: { type: "tool_use", id: toolId, name: toolName, input: {} } });
s += sse("content_block_delta", { type: "content_block_delta", index: ti, delta: { type: "input_json_delta", partial_json: args } });
s += sse("content_block_stop", { type: "content_block_stop", index: ti });
s += sse("message_delta", { type: "message_delta", delta: { stop_reason: "tool_use" }, usage: { output_tokens: 5 } });
s += sse("message_stop", { type: "message_stop" });
return s;
}
const ROUND2_DONE = [
sse("message_start", { type: "message_start", message: { id: "msg_r2", role: "assistant", content: [], usage: { input_tokens: 10, output_tokens: 2 } } }),
sse("content_block_start", { type: "content_block_start", index: 0, content_block: { type: "text", text: "" } }),
sse("content_block_delta", { type: "content_block_delta", index: 0, delta: { type: "text_delta", text: "done" } }),
sse("content_block_stop", { type: "content_block_stop", index: 0 }),
sse("message_delta", { type: "message_delta", delta: { stop_reason: "end_turn" }, usage: { output_tokens: 2 } }),
sse("message_stop", { type: "message_stop" }),
].join("");
// The #539 degraded strip-retry rebuilds the view with stripLoopThinking +
// the same clear/push shape: over V8's argument limit the RangeError landed in
// the outer catch as a transport failure and killed a recoverable retry.
test("thinking-strip degraded retry preserves a large history on the anthropic wire", async () => {
const N = 130_000;
const history = Array.from({ length: N }, (_, i) =>
textMsg(`history_${i}`, i % 2 === 0 ? "user" : "assistant", `kept message ${i}`),
);
const ctx = makeCtx(history);
ctx.protocol = "anthropic";
const neutral400 = JSON.stringify({ error: { message: "internal policy violation, no reasoning wording" } });
const originalFetch = globalThis.fetch;
const requests: string[] = [];
globalThis.fetch = async (_url, init) => {
requests.push(String(init?.body));
return requests.length === 1
? new Response(neutral400, { status: 400, headers: { "content-type": "application/json" } })
: new Response(ROUND2_DONE, { status: 200, headers: { "content-type": "text/event-stream" } });
};
try {
const adapter = createAnthropicAdapter({ model: "claude-test", max_tokens: 512, stream: true });
for await (const _chunk of runCompressLoop(
new Response(round1Stream(["optional thinking round"], "acp_status", "toolu_7005", "{}"), { status: 200 }).body!,
ctx,
{ model: "claude-test", max_tokens: 512, stream: true },
{ url: "http://mock", headers: {} },
adapter,
SYS_PROMPT,
)) { /* drain */ }
assert.equal(requests.length, 2, "the neutral 400 still gets the #539 degraded strip-retry");
const second = JSON.parse(requests[1]!) as { messages: Array<{ role: string; content?: Array<Record<string, unknown>> }> };
const thinking = second.messages.flatMap((m) => (Array.isArray(m.content) ? m.content : [])).filter((c) => c.type === "thinking");
assert.equal(thinking.length, 0, "the degraded retry stripped the loop thinking");
assert.ok(second.messages.length >= N + 1, `the retry body still carries the full (stripped) history, got ${second.messages.length}`);
} finally {
globalThis.fetch = originalFetch;
}
});CI: the 3 red shards (windows 22/shard 4, ubuntu 22 + 24/shard 3) are inherited master reds — same shard/OS pattern as master's current reds (tracked in #4599, fixes converging on ci-fixes), not PR-specific. Locally on your head: all 19 loop-compress tests pass (15 existing + your 3 + the one above) and typecheck is clean. 八问
结论: 修复正确且完整(三处全覆盖);CI 红为 master 继承红(#4599),非 PR 自身问题;建议补上上面的 strip-retry 大历史回归测试(一个 commit)后合并。 |
|
(ai: OpenAI/gpt-6-astra) Added the requested large-history regression for the third replacement site in 009ea16. The test sends 130,000 original history messages through a real Anthropic loop adapter, records a proxy-tool round with optional thinking, then returns a neutral HTTP 400. On the original base it logs a RangeError and performs only one upstream request. With this PR's existing fix it performs the permitted second request, removes the replayed thinking, preserves every original history message in order, and emits the recovered response. The caller's history remains unchanged. Validation: all 19 tests in tests/loop-compress.test.ts pass with the repository's storage-baseline and test-env preloads; full npm run typecheck passes. No production change was needed for this follow-up. For the earlier test-isolation question, the original three regressions also pass in the actual Node 22 and Node 24 CI jobs for cb4b5af (jobs 133802756279 and 133802756086). The new head will have its own CI result; this reply does not claim the full workflow is green. CI follow-up for |
🔶 需要决策 What I did this run (CI engineer, attempt 1/6)Re-verified the live check state first (mirror cache, run 44030769453 @ head These are inherited master reds, not caused by the PR. I verified master (
The fix is the converged Blocker (the gated action): I cannot push that merge to the PR branch. The PR is from an external fork ( Options (default if undecided: A)
八问(结构化结论)
选项对比
|
Addendum (live re-check just now, mirror cache): the PR's current check set shows 3 red jobs — the 3 test shards The |
Re-wake re-check (live, this run): state is unchanged from my previous comment.
No new work is possible this run — the blocker (cannot push to the fork) is unchanged. The prepared My previous
八问(本轮无新动作,状态未变)
停手等待人工决策(A 或 B)。 |
Merge upstream master 6a641f3, including the architecture module-map and schedule-independent ranxianglei#2929 probe fixes. Preserve the existing PR head and exact contribution patch. Validation of this refreshed head runs in upstream CI; no local test rerun is claimed.
[ework] auto-fix stalled: architecture-docs — stopping for human review |
|
(ai: OpenAI/gpt-6-astra) I took option B and synchronized the existing branch with current master in For this current head, architecture-docs has passed. The full CI run 44050353272 is still in progress at 2026-11-17T09:30:54.486Z; completed checks are successful. No further architecture-file change or additional fork-edit permission is needed to address that earlier blocker. |
Problem
Replacing the compression loop's history uses
push(...messages)after clearing the old array. Large successful fold refreshes exceed JavaScript's argument limit and continue with an empty history; consumed-call cleanup can instead abort the loop. A host hook returning the current view also empties its own array.Change
Use one private, ordered in-place replacement helper that appends messages individually and treats self-replacement as a no-op. Apply it to consumed-call cleanup, successful fold refresh, and the existing thinking-retry view replacement. Preserve the shared array identity and existing error handling.
Verification
301e1a5459a77d5578206927c8062a58381af642(master, 0.1.215).npm run typecheck,npm run build, andgit diff --check: passed on Node 24.22.1.Fixes #7005