-
Notifications
You must be signed in to change notification settings - Fork 72
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
test(ses-ava): use causal console #2109
Conversation
e082936
to
f62063f
Compare
fb4254e
to
a64412e
Compare
May want to redo #701 (comment) as part of this PR. It would be a natural fit. |
a64412e
to
34952ce
Compare
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.
Very nice! But I wonder if we can thread the unsealing/unredaction power through a bit more directly (see below).
1374a75
to
a24136d
Compare
Apologies to my reviewers, but in responding to @kriskowal 's request about how ses makes the special console-making-power available to |
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.
I’m satisfied by this coupling at a global symbol between ses
and ses-ava
since this is a stopgap on a path and not where we want to land for error unsealing in general.
I defer to @gibson042 for the final stamp since he has pending feedback!
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.
I gather @gibson042 and @kriskowal have this review well in hand.
8cd0a8d
to
2b4f0ce
Compare
7823bbe
to
c10e187
Compare
Ping. I addressed all reviewer suggestions. PTAL. thanks. |
closes: #611
closes: #891
refs: Agoric/agoric-sdk#8965 (comment) #647 #1467 #2107 Agoric/agoric-sdk#8662 #1798 #2101 #2107 https://github.com/Agoric/agoric-sdk/wiki/agoric-sdk-unit-testing#patterns
Description
Replaces #2101 and #2107 , though unclosed conversations there probably apply here as well.
Alter ses-ava so that
t.log
first goes through our causal console logic, to show redacted information including nesting errors, but still ultimately directs the output to the originalt.log
so it retains all the ordering and verbosity switching associated with Ava's originalt.log
.t.log
, so you see its redacted info as well, while staying associated with the error.To get access to the SES's causal console logic, this PR also adds a new export for a privileged power, which ses-ava needs and imports using
#2107 review comments raise the issue of whether such special powers should be "exported" from ses and "imported" by privileged clients vs
import
, as this PR currently does, or as a global binding of the start compartment. Unlike #2101 and #2107, this PR currently bundles the ses changes and the ses-ava changes together so we can coordinate changing our minds on this. Reviewers, once that settles, we can split this up into two PRs again if you wish.Security Considerations
As of this PR, ses-ava will import
makeCausalConsoleFromLogger
fromconsole-tools.js
. We must ensure that this arrangement does not accidentally make these powers available to non-privileged code executing in constructed (non-start) compartments.Scaling Considerations
none
Documentation Considerations
none
Testing Considerations
The whole point. Since this PR changes only the logging of errors or rejections from the
t => {...}
function, it will not by itself clean up console output in general. But at least it will cause these error reports to appear at the "right" place in the overall console output.In addition, the "export" of
makeCausalConsoleFromLogger
fromses/console-tools.js
enables other testing tools to build on our causal console the way ses-ava does.Compatibility Considerations
Mostly none.
If there are programs post-processing our voluminous console output, they might need to change. However,
Upgrade Considerations
Nothing breaking.
*BREAKING*:
in the commit message with migration instructions for any breaking change.NEWS.md
for user-facing changes.