fix(cua-driver): eliminate duplicate Swift bridge symbols - #3680
Merged
Conversation
Update only screencapturekit from 6.0.1 to 8.0.1, the smallest published release containing the upstream private Swift module rename. Existing Cua capture and recording call sites compile unchanged; other locked dependencies are unchanged. Salvaged from doom-fish/screencapturekit-rs#159 via its published 8.0.1 release. The upstream fix by grishy is reused rather than reimplemented or vendored. Native red: fresh release build succeeded with 64 duplicate-symbol diagnostic lines; the regression check exited 1. Green: the identical fresh build check exits 0 with no duplicate symbols; unrelated rpath and dead-code warnings remain visible. All 365 platform unit tests pass, 2 ignored. Native capture/recording certification remains pending. Co-authored-by: Sergei G. <13949080+grishy@users.noreply.github.com>
injaneity
marked this pull request as ready for review
September 9, 2026 14:34
This was referenced Sep 10, 2026
Open
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.
Refs #3627
Scope
Use published
screencapturekit 8.0.1, the smallest published release containing the private Swift module rename. Only the screencapturekit requirement and lock entry change:6.0.1->8.0.1. No Cua capture/recording call-site changes or other dependency updates.Salvaged from doom-fish/screencapturekit-rs#159 via its published release. The upstream contribution by grishy renames the private module to ScreenCaptureKitCoreMediaBridge while retaining C exports. Contributor credit is preserved in the integration commit. No vendored rewrite or warning suppression.
Red -> green evidence
Agreed public boundary: a fresh real macOS Cargo release build and its linker output.
scripts/ci/macos/test-swift-linker-symbols.shcreates a new Cargo/Swift build namespace every time, exposes linker messages, retains full output/toolchain provenance, and rejects duplicate-symbol diagnostics while leaving unrelated warnings visible.Windows/Linux: the changed dependency belongs to platform-macos. No Windows/Linux adapter implementation changes; ordinary cross-platform CI remains required.
Exact-candidate native validation
Canonical installed Lume wrapper run
20260909T154113Z-9d6ff124testedd1d2a7f37a8bb3a6a5686592a96487023d1f7ddcwith--standalone-browser.browser_type_replace: window normalization could not verify exact frontmost window 2656; focused target/process matched, but observed ordinary frontmost window was 68.browser_tool_roundtrip: foreground sentinel activation could not verify window 2901; same ordinary frontmost window 68 discrepancy.browser_prepare_existing_profile_setup: refused because the exact Chrome remote-debugging consent sheet was not found for reconnect attempt 1; cleanup retained a surface without a semantic cancel action.cua-driver-browser-baseline-20260908-chrome152, a browser-equipped local baseline derived from retained PR fix(cua-driver): correct macos click delivery and recording evidence #2907 / feat(cua-driver): add target-scoped post-action rediscovery #3373 workers, with Chrome 152.0.7977.83. This provenance does not negate the successful canonical desktop result.Remaining validation
The hosted fresh-link regression passed. The workflow publishing blocker is resolved. The full native gate remains blocked. The investigation below isolates two defects across the three failing paths; fixes and regression validation remain required. No readiness is claimed.
Browser failure investigation — 2026-09-10
Two concrete defects are now isolated; do not dismiss the three original failures as unrelated CI noise or make this PR ready before fixing and validating them.
Activation (type_replace and roundtrip): both actual cases passed once in a clean, correctly authorized focused diagnostic on unchanged product/harness
d1d2a7f37. In a separate controlled negative experiment, a concurrent live MCP agent cursor was moved over the foreground target. Both actual cases then failed in exact-window setup with the original focus/order disagreement. Type-replace target PID/window was 945/63; roundtrip sentinel target was 3838/120. Both remained focused with the correct front process, while the verifier reported ordinary frontmost window 61. Independent WindowServer metadata identified 61 as the driver-owned overlay (Cua Driver Local, PID 844; first layer-0 window in 483 samples). The renderer deliberately puts its transparent, mouse-ignoring window at layer 0 above the target; the verifier counts it as a competing ordinary application window. This reproduces the failure mechanism in the actual cases, not just a synthetic AppKit probe. Historical window 68 lacked ownership metadata, so its historical owner is not independently proven. Refs #3681.Consent (existing_profile_setup): the approved Chrome main-window AX tree exposed an actual sheet with remote-debugging text and enabled, AXPress-capable Allow and Cancel buttons. Its raw-title/description rendering was
AXButton "Allow" (Allow)andAXButton "Cancel" (Cancel).consent_ui::normalized_textconcatenates those fields intoallow allowandcancel cancel, but the matchers require exactallow/cancel; the captured buttons have no fallback identifier. Acceptance and cancellation therefore both reject valid controls. The separately enumerated consent window was AX-unresolved, but its sheet was accessible through the exact approved main window. The timeout's wording does not establish that the sheet never appeared.The consent diagnostic ended at the harness's 25-second client timeout, not the original run's structured refusal at roughly 24 seconds; the added read-only observer may affect timing. Its captured AX fields establish the matcher defect, not an identical terminal response. Related #3409 and #3140 touch consent matching and must be reconciled before implementation; #3409's fallback requires a nonempty sheet title, absent in this captured sheet. #3288 concerns a subsequent fresh claim; closed #3440 concerned a different runtime-identity setup problem.
Evidence/provenance: separate clone
cua-browser-failures-diagnostic-20260910of the stopped failed worker; unchanged signed installed product and cached exact-source release harness; GUI Terminal launch and canonical unlock/unrestricted/watchdog/restoration helpers. Product SHA-256f4613829d6e4eec40668bd157190ed64a43fc1e022245bccf38fcbd2f392f80d; harness SHA-25602fbe7af2e0499699452f1713cc5fe7f0086f6cada25e1d7b0e8124c744035eb. Raw window traces, AX snapshots, RPCs, recordings, and probe sources retained locally. Standard daemon restored, worker confirmed stopped, not deleted. The initial diagnostic omitted the canonical socket export and stopped before browser setup; that setup error is retained separately and is not product evidence. No product changes, permission repairs, or full-suite retries. The unchanged roundtrip harness performed its built-in bounded sentinel recovery during the negative control; no additional retry loop was added.Next gate: fix the two underlying defects with focused regression coverage, then certify the stable candidate. No fix, durable new regression test, or successful full-gate result is claimed by this investigation.
Underlying-fix TDD progress
ead27a53e718a96b7905e630f5699cd0735f781d): owned-overlay exclusion has native red -> green evidence. Both the sustained peer-cursor activation case and genuine-competing-window refusal control pass with strict recording validation. Ordinary CI is green at this head.b3622764fdca6df606164f00d1c23b207bcaf42c): identical AX-field normalization has native red -> green evidence through the existing browser_prepare lifecycle. Exact binding, browser effects, end_session listener/UI cleanup, all external oracles, and strict recording validation pass.