Repository navigation
Space delete-cleanup wait sat below the delete operation's own 30s contract - #898
Merged
Merged
Conversation
…ntract Space_ChildrenAreQueryable (and its sibling) awaited the recursive space delete with the assertion default of 10s. The delete fans out a DeleteNodeRequest per descendant — the Overview child and the creator _Access grant — and each fan-out ACTIVATES that leaf's per-node hub, a documented 5-45s cold start on a loaded CI shard; the operation's own ceiling is MeshOperationOptions.Timeout (30s). So on a saturated shard the delete completed normally just past the 10s assertion: CI dumped both leaf callbacks pending at 10.3s, the test's actual assertions had already passed, and locally the whole suite runs 85/85 in 12s. Waiting below the operation's contract was the red — the wait now matches the 30s contract. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts SpaceMenuAndAccessTest cleanup waits so the recursive DeleteNode cleanup does not time out under the stream-assertion default (10s) when the underlying delete pipeline is bounded by MeshOperationOptions.Timeout (30s), addressing a CI-only teardown flake.
Changes:
- Updated two
NodeFactory.DeleteNode(spaceId)cleanup assertions to wait within30.Seconds()before expecting an emission. - Added inline comments explaining why the longer wait matches the delete operation’s contract and avoids dispose-time pending callbacks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+125
to
+130
| // The recursive delete fans out a DeleteNodeRequest per descendant (here: the creator | ||
| // _Access grant), each ACTIVATING that leaf's per-node hub — 5-45s cold start on a loaded | ||
| // CI shard (HandleDeleteNodeRequest). The operation's own ceiling is | ||
| // MeshOperationOptions.Timeout (30s); waiting only the 10s assertion default sat BELOW the | ||
| // operation's contract and was the shard-5 red on otherwise-green runs. | ||
| await NodeFactory.DeleteNode(spaceId).Should().Within(30.Seconds()).Emit(); |
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
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.
The flake, root-caused
SpaceMenuAndAccessTest.Space_ChildrenAreQueryableredded main's post-merge run (31160623759, shard 5) with twoDeleteNodeRequestcallbacks pending 10.3s at dispose — while the test's actual assertions had already passed.The cleanup
NodeFactory.DeleteNode(spaceId)is a recursive delete: it fans out aDeleteNodeRequestper descendant (theOverviewchild and the auto-minted creator_Accessgrant), and each fan-out activates that leaf's per-node hub — a cold startHandleDeleteNodeRequestitself documents as 5–45s on a loaded CI runner. The operation's own ceiling isMeshOperationOptions.Timeout= 30s. The test waited only the assertion default of 10s — an assertion budget below the operation's documented contract. On a saturated shard the delete completes normally a moment after the assertion gives up; locally (and in bulk) the suite runs 85/85 in 12s.Fix: both cleanup waits in the class now wait to the operation's contract (
Within(30s)), with the reasoning in a comment. This is not a widened bound to make a wedge pass — nothing wedges; the wait simply contradicted the operation's own defined ceiling (the callbacks were observed live at 10.3s, inside the 30s budget).Test-only change — no What's New entry.
Verification
MeshWeaver.NodeOperations.Test85/85 in bulk (Release, one process)-warnaserrorbuild clean🤖 Generated with Claude Code