Skip to content

chore(runtime-host): ClientSurface is a required handshake field with zero readers #3216

Closed

Description

@Astro-Han

Found by a repo-wide simplification audit; re-verified with git grep -aI.

ClientSurface is a required handshake field that no Host code reads:

  • Type/decode/requireSurface: packages/runtime-host/src/protocol/index.ts:88-95, :219, :402-414; threaded into ConnectionContext (operation-dispatcher.ts), assigned once in host-kernel.ts.
  • Producers exist in all five clients (desktop, tui, run, activation, capability-provider), but git grep -aInw surface across src/server/ and src/transport/ shows zero production readers.

Methodology note that likely explains its longevity: protocol/index.ts contains NUL bytes, so default rg/grep treat it as binary and silently skip it — absence checks must use git grep -aI.

Disappearance surface: the enum, decode + requireSurface validation, the ConnectionContext field, and the five client-side pass-throughs. If client identity is wanted later for routing/telemetry, it can be reintroduced with an actual reader.

Activity

  1. added
    help wanted
    on Aug 18, 2026
  2. Astro-Han commented on Aug 18, 2026

    @Astro-Han
    ContributorAuthor

    Note for contributors: surface is a required handshake field, and remote Runtime Hosts can be on older/newer versions than the client (see #3204 on version skew). Removal should keep the server decode tolerant of clients that still send the field, and clients must not start failing against hosts that still require it — sequence the change so decode-tolerance lands before the client-side stop-sending.

  3. added
    enhancement
    on Aug 18, 2026
  4. Sun-GLiang commented on Aug 20, 2026

    @Sun-GLiang
    Member

    I’d like to take this. I’ve opened #3277 with the compatibility-safe cleanup: new Hosts accept hello frames with or without surface, while new Clients keep a private fixed surface: "desktop" shim for older Hosts. The shim remains until a tolerant Host release is the minimum supported version. The PR includes protocol, Host, client API, CLI/Desktop call-site, fixture, and regression-test updates.

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

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions