Summary
Tools/windows/Tests/WindowsShell.Tests.ps1 runs Zig unit tests by a hand-maintained list of 19 explicit zig test src\<File>.zig invocations. Any test file not added to that list is silently never executed.
20 source files containing ~95 test blocks are currently never run by any harness, in CI or locally.
Affected files (test count)
| File |
tests |
| Sidebar |
22 |
| WindowsRepositoryDialogs |
13 |
| WorktreeStatus |
9 |
| DraftAttachments |
8 |
| GraphContextMenu |
8 |
| App |
4 |
| MainWindow |
4 |
| WorktreeDialog |
4 |
| Accessibility |
3 |
| Dpi |
3 |
| TemplateLibrary |
3 |
| WorkspaceLifecycle |
3 |
| GdiGradient |
2 |
| Navigation |
2 |
| QuickChats |
2 |
| AppFont |
1 |
| GdiplusAA |
1 |
| UpdateOfferDialog |
1 |
| WindowsNativeDialogs |
1 |
| WorkspaceControls |
1 |
Why imports do not save this
Zig runs test blocks from the root file passed to zig test. Tests in imported files are not included unless the root references their declarations, typically via std.testing.refAllDecls.
git grep refAllDecls -- graphcode-windows/src returns zero matches.
So transitive coverage does not exist. Sidebar.zig is imported by the wired GraphCanvas.zig, and its 22 tests still never run. Confirmed there is also no zig build test step: build.zig declares no test step, and addTest/test_step appear nowhere in build.zig, Tools/, or .github/. Only WindowsShell.Tests.ps1 invokes zig test; ValidationRunner.Tests.ps1 merely regex-asserts that the harness contains a WindowsUpdates line.
Impact
This is a gating failure, not a coverage gap. Tests that pass locally and are cited as evidence are not enforced by CI, so nothing prevents them from silently rotting.
Concretely, PR #408 added a mitigation test asserting the Move Project menu item is disabled. That test lives in GraphContextMenu.zig and has never run in CI.
This plausibly contributes to parity-ledger rows being marked Validated on evidence that no longer holds. Two such rows have already been found: row 53 (Project context menu) asserted the opposite of shipped behavior, and row 112 (Show in Graph) cited a live-gate walkthrough that does not exist (see #423).
Expected
Every graphcode-windows/src/*.zig file containing test blocks is executed by CI, and adding a new test file cannot silently escape the harness.
Suggested fix
- Wire the 20 orphaned files into
WindowsShell.Tests.ps1 with the correct per-file link flags (several need -target x86_64-windows-msvc -lc plus specific libs, matching existing entries).
- Add a structural guard that enumerates
src\*.zig, greps for ^test ", and fails if any such file is absent from the harness list. Without this the same drift recurs.
- Expect real failures. Some of these tests have not run in a long time; fix or explicitly quarantine each with a stated reason. Do not delete a failing test to make the suite green.
Note
GraphContextMenu.zig and MainWindow.zig are already being wired in by in-flight work on #418 - coordinate to avoid duplicate entries.
Summary
Tools/windows/Tests/WindowsShell.Tests.ps1runs Zig unit tests by a hand-maintained list of 19 explicitzig test src\<File>.ziginvocations. Any test file not added to that list is silently never executed.20 source files containing ~95
testblocks are currently never run by any harness, in CI or locally.Affected files (test count)
Why imports do not save this
Zig runs
testblocks from the root file passed tozig test. Tests in imported files are not included unless the root references their declarations, typically viastd.testing.refAllDecls.git grep refAllDecls -- graphcode-windows/srcreturns zero matches.So transitive coverage does not exist.
Sidebar.zigis imported by the wiredGraphCanvas.zig, and its 22 tests still never run. Confirmed there is also nozig build teststep:build.zigdeclares no test step, andaddTest/test_stepappear nowhere inbuild.zig,Tools/, or.github/. OnlyWindowsShell.Tests.ps1invokeszig test;ValidationRunner.Tests.ps1merely regex-asserts that the harness contains aWindowsUpdatesline.Impact
This is a gating failure, not a coverage gap. Tests that pass locally and are cited as evidence are not enforced by CI, so nothing prevents them from silently rotting.
Concretely, PR #408 added a mitigation test asserting the Move Project menu item is disabled. That test lives in
GraphContextMenu.zigand has never run in CI.This plausibly contributes to parity-ledger rows being marked Validated on evidence that no longer holds. Two such rows have already been found: row 53 (
Project context menu) asserted the opposite of shipped behavior, and row 112 (Show in Graph) cited a live-gate walkthrough that does not exist (see #423).Expected
Every
graphcode-windows/src/*.zigfile containingtestblocks is executed by CI, and adding a new test file cannot silently escape the harness.Suggested fix
WindowsShell.Tests.ps1with the correct per-file link flags (several need-target x86_64-windows-msvc -lcplus specific libs, matching existing entries).src\*.zig, greps for^test ", and fails if any such file is absent from the harness list. Without this the same drift recurs.Note
GraphContextMenu.zigandMainWindow.zigare already being wired in by in-flight work on #418 - coordinate to avoid duplicate entries.