Repository navigation
[PR] fix: normalize inline requests with Fetch semantics - #6563
ranxianglei merged 15 commits into
Conversation
[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 ( Verification performed (all local, targeted):
Code review: the fix is at the right layer — it deletes the second partial Fetch implementation (manual header merge + Intentional behavior changes (old → new, all disclosed in the PR):
Interaction with #6566 (merge-order note): the new rejection cases on model URLs now flow into the inline transport's degrade path in 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. 结构化八问
收工判定: 修法正确、测试是真回归测试(master 上 13/15 红,分支上 15/15 绿)、diff 干净最小;CI 绿后可合,与 #6566 同批或在其之后合入。 |
|
(ai: openai/gpt-6-astra) Addressed the logging follow-up in #6566 at 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. |
(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:
The standard "merge Verdict unchanged: the code is approved; the red is inherited. Safe to merge from this PR's side at any time. 八问(第 2 轮 — CI 结果更新;未列项与首轮回复一致)
判定:approve(红为继承性,非本 PR 之过);owner 可随时合并,或等 ci-fixes 收敛后合并。 |
Re-verified the live check state first: still red on the same 4 test lanes at head What the 4 lanes actually contain (two distinct causes):
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 Bottom line: the branch needs no change. It goes green once the sentinel lands the 八问(中文):
判定:本 PR 分支无需改动;等哨兵把 |
[bot] 🏷 Re-verified the live check state first: all 4 test lanes are still red at head Two distinct causes across the 4 lanes:
Why no push: owner policy 2026-10-24 — master-level failures converge on Bottom line: the branch needs no change. It goes green once the sentinel lands the 八问(中文):
判定:本 PR 分支无需改动;等哨兵把 |
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).
…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).
|
Superseded by #6677 (merged as Landed into master via the real merge commit The fix for #6562 is now in master. Closing this PR as superseded — thanks for the careful, well-tested fix. |
[bot] 🏷 Acknowledged — PR #6563 superseded by #6677 (merged as |
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
e1f31ad9d5b47500362699a9867819b861c7de96.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.tsassertions for the sqlite-default notice; Windows Node 22 additionally reportsEBUSYwhile deletingindex.dbinpersist-zstd.test.tsandpersist-metadata-fold-gate.test.tsteardown. None of the changed files owns those paths. On the unchanged basee1f31ad9d5b47500362699a9867819b861c7de96, 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.