Skip to content

Diagnose native worker crash during legacy clipboard completion #89

Description

@wieslawsoltes

AppScene coordination epic: SceneTech/AppScene#66
Related clipboard contract: #86

Problem

The macOS arm64 Release Code OSS/AppScene package can copy real Monaco text through WebScene's user-initiated Document.execCommand('copy') bridge, but a later repeat of the computer-use sequence crashed in the stripped native runtime immediately after an accepted Command-C sequence.

Qualified inputs:

  • WebScene b639b4c49985891c2521421229a2f22e976ead2c
  • AppScene e9fd26777747adfda5fadd571b0b5c73412dfe67
  • executable SHA-256 678b9106885e42ad37fe1db03d22cf32d1f2027387ab262899950138acec6e99
  • macOS 26.6 arm64

One run copied the exact scenetechmanualinputok Monaco marker to the OS clipboard, accepted all 569 bounded AppScene input records, and closed normally. A later run accepted all 368 records, delivered Command-A and Command-C with modifier flags 8, then exited with SIGSEGV before the clipboard marker appeared.

The crash report records EXC_BAD_ACCESS (SIGSEGV) with pointer-authentication failure on a WebScene worker thread. The packaged dylib is stripped, so the available image-relative offsets are:

  • 0x508cb4
  • 0x20244c
  • 0x246404
  • 0x8830c
  • 0x1ba94
  • 0x17da8
  • 0x17cc8
  • 0x17b84

The active macOS desktop was shared during the Accessibility automation and other applications intermittently became frontmost, so the trigger is not yet deterministic. The accepted input trace and worker-thread crash still require a runtime stress gate before the combined Code OSS clipboard qualification can close.

Proposed implementation

  • Retain symbols for failed native package jobs or upload a matching dSYM with bounded retention so crash offsets can be resolved.
  • Add a repeated native legacy-copy test that dispatches a trusted Command-C, creates async clipboard representations, completes the typed host request from another thread, and drains microtasks.
  • Exercise engine teardown, window focus changes, delayed completion, duplicate completion, and navigation between dispatch and completion.
  • Audit isolate locking and worker ownership around dispatch_clipboard_shortcut, complete_host_request, promise resolution, and microtask checkpoints.
  • Fix only a reproduced ownership or scheduling violation; preserve the existing browser API and typed host ABI.

Quality gates

  • A deterministic sanitizer or stress test reproduces the old failure and passes the fix for at least 10,000 copy/completion iterations.
  • The existing 10,000 clipboard round-trip, maximum-payload, queue saturation, navigation cancellation, three-RID package, and consumer gates remain green.
  • The macOS Code OSS computer-use gate copies and pastes exact text, closes normally, and passes repeatedly on an idle desktop.
  • No Electron, CEF, WebView, Chromium, or VS Code source change.

Keep the implementation in the consolidated WebScene draft branch and do not merge until the repeated native and packaged gates pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions