Skip to content

fix(core): honor configured request timeout for response headers - #259

Merged
XXPermanentXX merged 1 commit into
mainfrom
fix/http-headers-timeout
Oct 16, 2026
Merged

XXPermanentXX merged 1 commit into
mainfrom
fix/http-headers-timeout

Conversation

@XXPermanentXX

Copy link
Copy Markdown
Collaborator

When --timeout exceeds 300 seconds, Node fetch's independent response-header timeout can abort a request before the CLI deadline. Disable that lower-level header timer only for common HTTP requests already protected by the CLI timeout signal.

Wrap the current dispatcher per request to preserve proxy and custom-dispatcher behavior. Keep body idle timeouts and unrelated fetch requests unchanged. Add five regression cases for delayed headers, deadline cancellation, dispatcher compatibility, body idle timeout, and bare-fetch isolation. Core reuses the existing Undici catalog version.

Validation

  • vp check: passed, with 3 existing warnings.
  • pnpm --filter bailian-cli-core build: passed.
  • Frozen offline lockfile validation: passed.
  • Full offline suite on current main: 2,857 passed, 245 skipped, 0 failed (3,102 total); real API tests disabled.

The reported Token Plan failure has not been reproduced in live tests on CLI 2.1.0 or 2.3.0. This fixes the independently reproduced client timeout mismatch without claiming the reported service scenario is resolved.

Refs #239

@XXPermanentXX
XXPermanentXX merged commit 5ec9f3b into main Oct 16, 2026
2 checks passed
@XXPermanentXX
XXPermanentXX deleted the fix/http-headers-timeout branch October 16, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant