Skip to content

Bound the packaged remote extension-host Ready-to-Initialized handshake #289

Description

@wieslawsoltes

Parent: #81
Related downstream qualification: #280 and #252.
Adjacent but non-overlapping lifetime owner: #288.
Local diagnostic commit (not pushed): e6f5c6a in vscode-demo.

Proven boundary

An unchanged packaged Code OSS workspace run on WebScene base aa786c0e (with the local #287 measurement candidate 0f92cf47), AppScene 1420e227, Code OSS 645f29cc, and Node 24.18.1 retained every browser and native phase of extension-host startup.

The local iframe/Worker/transferred-MessagePort path completes promptly after its document is dispatched:

  • iframe resource fetch: 0.835 ms, 6,786 bytes
  • iframe append → document loaded: 1,189 ms
  • document loaded → Worker created: 8 ms
  • Worker created → transferred MessagePort: 130 ms
  • transferred port → first message: 2 ms
  • first port message → Ready: 1 ms
  • local Ready → Initialized: 708 ms
  • worker module resource fetch: 2.964 ms, 1,932,148 bytes

The remote extension-host path is the first distinct handshake breach:

  • transport connected → first protocol byte / Ready: 1,177 ms
  • Ready → Initialized: 4,379 ms
  • remote Initialized → the separate AgentHost service connection: 9,682 ms
  • AgentHost service connection → exact five-row Explorer result: 99 ms

The exact root, provider registration, five resolved children, five Explorer-model children, and five rendered rows all pass. The 2 s product bound fails. The run observed 146 FileReader reads / 13,120,521 bytes with a 14,767 ms maximum, while the underlying Blob conversion maximum was 0.038 ms. This points to delayed asynchronous protocol continuation rather than resource transfer or port transfer.

Observer bounds were 21/96 phase records with zero drops and 8/64 resource records. Peak app process-group RSS was 845,184 KiB. App/server/helper processes were terminated and verified absent after the bounded run.

Retained evidence:

  • /private/tmp/vscode-252-product-extension-host-81.log
  • /private/tmp/vscode-252-extension-host-81-evidence.json (SHA-256 1a53ca07dfa317aa7fdfcd6b598617e8cfd41105770e9ad7fe082dac1172e851)

Scope

Identify and fix the product-neutral scheduler/protocol boundary that delays the packaged remote extension host between connected transport, Ready, initialization-data delivery, and Initialized. Keep Code OSS source unchanged outside query-gated diagnostics.

This issue does not change MessagePort lifetime ownership in #288. That issue still owns forced-GC reachability; this trace shows the transferred port, first message, Ready, and Initialized all arrive in order.

Acceptance

  • A reduced browser oracle and the native runtime retain timestamps for transport connected, first protocol byte, Ready, initialization-data send/settlement, Initialized, cancellation, reconnect, and teardown.
  • Direct native/provider and unchanged Chromium runs distinguish socket receive, runtime task delivery, Promise/microtask continuation, protocol dispatch, and init-data serialization/handling.
  • Cold and warm runs keep transport → Ready and Ready → Initialized each within 500 ms p95, and the complete remote handshake within 1 s p95, across at least 20 cycles.
  • Competing WebSocket, FileReader, Worker, MessagePort, timer, and microtask traffic remains fair; queue high-water and wake counts are retained and bounded.
  • Cancellation before Ready, cancellation during init-data creation, reconnect, navigation, Worker termination, socket close, and engine teardown release callbacks, ports, queues, and wake registrations exactly once.
  • The unchanged Code OSS exact-root/five-child/five-row Qualify remote workspace bootstrap, Explorer contents, and watcher refresh #252 gate completes within 2 s without polling or product behavior changes.
  • V8 heap and RSS plateau after warm-up; no retained protocol buffers, tasks, ports, or documents remain after teardown.
  • Directly related macOS/Linux/Windows native gates and the browser oracle 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

    bugSomething isn't workingvscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions