-
Notifications
You must be signed in to change notification settings - Fork 214
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
fix(async-flow): fix endowment equate bug #9736
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploying agoric-sdk with Cloudflare Pages
|
1 task
erights
force-pushed
the
markm-fix-async-flow-endowment-bug-2
branch
from
July 22, 2024 01:05
6fb4df3
to
1b4f248
Compare
mhofman
added
the
asyncFlow
related to membrane-based replay and upgrade of async functions
label
Jul 29, 2024
mergify bot
added a commit
that referenced
this pull request
Sep 28, 2024
refs: #9303 ## Description This adds a test for upgrading send-anywhere. It doesn't yet pass without these in-flight PRs, - #9736 - #9785 We've agreed to land this without those to reduce work-in-flight. ### Security Considerations none ### Scaling Considerations none ### Documentation Considerations none ### Testing Considerations The failing test has a link to the issue to make it pass. ### Upgrade Considerations none
mhofman
force-pushed
the
markm-fix-async-flow-endowment-bug-2
branch
from
October 1, 2024 19:08
bd80b3e
to
3e45a25
Compare
@erights please take a look to the small change I added, and to the test, I cannot add you as an official reviewer since you opened the PR. |
michaelfig
approved these changes
Oct 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It's not too complex, so I'm comfortable approving it, knowing that I might be called on to maintain it.
erights
force-pushed
the
markm-fix-async-flow-endowment-bug-2
branch
from
October 4, 2024 00:42
7b06833
to
90febcc
Compare
mhofman
force-pushed
the
markm-fix-async-flow-endowment-bug-2
branch
from
October 4, 2024 21:53
90febcc
to
0b38035
Compare
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
automerge:rebase
Automatically rebase updates, then merge
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes: #9830
refs: #9722 #9719
Description
#9719 originally failed on upgrade replay for an endowment. It revealed a bug introduced to async-flow when adding support for endowments. Because of the so-called "unwrapping" of some guests, there can be two guests corresponding to one host, with the host of course only mapping back to one of them -- the outer one. This makes
bijection.js
more complicated and irregular than an actual bijection.equate(g, h)
had a test for early return, if theg
andh
were already "equated", i.e., were corresponding guest and host. But the equate test was written before the elaboration of bijection. In fact, it should only test whether this guestg
maps to the hosth
, irrespective of whetherh
maps back to thisg
.Additional testing revealed that the unwrapped function was also not passable, and would fail to be passed back as an argument.
Security Considerations
None
Scaling Considerations
None
Documentation Considerations
This change potentially makes the diagnostic error when misusing async-flow slightly less precise.
Testing Considerations
Introduces equate checks in the endowments test exercising the bijection. For endowments with are further "unwrapped", we test both the original guest (which was previously failing) and the unwrapped one (which also was, but for a different reason).
Since #9719 landed with a failing test, this PR also sets that test as passing, effectively working as an integration test of functions as endowments.
Upgrade Considerations
Can be deployed as a new version of the async-flow NPM package.