You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Drive-by] #7346 regression test simulates the fix's effect but does not exercise the prepare-openai fix line #7373
found-in: PR #7357 (the #7346 fix — "watermark-HIT window save must not retire the verified prefix")
symptom/trigger: tests/issue7346-pf-window-ledger.test.ts pins the #3285 sweep/no-sweep contract by calling shadow.record directly with the two rawTail shapes (undefined for the fix, the window for the pre-fix). It simulates the fix's downstream effect (rawTail=undefined => no sweep) but does not exercise the prepare-openai.ts fix line (if (wpHit !== undefined) session.lastMessagesFolded = true), so it would not fail if that line were removed. The prepare -> persist link (HIT turn => lastMessagesFolded=true => persist.ts:3081 omits the raw tail) is untested.
proposed fix: add a full-path test that drives a watermark-HIT turn through prepareOpenai -> persist -> shadow and asserts the verified prefix is preserved (fails if the fix line is removed). Non-trivial (needs a HIT-turn request simulation), so not a drive-by fix.
blocking: none — straightforward once the HIT-turn simulation is set up. Low priority: the fix is 1 line and the storage contract is pinned; the gap only matters if the fix line is removed, which code review would catch.
查重: 不重复. Open [PR]/issue rows touching this surface: only #7358 (the PR #7357 fix itself) and this #7374. No other issue/PR pins the prepare→persist→shadow full-path gap.
标签: bugdshp3scope/ci — test-coverage defect in the dsh watermark-lane regression; p3 because the 1-line fix and the storage contract are already pinned, the gap only bites if the fix line is deleted.
Confirmed the gap is real: tests/issue7346-pf-window-ledger.test.ts calls shadow.record directly with the two rawTail shapes — it never drives prepareOpenai, so deleting if (wpHit !== undefined) session.lastMessagesFolded = true (prepare-openai.ts:675) would leave the suite green.
Plan: add a full-path test on the PR #7357 branch (2026-11-20_issue7346-pf-window-ledger) that drives a real watermark-HIT turn through the proxy (shadow mode) and asserts the verified prefix survives in the ledger — fails if the fix line is removed. Working on it now.
Done. Added a full-path regression test to PR #7357's branch (2026-11-20_issue7346-pf-window-ledger), commit 7a4224ed.
What it does:tests/issue7346-pf-window-ledger-fullpath.test.ts drives a real watermark-HIT turn through the full proxy in shadow mode (sidecar → full resend → HIT) and asserts the verified prefix survives in the ledger after the HIT turn.
Verified:
Passes with the fix line present (6 live rows: the full log).
Fails when the fix line is removed (2 live rows: the swept window) — AssertionError: the verified prefix must survive the HIT window save (got 2 live rows).
Typecheck clean. Existing sibling test (issue7346-pf-window-ledger.test.ts) still passes.
PR #7357 head is now 7a4224ed (2 commits: the fix + this test).
CI fix: the Windows EBUSY failure on the new test is resolved. CI is now green (30/30, 0 failed) on head 74c6ece6.
What happened: the first push (7a4224ed) failed on test (windows-latest, 22, 5) with EBUSY: resource busy or locked, unlink '…index.db' in the test teardown. Root cause: the test runs in shadow mode with the SessionStoreenabled: true, so its shadow UnifiedStore opens index.db and holds a file lock; on Windows a locked file cannot be unlinked, so the rmSync in the finally block threw EBUSY. (Linux passes because rmSync unlinks open files.) Not inherited — the fix-only head and master were both green on that shard.
Why the hardening matters: the first fix put closeQuietlyaftercloseServers inside the try block, so it only ran when the test passed. When the assertion fails (the fix line removed — the whole point of this regression test), the throw skips closeQuietly, the shadow still holds the lock, and the rmSync in finally throws EBUSY, masking the real assertion error. Moving it to finally means the assertion error now propagates cleanly on every platform, and rmBestEffort tolerates any residual lock race.
Verified:
Test passes locally (1/1); sibling test still passes (2/2); typecheck clean.
CI on 74c6ece6: 30/30 green, including test (windows-latest, 22, 5).
PR #7357 head is now 74c6ece6 (the #7346 fix + the full-path test + 2 teardown commits). The 八问 in the previous comment still applies — the test is unchanged, only its teardown was hardened.
Activity
ranxianglei commentedon Nov 20, 2026
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)
查重: 不重复. Open [PR]/issue rows touching this surface: only #7358 (the PR #7357 fix itself) and this #7374. No other issue/PR pins the prepare→persist→shadow full-path gap.
标签:
bugdshp3scope/ci— test-coverage defect in the dsh watermark-lane regression; p3 because the 1-line fix and the storage contract are already pinned, the gap only bites if the fix line is deleted.Confirmed the gap is real:
tests/issue7346-pf-window-ledger.test.tscallsshadow.recorddirectly with the tworawTailshapes — it never drivesprepareOpenai, so deletingif (wpHit !== undefined) session.lastMessagesFolded = true(prepare-openai.ts:675) would leave the suite green.Plan: add a full-path test on the PR #7357 branch (
2026-11-20_issue7346-pf-window-ledger) that drives a real watermark-HIT turn through the proxy (shadow mode) and asserts the verified prefix survives in the ledger — fails if the fix line is removed. Working on it now.ranxianglei commentedon Nov 20, 2026
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)
Done. Added a full-path regression test to PR #7357's branch (
2026-11-20_issue7346-pf-window-ledger), commit7a4224ed.What it does:
tests/issue7346-pf-window-ledger-fullpath.test.tsdrives a real watermark-HIT turn through the full proxy in shadow mode (sidecar → full resend → HIT) and asserts the verified prefix survives in the ledger after the HIT turn.Verified:
AssertionError: the verified prefix must survive the HIT window save (got 2 live rows).issue7346-pf-window-ledger.test.ts) still passes.PR #7357 head is now
7a4224ed(2 commits: the fix + this test).八问:
tests/issue7346-pf-window-ledger.test.ts直接调shadow.record钉住 [bug] Fold anchor detaches after host restart (parent-gone): hydrated and unified-shadow DIGEST DRIFT within the same second, gap solidifies without self-healing (0.1.197, complementary to #3013 restart path) | [bug] 宿主重启(parent-gone)后 fold 锚点脱锚:hydrated 与 unified-shadow DIGEST DRIFT 同秒,缺口固化不自愈(0.1.197,与 #3013 重启路径互补) #3285 sweep/no-sweep 契约,但从不驱动prepareOpenai——删掉修复行if (wpHit !== undefined) session.lastMessagesFolded = true后测试套件仍绿。BILI_ROLLOUT_PLUGIN_FULL_RESEND_WATERMARK、BILI_STORAGE_UNIFIED)。判定: 可合 — 测试钉住了修复行,PR #7357 现在覆盖了 prepare→persist→shadow 全链路。
ranxianglei commentedon Nov 20, 2026
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b)
CI fix: the Windows EBUSY failure on the new test is resolved. CI is now green (30/30, 0 failed) on head
74c6ece6.What happened: the first push (
7a4224ed) failed ontest (windows-latest, 22, 5)withEBUSY: resource busy or locked, unlink '…index.db'in the test teardown. Root cause: the test runs in shadow mode with theSessionStoreenabled: true, so its shadowUnifiedStoreopensindex.dband holds a file lock; on Windows a locked file cannot be unlinked, so thermSyncin thefinallyblock threw EBUSY. (Linux passes becausermSyncunlinks open files.) Not inherited — the fix-only head and master were both green on that shard.Fix (two commits on the PR branch):
6b611620— close the shadow handle beforermSync.74c6ece6— harden it: movecloseQuietly()into thefinallyblock (guaranteed to run on both the passing and failing paths) and usermBestEffort(bounded retries, swallow persistent EBUSY — the Compression fails in long sessions while new sessions work fine | 压缩失败.新会话反而没事 #3397/Unified-store ingest verification reports DIGEST DRIFT and re-ingests the full tail for sessions whose in-memory ref order diverges from stored row order #4986/0.1.214 moved the twoslow-ingestcalls per round ahead offorward POST, increasing TTFT from 2.3s to 7.7s | 0.1.214 把每轮两次slow-ingest挪进了forward POST之前,首字从 2.3s 涨到 7.7s #6780 pattern).Why the hardening matters: the first fix put
closeQuietlyaftercloseServersinside thetryblock, so it only ran when the test passed. When the assertion fails (the fix line removed — the whole point of this regression test), the throw skipscloseQuietly, the shadow still holds the lock, and thermSyncinfinallythrows EBUSY, masking the real assertion error. Moving it tofinallymeans the assertion error now propagates cleanly on every platform, andrmBestEfforttolerates any residual lock race.Verified:
74c6ece6: 30/30 green, includingtest (windows-latest, 22, 5).PR #7357 head is now
74c6ece6(the #7346 fix + the full-path test + 2 teardown commits). The 八问 in the previous comment still applies — the test is unchanged, only its teardown was hardened.