Repository navigation
fix(workflow): reject incompatible resume definitions - #923
Merged
Merged
Conversation
Agentflare-Branch: task/754-safer-workflow-resume Agentflare-Item: 754
getappz
marked this pull request as ready for review
October 19, 2026 11:09
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.
A saved JSON workflow could resume after its prompt, model, arguments or steps changed under the same workflow name. Journal replay then reused results from the old definition while running the current one.
Persist an execution identity in the existing workflow state and compare it before lease acquisition and journal replay, including a fresh-state recheck. JSON compilation supplies the typed definition and captures its absolute working directory. Both normal and start-once creation preserve the identity; duplicate start receipts retain their existing behavior. This adapts Harness2's configuration identity guard without adding a runner, store, dependency or completion-marker layer.
Compatibility: legacy JSON runs without identity require a new run. Unversioned Rust workflows retain existing behavior; Rust callers can opt in with an explicit revision identity. Repository contents, inherited environment, executable/agent defaults and persona-file contents are outside this identity.
Validation: regression reproduced the unsafe resume before the fix; all 134 flare-workflow tests pass, including six new resume tests. cargo fmt --check, git diff --check and independent source review pass. Local Clippy passes with all targets/features and warnings denied. Hosted CI passed: workspace tests/builds on Linux and Windows, Clippy, formatting, audit, cargo-deny, hakari, CodeQL and CI Green. Windows tests used a command-only per-package debug=0 override after a PDB/disk-space link failure; no repository build settings changed.
The experimental refinement loop remains in draft PR #920 and is not included here.
Opened by
codexon i-flare-c997d745ae66 (flared:c997d745ae66) for item #754 via agentflare.Summary by CodeRabbit