fix(dag): sweep terminalizes workflows and releases their lease after a host-level settle - #360
Merged
Conversation
… a host-level settle With the owning instance torn down, checkCompletion/dag.fail/complete and the automation unregister all lived inside the dead DagLoop — a swept workflow stayed running forever with required nodes failed and its lease registration leaking (workflow rot). After a host-level settle lands, the sweep now mirrors checkCompletion's durable half: when every current-revision node is terminal it fails (required-node failure) or completes the workflow via the same workflow-lock-serialized command layer, then unregisters the dag lease. Parent wake delivery stays with the owning instance (session context) and converges through the DagLoop init drain on the next instance load; cascade skips of pending dependents likewise converge at adopt. Closes#343
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 freeto 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#343
What
After a host-level sweep settle lands, the sweep mirrors
checkCompletion's durable half:dag.fail(required-node failure) ordag.complete({skipReviewGate:true})— through the same workflow-lock-serialized command layer a live DagLoop uses (double settles collapse via the terminal-status guards)Explicitly out of scope (converge through existing instance-load paths, documented in code):
ownsSessionguard + prompt injection); the DagLoop init drain delivers on the next instance loadTests
failed(single required node) — 11/11 in the file pass with--timeout 30000(CI suite default)Note: the earlier "pre-existing failures" in this file were bun's default 5s per-test timeout; the file's header already mandates
--timeout 30000.