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

Sync Endo: 2023-08-08 #8314

Merged
merged 18 commits into from
Sep 13, 2023
Merged

Sync Endo: 2023-08-08 #8314

merged 18 commits into from
Sep 13, 2023

Conversation

kriskowal
Copy link
Member

@kriskowal kriskowal commented Sep 7, 2023

This change brings Agoric and Endo in sync.

ses v0.18.8 (2023-09-11)

  • Extracts repairIntrinsics(options) and hardenIntrinsics() from the
    behavior of lockdown(options) so vetted shims can run between these
    calls.
    Any modifications to shared intrinsics survive if applied after
    repairIntrinsics().
  • In the SES-shim implementation of HardenedJS, all constructed compartments
    get the same safe Date constructor, that does not provide the ability to
    measure duration.
    It used to do this by having Date.now() return NaN, and to have calls on
    the constructor that would normally have returned an indication of the
    current date, instead return the corresponding invalid date indication.
    Now, all of these throw a TypeError whose message begins with 'secure mode'.
    This aligns with the XS implementation of HardenedJS.
  • Similarly, In the SES-shim implementation of HardenedJS, all constructed
    compartments get the same safe Math namespace object that does not provide
    a working random() function.
    It used to do that by omitting the random property from the safe Math
    namespace object.
    Now, the safe shared Math namespace object has a Math.random() function
    that throws a TypeError whose message begins with 'secure mode'.
    This again aligns with the XS implementation of HardenedJS.

ses v0.18.6 (2023-08-07)

  • Censors the pattern {...import(specifier)}.
    We previously censored import(specifier) and expressly allowed
    object.import(specifier).
    The relaxation for the latter form in version 0.13.0 inadvertently allowed
    import with the spread operator.

@endo/patterns v0.2.6 (2023-09-11)

  • Adds support for CopyMap patterns (e.g., matches(specimen, makeCopyMap([]))).

@endo/exo v0.2.6 (2023-09-11)

  • Adds support for symbol-keyed methods in interface guards, e.g.
    const LabeledIterableI = M.interface('LabeledIterable', {
      getLabel: M.call().returns(M.string()),
      [Symbol.asyncIterator]: M.call().returns(M.remotable('Iterator')),
    });
    

@endo/bundle-source v2.8.0 (2023-09-11)

  • The @endo/bundle-source/cache.js maker now accepts additional optional
    arguments: pid and nonce, with reasonable defaults.
    Providing the pid can make it easier to clean up scratch files if
    the bundler is interrupted, since deleting any scratch file with the PID of a
    non-running process is safe.

@mergify mergify bot mentioned this pull request Sep 7, 2023
@kriskowal kriskowal force-pushed the kris-sync-endo-2023-08-08-20-05-10 branch 2 times, most recently from d6cd5ff to 9792a58 Compare September 8, 2023 22:21
@michaelfig michaelfig force-pushed the kris-sync-endo-2023-08-08-20-05-10 branch from 9792a58 to 2300eca Compare September 9, 2023 03:30
@kriskowal kriskowal force-pushed the kris-sync-endo-2023-08-08-20-05-10 branch 3 times, most recently from 2e39409 to 62e0168 Compare September 12, 2023 03:48
@kriskowal kriskowal force-pushed the kris-sync-endo-2023-08-08-20-05-10 branch from 62e0168 to 5037da2 Compare September 12, 2023 03:50
@kriskowal kriskowal marked this pull request as ready for review September 12, 2023 04:22
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed (and approve) all of your @kriskowal commits. Can you comment on my commits, or delegate to somebody else to do a review of them before we merge?

Copy link
Member Author

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your commits all look good to me @michaelfig.

@@ -59,7 +59,7 @@ const runSetMathHelpersTests = (t, [a, b, c], a2) => {
if (a2 !== undefined) {
t.throws(
() => m.make(mockBrand, harden([a, a2])),
{ message: /value has duplicates/ },
{ message: /value has duplicate(| key)s/ },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think we need another reviewer, but it would be good for @gibson042 or @erights to know that this change created a complication for synchronizing Endo. It would be good for this frustration to have been discovered earlier and for a change to land in Agoric or Endo to iron it out before we attempted integration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to have been discovered earlier

Would that be done by a process change or new tooling? If the latter, is there a ticket?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have used #7937 on occasion to detect and fix such problems. I think this is similar to some automation @michaelfig already did?

@@ -14,7 +14,7 @@ export const makeNodeBundleCache = async (dest, options, loadModule) => {
styles.dim.close,
);
};
return wrappedMaker(dest, { log, ...options }, loadModule);
return wrappedMaker(dest, { log, ...options }, loadModule, pid);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And, this is a complication that I introduced that I should have addressed in Agoric before we had attempted to sync the repos.

@michaelfig has created some tools to make these aberrations more visible. I haven’t internalized them well enough in my own process to recommend a workflow for the rest of the team.

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

One question about a possible unintentional change, but it's innocuous and can be improved later.

@@ -125,7 +129,7 @@ runs:
if test -e ~/endo; then
# Stage the redirected `yarn install` consequences.
git add package.json yarn.lock
rm -rf ~/endo
${{ inputs.keep-endo }} || rm -rf ~/endo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nifty

@@ -417,7 +417,7 @@ jobs:

test-boot:
# BEGIN-TEST-BOILERPLATE
timeout-minutes: 30
timeout-minutes: 40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😞

@@ -305,12 +307,14 @@ harden(prepareAttenuator);
/**
* Prepare an attenuator whose methodNames are derived from the interfaceGuard.
*
* @template {import('@endo/patterns').InterfaceGuard} G
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't being used as a type parameter. did you mean to use it for the return type?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's being used as the type of the input interfaceGuard, and it (via inference) is also used as part of the return type.

@michaelfig michaelfig added the automerge:rebase Automatically rebase updates, then merge label Sep 13, 2023
@mergify mergify bot merged commit 7cead9c into master Sep 13, 2023
89 checks passed
@mergify mergify bot deleted the kris-sync-endo-2023-08-08-20-05-10 branch September 13, 2023 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants