Context
GitHub Reference: lambda_service.py#L833
Standardize how None/null CheckpointToken values are handled throughout the system. Align with TypeScript.
Technical Requirements
- Define consistent behavior for null checkpoint tokens
- Update all checkpoint token handling code
- Ensure proper validation and error messages
- Handle edge cases in token lifecycle
Implementation Details
- File:
src/aws_durable_execution_sdk_python/lambda_service.py
- Line: Around line 833
- Validation: Add null checks and appropriate defaults
def handle_checkpoint_token(self, token: str | None) -> str:
"""Standardize checkpoint token handling."""
if token is None:
# Define standard behavior for null tokens
logger.warning("Checkpoint token is None, using empty string")
return ""
# OR?
# raise FatalError(f"Checkpoint token must be string, got {type(token)}")
return token.strip() # Normalize whitespace
Acceptance Criteria
Priority: Low
Estimated Effort: 0.5 day
Context
GitHub Reference: lambda_service.py#L833
Standardize how None/null
CheckpointTokenvalues are handled throughout the system. Align with TypeScript.Technical Requirements
Implementation Details
src/aws_durable_execution_sdk_python/lambda_service.pyAcceptance Criteria
Priority: Low
Estimated Effort: 0.5 day