Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ These are the single source of truth. Never silently upgrade one.
| Swift | 6.3.3 | `.github/workflows/windows-*.yml` (`swift-version: swift-6.3.3-release`), `Tools/windows/bootstrap.ps1` |
| Zig (shell) | 0.15.2 | `mise.toml`, `graphcode-windows/build.zig.zon` (`minimum_zig_version`) |
| Zig (zmx only) | 0.16.0 | `graphcode-windows/provider-pins.json` |
| Winghostty | `e0a5579f3b470bede72294d661282a391c502ace` | `graphcode-windows/provider-pins.json` |
| Winghostty | `cac8f5f148fd5015d49e81e169ce9006ac7156ea` | `graphcode-windows/provider-pins.json` |
| zmx | `785b3fd15dcafd1882b495c831a10f98c201b908` | `graphcode-windows/provider-pins.json` |

If a build fails because a tool is missing or the wrong version, rerun
Expand Down
2 changes: 1 addition & 1 deletion Tools/windows/Convert-CanvasPaintArtifact.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ namespace GraphCode.PaintArtifactTests
osVersion = [Environment]::OSVersion.Version.ToString()
platform = [Environment]::OSVersion.Platform.ToString()
zigVersion = "0.15.2"
winghosttyPin = "e0a5579f3b470bede72294d661282a391c502ace"
winghosttyPin = "cac8f5f148fd5015d49e81e169ce9006ac7156ea"
pinEvidenceScope = "Expected repository pins; actual Zig executable and Winghostty checkout identity are not measured by the converter."
}
dimensions = $receipt.dimensions
Expand Down
2 changes: 1 addition & 1 deletion Tools/windows/PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ The current accepted public provider commits are:

