Skip to content

[PR] fix: normalize inline requests with Fetch semantics - #6563

Merged
ranxianglei merged 15 commits into
ranxianglei:masterfrom
Afloat16:2026-11-13_inline-request-init-parity
Nov 14, 2026
Merged

ranxianglei merged 15 commits into
ranxianglei:masterfrom
Afloat16:2026-11-13_inline-request-init-parity

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #6562

Problem

The inline engine implements Request conversion itself, merging headers, eagerly consuming the old body even when a replacement is provided, treating null as an empty body, and swallowing body-read errors. This differs from the Fetch interface that the inline transport replaces. Explicit header replacement can retain an old Authorization header, and an unused unfinished body can block an otherwise ready request.

Changes

Use the platform Request constructor to resolve the effective method, headers and body before converting it to the pipeline's HTTP-shaped request. Remove the partial body serializer. Standard string/URLSearchParams content types and multipart FormData serialization now match Fetch, and invalid/failed body reads reject at the dispatcher boundary.

Validation

  • New 15-case suite exercises the real inline engine against a loopback HTTP echo server. Unchanged master: 13 failures, 2 passing controls; fixed branch: 15 pass.
  • New and existing pi-inline / inline-streaming suites: all 23 tests pass.
  • Root typecheck, full build, unused-export gate, test-import-graph gate and git diff --check pass on base e1f31ad9d5b47500362699a9867819b861c7de96.
  • Cases cover object/Headers/tuple/empty header overrides, inherited undefined/null bodies, empty/nonempty replacements, unused open streams, consumed/erroring streams, string/URL inputs, URLSearchParams, FormData boundaries and GET-body rejection.

This is host-side Fetch normalization. It leaves the pipeline, kernel, persistence and cancellation lookup untouched; #6504 separately addresses the engine's cancellation signal. Direct-fallback replay policy is outside this change. Hosted CI and real-model E2E are not claimed by the local results.

Remote CI follow-up (2026-11-13)

CI run 43459246138 is failed, not green. I inspected every failed test job: Ubuntu Node 22/24 report the two notice-registry.test.ts assertions for the sqlite-default notice; Windows Node 22 additionally reports EBUSY while deleting index.db in persist-zstd.test.ts and persist-metadata-fold-gate.test.ts teardown. None of the changed files owns those paths. On the unchanged base e1f31ad9d5b47500362699a9867819b861c7de96, running the notice suite with the exact CI preload chain reproduces 3 passed / 2 failed (without the legacy-storage preload it is 5 passed / 0 failed).

Existing upstream PR #6561 / issue #6547 covers these same storage-baseline and Windows-handle failures. This PR keeps its focused product change separate; its full CI verdict remains failed until the upstream test fixes land and the head is rechecked. Windows reproduction here is limited to the remote job logs.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)

