Repository navigation
Wait for capture action targets within the reserved deadline - #865
Merged
Merged
Conversation
Reuse the worker's bounded zero-match poll for scene-action resolution and retain its existing terminal candidate evidence on refusal. Preserve exact selectors, ownership checks, and the reserved worker deadline. Add real hidden-UIA action-path coverage for late target availability and terminal refusal, with the default suite registered at 132 cases. Refs scgopi#848 scgopi#850 Signed-off-by: Colin Neilens <coneilen@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 87739019-4c73-4846-aa7f-1fb0e10b812c
coneilen
marked this pull request as ready for review
October 18, 2026 01:04
This was referenced Oct 18, 2026
Closed
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
Wait for capture scene-action targets using the existing deadline-bounded zero-match poll, and retain the existing terminal refusal evidence when resolution fails. Exact selectors, ownership checks, and the reserved worker deadline remain unchanged.
Refs #848 #850
Changes
found=0loop into one shared module helper; the original worker wait delegates to it, and scene actions forward the same lease deadline and deadline guard.Test plan
RED: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -SelectorRefusalContractOnly -ScratchRoot D:\gcs\action848-polling\red3 -> 16 executed / 14 passed / 2 intended behavioral failures on unchanged 29ae94e production: the real action path made one lookup in 0.456 s (terminal case 0.478 s), refused "Expected exactly one visible UIA element Name='Alpha' id='' prefix='open-project-'; found=0.", and retained 0 terminal snapshots.
GREEN: pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -SelectorRefusalContractOnly -ScratchRoot D:\gcs\action848-polling\green -> 16/16 passed; the late native UIA target succeeded in 1.637 s after 3 resolver queries and 1 invocation, and the terminal case retained the existing typed last-poll candidate snapshot; both hidden HWNDs and fixture threads closed.
REGRESSION: & 'C:\Program Files\PowerShell\7\pwsh.exe' '-NoProfile' '-File' 'D:\depot\copilot-worktrees\GraphCode\coneilen-super-goggles\Tools\windows\Tests\UiCaptureDriver.Tests.ps1' '-ScratchRoot' 'D:\gcs\action848-polling\default' '-PrebuiltFixtureManifest' 'D:\gcs\a848fx\fixtures.json' '-PrebuiltFixtureManifestSha256' '79E475A26F37F2F1864088C20A31459D8412B28A1C58FEEF085D4A80DA73BBFF'; pwsh -NoProfile -File D:\gcs\action848-polling\full2-controller.ps1 -> default 132/132 passed before the registrar changed to 132; the separately authorized job-owned full2 ran the official ValidationRunner body with its exact parent PASS line, held-generation exit 0, and complete registered 132/132 report, manifest, and source bindings.
The separate focused regression also passed 16/16:
pwsh -NoProfile -File Tools\windows\Tests\UiCaptureDriver.Tests.ps1 -SelectorRefusalContractOnly -ScratchRoot D:\gcs\action848-polling\focused.Evidence limits and retained failures:
CS0246forIRawElementProviderFragmentRootand thenManualResetEvent. They are retained separately asredandred2; neither is behavioral RED. Onlyred3, after the reference corrections and before production changes, is the behavioral failure evidence.Terminate, then measured typedActive=0after Terminate and before Close, and observed actual stdout/stderr EOF. The pre-termination member count is unknown; this is not a claim of zero-before-termination or zero harness safety termination. Raw stderr is nonempty and retained.System.Threading.Tasks.VoidTaskResultlines; they are retained and are not counted as parent PASS.Checklist
git commit -s) per the DCOmake test)make check)