Decode production daemon graph frames and guard empty sidebar text - #630
Merged
Merged
Conversation
The Swift daemon encodes DaemonEvent.graphChanged(LoopGraph) with synthesized
Codable as {"graphChanged":{"_0":<graph>}}. The Windows model read the
wrapper as the graph, so every real daemon project decoded with an empty
path and name. Painting that empty name passed an undefined zero-length
pointer to DrawTextW with DT_END_ELLIPSIS, which faults inside USER32 and
terminates the shell with 0xC000041D as soon as a registered project paints.
Unwrap the associated value, skip DrawTextW for empty text in every helper,
remove the round-trip test shim that normalized real frames before the
model saw them, and add a scrubbed real-daemon live case that registers a
plain folder and requires the shell to stay alive with its project row.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
coneilen
added a commit
that referenced
this pull request
Oct 5, 2026
Record the immutable, unpublished 0.1.78-windows.beta7 candidate built from e770438 with #630's production daemon graph decode and empty-text drawing fix. Beta6 is failed/superseded by the Dev Box Production core flow failure and kept unchanged. Exact artifact stays complete; the other six gates and the 98/62/36 parity ledger are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
2 of 5 tasks
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
The Windows shell could not decode any graph sent by the real production
daemon. The beta6 Dev Box run registered the Core fixture and the CLI listed it,
but the shell never showed the project. Locally, the exact beta6 packaged shell
terminates with
0xC000041Da few seconds after a project is registered.Root cause:
DaemonEvent.graphChanged(LoopGraph)withsynthesized
Codableas{"graphChanged":{"_0":<graph>}}. The Windows modelread the
_0wrapper as the graph itself, so every real daemon projectdecoded with an empty path, an empty name, and no nodes.
(
0xaaaaaaaaaaaaaaaain the Debug build) toDrawTextWwithDT_END_ELLIPSIS. USER32 dereferences it, the access violation crosses thewindow procedure, and the shell exits with
0xC000041D.USER32!DrawTextExWorker←Sidebar.drawText(Sidebar.zig:1733)←
Sidebar.draw(Sidebar.zig:211) ←GraphCanvas.paint←WM_PAINT.wideslice hadlen = 0andptr = 0xaaaaaaaaaaaaaaaa.Why every earlier gate passed:
{"_0":...}frames beforehanding them to the model.
The beta3 crash after accepting a folder has the same USER32
c0000005→c000041dsignature, so it was most likely this defect.Changes
GraphModel.decodeGraphFramenow unwraps the daemon's_0associatedvalue. The unwrapped form is still accepted for the existing fixtures and
the stub daemon.
DrawTextWhelper skips empty text before selecting a font, so anempty label can no longer hand USER32 an undefined pointer. The helpers are
in Sidebar, GraphCanvas, NativeForms, TerminalSurface, WindowsOnboarding and
WindowsProductSettings.
DaemonRoundTripTests.zigpasses real daemon frames to the modelunmodified, and now also asserts the decoded project name.
ScrubbedShellStartup.Live.Tests.ps1adds a fifthregistered-projectcase, run inside the existing developer-free 11-key environment:
graphcode status;open-project-*ListItem namedCore;graphcode projectsto list the project.WindowsShell.Tests.ps1contracts keep the registered-project case andforbid reintroducing a frame-normalization shim.
Test plan
RED: zig test src\GraphModel.zig --test-filter "production daemon graphChanged" with pinned Zig 0.15.2 -> 0 passed, 1 failed (ProductionGraphProjectMissing)
GREEN: zig test src\GraphModel.zig --test-filter "production daemon graphChanged" with pinned Zig 0.15.2 -> 1/1 passed
REGRESSION: exact-head CI windows-shell integration for 578cf63 (run 37351425076) -> PASS; scrubbed startup executed=5 incl. registered-project, live UIA gate passed; unit shards, packaging and DCO green
Additional RED/GREEN evidence, all with pinned toolchains:
zig test src\Sidebar.zig ... --test-filter "empty".Sidebar.zig:211→drawText→
DrawTextW. This is the production stack.Tools\windows\Tests\DaemonRoundTrip.Live.Tests.ps1with the real beta6
graphcoded.exeand the shim removed.expectEqualStringsexpectedC:/gc-rt-red/.../projectand found an empty string.REAL_DAEMON_ROUNDTRIP: PASS, covering five mutations and therestart readback.
graphcoded.exeandgraphcode.exe:passed, then
registered-project did not retain live shell/daemon after onboarding.-Dworktrees-deferred=true:SCRUBBED_SHELL_STARTUP: PASS; executed=5,with
projectRow=open-project-*and CLI outputCore C:/.../Core.zig test src\GraphModel.zig152/152;zig test src\Sidebar.zig ...182/182.Limits:
not modified.
package, release, backend turn, Worktrees action, Nod test, dump, or
publication is included.
real-daemon live case is what covers the production wire shape.
make testandmake checkwere not run. The change is limited to theWindows Zig shell and Windows validation scripts.
Checklist
git commit -s) per the DCOmake test)make check)