Skip to content

Conversation

@ParidelPooya
Copy link
Contributor

feat: enhance wait handler with running operations awareness and helper utilities

## Core Features:
- Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before terminating
- Implement waiting logic for parallel execution scenarios

## Helper Utilities:
- Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change detection
- Internal checkpoint.force() handling when timers expire

## Test Coverage:
- Added unit tests for wait handler
- Tests for parallel execution scenarios

## Architecture:
- Clean layered design: wait-handler → waitBeforeContinue
- Proper separation of concerns and reusable components
- Support for real-world scenarios like ctx.parallel([wait, step])

## Technical Details:
- Polling-based implementation with 100ms intervals
- Promise.race coordination for multiple async conditions
- Automatic API refresh via checkpoint.force() on timer expiry
- Loop-back approach for clean condition re-evaluation

Major improvements to wait handler functionality:

## Core Features:
- Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before terminating
- Implement complex waiting logic for parallel execution scenarios

## Helper Utilities:
- Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change detection
- Internal checkpoint.force() handling when timers expire
- Polling-based implementation with 100ms intervals

## Test Coverage:
- Comprehensive unit tests for wait handler (88% statement coverage)
- Integration tests for parallel execution scenarios
- Helper utilities with 100% test coverage
- Full coverage for durable-context hasRunningOperations function

## Architecture:
- Clean design: wait-handler → waitBeforeContinue → Promise.race
- Proper separation of concerns with reusable components
- Simplified wait handler logic with declarative API
- Support for real-world scenarios like ctx.parallel([wait, step])

## Technical Details:
- Promise.race coordination for multiple async conditions
- Automatic API refresh via checkpoint.force() on timer expiry
- Loop-back approach for clean condition re-evaluation
- Inlined logic for better maintainability
@ParidelPooya ParidelPooya merged commit 880535b into development Sep 6, 2025
1 check failed
@ParidelPooya ParidelPooya deleted the feat/wait-handler-enhancements branch September 6, 2025 22:36
ParidelPooya added a commit that referenced this pull request Oct 10, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
ParidelPooya added a commit that referenced this pull request Oct 12, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
ParidelPooya added a commit that referenced this pull request Oct 24, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
ParidelPooya added a commit that referenced this pull request Oct 26, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
ParidelPooya added a commit that referenced this pull request Nov 2, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
ParidelPooya added a commit that referenced this pull request Nov 6, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
ParidelPooya added a commit that referenced this pull request Nov 6, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
ParidelPooya added a commit that referenced this pull request Nov 6, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
ParidelPooya added a commit that referenced this pull request Nov 7, 2025
…er utilities (#12)

feat: enhance wait handler with running operations awareness and helper
utilities
        
    ## Core Features:
    - Add running operations awareness to prevent premature termination
- Wait handler now checks if other operations are running before
terminating
    - Implement waiting logic for parallel execution scenarios
    
    ## Helper Utilities:
    - Create waitBeforeContinue() - high-level domain-specific helper
- Support timer expiry, operations completion, and status change
detection
    - Internal checkpoint.force() handling when timers expire
    
    ## Test Coverage:
    - Added unit tests for wait handler
    - Tests for parallel execution scenarios
    
    ## Architecture:
    - Clean layered design: wait-handler → waitBeforeContinue
    - Proper separation of concerns and reusable components
    - Support for real-world scenarios like ctx.parallel([wait, step])
    
    ## Technical Details:
    - Polling-based implementation with 100ms intervals
    - Promise.race coordination for multiple async conditions
    - Automatic API refresh via checkpoint.force() on timer expiry
    - Loop-back approach for clean condition re-evaluation
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.

2 participants