Skip to content

Preserve Windows Wire drags across same-window recapture - #962

Merged
coneilen merged 23 commits into
mainfrom
coneilen-native-wire-closure
Nov 7, 2026
Merged

coneilen merged 23 commits into
mainfrom
coneilen-native-wire-closure

Conversation

@coneilen

@coneilen coneilen commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Preserve Windows Wire drags across verified same-window recapture, safely observe the owned native edge sheet, and match macOS's Create action. Normal W1 was accepted at71a; independently qualified495b and the release-metadata composition1a5514a preserve the original failures and their evidence limits.

Changes

  • Preserve same-window recapture only with matching recipient and actual GetCapture ownership; foreign transfer/release/cancel still cancel. Dispatch the owned connector gesture with strict recipient/runtime/endpoint guards; tracing stays default OFF.
  • Support optional verified installed compiler/vcvars/SDK input through normal fresh preparation/full execution. Preserve default discovery, flags/deadlines/current-source/native-custody/EOF checks; no error31 retry expansion or old-manifest rebinding.
  • Observe the root's transitive owner/descendant family, including hidden/disabled controls, and caption-free structural readiness before one full census. Ambiguity, ancestry drift, replacement and native query failures refuse without guard relaxation.
  • Use Create only for new edge forms; edited edges retain OK. Keep strict Button+Create/count1/enabled/onscreen and native/semantic readonly endpoint checks before invocation.
  • Retain actual initial/filtered UIA predicate state and primary Current/property/post-exit discovery errors. Attach trace failures rather than replacing the primary; reuse the validated current-source/signed-provider UIA client loader and idempotent registration.
  • Repair receipt-test publication with the existing atomic replacement pattern. Harden held-process image output with an owned32768-character Unicode buffer: BOOL/immediate cached Win32 error first, validated successful length/terminator/content only, and finally free. PID/generation/image comparison, UNKNOWN, retries and custody remain unchanged.
  • Add separate strict-positive image-buffer9 contracts without inflating hierarchy32/observation15/capture182 or185/registry684 counts. This is unsafe-output-contract hardening, not proof of the historical CI capacity error's API cause.
  • Merge only main's Project.swift release0.1.84/build324 metadata. Every other tracked object is byte-identical to495b, including all Windows/Tools/shared/provider inputs. No rebase, classifier manipulation, admin/force/bypass or manual dispatch.

Test plan

RED: pwsh -NoProfile -File Tools\windows\Tests\WireCreateObservation.Tests.ps1 -ScratchRoot D:\gc-nwc-e718\create-observation-20261107\red9 -> 9 executed, 7 passed, 2 failed: Current getter and trace failures lost primary errors; actual extracted managed guard/native0
GREEN: pwsh -NoProfile -File Tools\windows\Tests\NativeImageBuffer.Tests.ps1 -ScratchRoot D:\gc-nwc-e718\native-image-freeze-lf-20261107\NativeImageBuffer -> 9 executed, 9 passed, 0 failed, 0 skipped/nativeQueries0; controlled decoder/source evidence, not historical native cause
REGRESSION: pwsh -NoProfile -File Tools\windows\Tests\WindowHierarchyDiagnostic.Tests.ps1 -ScratchRoot D:\gc-nwc-e718\native-image-freeze-lf-20261107\WindowHierarchyDiagnostic -> 32 executed, 32 passed, 0 failed, 0 skipped/nativeCalls0; separate from full684 qualification

Current composition: head 1a5514a07e1a346b462aa1faa7379feaa7680724, tree a9d360e49b18b0120edfce2395edbf681d6be396, parents495b and main999fcf. The complete tracked delta from495b is only Project.swift; its bytes match main exactly.23 PR commits have DCO/coauthor trailers and the worktree is clean/LF. Fresh privacy, the four-case TDD-validator contract suite, body TDD/template and composition checks passed locally. macOS make test/make check cannot run here and were not run; inherited base-only metadata legitimately path-skips the required macOS job. No executed-macOS claim.

Actual new-head PR CI: shell42416539900, port42416539926 and TDD42416539933 completed SUCCESS at exact1a5514a. Before this body edit:26 checks=21 SUCCESS/5 SKIPPED,9 required=7 SUCCESS+Linux/macOS2 legitimate skips. Fresh coverage AACE4280611C8506807BC511E75304F30BB0D337C4C987991B6BEAA6800A752A proves684 unique/684passed/2231direct+1derived/fullTRUE/errors0/selectors0/onePASS-EXEC, not reused495b coverage. Latest body TDD/all required checks must remain positive before ready/expected-head merge.

