Repository navigation
[PR] fix: preserve caller cancellation before inline fallback - #6560
ranxianglei merged 14 commits into
Conversation
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — 本 PR 修 #6558(pi-inline 传输层取消误判),与同属内联取消家族的 #6504(引擎信号继承)、#6556(native Request 重建保信号)文件不相交、机制不同,三者互补。修复本身的复现与验证已在 #6558 线程完成;本条是 PR 线程的独立审核结论。 Review (independent, head
CI (verified live): 4 red shards, all attributable to non-PR causes with zero intersection with the PR diff:
Label judgment (reported, not applied — the 2026-11-12 policy forbids mutating the source PR's labels): 八问(中文):
判定:代码与测试审核通过(可合)。CI 4 个红分片均为继承红/已知 flake,与本 PR diff 零交集,本 PR 自带 20 个新测试在 CI 全绿;待哨兵在 ci-fixes 收敛 visibleNotices born-red(#4599)+ 分片重跑后,由 owner 人工合并。建议 #6504/#6556 一并合入,补齐内联车道取消全链路。 |
(ai: vllm-qwen/qwen3.8-27b) CI status for this PR (head Per-shard breakdown:
This PR's own 20 new tests (pi-inline-cancellation) are all green (ok 2100–2119). The PR diff ( Why I did not push a fix to this branch: the visibleNotices hermetic fix is a master-level fix (the test lives on master, last touched by #6480). Per the CI coordination policy (owner 2026-10-24), master-level fixes MUST converge into Blocker escalated to #4599 (CI control center): the ci-master-sentinel has been stalled since floor 1309 (spawn refused, ~8h no convergence). Multiple PRs are waiting on its ci-fixes convergence. Once the sentinel lands the visibleNotices hermetic fix in ci-fixes, this PR just needs 八问(中文):
判定:本 PR 代码 ready(自带测试全绿);CI 红为继承性,等 ci-fixes 收敛后重跑即绿。本分支无需任何改动。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) CI verdict for this PR (head
八问(中文):
判定:本 PR 代码 ready(自带测试全绿);CI 红为继承性,等 ci-fixes 收敛后重跑即绿。本分支无需任何改动。 |
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] auto-fix stalled: test (ubuntu-latest, 24, 3), test (windows-latest, 22, 1), test (windows-latest, 22, 3), test (ubuntu-latest, 22, 3) — stopping for human review |
1 similar comment
[ework] auto-fix stalled: test (ubuntu-latest, 24, 3), test (windows-latest, 22, 1), test (windows-latest, 22, 3), test (ubuntu-latest, 22, 3) — stopping for human review |
…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 #6558 is now in master. Closing this PR as superseded — thanks for the careful, well-tested fix. |
[bot] 🏷 Review complete for PR #6560 (fix: preserve caller cancellation before inline fallback). Verdict: APPROVE — the primary fix is correct and well-tested. What I verified:
Non-blocking finding (latent spec deviation, not in the merged code): PR status: Merged into master via batch PR #6677 (wave 5, merged as 3858b69, 2026-11-14). Landed via real merge commit febe718. The fix for #6558 is in master. 8问 (Chinese checklist):
Conclusion: APPROVE. The primary fix is correct and the PR is now merged. The latent |
Fixes #6558
Problem
makeInlineTransportdistinguishes cancellation from an engine failure only byerr.name === "AbortError". AbortController permits arbitrary reasons, so a cancelled generation can enter the direct upstream fallback. It can also start or dispatch work when cancellation has already happened.Changes
Resolve the effective signal using RequestInit precedence, then call throwIfAborted before starting the engine, after startup completes and before classifying a rejected dispatch. This preserves the caller's exact reason and prevents direct retries after cancellation. Explicit signal/null overrides, transport AbortError propagation and fallback for genuine engine failure remain covered.
Validation
e1f31ad9d5b47500362699a9867819b861c7de96: 17 regression failures and 3 passing controls.Related scope
This addresses the fallback issue identified in the review of #6504. That PR changes engine signal inheritance; #6556 changes native Request reconstruction. This change concerns the transport's cancellation/failure decision and introduces no config, kernel or persistence change.
Remote CI follow-up (2026-11-13)
CI run 43457325739 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.