dify/api/tests/unit_tests/core/app
QuantumGhost fd255e81e1
feat(api): Introduce `WorkflowResumptionContext` for pause state management (#28122)
Certain metadata (including but not limited to `InvokeFrom`, `call_depth`, and `streaming`)  is required when resuming a paused workflow. However, these fields are not part of `GraphRuntimeState` and were not saved in the previous
 implementation of  `PauseStatePersistenceLayer`.

This commit addresses this limitation by introducing a `WorkflowResumptionContext` model that wraps both the `*GenerateEntity` and `GraphRuntimeState`. This approach provides:

- A structured container for all necessary resumption data
- Better separation of concerns between execution state and persistence
- Enhanced extensibility for future metadata additions
- Clearer naming that distinguishes from `GraphRuntimeState`

The `WorkflowResumptionContext` model makes extending the pause state easier while maintaining backward compatibility and proper version management for the entire execution state ecosystem.

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-11-12 17:00:02 +08:00
..
app_config/features/file_upload fix: streamline file upload configuration handling in manager.py (#15714) 2025-03-13 16:32:49 +08:00
apps fix unit test using enum (#27575) 2025-10-29 10:26:40 +08:00
features/rate_limiting test: add comprehensive test suite for rate limiting module (#23765) 2025-08-12 10:05:30 +08:00
layers feat(api): Introduce `WorkflowResumptionContext` for pause state management (#28122) 2025-11-12 17:00:02 +08:00