The exact locally excepted GraphcodeWindowsProductionTests.WindowsDaemonTests/testWindowsScheduledTaskXMLRegistersLongUnicodeSupportAndPipe started once and passed once in0.196s on1a5514a. It is distinct from the unfiltered native packaging scheduler's3 actual PASS markers. Real scheduled install/locked-upgrade/upgrade/rollback/uninstall lifecycles passed twice; stock default native UIA integration/connected rename ran without focused-selector flags. Earlier495b CI separately passed27checks/22SUCCESS/5SKIPPED/full684, exact Swift scheduler0.183s and actual image-buffer9/hierarchy32/observation15 prerequisites.

Accepted W1 remains a71a execution: manifest E1C1AC88FBEF1CB2D81FBDF763541FF52079F17880DCE365BDC7A63F959DAB11, release 78B742AD610B9E34BED8E29C82E1DD23F7B0CC1C2000D7C8D7925A73FB6A827E, outer 4634FF6B8280993FD9BAAF290E0FD5DF8673DC543C0837779E96CE67E0E8986D. Native Edit9100/9101 ES_READONLY, semantic IsReadOnly, exact native/semantic UUIDs and owned identities were verified before Create. Actual Button50000/Edit50004; one correlated APPLIED handoff/always edge, request 00000000-0000-4000-8000-d9b2162b0eff, unanswered0/edge1/cards preserved/unwired removed. Receipt1/png0/exit0/18.4298847s/all6cleanup/no retention.71a185 and495b full/focused9 remain source-bound historical runs applicable to unchanged Windows inputs, not newly executed1a5514a W1 or rebinding. The normal AppEC4319 build source remains e255.

Failures preserved: published71a CI42405008318 failed capture182/180passed/2failed: post-exit descendant discovery PID616 capacity error, then a derived all-green-report refusal. Coverage684/53passed/350direct/incomplete was not success. Earlier495b full5B57/9EC0 failed Wire75/70passed/5failed and halted; downstream missing units were not independent failures and outer cleanup passed. Two assertions only failed expected-message predicates after catch-any/unexported exceptions, not accepted gestures or guard bypasses. Three explicitly failed GetCursorPos Win32error5 before dispatch, with no contemporaneous input-desktop/lock/user-activity/ACL/RDP cause established. Later full329E/F904 independently passed684; failed receipts were not overwritten.

Original buffer RED9/0 contained five intended decoder/source assertions plus four managed WriteInt16 overload harness failures; first post-implementation5/4 retained that harness error. Corrected final9/9 is controlled evidence, not nine native reproductions. Focused native9 passes did not reproduce the historical CI capacity failure or prove its failed-API branch. Old e255/1df Create/Pane predicate failures remain failed. Integration resize-error log entries preceding successful smoke contracts do not establish error-free PTY behavior. No physical-input, paired macOS visual parity, hardware or production-daemon persistence acceptance.

Completion follows creator-origin delegation under the original approved M1 normal PR-completion scope, not a fresh human permission response. Original detailed evidence/drafts/logs remain retained; no additional permissions, native campaign, guard weakening, source retry or manual-dispatch substitute.

Checklist

  • I have read the Contributing Guidelines
  • I have signed off my commits (git commit -s) per the DCO
  • Tests pass locally (make test)
  • Code follows the existing style (make check)
  • I added the test/contract before the implementation and observed the intended RED failure

coneilen and others added 23 commits November 5, 2026 11:21
Send source connector down, held target move, and target up instead of clicking the target card. Bind both endpoints to current source geometry, preserve fail-fast partial receipts, and exercise the actual worker dispatch and production native form route without changing product input semantics.

Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Share the existing native and semantic endpoint reader with ordinary UIA edge routes, preserving their fixture defaults and requiring exact Wire bindings before Create. Keep capture-local native helpers distinct from compiled UIA bindings and retain fail-closed endpoint receipts and behavioral coverage.

Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate reviewed main 79f7a44 without changing the Windows Wire repair. Shared Swift daemon and CLI inputs require fresh mapped validation; prior b0 evidence remains labeled to its original source.

Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the visual DPI192 capture contract unchanged while binding W1 to fresh owned scene-state provenance and measured window geometry.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Do not claim that the copied, unused daemon was rebuilt at the harness commit. Exercise the actual preparation assignments and update the counted identity contracts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Retain the original native ErrorRecord for custody decisions while emitting scalar native/CIM/error diagnostics with explicit graph omissions and truncation metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Propagate a hash-bound installed MSVC and SDK selection through the canonical full runner while preserving guarded default discovery and fresh fixture compilation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Use the existing stderr logger for capped before/after scalar mouse and cancellation state. Keep default builds disabled and do not change input delivery or interaction behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Handle actual reentrant WM_CAPTURECHANGED from SetCapture without cancelling when the same non-null receiver still owns capture. Keep release, foreign transfer, cancel-mode and deactivation cancellation unchanged; cover production hidden window procedure and real capture transitions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Preserve the normal full-host-only checks while recognizing the exact optional compiler-input pair and scoped argument forwarding. Reject legacy fixture selectors, extra flags, missing SHA forwarding and unguarded splats; keep all private SDK runtime controls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Preserve already-read handle, class, process and thread identity plus immediate cached Win32 error without extra native queries or timeout changes. Run five managed/source contracts as a separate capture prerequisite before fresh fixture preparation; retain the 182-case inventory and 684-unit registry.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Reuse existing structural observations before the unchanged bounded text query and retain their scalar failure facts. Add an explicit functional-only diagnostic switch that stops after one post-dispatch observation without resolving the sheet, reading endpoints, creating an edge or issuing a W1 receipt. Preserve default actions and cleanup, and label diagnostic success separately from W1 acceptance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Resolve top-level ownership and complete descendant topology with a shared pure selector before bounded text queries. Retain hidden and disabled members of every class, reject unresolved or cyclic relationships and selected PID drift, and leave direct-owner sheet and readonly endpoint guards unchanged. Run 21 separate prerequisite contracts without changing the 182-case capture inventory or 684-unit registry.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Re-read parent and owner through the existing topology reader immediately before each bounded text query. Compare with admitted topology, retain fresh observed and expected scalars on refusal, and reuse live relationships on success. Add stable and drift managed contracts with exact 26-case prerequisite wiring; document the remaining non-atomic and HWND-generation limits.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Reuse the existing File.Replace and true-null backup pattern instead of overwrite Move while valid delete-sharing readers may hold the destination. Deterministically retain a partial reader snapshot across publication and verify that the production reader observes the complete bound receipt. Preserve original deadlines, retry limits and negative identity controls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Reuse owned-family topology and ancestry validation in a distinct caption-free structural observation. Keep the existing clipped readiness deadline and cadence, then perform one full post-dispatch observation only after the existing sheet predicate is ready. Refuse identity drift or full-observation failure without repolling; retain all rooted hidden members, native text budgets and endpoint/Create guards. Add controlled actual-code readiness contracts as a separate strict 32-case prerequisite.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Override only a new edge state with no editing baseline through the existing shared primary-label API. Preserve edit-edge OK and all other form labels, footer roles, measurement, validation and default-action behavior. Add three pure caption contracts and a prepared hidden-footer native regression without changing Wire selectors or guards.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Rename only the native fixture test into the existing dialog framework classification. Preserve its body and product behavior while the unchanged edge creation CI filter executes all 17 data-only cases without pulling in GDI or GUI dependencies.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Record first and filtered UIA type and identity observations without changing the Button plus Create predicate. Cache existing guard-state reads, preserve explicit getter and trace failures, and run nine independent managed contracts as an owned capture prerequisite without changing capture or registry counts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Reuse the existing source-bound runtime provider loader and idempotent managed registration before live observations. Forward explicit assembly selection through the supervisor scrub boundary and use only the existing canonical Release path when no selection is supplied, without building or copying. Keep dry-run/import/rehearsal behavior and strict Create guards unchanged; expand the separate managed prerequisite to 15 cases.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Retain the original ErrorRecord and stack with already-held identity context for the existing cleanup refusal. Attach trace failures without replacing the primary and leave failed cleanup status, native identity guards and queries unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Signed-off-by: Colin Neilens  <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant