Repository navigation
[PR] fix: preserve Request fields during inline fallback - #6566
ranxianglei merged 15 commits into
Conversation
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).
|
(ai: vllm-qwen/qwen3.8-27b) Review of the code: the fix is correct. The double construction The 4 red CI jobs are all inherited from master, not caused by this PR (same 4 on both heads):
No code action needed on your side; the remaining work is master-side (ci-fixes convergence), after which a rebase should leave this PR green. |
(ai: vllm-qwen/qwen3.8-27b) CI status — re-verified; state is unchanged from the review above. The 4 red jobs are all inherited from master (identical on the PR base and head), two distinct master-level defects:
I attempted to unblock directly by merging Contributor unblock (clears the 3 notice-registry reds immediately; the 4th EBUSY flake clears on re-run): Remaining blockers — both master-side, none in this PR's code:
No code change needed — the fix is correct and its own 13-case suite is green in CI. Ready to merge once the two master-side items clear. |
(ai: vllm-qwen/qwen3.8-27b) Confirming the CI verdict (already posted above) — no new changes since:
Ready to merge once the two master-side items clear. |
…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).
|
Current head I verified this exact head on Linux / Node 24.22.1: 28 tests passed, 0 failed, 0 skipped — 13 Request fallback cases, 8 adjacent inline cases, 5 notice-registry cases, and the 2 upstream in-place-update regressions. The repository's storage/test-environment/zone preloads were used; its existing registry-fetch test seam kept the optional catalog refresh offline, while the loopback HTTP fixtures ran normally. Exact-head manifest and test log. The fresh upstream CI run is still pending. This local result does not establish a Windows or full-matrix pass; the Windows handle-teardown work in #6561 remains open. |
(ai: vllm-qwen/qwen3.8-27b) Re-verified the live state after the contributor's merge — the unblock has landed:
I'll confirm green once the run finishes. |
|
Updated again after upstream The merge retains master's revised CI fixture setup and the Windows Validation on the exact published tree: full build, strict TypeScript checking of the affected files and dependencies, and all 21 focused fallback/adjacent inline tests pass (0 failures, 0 skips). The new upstream CI run is still pending; full hosted and Windows results remain to be confirmed. The same master integration and conflict resolution are also pushed to #6484, #6487, #6489, #6492, #6494, #6496, #6498, #6500, #6502, #6504, #6556, #6560, #6563, #6571, #6575 and #6577. Each branch has its own validated tree and fresh CI run. |
(ai: vllm-qwen/qwen3.8-27b) Verified the new head
No action needed from me — the contributor has done the unblock (merged the new master + ci-fixes). Once the CI run completes, the reds should clear (both the notice-registry fix and the Windows SessionStore close fixes are in the head). I'll confirm green when the run lands. |
|
Superseded by #6677 (merged as Landed into master via the real merge commit The fix for #6565 is now in master. Closing this PR as superseded — thanks for the careful, well-tested fix. |
(ai: vllm-qwen/qwen3.8-27b) Confirmed and verified against live master: the fix for #6565 is in — current master The CI lane's work is complete: the 4 red jobs were all inherited from master (3× |
Fixes #6565
Problem
When inline engine startup fails, the direct fallback calls send(targetUrl, init). For Request inputs this drops the request method, headers, body and signal: a POST arrives as an empty GET without its Authorization header. Providing an init.body alone also fails because the inherited POST method is lost.
Changes
Normalize RequestInit against the original Request and retarget the effective Request to the embedded upstream URL. Preserve transport-specific init fields while avoiding a second header/body application, which would regenerate multipart FormData boundaries. Consumed requests without a replacement reject instead of being replayed as empty GETs. String and URL inputs keep their existing path.
Validation
Related scope
Fresh all-state searches and 71 prior Afloat16 PRs were checked. #6563 fixes conversion within a running engine and #6560 fixes the cancellation/failure decision. This patch retains caller request data when genuine engine failure takes the existing direct fallback. It adds no retry or configuration and changes no kernel or persistence code.
Remote CI follow-up (2026-11-13)
CI run 43461411667 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.