| Provider | Pinned commit | Retained branch |
|---|---|---|
| [coneilen/winghostty](https://github.com/coneilen/winghostty/commit/e0a5579f3b470bede72294d661282a391c502ace) | `e0a5579f3b470bede72294d661282a391c502ace` | `graphcode-host` |
| [coneilen/winghostty](https://github.com/coneilen/winghostty/commit/cac8f5f148fd5015d49e81e169ce9006ac7156ea) | `cac8f5f148fd5015d49e81e169ce9006ac7156ea` | `graphcode-host` |
| [coneilen/zmx](https://github.com/coneilen/zmx/commit/785b3fd15dcafd1882b495c831a10f98c201b908) | `785b3fd15dcafd1882b495c831a10f98c201b908` | `graphcode-quickchat-hang` |

The annotated `graphcode-windows-baseline-2026-09-17` tags remain historical
Expand Down
1,070 changes: 535 additions & 535 deletions Tools/windows/Tests/PreviewCore.Qualification.ps1

Large diffs are not rendered by default.

994 changes: 497 additions & 497 deletions Tools/windows/Tests/PreviewCore.Tests.ps1

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Tools/windows/Tests/TerminalGate.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ foreach ($provider in @("winghostty", "zmx")) {
}
Assert-Contract ($pins.schemaVersion -eq 1) "provider pin schema is not 1"
Assert-Contract ($pins.winghostty.sha -eq
"e0a5579f3b470bede72294d661282a391c502ace") "Winghostty SHA is not exact"
"cac8f5f148fd5015d49e81e169ce9006ac7156ea") "Winghostty SHA is not exact"
Assert-Contract ($pins.zmx.sha -eq
"785b3fd15dcafd1882b495c831a10f98c201b908") "zmx SHA is not exact"
Assert-Contract ($pins.winghostty.remoteUrl -eq
Expand Down
4 changes: 2 additions & 2 deletions Tools/windows/Tests/ValidationRunner.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6192,9 +6192,9 @@ $wireTargetingSummaries=@($wireTargetingOutput|Where-Object {
})
if ($wireTargetingSummaries.Count -ne 1) {throw 'RED: wire targeting count missing or duplicated'}
$wireTargetingSummary=ConvertFrom-Json $wireTargetingSummaries[0]
if ($wireTargetingSummary.executed -ne 56 -or $wireTargetingSummary.passed -ne 56 -or
if ($wireTargetingSummary.executed -ne 75 -or $wireTargetingSummary.passed -ne 75 -or
$wireTargetingSummary.failed -ne 0 -or $wireTargetingSummary.skipped -ne 0) {
throw 'RED: wire targeting requires all 56 contracts without skips'
throw 'RED: wire targeting requires all 75 contracts without skips'
}
$agentCommandOutput = @(& $pwsh -NoProfile -File (
Join-Path $PSScriptRoot "Invoke-AgentCommand.Tests.ps1"))
Expand Down
2 changes: 1 addition & 1 deletion Tools/windows/Tests/VisualBaseline.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ try {
providers = @{
zmx = @{ sha256 = ('4' * 64); pin = '785b3fd15dcafd1882b495c831a10f98c201b908'
artifact = '.graphcode-tools\providers\zmx\zig-out\bin\zmx.exe' }
winghostty = @{ sha256 = ('5' * 64); pin = 'e0a5579f3b470bede72294d661282a391c502ace'
winghostty = @{ sha256 = ('5' * 64); pin = 'cac8f5f148fd5015d49e81e169ce9006ac7156ea'
artifact = '.graphcode-tools\providers\winghostty\zig-out\lib\winghostty-win32-host.lib' }
}
renderer = @{ uiaGate = $false; daemonSupervisorHook = $false }
Expand Down
2 changes: 1 addition & 1 deletion Tools/windows/Tests/WindowsShell.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ $pins = Get-Content -LiteralPath (Join-Path $shellRoot "provider-pins.json") -Ra
ConvertFrom-Json
Assert-Contract ($pins.schemaVersion -eq 1) "provider pin schema is not 1"
Assert-Contract ($pins.winghostty.sha -eq
"e0a5579f3b470bede72294d661282a391c502ace") "Winghostty pin changed"
"cac8f5f148fd5015d49e81e169ce9006ac7156ea") "Winghostty pin changed"
Assert-Contract ($pins.zmx.sha -eq
"785b3fd15dcafd1882b495c831a10f98c201b908") "zmx pin changed"
Assert-Contract ($pins.winghostty.remoteUrl -eq
Expand Down
26 changes: 22 additions & 4 deletions Tools/windows/Tests/WireTargeting.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,13 @@ public static class WireFixture {
'@
$root=[IntPtr]::Zero;$hostWindow=[IntPtr]::Zero;$content=[IntPtr]::Zero
try {
$root=[WireFixture]::Create([IntPtr]::Zero,$false,'wire fixture owner')
$hostWindow=[WireFixture]::Create($root,$false,'wire fixture sheet')
$content=[WireFixture]::Create($hostWindow,$true,'wire fixture content')
$fixtureDpiContext=[WireFixture]::SetThreadDpiAwarenessContext([IntPtr](-4))
Assert-WireCase ($fixtureDpiContext -ne [IntPtr]::Zero) 'Fixture PMv2 setup failed.'
try {
$root=[WireFixture]::Create([IntPtr]::Zero,$false,'wire fixture owner')
$hostWindow=[WireFixture]::Create($root,$false,'wire fixture sheet')
$content=[WireFixture]::Create($hostWindow,$true,'wire fixture content')
} finally {$null=[WireFixture]::SetThreadDpiAwarenessContext($fixtureDpiContext)}
if ($LegacyBehavior) {
Test-WireCase 'owned child form is observable, not just a top-level class' {
$actual=[CapUiaGateState]::FindTopLevel('WireTargetFixtureContent',[uint32]$PID)
Expand Down Expand Up @@ -560,15 +564,29 @@ try {
$previous=[WireFixture]::SetThreadDpiAwarenessContext([IntPtr](-1))
try {
$before=[WireFixture]::GetThreadDpiAwarenessContext()
$activePrevious=[WireFixture]::SetThreadDpiAwarenessContext([IntPtr](-4))
Assert-WireCase ($activePrevious -ne [IntPtr]::Zero) 'Drag PMv2 observation setup failed.'
try {$retainedDpiContext=[WireFixture]::GetThreadDpiAwarenessContext()}
finally {
$restored=[WireFixture]::SetThreadDpiAwarenessContext($activePrevious)
Assert-WireCase ($restored -ne [IntPtr]::Zero) 'Drag PMv2 observation restore failed.'
}
$receipt=[CapNative]::PostPointerDragScreen($hostWindow,($b[0]+10),($b[1]+10),($b[0]+15),($b[1]+15))
Assert-WireCase ($receipt.Start.ClientX -eq 10 -and $receipt.Start.ClientY -eq 10 -and
$receipt.End.ClientX -eq 15 -and $receipt.End.ClientY -eq 15 -and
$receipt.End.ClientX-$receipt.Start.ClientX -eq 5 -and
$receipt.End.ClientY-$receipt.Start.ClientY -eq 5 -and
$receipt.End.ScreenX-$receipt.Start.ScreenX -eq 5 -and
$receipt.End.ScreenY-$receipt.Start.ScreenY -eq 5 -and
$receipt.Start.MovePosted -and $receipt.Start.DownPosted -and
$receipt.HeldMovePosted -and $receipt.End.UpPosted -and
$receipt.Start.Recipient -eq $hostWindow.ToInt64() -and
$receipt.End.Recipient -eq $hostWindow.ToInt64() -and
$receipt.Start.DpiContext -eq $retainedDpiContext -and
$receipt.End.DpiContext -eq $retainedDpiContext -and
$receipt.Delivery -ceq 'POSTED_WINDOW_MESSAGES_NOT_PHYSICAL_POINTER' -and
[WireFixture]::GetThreadDpiAwarenessContext() -eq $before) `
"Drag receipt/DPI restore failed: $($receipt|ConvertTo-Json -Depth 10 -Compress); before=$before; after=$([WireFixture]::GetThreadDpiAwarenessContext())"
"Drag receipt/DPI restore failed: $($receipt|ConvertTo-Json -Depth 10 -Compress); retained=$retainedDpiContext; before=$before; after=$([WireFixture]::GetThreadDpiAwarenessContext())"
} finally {$null=[WireFixture]::SetThreadDpiAwarenessContext($previous)}
}
foreach ($failureIndex in 0..3) {
Expand Down
9 changes: 9 additions & 0 deletions Tools/windows/ValidationRunner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ Overview, Quick Chats and other owners select neither of those rows. The
`ownership.mixed-ui-policy` suite checks all 32 surface/owner/selection combinations
without changing the independent roster, card, metadata, bounds or foreign-owner
requirements.
Connector drag snapshots retain the separate Actual Size action and require at
least an 8-by-8 physical-pixel intersection of each exact owned card with both
graph and client bounds. Geometry-only failures may invoke the existing owned
Fit Canvas action at most twice during the existing 40-observation convergence
budget. Each observation reconnects and recaptures the exact IDs; no zero-area
or foreign snapshot is accepted. Final refusal saves the attempt index, fit
count, graph/client bounds, both card captures, decision and a uniquely named
owned-window PNG with byte count/hash before throwing. Capture failures remain
explicit and do not replace the original connector refusal.

With both process flags `GRAPHCODE_UIA_GATE=1` and
`GRAPHCODE_UIA_EDGE_ACTION_TRACE=1`, popup input emits
Expand Down
37 changes: 37 additions & 0 deletions Tools/windows/ValidationRunner/Ui/MixedPolicyContracts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ foreach ($productionPath in @('Stub-Daemon.ps1', 'uia-live-gate.ps1')) {
($node.Name -like '*-MultiProject*' -or $node.Name -cin @(
'ConvertTo-SketchCanonicalJson', 'Test-RetryableUiaError', 'Test-UpdateBannerClickTarget',
'Get-DynamicProjectCardSnapshotDecision', 'Get-ConnectorDragSnapshotDecision',
'Wait-ConnectorVisibleSnapshot',
'Get-WorkspaceTabMountDecision', 'Get-UiaSelectionEventDecision'))
}, $true)) {
# Keep the actual helper's file-backed loader rooted at its production directory.
Expand Down Expand Up @@ -403,6 +404,42 @@ Invoke-Mixed 3635 'selected-project-roster-and-physical-connector-snapshots' {
$d=Get-ConnectorDragSnapshotDecision $cutoff $expected 4242 $connectorGraph $client $false
Assert-Mixed ($d.ready -and ($d.targetCenter -join ',') -ceq '1514,461' -and -not $d.targetCenterVisible -and
($d.targetPoint -join ',') -ceq '1339,461') 'Actual Size cutoff did not use visible card intersection'
foreach ($scenario in @('already-visible', 'visible-after-fit', 'never-visible')) {
$state = @{ reads = 0; fits = 0; saved = $null; pauses = 0 }
$failure = $null
try {
$snapshot = Wait-ConnectorVisibleSnapshot {
$state.reads++
$cards = Copy-MultiProjectValue $fitted
if ($scenario -ceq 'never-visible' -or ($scenario -ceq 'visible-after-fit' -and $state.fits -eq 0)) {
$cards[0].bounds = @(1600,552,1790,630)
$cards[1].bounds = @(1908,552,2114,630)
}
$sliver = Copy-MultiProjectValue $fitted
$sliver[1].bounds = @(1412,552,1618,630)
$sliverDecision = Get-ConnectorDragSnapshotDecision $sliver $expected 4242 $connectorGraph $client $false
Assert-Mixed (-not $sliverDecision.ready -and $sliverDecision.failure -ceq 'cards-insufficient-visible-intersection') `
'A two-pixel target sliver must not qualify as a material connector intersection'
return [ordered]@{
captures = $cards; graphBounds = $connectorGraph; clientBounds = $client
decision = Get-ConnectorDragSnapshotDecision $cards $expected 4242 $connectorGraph $client $false
}
} { $state.fits++ } { param($record) $state.saved = $record } `
{ $state.pauses++ } -MaximumAttempts 4 -MaximumNormalizations 2
} catch { $failure = $_ }
if ($scenario -ceq 'never-visible') {
Assert-Mixed ($null -ne $failure -and $state.reads -eq 4 -and $state.fits -eq 2 -and
$state.saved.attempt -eq 4 -and $state.saved.normalizations -eq 2 -and
$state.saved.snapshot.captures.Count -eq 2 -and
$state.saved.snapshot.decision.failure -ceq 'cards-outside-viewport' -and
$state.saved.snapshot.graphBounds.Count -eq 4 -and $state.saved.snapshot.clientBounds.Count -eq 4) `
'Never-visible connector must persist the final exact snapshot and refuse after bounded normalization'
} else {
$fits = if ($scenario -ceq 'visible-after-fit') { 1 } else { 0 }
Assert-Mixed ($null -eq $failure -and $snapshot.decision.ready -and $state.fits -eq $fits -and
$null -eq $state.saved) 'Connector must reacquire and prove visibility after bounded fit'
}
}
foreach($mutation in @('wrong-connector','wrong-target','wrong-process','logical-card-space','logical-client-space','preexisting-dialog')) {
$candidate=Copy-MultiProjectValue $fitted;$candidateClient=@($client);$dialog=$false
switch($mutation){wrong-connector{$candidate[0].automationId='canvas-card-wrong-source'} wrong-target{$candidate[1].name='Wrong target'}
Expand Down
6 changes: 6 additions & 0 deletions Tools/windows/ValidationRunner/Ui/UiDerivedContracts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ Invoke-Derived 'ui.root.source.line-7027' {
'\[GraphCodeUiaGateState\]::PostMouseDragMoveAt\(', '\$visibleTargetBounds = @\(')) {
Assert-Derived ($source -match $pattern) 'Connector physical-screen/clipped target contract missing'
}
foreach ($literal in @('function Wait-ConnectorVisibleSnapshot(', '[ValidateRange(0, 2)][int] $MaximumNormalizations = 2',
'$connectorConvergence = Wait-ConnectorVisibleSnapshot', '$fit = Find-FragmentByIdWithRetry $root "fit-canvas" $rawWalker',
'UIA_CONNECTOR_FINAL_FAILURE_EVIDENCE=', 'Save-UiaShellWindowCapture $shellWindow $png',
'[IO.FileMode]::CreateNew', 'cards-insufficient-visible-intersection')) {
Assert-Derived ($source.Contains($literal)) 'Connector bounded normalization/final evidence contract missing'
}
}
$null = [IO.Directory]::CreateDirectory($ArtifactRoot)
[IO.File]::WriteAllText((Join-Path $ArtifactRoot 'ui-derived-results.json'), ($results | ConvertTo-Json -Depth 8), [Text.UTF8Encoding]::new($false))
Expand Down
Loading
Loading