Repository navigation
fix(clock-skew): exclude server processing time from skew correction - #8391
Merged
Merged
Conversation
kuhe
approved these changes
Oct 30, 2026
stobrien89
force-pushed
the
fix/clock-skew-long-running-requests
branch
from
October 30, 2026 15:24
18eb177 to
bb19fa4
Compare
laithalsaadoon
added a commit
to memhtml/memhtml
that referenced
this pull request
Nov 11, 2026
…s to 3.1161.0 (#375) Weekday dependency sweep: the `ai` family patches, its Bedrock and openai-compatible providers, and the AWS SDK clients, all past pnpm's 3-day soak. Updated 2026-11-06 to the newer `ai` patches (main merged in first; main had moved no manifest or lockfile since this branch was cut). | Package | From | To | Where | | --- | --- | --- | --- | | `ai` | 7.0.158 | 7.0.162 | `packages/curator` | | `@ai-sdk/amazon-bedrock` (exact pin `@ai-sdk/anthropic` 4.0.93 -> 4.0.96) | 5.0.129 | 5.0.132 | `packages/curator` | | `@ai-sdk/openai-compatible` | 3.0.82 | 3.0.84 | `packages/curator` | | `@aws-sdk/credential-providers` | 3.1160.0 | 3.1161.0 | `packages/curator` | | `@aws-sdk/client-bedrock-runtime` | 3.1160.0 | 3.1161.0 | `packages/llm` | Transitives of the `ai` set: `@ai-sdk/gateway` 4.0.131 -> 4.0.135, `@ai-sdk/openai` 4.0.106 -> 4.0.108 (reached only through bedrock's `/mantle` subpath, which nothing imports) and `@ai-sdk/provider-utils` 5.0.72 -> 5.0.74. AWS SDK side, unchanged since the first push: the clients now ask `@smithy/core` ^3.38.0 and `@smithy/node-http-handler` ^4.14.0. A within-range refresh (`pnpm update -r --depth Infinity @smithy/core @aws-sdk/core`) keeps one copy of `@smithy/core` (3.38.1; npm marks 3.37.0 deprecated for aws/aws-sdk-js-v3#8393, a custom logger receiving unredacted nested sensitive fields, and memhtml passes no logger) and one copy of `@aws-sdk/core` (3.979.1, where main holds 3.978.3 and 3.979.0). `@aws-sdk/xml-builder` leaves the tree. One reached behavior change, which is why this PR is left for review rather than merged: `@aws-sdk/core` 3.979.1 (aws/aws-sdk-js-v3#8391) stops storing half of a SigV4 call's duration as clock skew, and `packages/llm`'s direct client runs that code on every signed response. It is a fix: on main a 620 s call makes the next signed call fail with `InvalidSignatureException`, on this branch it does not. Verification: - `mise run check` on 5f06fc8: 76/76 in 205 s (on 71f3e1a: 76/76 in 217 s). - Pre-push `package:smoke:live` on 5f06fc8: 92 checks, real Bedrock embeddings (query embed 390 ms). Its `curate run` uses `--model fake`, so the smoke proves the embedding client in `packages/llm` and the head server's vector arm, not the curator's model path; the wire capture in the comments is the proof for that path. - Changelog, dist and wire-capture reads: the AWS half in the 2026-11-03 comment, the newer `ai` half in the 2026-11-06 comment.
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.
Issue
n/a
Description
Updates clock skew correction to compare the server time against the client time when the response is received instead of the request midpoint.
The midpoint calculation attributed half of the server processing time to clock skew. For long-running requests, this could store an incorrect offset and cause subsequent requests to fail with
InvalidSignatureException.This preserves the existing 15-minute request duration and
Ageheader safeguards.Testing
Checklist
*.integ.spec.ts) or E2E tests.@public,@internaltags and enabled doc generation on the package. Remember that access level annotations go below the description, not above.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.