Skip to content

Eventual-send types should map the result #2986

@mhofman

Description

@mhofman

What is the Problem Being Solved?

Currently the result of an eventual-send is simply a promise for the original result of the callable. For results that document a "local remotable" that isn't actually correct as the eventual-send may not be local, and as such the remotable would only show up as a "remote presence".

Passing through the original type for anything remotable risks the consumer potentially await-ing the result and attempt to directly interact with the remotable as the static type currently implies.

Description of the Design

#2849 introduced and EAwaitedResult that does this mapping (as much as possible), but it couldn't be adopted in E types itself as it broke some cases in agoric-sdk. There may be some relations to #2979, where keeping only the nominal RemotableBrand may break some checks for "passable" RemotableObject. I also remember some issues with the tagged containers helpers used for Instance handles in agoric-sdk.

Security Considerations

None, type only

Test Plan

We need some type tests in endo that sufficiently cover all the advanced types and inference agoric-sdk relies on.

Compatibility Considerations

This change will rely on consumers to adapt to stricter types, but shouldn't cause a loss of type coverage, or make it impossible to adapt.

Upgrade Considerations

Types only

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions