Repository navigation
refactor(strands): remove the unused StrandsFailureConverter (breaking) - #281
Closed
campoy wants to merge 3 commits into
Conversation
The plugin no longer installs StrandsFailureConverter: an activity interceptor and a workflow interceptor rewrite Strands errors instead. As a failure converter it could only retype a Strands error nested as the cause of another error, since the SDK wraps every top-level error before a converter sees it, so it changed neither retries nor interrupt routing. Remove the class, its failureConverter instance and the index export, and rename the module to strands-errors, which keeps rewriteError, rewriteTerminalError and STRANDS_INTERRUPT_TYPE. Breaking change: code that imports StrandsFailureConverter, or sets failureConverterPath to @temporalio/strands-agents/lib/failure-converter, no longer builds or starts. Remove the import or the path.
…places-caller-failure-converter' into refactor/strands-typescript-remove-failure-converter
…places-caller-failure-converter' into refactor/strands-typescript-remove-failure-converter
Contributor
Author
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.
What was changed
StrandsFailureConverter, itsfailureConverterinstance and the index export.failure-converter.tstostrands-errors.ts, which keepsrewriteError,rewriteTerminalErrorandSTRANDS_INTERRUPT_TYPE.STRANDS_INTERRUPT_TYPEis still exported from the package.Stacked on #200. Review base: #200's branch.
Why?
After #200 the plugin no longer installs this converter: an Activity interceptor and a Workflow interceptor rewrite Strands errors instead. As a failure converter it could only retype a Strands error nested as the
causeof another error, because the SDK wraps every top-level error (ensureApplicationFailure/ensureTemporalFailure) before a converter sees it. That changes neither retries, which read the top-level failure, nor interrupt routing, which reads one level. Keeping it exported invites users to install it for behavior it doesn't give. A code owner's review of #200 asked to delete it in this release, which is already breaking.Breaking change
Code that imports
StrandsFailureConverter, or setsfailureConverterPathto@temporalio/strands-agents/lib/failure-converter, no longer builds or starts. Remove the import or the path; the plugin already does what the converter did, and more. A GitHub code search found no TypeScript code that imports it. The TypeScript sample mentions it in a comment and its README.No runtime or replay change otherwise. The class decoded exactly like the SDK's default converter, so histories written by someone who installed it themselves still replay.
Checklist
No issue of its own; follow-up to fix(strands): keep the caller's failure converter and turn Strands errors into Temporal failures (breaking) #200.
How was this tested:
make sync,make lint,make test(38 tests; 39 after merging fix(strands): keep the caller's failure converter and turn Strands errors into Temporal failures (breaking) #200'scaae774into this branch asdca1555),make build, the npm package check, the smoke install andcheck_conventions.pypass, and Prettier with the SDK settings reports the files clean. The packed tarball haslib/strands-errors.jsand nolib/failure-converter.js. The Node 22, macOS and Windows cells did not run locally.Any docs updates needed?
Release notes must name the removed export. The Temporal docs page for the plugin names
StrandsFailureConverterand needs a change once this is released, as does the TypeScript sample's comment and README.