Skip to content

test: event-driven first-chunk wait in the retired-stall-guard case (windows CI flake) - #3457

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-17_ci-windows-timing-flake
Closed

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-17_ci-windows-timing-flake

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

The retired stall guard: mid-stream silence survives any short window even with the stale export set (#1706/#1714) case in tests/issue1452-socket-hardening.test.ts waited a FIXED 2000ms wall-clock window and then asserted the first SSE byte had arrived. On a loaded windows runner (master ce9bc90a3, job 117073924654, test (windows-latest, 24, 2)) first-byte delivery took longer than that window with no product defect involved — the case ran 64.8s under concurrent-instance load (multiple #394 "another bili instance is running" warnings in the same run) and failed first chunk should have flowed through. The sibling behavioral pins (idle budget cuts at ~3s; startup notice names the stale export) passed in the same run.

Fix

Replace the fixed window with an event-driven wait for the first data event (deadline 15s — the pattern this file already uses in the clientError-backstop case), then observe >=2s of post-first-chunk silence before the negative assertions.

Behavior change disclosure (test semantics only)

  • OLD: first byte must arrive within a fixed 2000ms of request start.
  • NEW: first byte must arrive at all (bounded by a 15s deadline); the no-truncation / no-[DONE] assertions now run after >=2s of observed post-first-chunk silence (strictly longer observation than before).
  • Teeth preserved: a regression where the retired guard cuts early produces the error frame immediately → caught by the unchanged negative assertions; a regression where nothing ever flows fails at the deadline. No product behavior, config surface, wire shape, or kernel change.

Verification

  • Targeted local run: node --import tsx --test tests/issue1452-socket-hardening.test.ts → 10/10 pass.
  • npm run typecheck clean.
  • Full-suite verdict: remote CI on this head.

Closes #3449

…3449)

A loaded windows runner delivered the first SSE byte slower than the fixed
2s wall-clock window, failing 'first chunk should have flowed through' on
master itself (job 117073924654, case took 64.8s under concurrent-instance
load). Wait for the first data event up to 15s instead, then observe >=2s of
post-first-chunk silence before the negative assertions — the behavioral pin
(retired guard must not cut or terminate a silent stream) is unchanged and a
real pre-first-byte hang still fails at the deadline.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-17_ci-windows-timing-flake (8b50c88)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4073-pr.3457.5c104fe

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr3457.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

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

Closing as duplicate of #3421 (which closed #3420): while this PR was in flight, #3421 merged to master (076448fe1) fixing the exact same assertion in tests/issue1452-socket-hardening.test.ts. The merged version is strictly more robust than this branch: it bounds the first-byte wait by EVENT-LOOP TICKS (500×10ms) rather than a wall-clock deadline, because a runner freeze stalls the shared event loop AND Date.now() together (their ~42s freeze observation, #3435) — a wall-clock budget can itself be blown past, tick counts cannot. Keeping both would leave a redundant diff against master. Wrap-up posted in #3449.

@ranxianglei
ranxianglei deleted the 2026-10-17_ci-windows-timing-flake branch October 17, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant