Skip to content

CI flake backstop: graceful-close legs get a timeout budget + one fresh-port retry (#3454) - #3458

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-17_graceful-close-flake-backoff
Oct 17, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-17_graceful-close-flake-backoff

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #3454

What & why

The windows-latest shard intermittently wedges a leg's transport in the connect/handshake phase under load, and tests/graceful-close.test.ts had no recovery: a single timeout-class failure hard-failed the suite with no retry, so one stall blocked the merge (it stalled #3425 for a rerun cycle). The hang is a platform-load flake, not a code regression — local Linux rerun was 8/8 green, same-day master went red on other suites then self-healed, and zero server/graceful-close paths changed in the window. What was actually missing is test-side resilience.

Change (test-only — tests/graceful-close.test.ts)

  • Load-tolerant per-phase transport budgets: CONNECT/handshake 5s, response wait 8s → 15s, READY 30s.
  • Pure transport stalls (connect / handshake / response-incomplete / ready-timeout) are classified as a distinct TransportTimeout; on one such stall the entire scenario re-runs on a fresh child + fresh ports before failing.
  • Behavior assertions and lifecycle-line waits stay non-retriable — a real product regression still fails fast and is never masked by the retry.
  • Widened the teardown try so a READY-stall also tears down its child + mock upstreams (prevents a cross-attempt resource leak into the retry).

Server side is untouched — the listen/close semantics are the verified #1982 behavior contract and out of scope for flake-hardening.

Behavior-change disclosure (test-side only)

knob old new scope
response-wait budget 8s 15s test only
recovery on a transport stall none (hard fail) one-shot full-scenario retry on fresh ports test only

No product/runtime behavior change. No config surface added.

Verification

  • Local: tsc --noEmit clean; targeted node --import tsx --test tests/graceful-close.test.ts green (all five graceful-close steps, ~5.3s).
  • Full-suite verdict = remote CI on this head (per repo discipline, the authoritative green/red is the CI test lanes).

查重: 无 — searched open+closed issues/PRs for the graceful-close / windows-connect-flake family; none found (distinct from #3449 / #3420 / #3237, which are different test files and assertions).

… retry (#3454)

windows-latest intermittently wedges a leg's transport in the connect/handshake phase under load; the suite had no recovery, so one stall hard-failed CI and blocked merge.

Add load-tolerant per-phase budgets (CONNECT/handshake 5s, response 8s->15s, READY 30s), classify pure transport stalls as TransportTimeout, and on one such stall re-run the whole scenario on a fresh child + fresh ports. Behavior assertions and lifecycle-line waits stay non-retriable so a real regression fails fast. Teardown try widened so a READY-stall also cleans up. Server side untouched. Closes #3454
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-17_graceful-close-flake-backoff (629668b)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4075-pr.3458.4b3eed0

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-pr3458.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei
ranxianglei merged commit 896e734 into master Oct 17, 2026
39 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.508-master.896e734 (rolling master tag).

npm install -g billion-context@0.0.508-master.896e734  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

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