⚙️ FEATURE-#281: on_input_change policy for resume workflows#282
Open
FernandoCelmer wants to merge 32 commits intodevelopfrom
Open
⚙️ FEATURE-#281: on_input_change policy for resume workflows#282FernandoCelmer wants to merge 32 commits intodevelopfrom
FernandoCelmer wants to merge 32 commits intodevelopfrom
Conversation
FernandoCelmer
commented
Apr 27, 2026
Member
Author
FernandoCelmer
left a comment
There was a problem hiding this comment.
🔍 Code Review
Code issues found: 1
| # | Severity | Comment |
|---|---|---|
| 1 | [Blocking] | fingerprint_of: default=str produces unstable fingerprints |
FernandoCelmer
commented
Apr 27, 2026
Member
Author
FernandoCelmer
left a comment
There was a problem hiding this comment.
🔍 Code Review
Code issues found: 4
| # | Severity | Comment |
|---|---|---|
| 1 | [Blocking] | Prefix collision in clear() deletes sibling workflow data |
| 2 | [Blocking] | TOCTOU race in StorageFile.clear() |
| 3 | [Blocking] | Unstable fingerprints from default=str + dead except branch |
| 4 | [Suggestion] | clear() should be abstract or have a better error path |
…ith pydantic 2.12+
…each repr fallback
…ure__ annotations)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #281
Description
dotflow/core/fingerprint.py(new): SHA-256 fingerprint helpers (fingerprint_of,fp_key,read_fingerprint,write_fingerprint) andVALID_POLICIESconstant for the three supported policies.dotflow/core/workflow.py:Manager.__init__gainson_input_change: str = "reuse"and calls_enforce_input_fingerprinton resume when storage is configured.dotflow/abc/storage.py: New non-abstractclear(workflow_id)method; default implementation raisesNotImplementedError.dotflow/providers/storage_default.py:clear()deletes in-memory keys whose name starts withworkflow_id.dotflow/providers/storage_file.py:clear()removes files in the tasks directory whose name starts withworkflow_id.dotflow/providers/storage_s3.py:clear()delegates toS3.delete_prefix(workflow_id).dotflow/cloud/aws/services/s3.py:delete_prefix(sub_prefix)paginates and batch-deletes S3 objects; rejects emptysub_prefixto prevent bucket-wide wipes.dotflow/core/exception.py:InputChangedErrorandInvalidOnInputChangeexceptions with descriptive messages.docs_src/checkpoint/checkpoint_input_change.py(new): End-to-end usage example.tests/core/test_fingerprint.py(new): Unit tests for fingerprint helpers.tests/core/test_workflow_input_change.py(new): Policy integration tests (reuse / reset / raise / invalid / no-resume).tests/providers/test_storage_default.py,test_storage_file.py,test_storage_s3.py:clear()coverage.Motivation and Context
Resuming a workflow with a different
initial_contextsilently reused stale checkpoints, making it impossible to detect or handle input drift. Closes #281.Types of changes
Checklist