Re-resolve the graph parent while waiting for workspace chrome - #443
Merged
Merged
Conversation
The mount loop re-queried its children every attempt but from a \ reference captured before the project and loop rows were invoked. That invocation transitions the canvas and remounts the graph fragment, so the captured parent can already be dead when the loop starts, and Get-DirectChildren on a dead parent yields nothing for as long as it is asked. Waiting longer could never recover from that. Re-resolve the parent alongside the children on every attempt, in both the chrome mount loop and the detail-children loop, so each attempt observes one live generation of the tree. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
This was referenced Sep 24, 2026
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.
Problem
#442 fixed the detail-children assertion by re-resolving the four children from the live tree instead of polling cached references. The next run failed one assertion earlier, on the chrome mount loop:
Same root cause, one level up. The mount loop already re-queries its children on every attempt, but it queries them from a
$graphreference captured at line 1526 — before the project row and loop row are invoked at 1551–1552. That invocation is exactly what transitions the canvas into the workspace view, and it remounts the graph fragment itself.So the parent can already be dead when the loop starts.
Get-DirectChildrenon a dead parent returns nothing for as long as it is asked, which is why the previous hardening kept failing in this block no matter how the budget was adjusted: widening 10s to 20s gave a dead reference more time to stay dead. This is the same trap as #442 — polling something that cannot change — just applied to the parent rather than the children.It also explains the long-standing non-determinism here, where a single commit produced different failure sites in this block across runs with no code change: which assertion you land on depends only on where the remount falls relative to the loop.
Fix
Re-resolve the parent alongside the children on every attempt, so each attempt observes one live generation of the tree. Applied in both places that walk this subtree: the chrome mount loop and #442's detail-children loop, which had the same latent exposure through its own cached
$graph.Evidence
RED: CI run 35954040424 -> FAIL
workspace chrome omitted the toolbar identity childatuia-live-gate.ps1:447, after the mount loop had consumed its full 20s budget against a parent captured before the invocation that remounts it.GREEN: the
windows-shelllive gate now resolves the workspace chrome and advances past the block -> see thewindows-shellcheck on this PR.REGRESSION:
Tools\windows\Tests\WindowsShell.Tests.ps1 -ZigExecutable $env:GRAPHCODE_ZIG0152-> All 266 tests passed, Windows shell scaffold contract: PASS (40 source files executed).Verification
Requirepredicates are byte-identical to main: 379 on main, 379 here,Compare-Objectreports no differences in either direction. This change is purely about which element reference is inspected; no assertion was added, removed, or weakened.Add-Typeblock and its declaration counts are unaffected.