Repository navigation
fix(sdk/typescript): stop retrying permanent status callbacks - #1126
Merged
santoshkumarradha merged 1 commit intoOct 26, 2026
Conversation
Align reportExecutionResult and updateExecutionStatus with the Go SDK's postExecutionStatus: retry transport errors, 408, 429 and 5xx with 1+2+4+8s backoff, and fail fast on any other status (e.g. a 409 terminal-status conflict). Each attempt is signed with a fresh DID timestamp/nonce instead of reusing one signature across retries. Fixes Agent-Field#1088 Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
Contributor
Performance
⚠ Regression detected:
|
Contributor
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
Contributor
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
santoshkumarradha
approved these changes
Oct 26, 2026
santoshkumarradha
left a comment
Member
There was a problem hiding this comment.
Reviewed the current head and focused validation. This looks good to me.
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
The Python half of #1088 landed in #1109; this ports the same status-callback retry policy to the TypeScript SDK so it matches the Go SDK's
postExecutionStatus(#1081).AgentFieldClient.reportExecutionResultused to retry every non-2xx response 5 times with 1+2+4+8s backoff. That meant a 409 terminal-status conflict took about 15s before it gave up. It now retries only transport errors, 408, 429 and 5xx. Any other status returnsfalseright away. Like Python after fix(sdk/python): stop retrying permanent status callbacks #1109, 404 is treated as permanent now that Legacy /reasoners/:id and /skills/:id never create the executions row, so status callbacks 404 #1086 persists the execution row.updateExecutionStatus, whichWorkflowReporter.progresscalls, used to send only once. It now uses the same retry helper and throws the last error if every attempt fails. It also gets an explicit 30s per-attempt timeout and URL-encodes the execution id, likereportExecutionResultalready did.I did not touch the fire-and-forget
publishWorkflowEventstart event. Its main risk was progress arriving before the execution existed, and that no longer causes a 404 now that #1086 has landed.Type of change
Test plan
cd sdk/typescript && npx vitest run(93 files, 1088 passed, 1 skipped)cd sdk/typescript && npm run lint(tsc --noEmit, clean)New tests in
tests/agentfield_client_async.test.tsrun against a real local HTTP server:falseX-DID-NonceupdateExecutionStatusretries a 503 and throws on a 409 after one attemptWithout the fix, the 4xx cases time out because they are retried with backoff, and the nonce test fails because the signature is reused.
Test coverage
coverage-baseline.jsonin this PR only if the removal caused a legitimate regression and I called it out in the summary above.Checklist
Related issues / PRs
Fixes #1088
Follows #1081 (Go) and #1109 (Python).