endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
828 stars 72 forks source link

refactor(daemon): Synchronize host `makeUnconfined()` #2124

Closed rekmarks closed 8 months ago

rekmarks commented 8 months ago

Progresses: #2086

Synchronizes the host's makeUnconfined() per #2086. Refactoring daemon.js in support of this goal fixed one bug while revealing another.

In particular, #2074 is progressed by enabling indirect cancellation of caplets via their workers. The issue is not resolved since indirect cancellation of caplets via their caplet dependencies still does not work as intended. A new, failing regression test has been added for this specific case.

The revealed bug is #2021, which we believed to be fixed by #2092. Rather than fixing the bug, that PR concealed it by always creating a new incarnation of eval formula workers, even if they already existed. The regression test for #2021 has been marked as failing, and we will have to find a different solution for it.

rekmarks commented 8 months ago

@kumavis I hope to simplify things as the synchronization effort continues, but the simplest way of doing things may not reveal itself until late in that process.