Test and run over the wasm boundary, and two decisions written down - #683
Merged
Conversation
onatozmenn
enabled auto-merge (squash)
July 30, 2026 22:16
…590, #591) deed-wasm gets deed_test and deed_run alongside deed_check, same shape: write to a buffer from deed_alloc, call, read JSON back through deed_result_ptr/deed_result_len. test needs no capability decision at all, a test block takes no parameters so nothing in one can hold a capability. #591: a page offers Io.write and Io.now, nothing else, decided rather than attempted and left to fail two different ways (Io.epoch has no fallible form on this target and traps; the directory operations fail safely but with a raw io::Error nobody chose to write). unsupported_capabilities reads main's row and turns every other Io operation into one sentence ("this page does not offer `Io.save` yet"), checked before anything runs rather than discovered by an OS error partway through. #590: MAX_DEPTH already turns unbounded recursion (the only way to not return, since there is no while) into DEED6009 rather than a hang, on every host. The residual question, a fuel limit or a worker thread, is decided as the worker thread, and it is the page's job: a fuel limit would tax every embedder for a failure mode that is the existing "time and memory are also resources" open question, not a new one, and a page already has the tool that fits it. Both decisions and the reasoning are in design/04-capabilities.md. A new test proves a mutually recursive Diverge program terminates with the depth error rather than hanging, run through deed_run itself.
onatozmenn
force-pushed
the
issue-590-591-capabilities-and-nonstop
branch
from
July 30, 2026 23:29
39cf5a1 to
eb34f65
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #590. Closes #591.
deed-wasmgetsdeed_testanddeed_runalongsidedeed_check, same shape: write to a buffer fromdeed_alloc, call, read JSON back throughdeed_result_ptr/deed_result_len.testneeds no capability decision at all, a test block takes no parameters so nothing in one can hold a capability.#591: a page offers
Io.writeandIo.now, nothing else, decided rather than attempted and left to fail two different ways (Io.epochhas no fallible form on this target and traps; the directory operations fail safely but with a rawio::Errornobody chose to write).unsupported_capabilitiesreadsmain's row and turns every otherIooperation into one sentence (this page does not offer `Io.save` yet), checked before anything runs rather than discovered by an OS error partway through.#590:
MAX_DEPTHalready turns unbounded recursion (the only way to not return, since there is nowhile) intoDEED6009rather than a hang, on every host. The residual question, a fuel limit or a worker thread, is decided as the worker thread, and it is the page's job: a fuel limit would tax every embedder for a failure mode that is the existing "time and memory are also resources" open question, not a new one, and a page already has the tool that fits it. Both decisions and the reasoning are indesign/04-capabilities.md.A new test proves a mutually recursive
Divergeprogram terminates with the depth error rather than hanging, run throughdeed_runitself.Stacked on #682 (wasm entry point) for the
deed-wasmcrate; will show a clean diff once that merges.