ReviewOS

craft-native/craft

Make the Windows modality probe return actual native window snapshots

#433
Closed chris opened this 3 days ago ·
3 days ago

The parent-scoped Windows native-window acceptance failed in exact-source CI for v0.0.396.

Evidence: https://github.com/craft-native/craft/actions/runs/41071220268/job/124116226600

The long-lived PowerShell probe completed its startup handshake, then produced no snapshot response before the existing 15-second probe deadline. The verifier reported: visible Win32 modality was not parent-scoped because probing Win32 windows timed out. This is not evidence that the modality assertion actually observed incorrect owner/enabled state. The build also emits pkg-config.BAT resolution diagnostics; those should be investigated separately rather than assumed to explain an empty probe response.

Inspect the EnumWindows callback/runspace boundary and probe transport. Preserve actual parent-scoped owner/enabled assertions and the release gate; do not simply increase the deadline or claim a Windows pass from a macOS run. Verify through the real Windows job and its retained fixture log.

This blocks the host release needed for https://github.com/stacksjs/hq.training/issues/339 and https://github.com/stacksjs/stx/issues/2137.

3 days ago

6987b7e is pushed to main. The probe now executes EnumWindows and collects titles, owners and enabled state in the compiled C# callback, instead of entering a PowerShell runspace once per desktop window. The existing native modality assertions and 15-second snapshot deadline remain in force; enumeration errors now report their Win32 cause.

Local TypeScript checks and lint passed; related portable tests reported 5 passes and 6 platform skips. No Windows pass is inferred from this Mac. Exact-source CI 41078342459 is pending and must verify the actual Windows behavior. The change is consistent with the managed native-callback pattern documented by Microsoft: https://learn.microsoft.com/en-us/dotnet/standard/native-interop/how-to-implement-callback-functions .

3 days ago

Fixed in https://github.com/craft-native/craft/commit/6987b7e5b5 and now verified by the real Windows multi-window job: https://github.com/craft-native/craft/actions/runs/41078342459/job/124160909526. The compiled C# probe enumerates actual HWND state; the original owner/enabled checks and 15-second deadline remain. The full native Windows job passed. Local related portable tests, types, lint and the pinned Zig format check also passed; platform skips were not treated as native proof.

Sign in to comment on this issue.