Repository navigation
fix(acp): persist embedded text resources for transcript replay - #12585
XIQIXIQIXIQI wants to merge 72 commits into
Conversation
Verification reportStatus: VERIFIED_FIXED by focused test-script fallback, not by a live ACP daemon E2E run.
Remaining runtime acceptance: launch a real ACP daemon, submit a typed |
yiliang114
left a comment
There was a problem hiding this comment.
Blocking on one regression that CI caught and I traced to this diff:
Test (ubuntu-latest) is red on this head, and the failure belongs to this PR: acp-bridge > bridge.test.ts > sendPrompt > does not leak a prompt slot for a malformed null block now fails with AssertionError: expected TypeError: Cannot read properties of null… to not be an instance of TypeError. That test is pre-existing (this PR doesn't touch it), and on main the malformed null block in a prompt reaches the typed-error path. The new resolvedPrompt.flatMap((block, index) => block.type === 'resource' && …) reads .type on every element — a null element (which the malformed-block case legitimately produces) throws a bare TypeError before any typed error handling runs. Same for the new dispatchBlocks.filter(isSessionAttachmentReference) if that predicate doesn't null-guard.
The fix is small: null-guard the flatMap predicate (block != null && block.type === 'resource'), or run the snapshot computation after the existing malformed-input handling. Whichever, the red test must go green again.
The rest of the change (persisting embedded text resources for replay, the provenance-by-position tracking, the SDK normalizer types) reads fine — holding approval only on this regression.
|
Rechecked the existing feedback at The earlier null-block P1 is fixed: the resource-index predicate now guards null, and the attachment-reference predicate also handles null safely. That thread can be resolved; the executed repository CI gates on this head are green. R1-1 still needs a scope decision. The 256 KiB replay budget currently rejects the entire prompt, including from This is a source recheck of existing feedback, not a fresh full review or live-daemon acceptance run. The PR already discloses that restart/ |
|
@qwen-code /triage |
|
@qwen-code /takeover from 2 |
|
🤝 Takeover engaged: the autofix loop now manages this PR — it will address new review feedback and resolve base conflicts until the label is removed or the round cap is reached. This window's round counter starts at 2 (the rounds this PR spent in review before takeover), so the Critical-only brake engages after 3 more change-producing round(s) instead of a full fresh 5. Remove the 中文说明🤝 已接管:autofix 循环现在管理此 PR —— 将持续处理新的评审反馈与 base 冲突,直到移除标签或达到轮次上限。本窗口轮次计数从 2 起算(即本 PR 托管前已进行的评审轮数),因此再经过 3 个产生改动的轮次即进入 Critical-only,而非重新计满 5 轮。移除 |
…edded-resource-replay # Conflicts: # packages/acp-bridge/package.json
The 256 KiB bound was enforced as an admission limit that rejected the whole prompt (daemon pre-echo and child pre-recording), including on the direct-ACP path with no journal at all. Bound retention instead: the prompt always runs, blocks beyond the byte budget (256 KiB) or count cap (256, matching the live echo bound) are dropped from the durable record, and the user record marks the loss with embeddedResourcesTruncated. - capture guard skips empty-URI resources, mirroring the replay validator - daemon no longer charges the raw request body; the child accounts once, on the schema-normalized blocks it persists (single derivation) - parse daemon attachment references once per prompt under a shared bound so 257+ references stay recorded instead of vanishing from the record - linearize readDaemonNativeResourceIndexes (Set/Map instead of includes/some per index) - a resource-only record's empty displayText no longer flips the session title projection off (channel '' markers are preserved) Updates both design docs and inverts the three throw-pinning tests to assert admission plus bounded retention. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
|
🤖 Addressed the latest review feedback (round 3/100). What changed, and what I pushed back on: · 已处理最新评审反馈(第 3/100 轮)。改动内容与我反驳保留之处如下: Round summary — PR #12585Merge
Findings addressed in code
Deferred to the next round (batch budget, ~8 findings/round)R1-24 (residual acceptance case — note: the updated same-URI bridge test now asserts forwarded indexes Mutation probes (each run locally, then reverted)
Test-contract notesThe two inverted bridge cases and the one inverted Session case are declared in Diff growth this roundSource: +27 net lines (embedded-resource-replay.ts +23, session-control-plane.ts −5, Session.ts −3, chatRecordingService.ts +12). Test: +399 net lines (including the new 195-line unit file). Docs: ±0 net. Within the 400/400 window budgets. Verification
中文说明本轮总结 — PR #12585合并
本轮在代码中处理的发现
顺延到下一轮(批次预算,每轮约 8 个发现)R1-24(剩余验收用例——注意:更新后的同 URI 桥接测试现在断言转发索引 变异探针(均在本地执行后还原)
测试契约说明两个反转的桥接用例与一个反转的 Session 用例已在 本轮 Diff 增长源码:净 +27 行(embedded-resource-replay.ts +23,session-control-plane.ts −5,Session.ts −3,chatRecordingService.ts +12)。测试:净 +399 行(含新增的 195 行单元测试文件)。文档:净 ±0。在 400/400 窗口预算内。 验证
Base-conflict check · 基分支冲突检查: conflicted with main — resolved in this push. · 与 main 有冲突——已在本次推送中解决。 🧵 Resolved all 10 selected review thread(s). · 已关闭全部选中的 10 条评审线程。 Re-review when you have a moment. After round 100 this bot stops and leaves the PR for a human. · 有空请复审;第 100 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
|
🤖 Reviewed the latest feedback — no changes needed. Why, point by point: · 已审阅最新反馈——无需改动。逐点说明原因如下: Autofix round — no actionWhat this round foundNo actionable code feedback was present for PR #12585 in this round:
Why no code change was madeThe failed
Additionally, the review workflow ( VerificationNo files were changed and no commit was created, so no build/typecheck/lint/test runs were required. Evidence inspected this round:
中文说明Autofix 本轮 —— 无需操作本轮发现本轮 PR #12585 没有任何可执行的代码反馈:
为什么不做代码修改
此外,评审工作流( 验证情况本轮未修改任何文件、未创建提交,因此无需运行构建/类型检查/lint/测试。本轮核查的证据如下:
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 🧠 Handled by Qwen Code · model/模型 |
|
🔀 Base updated: red check(s) [review-pr] pass on current main — merged current main via update-branch; CI will re-run. 中文说明🔀 已更新 base:红色检查 [review-pr] 在当前 main 上通过 —— 已通过 update-branch 合入当前 main,CI 将重新运行。 |
- core: exempt truncation-only records (displayText '' + embeddedResourcesTruncated, no retained resources) from the title projection marker, so an over-budget resource-only prompt no longer disables auto-titling for the whole session - cli/acpAgent: strip qwen.daemon.attachmentReferences and qwen.daemon.attachmentResourceIndexes from untrusted prompt _meta and re-arm both only for a trusted parent, so a direct-ACP client cannot exempt its own blocks from the durable journal - acp-bridge: share the attachment expansion URI format between the SessionAttachmentStore producer and both replay matchers via the dependency-free attachmentResourceUri() helper - acp-bridge: project a placeholder chunk on replay when a truncation marker leaves a user turn with nothing else projectable, instead of emitting zero updates - cli/Session: record attachmentReferences and resourceLinks on the deferred /advisor branch, matching the main recording branch - acp-bridge tests: pin the forwarded prompt content (not just the provenance metadata) for the oversized direct-resource admissions - docs: state the 256-block echo cap and the 256 KiB journal budget as separate bounds in both language versions
|
🤖 Addressed the latest review feedback (round 4/100). What changed, and what I pushed back on: · 已处理最新评审反馈(第 4/100 轮)。改动内容与我反驳保留之处如下: Round summaryAddressed all 7 findings from the round-2 review (R2-1 through R2-7) in commit FindingsR2-1 (rc:4119082230, Critical) — truncation-only record disabled auto-titling — FIXEDThe title-projection exemption in Evidence: added R2-2 (rc:4119082249, Critical) — untrusted ACP client could self-exempt blocks from the journal — FIXED
Evidence: extended R2-3 (rc:4119082254, Suggestion) — retention-cap rationale cited a nonexistent echo byte coupling — FIXED
R2-4 (rc:4119082262, Suggestion) — oversized-admission tests never asserted the forwarded content — FIXEDTest 3 ( R2-5 (rc:4119082264, Suggestion) — attachment-expansion URI re-derived by hand in the new matchers — FIXEDAdded the dependency-free R2-6 (rc:4119082270, Suggestion) — marker-only record projected zero replay updates — FIXED
R2-7 (rc:4119082276, Suggestion) — deferred /advisor branch omitted attachment provenance — FIXEDThe deferred- Not in this round: the four Verification
中文说明本轮摘要在提交 发现处理R2-1(rc:4119082230,Critical)——仅截断标记的记录导致自动命名失效 —— 已修复
证据:在 R2-2(rc:4119082249,Critical)——不可信 ACP 客户端可自行豁免于持久化日志 —— 已修复
证据:在 R2-3(rc:4119082254,Suggestion)——保留上限的理由引用了不存在的回显字节耦合 —— 已修复
R2-4(rc:4119082262,Suggestion)——超限接纳测试从未断言被转发的内容 —— 已修复测试 3( R2-5(rc:4119082264,Suggestion)——附件展开 URI 在新匹配器中被手工重新推导 —— 已修复新增零依赖辅助函数 R2-6(rc:4119082270,Suggestion)——仅标记记录在回放时投影出零条更新 —— 已修复当 R2-7(rc:4119082276,Suggestion)——延迟 /advisor 分支遗漏附件来源信息 —— 已修复延迟 本轮未处理: 验证
Base-conflict check · 基分支冲突检查: no conflict with main. · 与 main 无冲突。 🧵 Resolved all 7 selected review thread(s). · 已关闭全部选中的 7 条评审线程。 Re-review when you have a moment. After round 100 this bot stops and leaves the PR for a human. · 有空请复审;第 100 轮后本 bot 停止并将 PR 交给人工。 🧠 Handled by Qwen Code · model/模型 |
|
🔀 Base updated: red check(s) [Lint & Static (ubuntu-latest, Node 22.x)] pass on current main — merged current main via update-branch; CI will re-run. 中文说明🔀 已更新 base:红色检查 [Lint & Static (ubuntu-latest, Node 22.x)] 在当前 main 上通过 —— 已通过 update-branch 合入当前 main,CI 将重新运行。 |
|
🤖 AutoFix ran out of time before finishing (timeout (7200000ms)) (attempt 5/100) — it will retry on the next scan. What I found before stopping: See the Qwen Autofix agent step logs for model/tool output. 中文说明🤖 AutoFix 在完成前耗尽了时间(timeout (7200000ms))(第 5/100 次尝试)—— 将在下次扫描时重试。 Run log: https://github.com/QwenLM/qwen-code/actions/runs/36467708558 🧠 Handled by Qwen Code · model/模型 |
Takeover complete — merge-ready pending approvalsMaintainer takeover (2026-10-31), head
State: CI green (30 pass / 35 skipping / 0 fail), trial merge into current Remaining for merge: the 中文摘要维护者接管(2026-10-31),head |
wenshao
left a comment
There was a problem hiding this comment.
Approving at head ed5fb433903 after the maintainer takeover (2026-10-31).
Basis:
- Verification round 6 (ic:6491633555): 60/60 scripted assertions on real processes — a real
qwen --acpchild, a real JSONL journal, a real SIGKILL +session/loadrestart. Base replays 0 typed resource chunks (resource-only turns vanish); head replays 2, byte-identical, attributed to their owning prompts, zero URI re-fetch. Round 5's two Criticals are closed by measurement (M10/M11 mutation witnesses killed). - Its sole blocker is corrected: the PR body no longer describes a pre-echo rejection path the code does not have. It now states the shipped semantics — admission + live delivery to the model + retention-only durable drop marked
embeddedResourcesTruncated— matching both design docs and the PR's own test (bridge-embedded-resource-replay.test.ts:12, "admits an oversized direct text resource; the bound limits retention only"). - Takeover census: all 12 unresolved threads closed with evidence (3 fixed or addressed by a documented alternative, 9 Suggestions tracked in #13282); 19 stale CHANGES_REQUESTED reviews dismissed (full REST census: 0 remaining); CI green (30 pass / 35 skipping / 0 fail); trial merge into current
mainconflict-free.
No code change since round 6's verified head. The remaining Suggestions live in #13282, not in this PR. This is approval 1 of the 2 the main ruleset requires.
中文摘要
在 head ed5fb433903 批准。依据:round-6 真实进程验证 60/60(base 回放 0 个类型化资源块、head 回放 2 个且字节一致、归属原 prompt、零 URI 抓取;round-5 两条 Critical 经变异见证关闭);其唯一阻断项(正文描述代码不存在的回显前拒绝路径)已修正为实际语义,与设计文档和自带测试一致;接管核对关闭全部 12 个未决线程(9 个 Suggestion 登记 #13282)、dismiss 19 条过期评审(REST 全量复核余 0)、CI 全绿、与当前 main 试合并无冲突。自 round-6 验证 head 以来零代码改动。本批准为 ruleset 要求的 2 个批准之一。
|
Verdict: Verified head 中文摘要(点击展开)结论:
Delta classification since round 6The PR head is the same commit round 6 verified (
Because the merge candidate is what lands, this round treats the trial-merge tree as a third arm, not only head vs base. Previous-finding status (follow-up protocol; re-measured at
|
| # | finding (round) | severity | status at ed5fb4339 |
evidence |
|---|---|---|---|---|
| C-1 = L-2 | PR body describes a rejection path the code does not have | suggestion | FIXED | body now says admitted + live + retention-only drop; big/big-only cells match the new wording |
| C-2 | partial truncation drops user content with no client-visible trace | suggestion | STANDS, narrowed | big (text + oversized resource): placeholderChunks=0; new big-only cell (no text): replay emits exactly 1 [Embedded resource too large to replay] |
| R2-#4 | intra-turn block order not preserved on replay | note | STANDS, re-measured | submitted [resource, text] replays text,resource on head and merged |
| R21-1 | cold restore retains per-turn displayText and cloned apiHistory |
note | not re-measured | no code change since round 6; no RSS measurement this round (see Not covered) |
| M12 | incremental accumulator has no committed test | note | not re-run | unchanged; still a coverage observation, not a defect |
| L-3 | base lets any ACP caller inject forged attachmentReferences |
security, closed by PR | closed, measured | h3: base replays a forged reference card (1) and journals nothing; head strips the keys, journals the real resource, replay emits 0 forged cards |
| C-4 / R2-#3 / M0–M3 | count cap, URI encoding, replay liveness, byte budget | suggestion | re-run | u1 G/F/H + h1 liveness cells all green |
Central claim and A/B on real processes
Claim. An ACP session/prompt carrying embedded text resource blocks is persisted with its owning user prompt and replayed as typed user chunks after a real restart.
Harness harness/h1-restart-e2e.mjs spawns node <tree>/dist/cli.js --acp in an isolated HOME/QWEN_HOME, talks to a loopback OpenAI-compatible server (the only fake — the far side of the wire), sends text + 1 resource, a resource-only prompt, then text-only, reads the real JSONL, SIGKILLs, and loads the session in a second process. Base expectations are encoded, so a base cell that loses the resources is a passing control.
| observable (real process, real JSONL, real restart) | base 9a41afe0 |
head ed5fb4339 |
trial merge 45ea3a08 (main@107e1cfab1) |
|---|---|---|---|
| durable user records | 3 | 3 | 3 |
user records carrying embeddedResources |
0 (0,0,0) | 2 (1,1,0) | 2 (1,1,0) |
| journaled resource blocks | 0 | 2 | 2 |
replayed user_message_chunk with content.type === 'resource' |
0 | 2 (byte-identical text) | 2 (byte-identical text) |
| resource chunk attribution (source-record → turn index) | — | 0, 1 |
0, 1 |
| resource-only turn visible after restart | no — the turn vanishes | yes | yes |
| replayed user text chunks (liveness) | 2 | 2 | 2 |
| model calls carrying the resource text live | 6 | 6 | 6 |
| URI re-fetch over HTTP | 0 | 0 | 0 |
new model call during session/load |
0 | 0 | 0 |
| scripted cells | 13/13 (all expected-red) | 13/13 | 13/13 |
Witness 01-central-ab-base-vs-head.png (live output of both arms, re-run this round on freshly rebuilt bundles: base fddc789c0339ae9ee721, head c5c2a0d372da850ba6e5).
Edge shapes, re-measured on real processes
Harness harness/h2-edge-e2e.mjs, one fresh session per shape so the 400 KiB payload cannot disturb the others.
| cell | base | head | trial merge |
|---|---|---|---|
[resource, text] submission |
resource absent; replay text |
replay text,resource (order still not preserved) |
text,resource |
| same-URI duplicate resources | journal 0, replay 0 (turn invisible) | journal 2, replay 2, both context://dup |
journal 2, replay 2 |
400 KiB direct resource + text: prompt admitted (end_turn) |
yes | yes | yes |
| model received it live (max wire body) | 481,696 B | 481,696 B | 481,858 B |
| durable record | absent payload | dropped + embeddedResourcesTruncated: true + displayText kept |
same |
| replay of that turn | text |
text (no placeholder — round-6 C-2) |
text |
| 400 KiB resource-only prompt: admitted, live bytes | 481,728 B | 481,728 B | 481,890 B |
| its replay | turns: 0 chunks (turn vanishes) | exactly 1 [Embedded resource too large to replay] placeholder |
same as head |
Native-attachment provenance and retention bounds (u1)
harness/u1-native-positions.mjs drives the shipped packages/acp-bridge/dist/embedded-resource-replay.js (no mocks) with the shapes the acceptance plan names; 23 cells, green on head and on the trial merge.
| cell | head / merged |
|---|---|
position metadata [1] + one direct and one native block sharing attachment:///att-1 |
native index excluded, direct block retained (DIRECT-RESOURCE) |
| legacy metadata (no positions), unique URI match | excluded |
| legacy metadata, two blocks share the URI (ambiguous) | both retained, no silent drop |
| out-of-range / duplicate / non-resource / non-array indexes, empty reference list | all fail closed ([]) |
daemon-owned _meta keys |
stripped; client _meta kept |
| byte bound bisect | JSON bytes 262144 retained; 262145 dropped with truncated=true |
| block cap | 256 retained of 257, truncated=true |
| attachment URI format | attachment:///a%2Fb%20c stable |
Untrusted provenance claim (h3) — the L-3 gate
A plain ACP caller sends a prompt whose resource carries _meta claiming daemon native provenance (qwen.daemon.attachmentReferences + qwen.daemon.attachmentResourceIndexes: [1]). The daemon re-injects those keys only for its trusted children.
| observable | base 9a41afe0 |
head ed5fb4339 |
trial merge |
|---|---|---|---|
| durable resource retained | 0 | 1 (attachment:///att-1, text exact) |
1 |
| replayed embedded resource chunks | 0 | 1 | 1 |
replayed forged reference cards (content.attachmentId) |
1 | 0 | 0 |
| cells | 10/10 | 10/10 | 10/10 |
SDK offline projection from the real replay wire (s3)
The captured session/update frames of each arm's real session/load are wrapped in daemon event frames and fed to the shipped dist/daemon/ui/index.js (normalizeDaemonEvent → reduceDaemonTranscriptEvents). Nothing is a fixture.
| observable | base | head | trial merge |
|---|---|---|---|
| normalized UI events | 9 | 11 | 11 |
| user blocks | 2 (resource-only turn absent) | 3 | 3 |
turns carrying embeddedResources |
0 | 2 | 2 |
| turn 0 / turn 1 resource URI | — | context://one / context://two |
same |
| resource text sha (turn 0 / turn 1) | — | da5c08597e… / 8b5cf5d0… |
same |
invented attachmentId |
none | none | none |
session.rewound to turn index 1 |
1 user block, 0 resources | 1 user block, turn-0 resource kept | same |
| cells | 13/13 | 13/13 | 13/13 |
Mutation matrix at head
Baseline first (M0): the PR's embedded-resource-replay suite is 15/15 green and u1 is 23/23. Every mutant is a single-literal edit with a marker constant, and each marker was found in the shipped artifact before the probe ran (dist/chunks/acpAgent-*.js for M1, dist/embedded-resource-replay.js for M2–M4). Every restore is sha256-identical and the head bundle returns to c5c2a0d372da850ba6e5.
| # | mutant | probe | PR suite |
|---|---|---|---|
| M1 | provenance gate trusted → always on (acpAgent.ts) |
h3 6/10 red: no durable resource, 1 forged card |
not run |
| M2 | native-position exemption disabled | u1 2/23 red (A.retainedCount 1→2, B.retained 0→1) |
1 failed / 14 passed |
| M3 | legacy same-URI ambiguity guard removed | u1 2/23 red (C.legacyIndexes []→[0,1], C.retained 2→0) |
1 failed / 14 passed |
| M4 | 256 KiB byte bound → 1 KiB (positive control) | u1 1/23 red (G.cap.count 256→11: the byte arm binds first) |
4 failed / 11 passed |
Kills attributed: M2 → snapshotReplayableEmbeddedResources > exempts daemon-native positions from retention; M3 → readDaemonNativeResourceIndexes > keeps ambiguous same-URI blocks on the legacy path. M4 is the runner liveness control: the same command that reports green on the clean tree reports four reds with the bound mutated, so the green rows are measurements rather than a dead runner. No mutant row is presented as per-commit coverage: the PR head is unchanged since round 6, so git log --no-merges <round-6 head>..<head> --not <main tip> is empty and the matrix is per-guard.
Findings
No Critical or blocking finding. Two Suggestions stand from round 6, both tracked in #13282:
1. Suggestion — intra-turn block order is still not preserved. Submitting [resource, text] replays text,resource, because projectUserAttachmentReferences emits references/resources after projectMessageParts. Reproduce: node harness/h2-edge-e2e.mjs --tree <head> --arm head --expect head --shape order → replay.sequence="text,resource".
2. Suggestion — a mixed turn that lost its oversized resource still replays silently. When the turn has visible text and a dropped resource, replay emits the text alone (placeholderChunks=0). The truncation marker exists only for the turn with nothing else to show (new big-only cell: placeholderChunks=1). Both cells pass because the shipped behaviour is what the design documents; the author's plan records the loss in the durable record via embeddedResourcesTruncated, which no client is obliged to render.
Not covered
- R21-1 residual retention: per-turn
displayTextand clonedapiHistorywere not RSS-measured. No code changed since round 6; the fix remains structural. - M12 (accumulator vs
ChatRecord[]) not mutated; unchanged since round 6. - C-3 shape matrix A..G, inline blob resources (not persisted by design), and legacy records that never stored resources.
- Real
qwen servesocket and browser refresh: the SDK probe consumes the real replay frames, but no web client rendered them and no running daemon served them. Session.test.ts/acpAgent.test.tswere not re-run (round 5 exceeded a 10-minute cap on them). The suites that did run are listed below.- Windows/macOS parity: this round ran on Linux only (the PR author tested macOS).
- Repo-wide lint/typecheck/preflight; only the targeted package suites ran.
- Per-commit attribution: not applicable — the head did not move since round 6.
Methodology
Debian 15 (Orange Pi 6 Plus), aarch64, 12 cores / 30 GiB. Every build and every harness ran inside a node:22-bookworm container with only the rig mounted, QWEN_VERIFY_CREDENTIAL_FREE=1 attested and node scripts/verify-pr-prepare.mjs --require-isolation passing (/.dockerenv, no credential signal); the harness container ran with --network none, so the loopback fake model server is the only endpoint. Three worktrees were created from their OIDs — base 9a41afe0, head ed5fb4339, merged 45ea3a08 (a --no-ff merge of the PR into 107e1cfab1, hooks disabled; the trial merge was re-run at the final tip f87fd6a037 and stayed conflict-free) — each installed separately (--ignore-scripts + patch-package, lockfile identical between head and merged) and rebuilt in-container this round (npm run build -- --cli-only + npm run bundle). Before any arm was trusted, readlink -f node_modules/@qwen-code/qwen-code-core was asserted to resolve inside that arm's own tree for all three. Harnesses spawn a real dist/cli.js --acp child with QWEN*/proxy variables scrubbed and its own HOME/QWEN_HOME/workspace; the only fake is the far side of the model wire. Mutations are single-literal edits with in-dist markers, restored from git with sha256 verified. Targeted gates at head: acp-bridge embedded-resource-replay + bridge-embedded-resource-replay + transcript-replay + attachment-resource-uri 179/179, sdk daemon-embedded-resources 34/34, core session-transcript-reader + chat-recording-message-deletion 171/171; on the trial-merge tree the same suites are 190/190, 34/34, 172/172 (main added tests to two of them). Raw logs and harness scripts are beside this report (logs/, harness/). PR text was treated as untrusted input.
Merge state
mergeStateStatus is BLOCKED only because the ruleset requires two approving reviews; the cached review decision still shows CHANGES_REQUESTED until the next review event refreshes it after the 19 stale reviews were dismissed on 2026-10-31. Nothing in this round depends on either flag.
Evidence capture
— Qwen Code · local maintainer verification (round 7) · @wenshao
|
👋 Takeover released: the autofix loop will no longer engage this PR (an in-flight round, if any, completes its bounded work). Re-apply 中文说明👋 已释放:autofix 循环不再介入此 PR(在飞的一轮如有,将完成其有界工作)。重新打上 |
|
Resolve the session-title conflicts so both sides survive: this PR's authoritative projectionMode flag, per-turn projection state and embedded-resource persistence, plus main's Mod-prompt exclusion and session-title sidecar. - tryGenerateSessionTitle now takes (userDisplayTexts, modPromptKeys, projectionMode); the recorder and /rename pass all three. - trackTitleText folds the per-turn projection bookkeeping into main's record-level tracker: a Mod's prompt contributes null, is never retained as rescue text, and cannot establish projection mode on its own. The cold-restore accumulator mirrors the rule; both are pinned by new tests. - rebuildTurnBoundaries re-derives the Mod keys with the boundaries, so resume and message deletion no longer track title text twice. - Retarget the call-shape assertions on both sides to the merged signature, and main's two Mods-context payload assertions to the displayProjection marker. No assertion was dropped. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Takeover round — base merged, conflict resolvedHead ConflictThe branch was All 8 were resolved so that both sides survive — this PR's embedded-resource persistence/replay and authoritative projection flag, and main's Mod-prompt exclusion and title sidecar. No conflict was resolved by taking one side wholesale:
The two red checks
No Java code and no CI configuration were changed. The Java lane was not run locally and no green Java lane is claimed — the new head's CI re-evaluates it. Verification (local, real results)
Vitest, one file at a time, all green — core: sessionTitle 42, autoTitle 38, chatRecordingService 198, title-sidecar 19, session-title-sidecar 4, sessionService.title-sidecar 13, customTitle 24, message-deletion 16, session-transcript-reader 157, writer-lease 138 (+10 skip), corruption 76, sessionService 268, bun-pty 32 (+1 skip), client 624; acp-bridge: 4 / 3 / 15 / 98 / 173; sdk-typescript: 34 / 44 / 23 / 11; cli: renameCommand 25, box-metrics 13, scheduled-tasks 138, hosted-hook 129, hosted-harness 708, acpAgent 939, Session 1446. Three non-assertion reds were diagnosed and excluded, not suppressed: Merge fidelity was checked in both directions: the commit's diff against the merged Base drift during the round
Approvals
Carried itemsThe 102 中文说明接管轮次 —— 已合入 base,冲突已解Head 冲突分支相对 8 处全部按「两侧语义都存活」解决,未整块取任一侧:
两条红检查
未改任何 Java 代码与 CI 配置。未在本地运行 Java lane,也不声称其变绿——由新 head 的 CI 重新评判。 验证(本地真实结果)
Vitest 逐文件运行,全绿 —— core:sessionTitle 42、autoTitle 38、chatRecordingService 198、title-sidecar 19、session-title-sidecar 4、sessionService.title-sidecar 13、customTitle 24、message-deletion 16、session-transcript-reader 157、writer-lease 138(+10 skip)、corruption 76、sessionService 268、bun-pty 32(+1 skip)、client 624;acp-bridge:4 / 3 / 15 / 98 / 173;sdk-typescript:34 / 44 / 23 / 11;cli:renameCommand 25、box-metrics 13、scheduled-tasks 138、hosted-hook 129、hosted-harness 708、acpAgent 939、Session 1446。 三次非断言性红已定位并排除,未压制: 合并保真度双向核对:提交相对所合并 本轮期间的 base 漂移本轮运行期间 批准
遗留项本轮读到的 102 条 — qwen-latest-series-invite-202610-m9 via Qwen Code (v0.26.8) |
Watch round —
|
| Shard | First run | After re-run |
|---|---|---|
| 1/4 | 5 failed, 21 flaky, 96 passed | success |
| 2/4 | 25 failed, 16 flaky, 71 passed | still running |
| 3/4 | success | success |
| 4/4 | 12 failed, 11 flaky, 60 passed | 2 failed, 9 flaky, 72 passed |
The re-run budget for this check on this head is now spent: the helper reports it "was re-run on this head already; treat the failure as real", so this round records it as needing a human rather than spending another re-run.
Why this still looks environmental, not a defect in this PR
Offered as evidence for whoever decides, not as a claim that the check is green:
- This PR changes no web-shell code. Its diff against the merged
mainis exactly 46 files, none underpackages/web-shell, and neither failing spec (web-shell.composer.mobile.spec.ts) is touched. - The remaining two failures are page-not-mounted, not assertion mismatches. Both are
expect(locator).toBeVisible()withError: element(s) not found—textarea[data-web-shell-composer-editor]atcomposer.mobile.spec.ts:1111, and[data-web-shell-root]:not([data-web-shell-gate])at:1202. The root element itself never rendered, after both retries. - The first run's dominant signature was backend unavailability:
TimeoutError: page.waitForFunction: Timeout 20000ms exceededinside the E2E helper'swaitForConnection(sessionId, { timeout = 20_000 }), plus sustainedconnect ECONNREFUSED 127.0.0.1:4170on/workspace/modelsand/workspace/hooks. That signature is gone after the re-run (0 occurrences), and the failure count fell from 12 to 2. - An unrelated PR shows the same signatures at the same time.
feat/core-pr-view(run 42359558892, shard 4/4) has 26waitForConnectionhits, 233ECONNREFUSED, 47data-web-shell-root/composer-editorlocator failures withelement(s) not found, and the same twocomposer.mobile.spec.ts:863/:1292cases entering retries. Two further unrelated PRs failed this lane in the same window with different shard subsets (codex/managed-session-diagnostics-20261106: 2/4;fix/14481-a3-rewritten-hook: 1/4 + 2/4).
What a person has to decide
Whether to accept this lane as environmental on ce481fe9f9 and re-run it once run 42359021212 finishes (shard 2/4 is still in flight), or to treat the two remaining mobile-chromium cases as real and investigate them. This watch cannot spend another re-run on this head, and it does not approve, change review state, merge, or enable auto-merge.
For context, main itself is green on this workflow in the same window (runs at 09:42–09:45 UTC and earlier all success), so this is not a broken base; it is concentrated on PR runners.
中文说明
值守轮次 —— web-shell E2E Smoke (shard 4/4) 需要人工决定
本轮未改任何代码、未推送,head 仍为 ce481fe9f9。
经过
该 lane 在 ce481fe9f9 上首次运行 4 个 shard 中 3 个红。重跑一次后大部分转绿:
| Shard | 首次 | 重跑后 |
|---|---|---|
| 1/4 | 5 failed、21 flaky、96 passed | success |
| 2/4 | 25 failed、16 flaky、71 passed | 仍在跑 |
| 3/4 | success | success |
| 4/4 | 12 failed、11 flaky、60 passed | 2 failed、9 flaky、72 passed |
该 check 在本 head 的重跑预算已用完:helper 报「was re-run on this head already; treat the failure as real」,故本轮按流程记为需要人工,而不是再花一次重跑。
为何仍倾向环境性、而非本 PR 缺陷
以下是给决定者的证据,不是「该检查已绿」的主张:
- 本 PR 不改任何 web-shell 代码:相对所合并
main的差异恰好 46 个文件,无一在packages/web-shell下,失败的web-shell.composer.mobile.spec.ts也未被触及。 - 剩余两条失败是页面未挂载,而非断言不符:均为
expect(locator).toBeVisible()且Error: element(s) not found——composer.mobile.spec.ts:1111的textarea[data-web-shell-composer-editor],以及:1202的[data-web-shell-root]:not([data-web-shell-gate])。两次重试后根元素始终未渲染。 - 首次运行的主导签名是后端不可用:E2E helper
waitForConnection(sessionId, { timeout = 20_000 })内的TimeoutError: page.waitForFunction: Timeout 20000ms exceeded,加上/workspace/models、/workspace/hooks持续connect ECONNREFUSED 127.0.0.1:4170。重跑后该签名归零,失败数由 12 降至 2。 - 无关 PR 在同一时间出现相同签名:
feat/core-pr-view(run 42359558892,shard 4/4)有 26 次waitForConnection、233 次ECONNREFUSED、47 处data-web-shell-root/composer-editor定位失败伴element(s) not found,且同两条composer.mobile.spec.ts:863/:1292同样进入重试。另两个无关 PR 在同一时间窗以不同 shard 组合失败(codex/managed-session-diagnostics-20261106红 2/4;fix/14481-a3-rewritten-hook红 1/4+2/4)。
需要人工决定的内容
是接受该 lane 在 ce481fe9f9 上属环境性、待 run 42359021212 收尾后(shard 2/4 仍在飞)再重跑一次,还是把剩余两条 mobile-chromium 用例当作真实缺陷去排查。本值守无法在本 head 再花一次重跑,也不 approve、不改评审状态、不合并、不开自动合并。
补充参照:同一时间窗内 main 自身在该 workflow 上为绿(09:42–09:45 UTC 及更早的 run 均 success),故不是 base 损坏,问题集中在 PR runner。
— qwen-latest-series-invite-202610-m9 via Qwen Code (v0.26.8)
Watch round — the whole
|
| Job | First run | After re-run |
|---|---|---|
| shard 1/4 | 5 failed, 21 flaky, 96 passed | success |
| shard 2/4 | 25 failed, 16 flaky, 71 passed | 21 failed, 26 flaky, 65 passed |
| shard 3/4 | success | success |
| shard 4/4 | 12 failed, 11 flaky, 60 passed | 2 failed, 9 flaky, 72 passed |
| summary job | failure | failure (test "$SMOKE_RESULT" = success) |
Shard 2/4 and the summary job have now also spent their re-run on this head — the helper reports "was re-run on this head already; treat the failure as real" — so both are recorded as needing a human, joining shard 4/4 from the previous round. The summary job is only the aggregate gate over the shards, not an independent failure.
What the re-run changed, and what it did not
The re-run halved the lane (shard 1/4 went green, shard 4/4 fell from 12 failures to 2) but did not clear shard 2/4. Its backend-unavailability signature recurred: 7 waitForConnection hits and 3 TimeoutError: page.waitForFunction: Timeout 20000ms exceeded, with 8 ECONNREFUSED. Its 21 failures again span unrelated feature areas — web-shell.files.spec.ts (6), loading-phrases, managed-progress, and others — and it ran 32.6 minutes, the longest shard.
The attribution evidence from the previous note still holds and was re-checked this round: this PR's diff against the merged main is exactly 46 files with none under packages/web-shell, and the unrelated PR feat/core-pr-view shows the same signatures in the same window. main itself is green on this workflow in that window.
What a person has to decide
The re-run limit that stopped this round is this watch's own budget, not GitHub's — a person can re-run the lane freely. The decision is whether to:
- treat the lane as a runner/daemon-environment problem, fix or wait out the environment, and re-dispatch it; or
- treat the surviving failures as real and investigate them, starting with shard 2/4, which did not improve under re-run.
This watch will not spend more re-runs on ce481fe9f9, and it does not approve, change review state, merge, or enable auto-merge. Separately, the PR still needs 2 approving reviews — the merge push dismissed the 2026-10-31 approval under main's stale-review rule.
中文说明
值守轮次 —— 整条 web-shell E2E Smoke lane 均需人工处置
本条是上一条说明的增量更新。未改代码、未推送,head 仍为 ce481fe9f9。Run 42359021212 现已收尾,结论 failure。
一次重跑后的最终状态
| Job | 首次 | 重跑后 |
|---|---|---|
| shard 1/4 | 5 failed、21 flaky、96 passed | success |
| shard 2/4 | 25 failed、16 flaky、71 passed | 21 failed、26 flaky、65 passed |
| shard 3/4 | success | success |
| shard 4/4 | 12 failed、11 flaky、60 passed | 2 failed、9 flaky、72 passed |
| 汇总 job | failure | failure(test "$SMOKE_RESULT" = success) |
shard 2/4 与汇总 job 在本 head 的重跑预算同样已用完——helper 报「was re-run on this head already; treat the failure as real」——故两者均记为需要人工,与上一轮的 shard 4/4 并列。汇总 job 只是各 shard 的聚合闸,不是独立失败。
重跑改善了什么、没改善什么
重跑使该 lane 失败面减半(shard 1/4 转绿,shard 4/4 由 12 条降至 2 条),但未能消除 shard 2/4 的失败。其后端不可用签名复现:7 次 waitForConnection、3 次 TimeoutError: page.waitForFunction: Timeout 20000ms exceeded,伴 8 次 ECONNREFUSED。21 条失败再次横跨互不相关功能区——web-shell.files.spec.ts(6 条)、loading-phrases、managed-progress 等——且耗时 32.6 分钟,为最长 shard。
上一条说明中的归因证据本轮已复核并仍成立:本 PR 相对所合并 main 的差异恰好 46 个文件,无一在 packages/web-shell 下;无关 PR feat/core-pr-view 在同一时间窗呈现相同签名;main 自身在该窗口内为绿。
需要人工决定的内容
本轮停止所依据的重跑上限是本值守自己的预算,不是 GitHub 的限制——人工可自由重跑该 lane。需要决定的是:
- 将其视为 runner/daemon 环境问题,修复或等待环境恢复后重新派发;或
- 将存活失败视为真实缺陷排查,从重跑后未改善的 shard 2/4 入手。
本值守不会在 ce481fe9f9 上再花重跑,也不 approve、不改评审状态、不合并、不开自动合并。另外,本 PR 仍需要 2 个批准——按 main 的陈旧评审规则,合并推送已作废 2026-10-31 的那条批准。
— qwen-latest-series-invite-202610-m9 via Qwen Code (v0.26.8)
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: reverse audit — stopped after audit round 4 without two consecutive dry rounds: rounds 1-4 each reported new findings, so the loop was closed unconverged rather than dry.
Not explored to full depth (tool budget reached): "agent 1c": did not read the web-shell chat-message renderer to confirm whether an empty content: '' user message is filtered before paint (the blank-turn part of the sce…; "agent 1c": did not run the affected suites ( packages/core , packages/acp-bridge , packages/sdk-typescript ) to confirm the added tests pass at this head..
Deferred under the convergence posture (round 24, not a blocker) — recorded, not requested in this round:
docs/design/daemon-embedded-resource-replay.md:23 — [review] The design doc states the journal's block cap *matches* MAX_ECHO_CONTENT_BLOCKS , but the implementation re-declares the number as an independent literal ( export const MAX_RECOR…packages/acp-bridge/src/bridge-embedded-resource-replay.test.ts:108 — [review] The only test of the 256 KiB daemon-native exemption accepts *any* string as the expanded resource text, so the very claim in its name ("without applying the inl…packages/acp-bridge/src/embedded-resource-replay.test.ts:171 — [review] The clone is pinned only by reference identity ( not.toBe at :39), so a shallow clone that shares the nested _meta object with the caller's block passes both this te…packages/acp-bridge/src/embedded-resource-replay.test.ts:183 — [review] The only test of the nativeResourceIndexes exemption uses a 6-byte native block, so the ordering that makes the exemption correct (the nativeIndexes.has(index) skip…packages/acp-bridge/src/embedded-resource-replay.test.ts:193 — [review] The only test for readDaemonAttachmentReferences pins the count cap and the happy path; none of its ~9 per-field rejection predicates is exercised. Failure scenario: …packages/acp-bridge/src/transcript-replay.ts:1517 — [review] The new truncation-placeholder gate re-derives "has visible text" from the raw payload['displayText'] , while every other place in projectUserRecord decides visibility from st…packages/cli/src/acp-integration/session/Session.test.ts:17564 — [review] The "exceed the budget" fixture sits exactly on MAX_RECORDED_EMBEDDED_RESOURCES_BYTES (262,144 code units), so it drives only the serialized-size branch; the siblin…packages/cli/src/acp-integration/session/Session.ts:12463 — [review] Mid-turn drained user messages never journal their embedded text resources, so the incident this PR fixes still happens for a steering message that carries a selection. Fa…packages/cli/src/ui/commands/renameCommand.ts:191 — [review] The new projectionMode === false arm in /rename has no test, and no test distinguishes its two arms. Failure scenario: Deleting the : [] arm keeps renameCommand.test.ts gr…packages/cli/src/ui/commands/renameCommand.ts:191 — [review] The gate's false branch — the one the new comment justifies ("fall back to the full history instead") — is not pinned by any test: every /rename title-path test either uses a re…packages/core/src/services/chat-recording-message-deletion.test.ts:176 — [review] The rewind regression test rewinds to turn 0, discarding both recorded turns, so it exercises only the empty-window case and cannot distinguish the correct tr…packages/core/src/services/chatRecordingService.autoTitle.test.ts:846 — [review] The only test for the new Mod-prompt title exemption records a *framed* Mod prompt ( asUser absent); the asUser arm — the one trackTitleText 's own modPro…packages/core/src/services/chatRecordingService.test.ts:3242 — [review] No test pins the restore side of the retained-title-text mechanism: restoreProjectedState assigns lastProjectionTextForTitle (chatRecordingService.ts:1832) but ever…packages/core/src/services/chatRecordingService.test.ts:3367 — [review] The new realigns title state when a rebuilt boundary list shrinks test pins only the display-text ring reset in rebuildTurnBoundaries , not the per-turn turnTitleSt…packages/core/src/services/session-transcript-reader.test.ts:1876 — [review] The cold-path emission of userDisplayTextsForTitle — new behaviour in this diff — has no assertion that can fail; the rewind test's not.toContain is satisfied …packages/core/src/services/session-transcript-reader.ts:288 — [review] SessionRuntimeResumeState.recording declares only turnTitleStates of the four title-state fields the reader emits; displayProjectionForTitle , userDisplayTextsForT…packages/core/src/services/session-transcript-reader.ts:1359 — [review] The widened navigation-visibility predicate enumerates three of UserPromptRecordPayload 's four visibility-bearing reference fields but omits resourceLinks . Failure …packages/core/src/services/sessionService.corruption.test.ts:273 — [review] The rewritten assertion leaves the test named "does not extract a uuid from a payload object inside a partial-tail fragment" ( :260 ) with no partial-tail fragment …packages/core/src/services/sessionService.corruption.test.ts:319 — [review] The rationale paragraph above the aligned-boundary test still explains the case with "The fix peeks the byte before readStart to tell the two apart" — the rewritt…packages/core/src/services/sessionService.corruption.test.ts:325 — [review] Every byte-geometry test of the new walk is pure ASCII ( 'x' , 'y' , 'A' , 'B' , 'C' ), so the one reason the walk carries spanParts as raw Buffer s instead …- …and 14 more (see the run report)
Mechanism health: this round did not close cleanly, so it withholds the incremental anchor — and the round it recovered had no anchor this round could use either — none at all, one with no certifier, one certified by an identity other than the one this round runs under, or one this round's fetch refused or resolved to the head — so the next review re-reads the whole diff unless recovery grafts an earlier own anchor that the round running it can use onto the complete work list this round leaves behind, and keeps doing so until a round's marker carries an anchor again or a graft lands that the round running it can use. (Stated, not acted on — this changes nothing about what the round posts.)
中文说明
仅完成部分审查,审查缺口已披露。
未审查(原文为英文):reverse audit — stopped after audit round 4 without two consecutive dry rounds: rounds 1-4 each reported new findings, so the loop was closed unconverged rather than dry.
未探索到全部深度(达到工具调用预算):"agent 1c":did not read the web-shell chat-message renderer to confirm whether an empty content: '' user message is filtered before paint (the blank-turn part of the sce…;"agent 1c":did not run the affected suites ( packages/core , packages/acp-bridge , packages/sdk-typescript ) to confirm the added tests pass at this head.。
收敛姿态下延后(第 24 轮,非阻断)——已记录,本轮不要求修改:共 34 条(原文未翻译,列表见上方英文部分)。
机制健康:本轮未能干净收尾,因而扣留了增量锚点,而它恢复到的那一轮也没有留下本轮可用的锚点——要么完全没有、要么没有认证者、要么由本轮运行身份之外的身份认证、要么被本轮的获取拒绝或解析为头提交——因此下一次评审将重读整个 diff,除非恢复流程把本轮能使用的更早自有锚点嫁接到本轮留下的完整工作清单上;并会一直如此,直到某一轮的标记重新带上锚点,或落地的嫁接能被运行该轮的评审使用。(仅陈述,不据此行动——这不改变本轮发布的任何内容。)
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.9)
Watch round — review round 24 dispositioned; one disclosed gap closed with evidenceNo code changed, nothing pushed. Head remains Review round 24 carries no actionable request, so this round makes no change. Its own ledger reads Closing the disclosed test gapThe review discloses that it
One deferred item verified as accurate, and why it is not acted on here
It is left for a follow-up rather than fixed in this round because the reviewer explicitly defers it as non-blocking, and pushing now would re-trigger the Still outstanding for a personUnchanged from the previous note: the 中文说明值守轮次 —— 第 24 轮评审已处置,并用证据关闭其披露的一个缺口未改代码、未推送,head 仍为 第 24 轮评审不含可执行请求,故本轮不做改动。其自带台账为 关闭其披露的测试缺口评审披露其「未运行受影响套件(packages/core、packages/acp-bridge、packages/sdk-typescript)以确认新增测试在本 head 通过」。这些套件在接管轮次中确已于
此外, 一条延后项经核实属实,及本轮不处置的理由
本轮将其留作后续而非就地修复,理由是评审已明确将其延后为非阻断项,且此刻推送会重新触发当前因 runner/daemon 不可用而失败的 仍待人工与上一条说明一致: — qwen-latest-series-invite-202610-m9 via Qwen Code (v0.26.8) |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: chunk 10 cross-file trace — stopped at the agent tool budget: the auditor did not finish tracing runtime.recording into the recorder's activate/constructor call site.
Not explored to full depth (tool budget reached): "agent reverse-audit (round 3)": the per-field rotation's "larger one" choice (transcript.ts:3042-3050, outside my chunk) compares .length while the ceiling is in bytes; I did not file it sep…; "agent reverse-audit (round 1)": could not walk the replay/emitter side ( transcript-replay.ts projection of embeddedResources / attachmentReferences and the SDK normalizer) — it lives outsi…; chunk 10: did not finish tracing runtime.recording into the recorder's activate /constructor call site — the grep was too noisy to read and the file belongs to another….
Mechanism health: this round did not close cleanly, so it withholds the incremental anchor — and the round it recovered had no anchor this round could use either — none at all, one with no certifier, one certified by an identity other than the one this round runs under, or one this round's fetch refused or resolved to the head — so the next review re-reads the whole diff unless recovery grafts an earlier own anchor that the round running it can use onto the complete work list this round leaves behind, and keeps doing so until a round's marker carries an anchor again or a graft lands that the round running it can use. (Stated, not acted on — this changes nothing about what the round posts.)
中文说明
仅完成部分审查,审查缺口已披露。
未审查(原文为英文):chunk 10 cross-file trace — stopped at the agent tool budget: the auditor did not finish tracing runtime.recording into the recorder's activate/constructor call site.
未探索到全部深度(达到工具调用预算):"agent reverse-audit (round 3)":the per-field rotation's "larger one" choice (transcript.ts:3042-3050, outside my chunk) compares .length while the ceiling is in bytes; I did not file it sep…;"agent reverse-audit (round 1)":could not walk the replay/emitter side ( transcript-replay.ts projection of embeddedResources / attachmentReferences and the SDK normalizer) — it lives outsi…;chunk 10:did not finish tracing runtime.recording into the recorder's activate /constructor call site — the grep was too noisy to read and the file belongs to another…。
机制健康:本轮未能干净收尾,因而扣留了增量锚点,而它恢复到的那一轮也没有留下本轮可用的锚点——要么完全没有、要么没有认证者、要么由本轮运行身份之外的身份认证、要么被本轮的获取拒绝或解析为头提交——因此下一次评审将重读整个 diff,除非恢复流程把本轮能使用的更早自有锚点嫁接到本轮留下的完整工作清单上;并会一直如此,直到某一轮的标记重新带上锚点,或落地的嫁接能被运行该轮的评审使用。(仅陈述,不据此行动——这不改变本轮发布的任何内容。)
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.9)
The skeleton cascade sizes its byte-budget cut from an exact JSON-byte measure, but the walk billed every code unit its worst-case escaped width: a valid astral pair cost 12 against its real 4 bytes, and the short escapes cost 6 against 2. A resource landing just over the 256 KiB ceiling therefore lost most of a legitimate text, and replay presented that over-cut value as correctly budgeted. Bill each unit its exact escaped width and consume a valid surrogate pair as one 4-byte unit so the cut never splits it. Every term remains an upper bound (now an equality), so the convergence invariant and the 23-byte minimum trimmed form are unchanged.
Watch round — Critical R25-31 fixed and pushedHead The Verified: whole Left untouched, deliberately
CI and approvalsThis push starts a fresh CI evaluation on The PR still needs 2 approving reviews. This watch does not approve, change review state, merge, or enable auto-merge. 中文说明值守轮次 —— Critical R25-31 已修复并推送Head 该 验证: 有意未动的部分
CI 与批准本次推送会在 本 PR 仍需要 2 个批准。本值守不 approve、不改评审状态、不合并、不开自动合并。 — qwen-latest-series-invite-202610-m9 via Qwen Code (v0.26.8) |
Watch round — stale lint gate refreshed by merging
|
|
Qwen Code review did not complete successfully. Failed to write qwen review log. A transient error is retried automatically; if you are seeing this, retry with |
Watch round — the
|
| Time (UTC) | Event |
|---|---|
| 18:47:18 | the review issues its 21-agent fan-out call |
| 18:51:38 | Operation cancelled. |
| 18:51:44 | Terminated |
| 18:51:44 | Failed to write qwen review log. |
| 18:51:49 | Process completed with exit code 1 |
So the review process was cancelled and terminated mid-run, and the log write failed because the process was already gone.
What it was not:
- Not a job timeout. The job ran 17:39:44 → 18:52:13, about 72 minutes, against a
QWEN_REVIEW_JOB_TIMEOUT_MINUTESbudget of 480. The workflow's own classifier agrees:FAILURE_KINDwas nottimeout, which is why the posted notice used the generic branch rather than the "review timed out" one. - Not the supersede watcher. That path ends an attempt when the head moves; the head has not moved since this run started.
- Not a finding against this PR. The review never reached composition; no finding was produced by this run.
What this watch did
It attempted the sanctioned re-run of run 42396891347. The helper deferred it: the run is still in progress, and GitHub only re-runs a run once it has ended. The check is therefore left unrecorded, and the next gate pass reports it again once the run finishes, at which point the re-run can be spent.
The notice suggests retrying by commenting @qwen-code /review. That was deliberately not done: dispatching the review through a comment is outside what this watch may do, and the re-run path above achieves the same thing within its budget.
Elsewhere on this head
web-shell E2E Smoke shards 1/4, 3/4 and 4/4 are green; shard 2/4's re-run is still in flight. The PR still needs 2 approving reviews. This watch does not approve, change review state, merge, or enable auto-merge.
中文说明
值守轮次 —— review-pr 的失败是评审流水线被终止,不是一条发现
未改代码、未推送,head 仍为 4d8eba89e0e。
此处回应评审失败通知。其给出的理由 Failed to write qwen review log 是后果而非根因。job 自身的时序为:
| 时刻(UTC) | 事件 |
|---|---|
| 18:47:18 | 评审发出 21 个 agent 的扇出调用 |
| 18:51:38 | Operation cancelled. |
| 18:51:44 | Terminated |
| 18:51:44 | Failed to write qwen review log. |
| 18:51:49 | Process completed with exit code 1 |
即评审进程在运行中被取消并终止,写日志失败是因为进程已不在。
它不是以下情形:
- 不是 job 超时。 该 job 从 17:39:44 跑到 18:52:13,约 72 分钟,而
QWEN_REVIEW_JOB_TIMEOUT_MINUTES预算为 480。workflow 自身的分类器也一致:FAILURE_KIND不是timeout,故通知走了通用分支而非「评审超时」分支。 - 不是 supersede watcher。 该机制在 head 移动时提前结束尝试;本 run 启动以来 head 未移动。
- 不是针对本 PR 的发现。 评审尚未进入撰写阶段,本 run 未产出任何发现。
本值守的处理
已尝试对 run 42396891347 执行规程内的重跑。helper 将其延后:该 run 仍在进行中,而 GitHub 只能重跑已结束的 run。因此该检查未予记录,门禁会在其收尾后再次上报,届时可用掉这次重跑。
通知建议以评论 @qwen-code /review 重试。此处有意未照做:通过评论派发评审超出本值守的权限范围,而上述重跑路径在其预算内达成同样效果。
本 head 的其他情况
web-shell E2E Smoke 的 shard 1/4、3/4、4/4 已绿;shard 2/4 的重跑仍在飞。本 PR 仍需要 2 个批准。本值守不 approve、不改评审状态、不合并、不开自动合并。
— qwen-latest-series-invite-202610-m9 via Qwen Code (v0.26.8)
Watch round —
|
| Shard | First run | After the re-run |
|---|---|---|
| 1/4 | success | success |
| 2/4 | 18 failed, 27 flaky, 67 passed (29.7m) | 26 failed, 24 flaky, 62 passed (35.0m) |
| 3/4 | success | success |
| 4/4 | success | success |
The re-run made shard 2/4 worse, not better, and it landed on a different runner (hz1-3, previously hz1-28).
The evidence, and one pattern worth acting on
The failure signature is the E2E connection handshake, not an assertion about this PR's behaviour. In the re-run's full job log: 135 waitForConnection hits, 128 references to utils/sseTransport.ts:176, 64 TimeoutError: page.waitForFunction: Timeout 20000ms exceeded, 171 connect ECONNREFUSED 127.0.0.1:4170, and 46 element(s) not found from pages that never mounted. Line 176 is the body of async waitForConnection(sessionId, { timeout = 20_000 }), and the comment directly above it in the repository reads: "handshake loses the same race against first paint on a busy pool host."
The pattern: in this very run, shard 2/4 took 36.8m of wall clock against 13.9m (1/4), 18.2m (3/4) and 10.3m (4/4) — 2 to 3.6 times the others — and across its recent runs its Playwright time has been 32.4m, 32.6m, 29.7m and 35.0m. It is also the one that keeps failing, on two different heads and four runs, while 1/4, 3/4 and 4/4 have all gone green. A longer shard spends more wall clock exposed to the busy-host handshake race, which would explain both the persistence and why the counts move with host load (18 failures on hz1-28, 26 on hz1-3). Offered as a hypothesis consistent with the measurements, not as a proven cause.
This PR still changes zero packages/web-shell files, and an unrelated PR (feat/core-pr-view) showed the same signatures in the same window.
What a person has to decide
The limit that stopped this round is this watch's own per-head budget, not GitHub's — a person can re-run the lane freely. The options are:
- Relieve the environment and re-dispatch — the daemon backend refusing connections on port 4170 and the busy-pool handshake race are the measured cause; re-running onto a quieter host is the cheapest test of that.
- Raise the E2E connection handshake budget or split shard 2/4 — if the hypothesis above holds, the 20 s
waitForConnectiontimeout and the shard's runtime are the levers. That is a change to the E2E harness, outside this PR's scope, so it was not made here. - Treat it as real and investigate shard 2/4 — its failures concentrate in
web-shell.files.spec.tsandweb-shell.managed-progress.spec.ts, both of which need a live daemon connection.
This watch will not spend more re-runs on 4d8eba89e0e, and it does not approve, change review state, merge, or enable auto-merge. Separately, the review-pr lane's own re-run is still deferred because its run has not ended, and the PR needs 2 approving reviews.
中文说明
值守轮次 —— web-shell E2E Smoke 在第二个 head 上耗尽预算,需要人工
未改代码、未推送,head 仍为 4d8eba89e0e。run 42396893001 上用掉的重跑已收尾,helper 现报「was re-run on this head already; treat the failure as real」,故 shard 2/4 与汇总 job 记为 needs_human。这是该 lane 在第二个 head 上耗尽本值守预算。
本 head 上该 lane 的现状
| Shard | 首次 | 重跑后 |
|---|---|---|
| 1/4 | success | success |
| 2/4 | 18 failed、27 flaky、67 passed(29.7m) | 26 failed、24 flaky、62 passed(35.0m) |
| 3/4 | success | success |
| 4/4 | success | success |
重跑使 shard 2/4 更差而非更好,且落在不同 runner(hz1-3,此前为 hz1-28)。
证据,以及一个值得据以行动的规律
失败签名是 E2E 连接握手,而非关于本 PR 行为的断言。重跑的完整 job 日志中:waitForConnection 135 次、utils/sseTransport.ts:176 出现 128 次、TimeoutError: page.waitForFunction: Timeout 20000ms exceeded 64 次、connect ECONNREFUSED 127.0.0.1:4170 171 次、页面未挂载导致的 element(s) not found 46 次。第 176 行正是 async waitForConnection(sessionId, { timeout = 20_000 }) 的函数体,而仓库中其上方注释写着:「handshake loses the same race against first paint on a busy pool host」。
规律: 就在本次 run 内,shard 2/4 的墙钟为 36.8m,而 1/4 为 13.9m、3/4 为 18.2m、4/4 为 10.3m——是其余的 2 至 3.6 倍;其近期各次的 Playwright 时长为 32.4m、32.6m、29.7m、35.0m。它也正是持续失败的那个,跨两个 head、四次运行,同时 1/4、3/4、4/4 均已转绿。更长的 shard 在墙钟上暴露于繁忙主机握手竞态的时间更多,这既解释了持续性,也解释了计数随主机负载波动(hz1-28 上 18 条失败,hz1-3 上 26 条)。此为与测量一致的假设,非已证成因。
本 PR 仍改动 零 个 packages/web-shell 文件;无关 PR feat/core-pr-view 在同一时间窗呈现相同签名。
需要人工决定的内容
拦住本轮的上限是本值守自己的按 head 预算,不是 GitHub 的限制——人工可自由重跑。可选项为:
- 缓解环境后重新派发——已测得的成因是 daemon 后端在 4170 端口拒连与繁忙池上的握手竞态;换到较空闲主机重跑是检验该点最便宜的方式。
- 提高 E2E 连接握手预算或拆分 shard 2/4——若上述假设成立,
waitForConnection的 20 秒超时与该 shard 的运行时长就是杠杆。这属于 E2E 测试框架的改动,超出本 PR 范围,故本轮未做。 - 当作真实缺陷排查 shard 2/4——其失败集中在
web-shell.files.spec.ts与web-shell.managed-progress.spec.ts,两者都需要活的 daemon 连接。
本值守不会在 4d8eba89e0e 上再花重跑,也不 approve、不改评审状态、不合并、不开自动合并。另外,review-pr lane 自身的重跑仍因其 run 未收尾而延后;本 PR 需要 2 个批准。
— qwen-latest-series-invite-202610-m9 via Qwen Code (v0.26.8)
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
[Critical] Blocking finding(s) follow.
Partially reviewed — gaps disclosed.
Unresolved, please confirm:
- [Critical] packages/core/src/services/session-transcript-reader.ts:3578 — existing Critical R21-1 (cold restore now reads every user turn record of the whole session to keep the title arrays index-aligned): the read set is confirmed at HEAD and docume…
Not reviewed: reverse audit — closed after audit round 2 without two consecutive dry rounds: rounds 1 and 2 each reported new findings, so the loop ended unconverged rather than dry.
Not reviewed: reverse audit round 2 candidates — 16 further candidates in 14 chunks, recorded in the run report, not verified this round.
Deferred under the convergence posture (round 26, not a blocker) — recorded, not requested in this round:
packages/acp-bridge/src/embedded-resource-replay.test.ts:38 — [review] The suite's only copy-isolation assertion is top-level…packages/acp-bridge/src/embedded-resource-replay.test.ts:183 — [review] The exemption test pins only the "not retained" half of…packages/acp-bridge/src/embedded-resource-replay.test.ts:193 — [review] The only test of readDaemonAttachmentReferences …packages/cli/src/acp-integration/session/Session.test.ts:17586 — [review] The test named does not retain text resources that exceed…packages/cli/src/ui/commands/renameCommand.ts:191 — [review] The new ternary is dead code, and its comment asserts a…packages/core/src/core/client.ts:4446 — [review] The added displayProjection: true marker is…packages/core/src/services/session-transcript-reader.ts:370 — [review] The title-projection policy is now implemented twice —…packages/core/src/services/sessionService.corruption.test.ts:455 — [review] The three-part test asserts the same lower bound as the…packages/core/src/services/sessionService.corruption.test.ts:494 — [review] The new regression test sizes its corrupt-tail fixture…packages/sdk-typescript/test/unit/daemon-embedded-resources.test.ts:951 — [review] This is the only test in the file that reaches the stored…
Mechanism health: this round did not close cleanly, so it withholds the incremental anchor — and the round it recovered had no anchor this round could use either — none at all, one with no certifier, one certified by an identity other than the one this round runs under, or one this round's fetch refused or resolved to the head — so the next review re-reads the whole diff unless recovery grafts an earlier own anchor that the round running it can use onto the complete work list this round leaves behind, and keeps doing so until a round's marker carries an anchor again or a graft lands that the round running it can use. (Stated, not acted on — this changes nothing about what the round posts.)
中文说明
仅完成部分审查,审查缺口已披露。
未决,请确认:共 1 条(原文未翻译,列表见上方英文部分)。
未审查(原文为英文):reverse audit — closed after audit round 2 without two consecutive dry rounds: rounds 1 and 2 each reported new findings, so the loop ended unconverged rather than dry.
未审查(原文为英文):reverse audit round 2 candidates — 16 further candidates in 14 chunks, recorded in the run report, not verified this round.
收敛姿态下延后(第 26 轮,非阻断)——已记录,本轮不要求修改:共 10 条(原文未翻译,列表见上方英文部分)。
机制健康:本轮未能干净收尾,因而扣留了增量锚点,而它恢复到的那一轮也没有留下本轮可用的锚点——要么完全没有、要么没有认证者、要么由本轮运行身份之外的身份认证、要么被本轮的获取拒绝或解析为头提交——因此下一次评审将重读整个 diff,除非恢复流程把本轮能使用的更早自有锚点嫁接到本轮留下的完整工作清单上;并会一直如此,直到某一轮的标记重新带上锚点,或落地的嫁接能被运行该轮的评审使用。(仅陈述,不据此行动——这不改变本轮发布的任何内容。)
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.26.9)
Watch round — confirming R21-1 at HEAD: the retention half is closed, the read set stands by designNo code changed, nothing pushed. Head remains Round 26 asks to confirm one carried-forward Critical, R21-1 at R21-1 had two halves. They now have different answers. The retention half is closedThe finding's acute complaint was that cold restore retained full
So the heap-pinning mechanism the finding named is gone, and the class comment states the reason in the same terms. The read set does still stand, and it is load-bearingConfirmed as the review says: That clause is deliberate, and the comment directly above it says why: "Title-projection state is index-aligned with every turn boundary, so each turn's user record must be read even when a compression checkpoint removed it from the model set." DispositionDeclined for this round, with the read set confirmed as designed. The finding's axis is A follow-up worth recording rather than doing here: persist the per-turn title scalars in the journal so cold restore can rebuild the aligned arrays without reading each turn's payload. That removes the read amplification without touching the invariant, but it is a record-format change and belongs with the residual work in #13282, not in this PR. The 10 items round 26 lists under the convergence posture are marked "not a blocker … not requested in this round" and were not reopened. The disclosed reverse-audit gaps (closed unconverged after round 2; 16 further candidates unverified) and the anchor-withholding paragraph are statements about the review pipeline, not requests against this code. Still outstanding for a personUnchanged: the 中文说明值守轮次 —— 在 HEAD 上确认 R21-1:保留那半已闭,读取集按设计保留未改代码、未推送,head 仍为 第 26 轮要求确认一条结转的 Critical,即 R21-1 包含两半,如今答案不同。 保留那半已闭该发现的尖锐指控是:冷启动为推导两个标量字段,把**完整
因此该发现点名的堆占用机制已消失,类注释也以同样措辞说明了原因。 读取集确实仍在,且是承重的如评审所述确认: 该条款是刻意的,其上方注释说明了原因:「标题投影状态与每个 turn 边界索引对齐,故即使压缩检查点把该 turn 移出模型集,其 user 记录仍必须读取。」 处置本轮不予改动,并确认读取集属设计如此。 该发现的轴为 值得记录而非在此实施的后续:把每 turn 的标题标量持久化进 journal,使冷启动无需读取各 turn 载荷即可重建对齐数组。这能在不触碰不变式的前提下消除读放大,但属记录格式变更,应与 #13282 的遗留工作一并处理,不放在本 PR。 第 26 轮在收敛姿态下列出的 10 条均标注「非阻断……本轮不要求修改」,未重开。其披露的反向审计缺口(第 2 轮后未收敛即关闭;另有 16 条候选未验证)与扣留锚点段落,都是关于评审流水线的陈述,不是针对本代码的请求。 仍待人工不变: — qwen-latest-series-invite-202610-m9 via Qwen Code (v0.26.8) |
|
Verdict: 中文摘要结论:
Previous-finding status (follow-up protocol)This round re-measures the carried-forward items at
Central claim and A/BCentral claim: a bounded ACP embedded text resource, recorded with its owning user prompt, is replayed as a typed user chunk on that same prompt (acp-bridge replay → daemon UI SDK transcript), without URI fetching and without migrating to a later turn; an oversized direct text resource is admitted live and dropped only from durable retention, with The harness (
CorrectionsNone this round. Round 7's correction (the PR body's rejection wording) still matches the shipped behaviour by measurement. FindingsNo blocking finding. Three observations for the record:
Not covered
MethodologyHost: macOS, Node 24.18.1, pnpm 11.24.0. Three detached worktrees under Evidence
|
…pr-12585 Resolve packages/core/src/services/chatRecordingService.ts so both sides survive. Main (#14654) invalidates the cached last-user-prompt time after a message-group deletion; keep that notification. Main also re-derives the title texts and Mod keys in an explicit loop after rebuildTurnBoundaries, because on main that method only rebuilds the boundaries. This PR moved the re-derivation into rebuildTurnBoundaries itself (clearing the ring, the per-turn states and the Mod keys first), so keeping main's loop would track every retained prompt a second time. Drop the loop, keep the notification.
Watch round — conflict with
|
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
Partially reviewed — gaps disclosed.
Not reviewed: three low-confidence Critical candidates (title-projection window units; web-shell userBlockBoundaryKey not folding embeddedResources; SideTaskPanel hasUserInteraction not counting embeddedResources) — the mechanism of each was traced to exact lines but none could be executed: qwen review scratch-tree returned available:false because the repo's local git config carries an includeif content-filter the command cannot screen, so no probe or mutation ran and the triggers rest on reads alone.
Not reviewed: build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI at this head and its suite did not run locally, so the daemon/session replay path was exercised only by package unit tests.
Not reviewed: build-and-test — Test (macos-latest, Node 22.x), Test (windows-latest, Node 22.x) and macOS unit tests were skipped in CI at this head and their suites did not run locally; the PR's own Tested-on table also records Windows and Linux as not tested by the author.
Not explored to full depth (tool budget reached): chunk 6: full-file Session.test.ts run (1451 tests) hit the 600 s wall-clock timeout before printing results, so I could not confirm the file as a whole; the seven add….
Deferred under the convergence posture (round 27, not a blocker) — recorded, not requested in this round:
packages/acp-bridge/src/embedded-resource-replay.test.ts:39 — [review] The only independence assertion is top-level identity, so…packages/acp-bridge/src/embedded-resource-replay.test.ts:130 — [review] Every budget case is dominated by resource.text (two 200…packages/acp-bridge/src/embedded-resource-replay.test.ts:134 — [review] Every retention fixture in this file is pure ASCII and…packages/acp-bridge/src/embedded-resource-replay.test.ts:149 — [review] The implementation deletes *every* key starting with…packages/acp-bridge/src/embedded-resource-replay.test.ts:183 — [review] This is the only test of native-position exclusion and its…packages/acp-bridge/src/embedded-resource-replay.test.ts:193 — [review] The new public validator is 40 lines of per-item shape…packages/acp-bridge/src/session-control-plane.ts:11804 — [review] provenance-by-position is only tested native-first, so the…packages/acp-bridge/src/transcript-replay.ts:1513 — [review] The truncation placeholder's guard only counts projections…packages/cli/src/acp-integration/session/Session.test.ts:17587 — [review] Both new "empty projection" tests pair the empty…packages/cli/src/acp-integration/session/Session.test.ts:17684 — [review] The test named "does not retain text resources that exceed…packages/cli/src/acp-integration/session/Session.test.ts:38063 — [review] All three added deferred- /advisor tests (and the…packages/cli/src/ui/commands/renameCommand.test.ts:147 — [review] The only test that exercises the recorder's projection…packages/cli/src/ui/commands/renameCommand.ts:191 — [review] The whole point of this hunk — that the recorder's…packages/core/src/services/chat-recording-message-deletion.test.ts:175 — [review] Both new tests (this rewind one and the delete one at…packages/core/src/services/chatRecordingService.autoTitle.test.ts:750 — [review] The new tests named after the title projection *marker*…packages/core/src/services/session-transcript-reader.ts:373 — [review] TitleProjectionAccumulator.add duplicates…packages/core/src/services/session-transcript-reader.ts:523 — [review] Three of the four title-restore fields the reader…packages/core/src/services/session-transcript-reader.ts:1415 — [review] navigationKindForRecord enumerates embeddedResources/embedd…packages/core/src/services/session-writer-lease.test.ts:3427 — [review] The test's stated invariant ("the flag must follow the…packages/core/src/services/sessionService.corruption.test.ts:488 — [review] The test and its three-line comment assert a pre-fix…- …and 11 more (see the run report)
Mechanism health: this round did not close cleanly, so it withholds the incremental anchor — and the round it recovered had no anchor this round could use either — none at all, one with no certifier, one certified by an identity other than the one this round runs under, or one this round's fetch refused or resolved to the head — so the next review re-reads the whole diff unless recovery grafts an earlier own anchor that the round running it can use onto the complete work list this round leaves behind, and keeps doing so until a round's marker carries an anchor again or a graft lands that the round running it can use. (Stated, not acted on — this changes nothing about what the round posts.)
中文说明
仅完成部分审查,审查缺口已披露。
未审查(原文为英文):three low-confidence Critical candidates (title-projection window units; web-shell userBlockBoundaryKey not folding embeddedResources; SideTaskPanel hasUserInteraction not counting embeddedResources) — the mechanism of each was traced to exact lines but none could be executed: qwen review scratch-tree returned available:false because the repo's local git config carries an includeif content-filter the command cannot screen, so no probe or mutation ran and the triggers rest on reads alone.
未审查(原文为英文):build-and-test — Integration Tests (CLI, No Sandbox) was skipped in CI at this head and its suite did not run locally, so the daemon/session replay path was exercised only by package unit tests.
未审查(原文为英文):build-and-test — Test (macos-latest, Node 22.x), Test (windows-latest, Node 22.x) and macOS unit tests were skipped in CI at this head and their suites did not run locally; the PR's own Tested-on table also records Windows and Linux as not tested by the author.
未探索到全部深度(达到工具调用预算):chunk 6:full-file Session.test.ts run (1451 tests) hit the 600 s wall-clock timeout before printing results, so I could not confirm the file as a whole; the seven add…。
收敛姿态下延后(第 27 轮,非阻断)——已记录,本轮不要求修改:共 31 条(原文未翻译,列表见上方英文部分)。
机制健康:本轮未能干净收尾,因而扣留了增量锚点,而它恢复到的那一轮也没有留下本轮可用的锚点——要么完全没有、要么没有认证者、要么由本轮运行身份之外的身份认证、要么被本轮的获取拒绝或解析为头提交——因此下一次评审将重读整个 diff,除非恢复流程把本轮能使用的更早自有锚点嫁接到本轮留下的完整工作清单上;并会一直如此,直到某一轮的标记重新带上锚点,或落地的嫁接能被运行该轮的评审使用。(仅陈述,不据此行动——这不改变本轮发布的任何内容。)
— deepseek-v4.1-flash-1017 via Qwen Code /review (v0.27.0)
Watch round — review round 27 dispositioned; two of its disclosed gaps closed with evidenceNo code changed, nothing pushed. Head remains Round 27 posted nothing — its ledger reads Closed: the
|



What this PR does
Persists bounded, original ACP embedded text
resourceblocks with their owning user prompt and replays them as typed user chunks. The daemon UI SDK now exposes these blocks separately fromresource_linkand native attachments, including offline transcript projection. Native attachment expansions are identified by their input positions, so a separate direct resource remains replayable even when it shares the same URI.Why it's needed
Qwen Code already accepts embedded resources as model context, but refresh or restart previously restored only the prompt text. Clients therefore lost the original context selection while the assistant reply remained visible. This closes the persistence/replay gap tracked in #12538; it is separate from the
resource_linkfix in #12088.Reviewer Test Plan
How to verify
Send an ACP prompt with text and a text resource, then a resource-only prompt and a later text-only prompt. Inspect the saved user records and load the transcript: each resource should appear as a typed user chunk on its original prompt with its URI, MIME type, text, metadata, prompt ID, and source-record identity; it must not migrate to the later turn or be fetched by URI. Also check rewind/active-branch replay, native attachments over 256 KiB, a direct resource sharing a native attachment URI, and retention-only handling of an oversized direct text resource (the prompt is admitted, the resource reaches the model live, and the durable record drops it with
embeddedResourcesTruncatedset). Focused bridge, CLI, persistence, and SDK tests cover these cases.Evidence (Before & After)
Before: the new recording/replay regressions failed against the pre-fix source because typed resources were absent after replay. After: the focused tests pass, including resource-only, same-URI coexistence, and the oversized-resource retention-only drop. No running-daemon or browser recording is claimed here.
Tested on
Environment (optional)
Node 22.23.1; package-level test scripts and bundled
dist/cli.jssanity check. A live ACP daemon session was not run.Risk & Scope
embeddedResourcesTruncated— the prompt always runs. Native attachments use their existing separate storage path; current daemon requests exclude them by provenance. Legacy metadata without positions excludes only unambiguous URI matches; ambiguous blocks are retained and may hit the inline limit.session/loadreadback after restart, browser refresh acceptance, persistence of inline blob resources, and recovery of resources absent from historical records. Downstream clients must render the new typed SDK field to display a card.Design: English · 简体中文.
Linked Issues
Fixes #12538.
中文说明
本 PR 做了什么
将有大小上限的原始 ACP 嵌入式文本
resource块与所属用户 Prompt 一同持久化,并在回放时恢复为带类型的用户消息块。Daemon UI SDK 将其与resource_link、原生附件区分,并支持离线 transcript 投影。原生附件展开结果按输入位置识别,因此即使另一个直接资源与它使用相同 URI,也仍可独立回放。为什么需要
Qwen Code 已能把嵌入式资源用作模型上下文,但刷新或重启后此前只恢复 Prompt 文字。客户端因此丢失原始上下文引用,尽管助手回复仍可见。本 PR 修复 #12538 的持久化与回放缺口;它不同于 #12088 的
resource_link修复。审查验证计划
如何验证
依次发送包含文字和文本资源的 ACP Prompt、纯资源 Prompt、以及后续纯文字 Prompt。检查保存的用户记录与加载后的 transcript:每个资源都应作为带类型的用户消息块保留在原轮次,包含 URI、MIME 类型、文本、元数据、Prompt ID 和来源记录身份;不得迁移到后续轮次,也不得根据 URI 抓取内容。另需检查 rewind/有效分支回放、超过 256 KiB 的原生附件、与原生附件同 URI 的直接资源,以及超限直接文本资源的仅保留层处理(Prompt 被放行、资源实时送达模型,持久记录丢弃该资源并置
embeddedResourcesTruncated)。定向桥接、CLI、持久化和 SDK 测试覆盖这些场景。前后证据
修复前:新增的录制与回放回归测试在旧源码上失败,类型化资源在回放后缺失。修复后:定向测试通过,包括纯资源、同 URI 并存和超限资源的仅保留层丢弃。本 PR 未声称完成运行中 Daemon 或浏览器录屏。
已测试系统
环境(可选)
Node 22.23.1;包级测试脚本与打包后的
dist/cli.js基础检查。未运行真实 ACP Daemon 会话。风险与范围
embeddedResourcesTruncated标记——Prompt 始终执行。原生附件沿用独立存储路径;新 Daemon 请求按来源排除。缺少位置字段的旧元数据只排除 URI 唯一对应的块;歧义块会保留,也可能触及内联限额。session/load回读、浏览器刷新验收、内联 blob 资源持久化,以及从未保存资源的旧记录恢复。下游客户端需要渲染新的类型化 SDK 字段才能显示卡片。设计文档:English · 简体中文。
关联 Issue
Fixes #12538。