查重: 不重复。 Same-author inline-engine Fetch-parity family (#6502 null response body, #6504 cancellation signal, #6556 cancellation across native Request reconstruction, #6560 pre-fallback cancellation, #6566 fallback field preservation, #6571 response-body-cancel stop), but this PR's mechanism is distinct: it rewrites the Request→pipeline conversion (toInlineReq) in src/inline-engine.ts. #6566 explicitly defers to this one ("#6563 fixes conversion within a running engine") and owns only the direct-fallback replay. No diff or failure-domain overlap.

Verification performed (all local, targeted):

  • Bug confirmed on master e1f31ad9d5: ran the PR's new suite against UNCHANGED master → exactly 13 failures + 2 passing controls, matching the PR's claim. Header retention, eager consumption, null-body clearing, swallowed read errors, and missing content types are all real.
  • PR branch: new suite 15/15 pass; existing pi-inline + inline-streaming 8/8; launcher-pi-inline + launcher-opencode-inline + pi-inline-ws 8/8; tsc --noEmit clean.
  • Base freshness: merge-base is the current master tip (e1f31ad9d5), 0 commits behind.
  • CI (mirror cache): 24/30 checks green-or-skipped, 6 queued (test-import-graph, kernel-guard, lock-sync, docs-coverage, lifecycle-ledger-guard, plan), 0 failed so far.

Code review: the fix is at the right layer — it deletes the second partial Fetch implementation (manual header merge + bodyToBuffer serializer) and delegates normalization to the platform Request constructor, then reads the effective request's method/headers/bytes. Root-cause fix, not a mask. I probed Node's Request semantics directly: method uppercasing, content-type inference, GET/HEAD body rejection, and host header preservation (so the loopback Host-gate fallback in toInlineReq is untouched) all hold. The 15-case suite is a real regression suite: it drives the actual engine against a loopback HTTP echo server, asserts wire-level method/headers/body bytes, uses a hits counter to pin "reject before any upstream call", and a 10 s guard against the stream hang — and it demonstrably fails on master.

Intentional behavior changes (old → new, all disclosed in the PR):

  1. init.headers on a Request input: merge-on-top → full replacement (the core fix; old code retained stale Authorization).
  2. Consumed/errored Request body: silently converted to an empty request (.arrayBuffer().catch(() => null)) → rejects at the dispatcher boundary before any upstream call.
  3. GET/HEAD with a body: sent → rejects (matches fetch).
  4. String/URLSearchParams/FormData bodies: no Content-Type (FormData rejected outright) → Fetch-inferred content types, multipart boundary for FormData.
  5. ReadableStream body without duplex: 'half': accepted → throws (matches real fetch; any host that streams already must pass duplex to real fetch).

Interaction with #6566 (merge-order note): the new rejection cases on model URLs now flow into the inline transport's degrade path in src/agent/pi-inline.ts:42-58, which replays send(url, init) with the original init — for a Request input with undefined init that is an empty header-less GET. That replay breakage is exactly what #6566 fixes. Both old and new behavior were broken for those inputs (old: empty body silently through the pipeline), so this is not a regression — but #6566 should land together with or before #6563, and its thread should also fix the now-misleading "inline engine unavailable" log line that will fire for malformed-request rejections.

Suggested labels (not applied — the source PR is owner/automation-owned): bug, p2, scope/wiring (matches the issue's suggested triage: specific trigger conditions, inline lane only, workaround exists).

Verdict: code quality meets the bar — no rework needed. Approve pending CI green; merge #6566 first or in the same batch.


结构化八问

  1. 是什么问题: 内联引擎(pi/opencode 内联车道的进程内压缩)自己手写了一套 Request→HTTP 转换,与它所要替代的 Fetch 契约漂移:头部覆盖是合并而非替换(旧的 Authorization 被保留)、提供了替换 body 时仍会先消费原 body、null body 会清掉继承的 body、body 读取错误被吞成空请求、标准 content-type 缺失。
  2. 什么原因导致的: 在平台 Request 之外维护了第二套 Fetch 语义的部分实现(手工头部合并 + bodyToBuffer 序列化器),两套实现各自演化必然漂移——根因是重复实现,不是某一行写错。
  3. 影响范围与严重程度: 仅 pi/opencode 内联车道;触发条件:传 Request 对象且带 init 覆盖、已消费/出错 body、GET 带 body、或无显式 content-type 的 string/FormData body。p2——错误/空请求发到模型或请求挂起;生产主路径(string URL + JSON + 显式 content-type)不受影响。
  4. 怎么修复的: 归一化整体委托给平台 Request 构造器(Fetch 语义的单一事实源),再读取有效请求的 method/headers/字节;删掉部分序列化器。非法/已消费 body、GET+body 在到达上游前于 dispatcher 边界拒绝。
  5. 是否有回归问题: 逐项审过既有行为——string/URL 输入路径(生产主导)除已披露的 content-type 推断与 GET+body 拒绝外逐字节不变;abort 路径调用方看到同样的 AbortError(预先 abort 的信号改在构造器抛出,少一条日志行,行为不变);host 头部回环 fallback 不变(已实测 Node 构造器保留 host);pipeline/kernel/持久化未触碰(diff 范围)。唯一交互:新拒绝会进入 pi-inline.ts 的降级重放,而该重放在 Request 输入下是坏的——那是 [PR] fix: preserve Request fields during inline fallback #6566 的范围,且本 PR 之前同样坏。
  6. 是否破坏缓存: 主导 JSON 路径显式 content-type 不变,上游 prompt-cache 键不变;此前非标准的 shape(无 content-type 的 string body)头部集现在与 fetch 一致,若该 shape 曾被发送则有一次性上游缓存未命中,而该 shape 本来就是坏的。
  7. 是否改了设计方向: 没有——正是向既定方向收敛:内联传输替代 fetch,Fetch 语义就应来自平台而不是第二套实现。
  8. 是否引入了新的配置: 无。

收工判定: 修法正确、测试是真回归测试(master 上 13/15 红,分支上 15/15 绿)、diff 干净最小;CI 绿后可合,与 #6566 同批或在其之后合入。

@Afloat16

Copy link
Copy Markdown
Contributor Author

(ai: openai/gpt-6-astra)

Addressed the logging follow-up in #6566 at 7da680cfc9331f3a6125e6280ca825c0869c8b8f: the diagnostic now says an inline request failed and direct fallback is being attempted, instead of assuming that every startup/dispatch rejection means the engine is unavailable. The fallback policy is unchanged.

Verified the updated #6566 head with its 21 focused cases, then temporarily composed #6563 and #6566: all 36 request-normalization, fallback, inline transport and streaming cases pass. The proposed merge order is #6566 first, or both in the same batch.

The current hosted failures on the earlier heads are the base-wide storage test failures covered by #6561; the PR bodies now include the failed run links and the reproduced notice baseline. The new #6566 follow-up head still needs its own CI result.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

CI update — the 4 red shards are inherited master red, not this PR's code.

CI finished: 30/30 checks, 26 green/skipped, 4 red test shards. I pulled the job logs and master's own run:

  1. visibleNotices ×2 (red in ubuntu 24/2, ubuntu 22/2, windows 22/3) — the exact same 2 tests fail on master tip e1f31ad9d5's own CI run (born-red; CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 documents it as the [PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 pure-SQLite default, awaiting ci-fixes convergence; same signature already reported on PRs [PR] fix(compress): make nudgeModelDecided decide lane usable on default-thinking models (option A from #5030) #5055 / [PR] fix(omp): default PI_ANTHROPIC_MESSAGE_THREADS=0 so bili sees the full history #6113).
  2. store: BILI_PERSIST_ZSTD ×10 + metadata fold #5506 ×3 (windows 22/1, windows 22/3) — every one is EBUSY: resource busy or locked, unlink '…index.db': the known Windows file-lock flake family (windows-22-1 lane randomly red: during test cleanup, unlink index.db hit an EBUSY external lock, couldn't survive tmp-rm | windows-22-1 车道随机红:测试清理期 unlink index.db 遇 EBUSY 外部锁,熬不过 tmp-rm 的 9.6 秒重试梯子(#2799/#2908 族复发) #4347), green on rerun.
  3. This PR's own suite is green in CI: all 15 new tests pass in the ubuntu 22/1 shard (ok 1028–1042).
  4. Zero diff intersection: the PR touches only src/inline-engine.ts + tests/inline-request-init.test.ts; none of the failing tests (notices / storage / metadata fold) sit on that path.

The standard "merge origin/ci-fixes" remedy is not applicable right now: ci-fixes (a007974683) is an ancestor of this PR's base — zero new commits to merge (the sentinel's fix has not landed yet; #4599 shows its session was spawn-refused on a full disk). So there is no branch-side action to take; the shards clear once master/ci-fixes converges (the Windows flakes also clear on rerun).

Verdict unchanged: the code is approved; the red is inherited. Safe to merge from this PR's side at any time.


八问(第 2 轮 — CI 结果更新;未列项与首轮回复一致)

  1. 是什么问题:PR CI 4 个 test 分片红,需判定是否本 PR 代码所致。
  2. 什么原因导致的:全部为继承性失败——visibleNotices ×2 在 master tip 自身 CI 即红([PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 pure-SQLite default 的 born-red,CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 已记录);Windows store/metadata-fold ×13 为 EBUSY 文件锁 flake(windows-22-1 lane randomly red: during test cleanup, unlink index.db hit an EBUSY external lock, couldn't survive tmp-rm | windows-22-1 车道随机红:测试清理期 unlink index.db 遇 EBUSY 外部锁,熬不过 tmp-rm 的 9.6 秒重试梯子(#2799/#2908 族复发) #4347 家族)。与本 PR diff 零交集。
  3. 影响范围与严重程度:仅影响本 PR 的 CI 显示(无法全绿),不影响 PR 代码正确性;PR 自带 15 个新用例在 CI 中全绿。
  4. 怎么修复的:无需分支侧动作——ci-fixes 无新提交(是 PR base 的祖先),「merge ci-fixes」为 no-op;等哨兵把 master 修复收敛进 ci-fixes 后重跑/合并即可。
  5. 是否有回归问题:无(同首轮:5 项有意行为变更已披露,无意回归未检出)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

判定:approve(红为继承性,非本 PR 之过);owner 可随时合并,或等 ci-fixes 收敛后合并。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

Re-verified the live check state first: still red on the same 4 test lanes at head ebf3a5b7ec (not an already-fixed event). I pulled all 4 failing job logs and reproduced the failures locally. No code change was pushed — every red is inherited or flaky, none is caused by this PR's diff.

What the 4 lanes actually contain (two distinct causes):

  1. tests/notice-registry.test.ts — visibleNotices ×2 (ubuntu-22 shard 2, ubuntu-24 shard 2, windows-22 shard 3): an inherited master-level born-red introduced by [PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 (pure-SQLite default, 5a80e2b8ea). The new storage-sqlite-default notice is gated on sqliteDefaultNoticeActive (src/notices.ts:82) → unifiedSelectionIsSqlite, which requires the ambient BILI_STORAGE_UNIFIED to be ABSENT (the pure-sqlite default). But the CI preload tests/preload-storage-baseline.mjs pins BILI_STORAGE_UNIFIED ??= "legacy" for the whole suite, so the gate is false in CI, the notice is hidden, and the assertion misses the id. Reproduced locally: clean env 5/5 green; BILI_STORAGE_UNIFIED=legacy or =full → the same 2 reds, byte-identical signature to CI. Already logged at CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floors 1305/1307/1310/1311/1312 (five PRs, same signature); the hermetic fix was requested on ci-fixes, but origin/ci-fixes is still 0 ahead of master (a007974683) — not yet converged.

  2. Windows EBUSY: resource busy or locked, unlink '…index.db' (windows-22 shard 1: Scheduled full test failed: ee0dcc7c | 定时全量测试失败: ee0dcc7c #5506 metadata-fold ×3; windows-22 shard 3: BILI_PERSIST_ZSTD store ×10): the known transient Windows file-lock flake family in the tests/tmp-rm.ts rimraf teardown (documented at CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floors 1307②/1310/1312). Not an assertion regression — green on re-run.

Why I did not push a fix to this branch: per owner policy 2026-10-24 (CI failure coordination), master-level failures must converge on ci-fixes via the sentinel — re-fixing them in each PR branch is explicitly forbidden. This PR's diff (src/inline-engine.ts + tests/inline-request-init.test.ts) has zero intersection with notices/storage, and the branch already contains master + ci-fixes (merging ci-fixes is a no-op). The EBUSY flake is runner/OS-level, not fixable in-branch. I reported the status to #4599, including that the sentinel has had no convergence action since the disk-full spawn refusal at floor 1309.

Bottom line: the branch needs no change. It goes green once the sentinel lands the visibleNotices hermetic fix on ci-fixes (then git merge origin/ci-fixes + re-trigger) and the Windows EBUSY flakes clear on re-run. Further auto-fix attempts on this PR will hit the same wait until ci-fixes converges.

八问(中文):

  1. 是什么问题:4 个 test 分片红,实为两类:① visibleNotices×2 继承 born-red([PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 引入,CI preload 钉 BILI_STORAGE_UNIFIED=legacy 使 sqlite 公告门假);② Windows EBUSY unlink index.db 文件锁 flake(Scheduled full test failed: ee0dcc7c | 定时全量测试失败: ee0dcc7c #5506×3 + BILI_PERSIST_ZSTD×10,重跑即绿)。
  2. 什么原因导致的:① [PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 新增的 storage-sqlite-default 公告由 sqliteDefaultNoticeActive(src/notices.ts:82)门控,要求 ambient BILI_STORAGE_UNIFIED 缺失(pure-sqlite 默认),而 CI 全套件 preload 钉死 legacy → 门假 → 公告不显示 → 断言缺项;测试未 hermetic(未自 pin 存储 env)。② Windows runner 的 AV/indexer 短暂锁住刚写的 index.db,rimraf 清理超时。
  3. 影响范围与严重程度:所有跑全矩阵的 PR head(继承 born-red ①);Windows 分片的存储测试(flake ②,瞬时)。是 CI 信号问题,非用户侧功能问题。
  4. 怎么修复的:本轮未在分支修——按 owner policy 2026-10-24,master 级失败必须收敛到 ci-fixes(哨兵维护),禁止在各自 PR 分支重复修;已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 报状态(含哨兵自 floor 1309 disk-full 后无收敛动作)。修法是让 tests/notice-registry.test.ts hermetic(自 pin/unset BILI_STORAGE_UNIFIED),由哨兵落 ci-fixes。
  5. 是否有回归问题:不涉及——本 PR diff(src/inline-engine.ts + tests/inline-request-init.test.ts)与 notices/storage 零交集,4 红均非本 PR 引入(本地 clean env 5/5 绿已证)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:本 PR 分支无需改动;等哨兵把 visibleNotices hermetic 修收敛到 ci-fixes 后 git merge origin/ci-fixes 重跑即绿,Windows EBUSY flake 重跑即清。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Re-verified the live check state first: all 4 test lanes are still red at head ebf3a5b7ec (not an already-fixed event). I pulled the 4 failing job logs and reproduced the failures locally. No code change was pushed — every red is inherited or flaky, none is caused by this PR's diff (which only touches src/inline-engine.ts + tests/inline-request-init.test.ts).

Two distinct causes across the 4 lanes:

  1. tests/notice-registry.test.ts — visibleNotices ×2 (ubuntu-22 s2, ubuntu-24 s2, windows-22 s3): inherited master-level born-red from [PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 (pure-SQLite default, 5a80e2b8ea). The storage-sqlite-default notice is gated on sqliteDefaultNoticeActive (src/notices.ts:82) → unifiedSelectionIsSqlite, which needs the ambient BILI_STORAGE_UNIFIED ABSENT; but the CI preload tests/preload-storage-baseline.mjs pins BILI_STORAGE_UNIFIED ??= "legacy" for the whole suite, so the gate is false in CI and the notice is hidden. Reproduced locally: clean env 5/5 green; BILI_STORAGE_UNIFIED=legacy or =full → the same 2 reds, byte-identical to CI. Already logged at CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floors 1305/1307/1310/1311/1312; the hermetic fix is requested on ci-fixes but origin/ci-fixes is still 0 ahead of master (a007974683) — not converged.
  2. Windows EBUSY: resource busy or locked, unlink '…index.db' (windows-22 s1: Scheduled full test failed: ee0dcc7c | 定时全量测试失败: ee0dcc7c #5506 ×3; windows-22 s3: BILI_PERSIST_ZSTD ×10): the known transient file-lock flake in tests/tmp-rm.ts rimraf teardown (green on re-run), documented at CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floors 1307②/1310/1312.

Why no push: owner policy 2026-10-24 — master-level failures converge on ci-fixes via the sentinel, re-fixing in each PR branch is forbidden; the EBUSY flake is runner/OS-level. The branch already contains master + ci-fixes (merge would be a no-op). I reported the status to #4599, including that the sentinel has had no convergence action since the disk-full spawn refusal at floor 1309.

Bottom line: the branch needs no change. It goes green once the sentinel lands the visibleNotices hermetic fix on ci-fixes (then git merge origin/ci-fixes + re-trigger) and the Windows flakes clear on re-run.

八问(中文):

  1. 是什么问题:4 个 test 分片红,实为两类:① visibleNotices×2 继承 born-red([PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 引入,CI preload 钉 BILI_STORAGE_UNIFIED=legacy 使 sqlite 公告门假);② Windows EBUSY unlink index.db 文件锁 flake(Scheduled full test failed: ee0dcc7c | 定时全量测试失败: ee0dcc7c #5506×3 + BILI_PERSIST_ZSTD×10,重跑即绿)。
  2. 什么原因导致的:① [PR] storage: pure-SQLite default — JSON envelopes stop being written unless dual-write is requested (#6479) #6480 新增的 storage-sqlite-default 公告由 sqliteDefaultNoticeActive(src/notices.ts:82)门控,要求 ambient BILI_STORAGE_UNIFIED 缺失(pure-sqlite 默认),而 CI 全套件 preload 钉死 legacy → 门假 → 公告不显示 → 断言缺项;测试未 hermetic(未自 pin 存储 env)。② Windows runner 的 AV/indexer 短暂锁住刚写的 index.db,rimraf 清理超时。
  3. 影响范围与严重程度:所有跑全矩阵的 PR head(继承 born-red ①);Windows 分片的存储测试(flake ②,瞬时)。是 CI 信号问题,非用户侧功能问题。
  4. 怎么修复的:本轮未在分支修——按 owner policy 2026-10-24,master 级失败必须收敛到 ci-fixes(哨兵维护),禁止在各自 PR 分支重复修;已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 报状态(含哨兵自 floor 1309 disk-full 后无收敛动作)。修法是让 tests/notice-registry.test.ts hermetic(自 pin/unset BILI_STORAGE_UNIFIED),由哨兵落 ci-fixes。
  5. 是否有回归问题:不涉及——本 PR diff(src/inline-engine.ts + tests/inline-request-init.test.ts)与 notices/storage 零交集,4 红均非本 PR 引入(本地 clean env 5/5 绿已证)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:本 PR 分支无需改动;等哨兵把 visibleNotices hermetic 修收敛到 ci-fixes 后 git merge origin/ci-fixes 重跑即绿,Windows EBUSY flake 重跑即清。

The suite baseline preload (preload-storage-baseline.mjs) pins
BILI_STORAGE_UNIFIED="legacy" for the broad corpus. After ranxianglei#6480 flipped the
storage default to pure-sqlite, the notice-registry suite's visibleNotices
assertions expect the pure-sqlite default notice, which is gated on
unifiedSelectionIsSqlite (unified "sqlite" or absent) — the preload's
"legacy" made the notice silent, so the suite was born-red on master. Pin
the selection explicitly (ranxianglei#4011 lesson: a test that depends on the production
default passes locally but fails in CI).
ework-agent and others added 12 commits November 14, 2026 10:20
…test

The dsh plugin lane (ci-e2e-dsh.yml) runs node --import tsx --test
WITHOUT the preload-storage-baseline.mjs preload, so BILI_STORAGE_UNIFIED
is unset and the storage mode defaults to 'full'. Under the pure-sqlite
default flip (5a80e2b, ranxianglei#6480), 'full' mode turns the JSON envelope
writer OFF — so the .content-store.json sidecar is never written, and
the test's readdirSync(namespace) hits ENOENT.

Pin BILI_STORAGE_JSON_WRITER=on in the test so the content-store
sidecar is written regardless of the storage mode. This keeps the
corrupted-store detection path exercised in both full and legacy modes.

Closes: dsh plugin lane red on master (run 43532980164, job 132255459726)
The pure-sqlite default flip (5a80e2b, ranxianglei#6480) turns the JSON envelope
writer OFF, so the .json session file this lane asserts on is never
written and 'proxy must persist the session' / 'no persisted session
carried compressed blocks' fail after the 20s wait. Pin the writer ON in
the spawned client's env (the bootstrapped proxy inherits it) so the
envelope this test was written for is still produced.

Closes: native opencode lane red on master (run 43547593803, job 132302438610)
Same pure-sqlite default flip (5a80e2b, ranxianglei#6480) as the opencode lane:
the JSON envelope writer is OFF, so 'proxy must persist the session
within 20000ms' fails — the on-disk .json session file is never written.
Pin the writer ON in the spawned dsh client's env (the bootstrapped
proxy inherits it).

Closes: native dsh lane red on master (run 43547497015, job 132302138843)
…e2e lane

Same pure-sqlite default flip (5a80e2b, ranxianglei#6480) as the opencode/dsh
lanes: the JSON envelope writer is OFF, so 'session persisted' fails —
the on-disk .json session file is never written. Pin the writer ON in
the spawned pi client's env (the bootstrapped proxy inherits it).

Closes: pi codex-responses WS lane red on master (run 43547626291, job 132302540960)
…lane

4th lane of the pure-sqlite default flip (5a80e2b, ranxianglei#6480) family: the
JSON envelope writer is OFF, so 'proxy must persist the session' and
'at least one persisted session must carry compressed blocks' fail — the
on-disk .json session file is never written. Pin the writer ON in the
spawned pi client's env (the bootstrapped proxy inherits it).

Closes: pi package-native lane red on ci-fixes (run 43558179054, job 132336647955)
Same pure-sqlite default flip (5a80e2b, ranxianglei#6480) family: the JSON writer
is OFF, so the per-session CCR content-store sidecar (.content-store.json)
that 'child persists its own companion and survives a proxy restart'
asserts on is never written (0 !== 1). The earlier b1bc17b pin only
covered tests/plugin-fork.test.ts, not this file. Pin the writer ON at
module load (before any SessionStore is constructed).

Closes: dsh plugin lane red on ci-fixes (run 43558179102, job 132336519539)
…lane

Pure-sqlite default flip (5a80e2b, ranxianglei#6480) family: the JSON envelope
writer is OFF, so 'proxy must persist the session' fails — the on-disk
.json session file is never written. Pin the writer ON in the spawned
opencode client's env (the bootstrapped proxy inherits it).
Pure-sqlite default flip (5a80e2b, ranxianglei#6480) family: the JSON envelope
writer is OFF, so the on-disk .json session envelope this lane asserts on
(exactly ONE persisted session under the raw key) is never written. Pin
the writer ON in the spawned dsh client's env.
Pure-sqlite default flip (5a80e2b, ranxianglei#6480) family: the JSON envelope
writer is OFF, so the on-disk .json session file this lane asserts on
(state survival across the OLD→NEW update) is never written. Pin the
writer ON in the spawned proxy's env (both update phases share envBase).
@ranxianglei
ranxianglei merged commit 5e4bcb6 into ranxianglei:master Nov 14, 2026
50 checks passed
@ranxianglei

Copy link
Copy Markdown
Owner

Superseded by #6677 (merged as 3858b6956, 2026-11-14).

Landed into master via the real merge commit 5e4bcb67fa8 (Merge Afloat16/2026-11-13_inline-request-init-parity (PR #6563)), so your original commits are preserved verbatim in master history — only hashes of the batch wrapper changed, your authorship and commit messages are intact.

The fix for #6562 is now in master. Closing this PR as superseded — thanks for the careful, well-tested fix.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Acknowledged — PR #6563 superseded by #6677 (merged as 3858b6956), fix for #6562 now in master via merge commit 5e4bcb67fa8. No further CI action needed from this lane; the 4 red test lanes were all inherited/flaky (visibleNotices born-red from #6480 + Windows EBUSY flakes), none from this PR's diff, so nothing to carry over. Closing out.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inline Request conversion violates Fetch header and body override semantics

2 participants