Skip to content

Space delete-cleanup wait sat below the delete operation's own 30s contract - #898

Merged
rbuergi merged 1 commit into
mainfrom
fix/space-delete-wait-budget
Aug 7, 2026
Merged

rbuergi merged 1 commit into
mainfrom
fix/space-delete-wait-budget

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The flake, root-caused

SpaceMenuAndAccessTest.Space_ChildrenAreQueryable redded main's post-merge run (31160623759, shard 5) with two DeleteNodeRequest callbacks 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 a DeleteNodeRequest per descendant (the Overview child and the auto-minted creator _Access grant), and each fan-out activates that leaf's per-node hub — a cold start HandleDeleteNodeRequest itself documents as 5–45s on a loaded CI runner. The operation's own ceiling is MeshOperationOptions.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.Test 85/85 in bulk (Release, one process)
  • Release -warnaserror build clean

🤖 Generated with Claude Code

…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>
Copilot AI lite review requested due to automatic review settings August 7, 2026 08:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 within 30.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();
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

367 tests  ±0   363 ✅ ±0   5m 13s ⏱️ +25s
 10 suites ±0     4 💤 ±0 
 10 files   ±0     0 ❌ ±0 

Results for commit ff4cd10. ± Comparison against base commit cce64b8.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

1 135 tests  ±0   1 128 ✅ ±0   5m 40s ⏱️ +42s
   11 suites ±0       7 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit ff4cd10. ± Comparison against base commit cce64b8.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

   10 files  ±0     10 suites  ±0   5m 2s ⏱️ -21s
1 487 tests ±0  1 487 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 577 runs  ±0  1 577 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit ff4cd10. ± Comparison against base commit cce64b8.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

1 541 tests  ±0   1 437 ✅ ±0   5m 26s ⏱️ -19s
   11 suites ±0     104 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit ff4cd10. ± Comparison against base commit cce64b8.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

2 013 tests  ±0   2 012 ✅ ±0   6m 56s ⏱️ -7s
   11 suites ±0       1 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit ff4cd10. ± Comparison against base commit cce64b8.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 571 tests  ±0   1 382 ✅ ±0   6m 53s ⏱️ +3s
   11 suites ±0     189 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit ff4cd10. ± Comparison against base commit cce64b8.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Test Results

   64 files  ±0     64 suites  ±0   35m 13s ⏱️ +24s
8 114 tests ±0  7 809 ✅ ±0  305 💤 ±0  0 ❌ ±0 
8 204 runs  ±0  7 899 ✅ ±0  305 💤 ±0  0 ❌ ±0 

Results for commit ff4cd10. ± Comparison against base commit cce64b8.

@rbuergi
rbuergi merged commit ecb12d9 into main Aug 7, 2026
17 checks passed
@rbuergi
rbuergi deleted the fix/space-delete-wait-budget branch August 19, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants