Skip to content

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

Draft
coneilen wants to merge 17 commits into
mainfrom
coneilen-native-wire-closure
Draft

coneilen wants to merge 17 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, observe the owned native edge sheet without querying unfinished modal content, and match the shipping macOS Create caption. Fresh compiler-provenance input and strict native/semantic endpoint guards support qualification; this remains a draft with normal W1 and merge blocked.

Changes

  • Dispatch the actual source-down/held-target-move/target-up connector gesture, with exact owned recipient, foreground, source/target and runtime identity guards.
  • Preserve reentrant same-window capture only when the notification recipient matches the receiver and actual GetCapture confirms ownership. Foreign transfer/release/cancel/deactivation still cancel.
  • Support an optional hash-bound installed compiler/vcvars/SDK input through fresh fixture preparation and the normal full host. Default discovery and original compiler/native-custody/EOF/flags/current-source checks remain; no error31 retry expansion or stale-manifest rebinding.
  • Select the explicit root's transitive owner/descendant family, including hidden/disabled members of every class. Missing/cyclic/conflicting ancestry, selected PID drift and changed live parent/owner relationships refuse.
  • Observe distinct caption-free structural readiness under the existing clipped5s/100ms loop, then one full post-dispatch census with the same host/content. Full text failure or replacement does not re-poll. Every rooted hidden member remains in the full census with unchanged50ms/2s guards.
  • Retain bounded scalar failure facts and an explicit diagnostic-only first-census stop. Diagnostic outcomes never accept W1.
  • Repair receipt-test publication with the existing File.Replace/true-null-backup pattern and a deterministic delete-sharing snapshot regression; existing deadlines/retries and production reader behavior remain.
  • Use Create only for new edge forms through the existing primary-label/measurement/role API. Edited edges keep OK; all unrelated labels remain unchanged. No Create|OK selector alias or enabled/endpoint-guard relaxation.
  • Keep strict unique direct Edit9100/9101, native ES_READONLY, semantic ValuePattern.IsReadOnly, matching native/semantic UUIDs, owned Create action and correlated applied-edge readback requirements. Receiver tracing remains disabled by default.

Test plan

RED: D:\gc-nwc-e718\tools\zig-0.15.2\zig.exe test src\NativeForms.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 -ID:\gc-nwc-e718\providers\winghostty\include --test-filter "edge creation primary caption pure:" --cache-dir D:\gc-nwc-e718\edge-caption-20261106\red-cache --global-cache-dir D:\gc-nwc-e718\zig-global -> 3 executed, 2 passed, 1 failed: expected Create, found OK; actual pure behavior RED, not native UI evidence
GREEN: D:\gc-nwc-e718\tools\zig-0.15.2\zig.exe test src\NativeForms.zig -target x86_64-windows-msvc -lc -luser32 -lgdi32 -ID:\gc-nwc-e718\providers\winghostty\include --test-filter "edge creation primary caption pure:" --cache-dir D:\gc-nwc-e718\edge-caption-20261106\clean-pure-cache --global-cache-dir D:\gc-nwc-e718\zig-global -> 3 executed, 3 passed, 0 skipped on clean9082; creationCreate/editOK/unrelatedlabels
REGRESSION: D:\depot\copilot-worktrees\GraphCode\coneilen-stunning-enigma\Tools\windows\ValidationRunner\bin\Release\net10.0-windows\ValidationRunner.exe --repository-root D:\depot\copilot-worktrees\GraphCode\coneilen-stunning-enigma --artifact-root D:\gc-nwc-e718\census-full-9082-01\full --fixture-compiler-input C:\Users\coneilen.copilot\session-state\e718632d-a6c5-4d58-830e-2bdc8b5411b3\files\compiler-input.json --fixture-compiler-input-sha256 D762B648BC871B467759CA4E93D417AD08E41488AEF382DE714161FA323D5BD7 -> exit0; unfiltered684/684,2231direct+1derived,onePASS/EXEC,separate32,current14/7,all6outercleanuptrue

Current draft candidate: 9082dcb18f48afb9a4f0fd7d879fb11ca480850b, tree f28faba390c615fde58b927062fde87ab06fa4f7,17 DCO/coauthored commits. Only normal non-forced draft publication is authorized. Current9082 preflight185, normal W1 and current-head CI are PENDING. No ready promotion, merge, Agent merge or auto-merge. Earlier53 CI/preflight success and its W1 caption failure are historical, not9082 acceptance.

New clean-source application: normal ReleaseSafe/traceOFF App SHA256 934CEAB0264EF35D1360012783A3AF0EC21CA9A7ED50181AC82F76F0484B1655, length8939520, built from clean9082/treef28. Actual source/input/tool/provider/library/argv manifest SHA256 4B695B9D7241197F0287C632DAC4BFC02DC498B1EA1B35AE6904F1B2C13FE236; generated tracefalse options F93A5CAE029906B56377F6FD5B2C0ACB5FB927A698130779740ACD8A3F3F7D11. The earlier dirty-C1/base53 build remains compile-only, not BuiltAt9082. OldF4F application/input equivalence is no longer current after the NativeForms change.

Actual affected roots at9082: unfiltered pinned native roots ran under the existing held supervisor with separately admitted budgets and source-derived current fixtures. NativeForms409/409/zero skips; App1686 passed/19 explicit skips/0 failed; MainWindow73/73/zero skips. Each proves all6 outer cleanup fields true/no retention. The three pure caption cases and prepared native footer case actually passed once inside both NativeForms and App; they are absent from MainWindow, not claimed there. Native footer verifies actual Create/Cancel captions, id1/host parent, primary/cancel roles, measurement/default action and disabled-invalid behavior. This is native/component evidence, not normal W1 or physical/visual parity.

The first unstaged NativeForms attempt failed401/409, retained as a failure. Its cwd fixture dependency gap was corrected by staging current-source fixture copies with hashes; the subsequent current unfiltered409 result is separate, not an overwritten failure or native fixture bypass. Pure harness compile mistakes (shadowed symbol and const/mutable slice mismatch) remain distinct from the genuine expectedCreate/foundOK RED.

Current normal full host9082: exact REGRESSION argv above under held OwnedChildSupervisor, original1500-second execution/180-second cleanup reserve. Fresh supported canonical Release/loader checks passed, not an isolated build or sourceRoot override. Executor SHA256 77F06772BC77D3D1659BAFD1440C121B52CC300B8C5FB9C15F0495C141E34925, DLL FCA7C9BA7EFCB70DFFE8E8918DAF2793C60CCABCE3B6C0B43616D05B73A50344.

Coverage SHA256 6458F4775B6D3F1E997581CC10B5430E425F03F605D9EABA9B5FB3CFA999D38D:684 unique required/684 passed/full invocation/zero selectors/errors,2231 direct+1 derived,exactly one emitted PASS/EXEC. Outer terminal B2823F76DDC4658F24FA9E9347F1DB1539536ED1E6C4FE86BDDFA9EEA8C2E4A0: exit0/1063.9147519s/all6 cleanup true/no retention. Separate32 unique managed/source cases passed/nativeCalls0, actual report SHA256 5834E4B706B147460DD8FD48E8EA772A911230347D65C0408563D83D0F024EED. These32 are not added to182 capture/185 preflight/2231 direct/684 registry counts.

Fresh original-directory14/current7 manifest: D:\gc-v\ded104485b0440d7\prebuilt\fixtures.json, SHA256 71289E39C055C70CB6AC9CA79D2D8ACA4F9F4CBC72935DD7DF9E1376BFCB6633. Every artifact hash/length and seven current source seals were checked. No FE9D/F95F/2155 rebinding. Raw compiler-file EOF remains unproven; host pipe EOF is not promoted to that proof. ExplicitD762 compiler route passed; default-discovery success is not inferred.

Historical acceptance docket, unchanged:

Source/run Actual result and limit
f9d product fix Receiver trace proved self-capture cancellation; actual hidden production-WndProc RED then GREEN. Full App1682/19 skips and Main73 passed/all6 cleanup. Old normalF4F and diagnosticD0D3 binaries preserved, not9082.
EFA/f9d earlier full gates Full684/684,2231+1 and then-fresh14/seven seals/all6 cleanup passed at their original heads. EFA/f9d manifests and coverage remain historical. Direct early preparation alone lacked whole-tree cleanup evidence.
Earlier shell/Swift/hardening 65-section shard union23/18/24; historical Swift portable2/contracts54/production204XCTest+6SwiftTesting and separate path/process/build/formatter evidence; deterministic hardening3x5 fixtures. Unsuppressed async VoidTaskResult launcher failure was preserved and only remaining phases resumed. Not fresh9082 whole-suite or skipped-path proof.
Earlier normal integration Agent attempt refused five-second foreground guard. Separately user-operated stock7BB run passed UIA2rows/7patterns/rename/teardown/all6 cleanup but wrapper source hygiene failed; exact approved artifact preservation/source closure was separate. Not literal wrapper PASS or current934C integration.
wb/wc/wd/8ac Wire failures wb refused foreign recipient before posts. wc then wd/8ac posted all4 owned messages but stopped at50ms census before endpoints/Create. Hidden ComboLBox/owner0/Parent65548 observations do not identify that parent or prove cause. All failure receipts and zero-survivor cleanup preserved; posts are not received-WndProc proof.
987 preflight FAILED183/185 at test Move overwriteTRUE/access denied, then derived all-green refusal. Report 1ED008A3E9621A6E12C224E6A6301AAE537A05EB6645E63EE971F6690002304D, terminal34EC/all6 cleanup. Three real-zmx passes did not rescue gate. Controlled held-reader RED5/4/1 ->GREEN5/5 after Replace; first unmodified focused5PASS remained separate.
1c65 full/preflight Actual full684+separate26/all6 passed. Actual preflight185/185/zero skips, report 1F352925FF2768B1CEE4F3AB5AD719B266D149AA21282C512849C072B9E020A5; all3 real-zmx two-phase cases/all6 cleanup. Not9082 preflight.
1c65 normal W1 FAILED after all4 owned posts on50ms text query of owned hidden SheetHost, before9100/9101/Create. Manifest A0320875D2D56F09B6FEF97E8FC98B918E06B1F119D1804C364EA6DF68A84E08, releaseCAB17/outerCA3B/all6 cleanup/0receipts/0images. No historical timeout-cause claim.
53 full/preflight/W1 Actual full684+separate32/FE9D14/seven/all6 passed. Parent-verified current53 preflight passed separately. Actual normal53 W1 passed structural readiness and full rooted census, then FAILED strict caption selector:31 owned controls/PID26840, primaryid1 NameOK, zeroCreate; visible owned host/content. Edit9100/9101 Names were observed, not nativeES_READONLY/semantic-value proof. No endpoints/Create/edge receipt. Manifest5C5/releaseE750/outerE149/all6 cleanup. This proved caption mismatch, not broader cause.

Historical CI, not current9082 CI: exact53 shell42323319429 and port42323319352 completed successfully.27 observed completed checks=22 SUCCESS/5 SKIPPED;9 required=7 SUCCESS/Linux-macOS2 path skips. Downloaded compiled coverage D1FD9323D7E357A729045DB55BBAA3D0482359860B7AC1E34CF32D0B77056491:684unique/684passed/full/2231+1/errors0/selectors0 and actual emittedPASS1/EXEC1.

Actual unfiltered seven-task Swift schedulerXML passed once0.175s within205 tests/1 skip/0 failures; real-zmx skipped there then separately passed0.05s with actual execution marker. Default integration positive45isolation/6smoke/6one-testdaemon/16tray-source contracts. Physical tray was explicitly skipped; no final full-UIA JSON/providerTeardownSafe or all6 outer CI cleanup receipt was inferred. Packaging contracts custody4/preview37/rollback23/uninstall4/self25/setup18 are not summed; real packaging2 scheduled-task lifecycle PASS/1 standalonePS5.1 lifecycle PASS/final suite PASS, no invented assertion total. Prior1c65 and91d5 CI remain distinct old-head evidence.

Remaining gates/authority: fresh9082 preflight185 and normal W1 with exact native+semantic readonly endpoints/Create/correlated applied-edge acceptance remain pending. Current-head CI must execute positively, including packaging contracts+real packaging, normal integration and the exact unfiltered schedulerXML test. Only the existing packaging2/fixed-normal-integration/single-scheduler-test local exceptions apply; no new skip or local OS/PATH/scheduler/access mutation is authorized. No ready/merge/Agent merge/auto-merge.

Mechanical checks: fresh pwsh -NoProfile -File Tools\windows\validate.ps1 -Task privacy -> exit0/one invocation/one success marker with owned TEMP/TMP.17 DCO/coauthor trailers/source clean verified. pwsh -NoProfile -File Tools\tdd\Test-TddEvidence.ps1 -BodyPath C:\Users\coneilen\.copilot\session-state\a203bd0f-2059-42cf-845c-042f8fe9fbba\files\wire-pr-body.md -> PASS with full template headings/comments/checklist/order preserved.

Retained main metadata 999fcf0c3ebef778f06aa86540cdd27afcc01bdb was one release-only Project.swift version/build commit ahead of merge base79f7; no rebase/merge/integrated-main validation claimed. macOS make test/make check were not run on this Windows host. No whole-parity, hardware, physical-input, paired-macOS-visual or production-daemon persistence acceptance is claimed.

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 17 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>

This branch has not been deployed

No deployments
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