Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orchestration: vow interface guard consistency #9611

Open
0xpatrickdev opened this issue Jun 28, 2024 · 0 comments
Open

orchestration: vow interface guard consistency #9611

0xpatrickdev opened this issue Jun 28, 2024 · 0 comments
Labels
code-style defensive correctness patterns; readability thru consistency enhancement New feature or request

Comments

@0xpatrickdev
Copy link
Member

What is the Problem Being Solved?

We use a mixture of VowShape and NetworkShape.Vow$ when defining interface guards for watchers in @agoric/orchestration. VowShape looks like:

M.tagged(
  'Vow',
  M.splitRecord({
    vowV0: M.remotable('VowV0'),
  }),
);

While NetworkShape.Vow$(shape) looks like M.or(shape, VowShape).

It’s debatable as to how much value NetworkShape.Vow$ buys us - it seems the .or for VowShape will always be the one hit - but in the course of #9449 it felt like a waste to remove shape’s that were previously working and provide helpful cues to the caller.

Description of the Design

  1. Decide whether to use NetworkShape.Vow$, soon to be renamed to Vow$ and exported directly from @agoric/vow, or VowShape`.

  2. Consistently implement the change in @agoric/orchestration exos, and only import type guard shapes for vows from @agoric/vow

Security Considerations

Scaling Considerations

Test Plan

Upgrade Considerations

@0xpatrickdev 0xpatrickdev added the enhancement New feature or request label Jun 28, 2024
@dckc dckc added the code-style defensive correctness patterns; readability thru consistency label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-style defensive correctness patterns; readability thru consistency enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants