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

async-flow bijection is not always symmetric #9830

Closed
mhofman opened this issue Aug 2, 2024 · 0 comments · Fixed by #9736
Closed

async-flow bijection is not always symmetric #9830

mhofman opened this issue Aug 2, 2024 · 0 comments · Fixed by #9736
Assignees
Labels
asyncFlow related to membrane-based replay and upgrade of async functions bug Something isn't working

Comments

@mhofman
Copy link
Member

mhofman commented Aug 2, 2024

Describe the bug

The addition of async-flow endowments in #9566 caused the bijection to not always be symmetrical: both the unwrapped version and the original guest are registered. This resulted in some equate(g, h) calls to fail.

More details in #9736

To Reproduce

See failing test

Error#2 ERROR_NOTE: Caused by (Error#3)
Error#3: internal h->g: Object [Alleged: findBrandInVBank] {} -> Object [Alleged: findBrandInVBank guest wrapper] {
__getInterfaceGuard__: [Function: In "__getInterfaceGuard__" method of (findBrandInVBank)],
__getMethodNames__: [Function: __getMethodNames__],
apply: [Function: In "apply" method of (findBrandInVBank)]
} vs [Function: unwrapped]
at makeError (file:///opt/agoric/agoric-sdk/node_modules/ses/src/error/assert.js:347:61)
at fail (file:///opt/agoric/agoric-sdk/node_modules/ses/src/error/assert.js:479:20)
at Fail (file:///opt/agoric/agoric-sdk/node_modules/ses/src/error/assert.js:489:39)
at Object.has (.../async-flow/src/bijection.js:177:6)
part of #9719

Expected behavior

Endowments should work through the async flow membrane back and forth, even for wrapped ones

Testing concerns

Needs to add sufficient test coverage of these cases

@mhofman mhofman added bug Something isn't working asyncFlow related to membrane-based replay and upgrade of async functions labels Aug 2, 2024
@mhofman mhofman self-assigned this Aug 2, 2024
@mhofman mhofman linked a pull request Aug 2, 2024 that will close this issue
@mergify mergify bot closed this as completed in #9736 Oct 4, 2024
@mergify mergify bot closed this as completed in 4bc297d Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asyncFlow related to membrane-based replay and upgrade of async functions bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant