Repository navigation
fix(workflows): charge an operation whose new edge the final scope check drops - #9664
Merged
Merged
Conversation
…eck drops The v2 apply-operations count treated an operation as applied when its connection created an edge that the end-of-batch scope check then removed (cross-subflow, trigger target, or note endpoint). The engine now records which operation's deferred connection created each edge and charges a dropped edge to that operation. Existing edges a move leaves crossing scopes stay uncharged: losing them is the move's effect, not a refusal.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThe engine now counts an operation as declined when the final edge check removes an edge that operation created.
|
This branch was previously deployed
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.
Summary
add Awithconnectionsinto a block inside a loop reportedapplied: 1even though its only edge was removed and listed underskipped.extract_from_subflow,insert_into_subflow) are still not charged. Losing them is the move's documented effect, not a refusal. Charging them is how the old skip-subtraction count could go negative.removeInvalidScopeEdgesnow returns the ids of the edges it dropped. Edge creation only appends, so each connection's new edges are the tail ofedgesafteraddConnectionsAsEdges.declinedOperationCount.Type of Change
Testing
lib/workflows/editing/operations.test.ts: added a regression test where anaddwhose connection crosses into a loop counts as one declined operation. It failed before the fix (0 vs 1). Also added a guard test: extracting a block that leaves an existing edge crossing scopes counts as zero declined.operations.test.ts+apply-workflow-operations.test.ts: 71/71 passChecklist
test-auditauthoring gate)