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.

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

    Chat v1.5Chat modality v1.5 workstreamR1-R2 tech debtWire format, Rust core integration, correctness, test infrarfc

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions