Description
A resilient orchestrator must stop deterministically when a long-running workflow never converges. This story adds bounded stop enforcement and explicit terminal classification for resumed long-running execution.
Scope
In scope:
- enforce bounded stop behavior from required project defaults
- prevent infinite resume/poll loops
- define deterministic terminal reason codes and final statuses for long-running resumed execution
- distinguish active/in-progress, timed-out, fail-closed, and completed-after-resume outcomes clearly
Out of scope:
- operator-driven repeated rerun strategy
- watcher/provider contract redesign
- full result-rendering redesign outside orchestration status needs
Acceptance Criteria
- Orchestrator stops deterministically when configured outer poll limits are exhausted
- Orchestrator stops deterministically when configured outer timeout budget is exhausted
- Final states and reason codes are explicit for bounded-stop outcomes
- Infinite resume loops are prevented by required defaults
- Terminal classification remains deterministic across resumed long-running execution
Implementation Notes
- Expected reason-code direction includes explicit outer-loop reasons such as poll exhaustion, timeout exhaustion, and progress-stalled classification where applicable.
- Preserve the distinction between business-state failure and outer orchestration stop reason where both are relevant.
Testing
UT for bounded-stop rule evaluation and terminal reason-code mapping
UT for infinite-loop prevention logic
IT for a non-converging watcher/external-verification workflow that is stopped by required orchestrator defaults rather than running indefinitely
IT for deterministic final status after outer poll exhaustion and after outer timeout exhaustion
Description
A resilient orchestrator must stop deterministically when a long-running workflow never converges. This story adds bounded stop enforcement and explicit terminal classification for resumed long-running execution.
Scope
In scope:
Out of scope:
Acceptance Criteria
Implementation Notes
Testing
UTfor bounded-stop rule evaluation and terminal reason-code mappingUTfor infinite-loop prevention logicITfor a non-converging watcher/external-verification workflow that is stopped by required orchestrator defaults rather than running indefinitelyITfor deterministic final status after outer poll exhaustion and after outer timeout exhaustion