-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
When implementing the queue-row cancel flag proposal (see proposals/activity-cancellation-queue-flag.md), we identified a gap in test coverage:
Scenario: An instance is deleted while activities are still in the worker queue, without first processing a CancelInstance.
What happens
- The
cancel_requestedflag is never set (no runtime turn processed cancellation) - Worker fetches the activity, sees
cancel_requested=false, and executes it - Worker completes and enqueues
ActivityCompletedto orchestrator queue - The completion sits in the orchestrator queue forever (no instance to process it)
Why this is acceptable
- The completion is harmless - it will either be filtered or ignored
- Direct instance deletion is a management/admin operation, not normal runtime flow
- The runtime already handles orphan completions gracefully
Test needed
Add a provider validation test that:
- Creates an instance and schedules an activity
- Deletes/archives the instance (bypassing normal cancellation flow)
- Fetches the activity work item
- Verifies the expected behavior (activity executes, completion is orphaned)
Blocker
This test cannot be implemented until the Provider trait supports instance deletion or archival. Currently there is no delete_instance or archive_instance method.
Related
proposals/activity-cancellation-queue-flag.md- Queue-row cancel flag proposalsrc/provider_validation/cancellation.rs- Existing cancellation tests (to be replaced)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request