Skip to content

RFC: Method-level capability detection for protocol extension #478

Description

@filvecchiato

Source PR: #420 · docs/rfcs/0027-capability-detection.md · @ryanleecode

Description

system.feature_supported answers a Method { id } query, so a product can check whether the host has a handler for a wire discriminant. Unregistered discriminants get an UNSUPPORTED_METHOD reply instead of being dropped.

Motivation

Products update continuously while native hosts update on app-release cycles, so new products routinely run against old hosts. An unknown wire ID is dropped silently today and the pending call hangs forever.

Requirements

  • HostFeatureSupportedRequest::Method { id }; older hosts fail to decode it and return MalformedFrame, which is the age signal.
  • supported is computed from the dispatcher's own wire table, never a static list.
  • Dispatch fall-through replies UNSUPPORTED_METHOD echoing request_id; the client rejects with CallError::Unsupported.
  • Codegen exposes a supportsMethod("<method>") helper.

Tasks

  • RFC document body
  • Implementation — rust-core
  • Implementation — hosts
    • dotli
    • Desktop
    • iOS
    • Android
    • host-cli

Note: RFC number 0027 is also claimed by #468.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions