Skip to content

Conversation

@VegetarianOrc
Copy link
Contributor

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

VegetarianOrc and others added 15 commits January 9, 2026 13:39
This commit removes TODO comments from the codebase that were triaged and
marked as "Won't Do" in the Nexus Python SDK TODO tracking document. These
comments documented items that were decided not to be implemented or were
already completed.

Removed TODO comments from:
- temporalio/worker/_activity.py (2 comments)
- temporalio/workflow.py (1 comment)
- temporalio/worker/_nexus.py (1 comment)
- temporalio/nexus/_token.py (1 comment)
- tests/nexus/test_workflow_caller.py (3 comments)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add comprehensive round-trip tests for failure converter handling of:
- nexusrpc.HandlerError (all HandlerErrorType values, retryable_override mapping)
- NexusOperationError (all fields, cause chains)
- nexusrpc.OperationError (one-way from_failure)
- nexus_sdk_failure_error_info (one-way to FailureError)
- ResetWorkflowError (with and without heartbeat details)

Also tests fallback behavior for unknown handler error types and operation
error states.

Remove TODO(nexus-preview) comment as test coverage is now in place.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The HTTP interface is not user-facing. Delete test_handler.py and
test_handler_async_operation.py which tested via direct HTTP calls. Convert
test_workflow_run_operation.py and test_dynamic_creation_of_user_handler_classes.py
to use workflow callers instead. Remove HTTP-specific helper code (ServiceClient,
Failure, dataclass_as_dict) from tests/helpers/nexus.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace the class-based ErrorConversionTestCase pattern with a simpler
dataclass-based approach:

- Remove ErrorConversionTestCase base class and registry pattern
- Add typed dataclasses for expected exceptions: ExpectedNexusOperationError,
  ExpectedHandlerError, and ExpectedApplicationError
- Move operation implementations from class methods to explicit ErrorTestService
  handler methods
- Replace tuple-based expected_exception_chain_in_workflow with typed
  expected_exception_chain using the new dataclasses
- Refactor _validate_exception_chain to use isinstance() checks instead of
  string key comparisons on dict[str, Any]
- Update workflow to call operations by name rather than through registry lookup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… no longer apply with the most recent api update
…havior when reset_workflow_failure_info is set on a failure. Remove some stale comments
temporalio.exceptions.FailureError
| nexusrpc.HandlerError
)
match failure.WhichOneof("failure_info"):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this to use match here to help ensure all cases are handled explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant