fix: add default 30s request timeout, release workflow, CI action pinning - #5
Merged
Conversation
Every request now runs under a timeoutMs deadline (default 30000ms) that bounds the whole logical request including all retry attempts and backoff sleeps, so a stuck daemon can no longer hang consumers. The caller-supplied AbortSignal composes with the deadline via a manual signal combiner (AbortSignal.any needs Node 20.3; engines is >=18) and its abort reason propagates unchanged. Deadlines reject with a TimeoutError DOMException; aborts are never retried. timeoutMs: 0 disables the deadline.
Add a release workflow modeled on hawk-sdk-go's tag-triggered release workflow, adapted for npm: setup-node with registry-url, npm publish --provenance with NODE_AUTH_TOKEN, and a softprops/action-gh-release step; permissions include id-token: write for provenance. Pin the floating actions/checkout@v4 and actions/setup-node@v4 tags in ci.yml to their v4.4.0 commit SHAs, resolved and verified via git ls-remote.
Document the actual retry, backoff, jitter, and timeout defaults of the Go, TypeScript, and Python SDKs with file and symbol references, so the drift between them is visible. No code defaults were changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
timeoutMs: 30000(30s whole-request deadline, bounds retries too). Manual signal combiner for Node 18 compat. Error surfaces asDOMExceptionwith name"TimeoutError".@v4action tags resolved to SHAs (checkout v4.4.0, setup-node v4.4.0, gh-release v2.2.2).Test plan
npm run typecheckcleannpm test— 54/54 pass (7 new: stalled server, timeout wins, retry deadline, caller signal wins)