You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Stale checkpoint token fails the execution; no stale-token carve-out in classifyCheckpointError #6
When the service rejects a checkpoint call with InvalidParameterValueException because the checkpoint token is stale (a newer invocation superseded this one), the SDK should end the current invocation as an invocation failure. The service then starts a fresh invocation with a fresh token, and the execution continues.
Actual Behavior
A stale checkpoint token fails the whole durable execution every time.
Root Cause
Two things combine (alpha branch at 7183f03; main is README-only):
classifyCheckpointError in durable/checkpoint_errors.go has no carve-out for the stale-token rejection. Every smithy.APIError with FaultClient other than TooManyRequestsException is non-retryable. The other SDKs carve out InvalidParameterValueException with the message prefix Invalid checkpoint token (note the case: the service constant is "Invalid checkpoint token", lowercase c and t; several sibling SDKs got this wrong).
Even a retryable classification would not help as the code stands. checkpointer.checkpoint in durable/checkpoint.go retries in-process with the same cp.token, then returns lastErr. The step returns that error to the handler, and durable/handler.go turns any handler error into Status: FAILED. There is no path by which a checkpoint failure ends the invocation with an error return (which is what makes the service re-invoke).
Steps to Reproduce
Have the service return a 400 InvalidParameterValueException whose message starts with Invalid checkpoint token.
Pass it through classifyCheckpointError.
Observe Retryable() is false, the step returns the error, and the invocation responds Status: FAILED.
Proposed Fix
In classifyCheckpointError, recognize ErrorCode() == "InvalidParameterValueException" with a message starting with Invalid checkpoint token (case-insensitive to protect against drift) as a stale-token rejection.
Do not retry a stale token in-process; the token will never become valid again. Instead, terminate the checkpointer and end the invocation with an error return from the Lambda handler (an invocation failure), not a FAILED response.
Unit test with the real service message string.
Related
Same defect exists in the other SDKs; each has its own issue. Sibling links are in a comment below.
Fixed by d678883 (fix(durable): halt on stale or no checkpoint token), now on main. The commit landed on the former alpha branch, so GitHub did not close this issue automatically.
Activity
yaythomas commentedon Sep 12, 2026
Sibling issues (same bug, one per SDK):
fix(durable): halt on stale or no checkpoint token
yaythomas commentedon Sep 20, 2026
Fixed by d678883 (
fix(durable): halt on stale or no checkpoint token), now onmain. The commit landed on the formeralphabranch, so GitHub did not close this issue automatically.