effect::tests::failed_and_missing_stages_are_deferred_with_their_reason
installed a plug-in that runs to the default instruction budget (about 51
million instructions for its input) inside a first view, whose budget is
2,000 ms of real time. Under heavy CPU load the run took longer than that,
the view's budget cut it short, and the stage was deferred for time
instead of as failed, so last_error was empty and the assertion at
effect.rs:722 failed. With the test pinned to one core beside 15 busy
loops it failed 3 runs of 3 that way.
The test now gives the plug-in a budget of 100,000 instructions, so the
run ends in an instruction-budget failure long before the view's budget
runs out, and it checks that the error is the instruction budget. The
same test passes 5 runs of 5 beside 15 busy loops and 5 of 5 beside 100.
The plug-in runtime keeps main's JavaScript plug-ins beside the web worker's module bytes and checked loads: a JavaScript plug-in's bundle is kept for the worker like a module, and load_checked loads it from its bundle.
A stored plug-in that didn't install, for example because its load
panicked or its module is broken, was only written to the log. The
person could not see it or load it again without restarting.
- plugin.list gains failed: [{file, error, from}], the plug-in files
that didn't load in this process: those of the Plug-ins folder, and
those the folder report of the Additional Plug-ins Folder (or the
folder plugin.reload loaded last) lists as failed. Disabled plug-ins,
files turned off since they failed, and modules skipped because
another install or removal of their id came first are left out. A
file that both loads list is listed once, as a stored file. A
plugin.reload replaces only the folder's rows. Installing or removing
a plug-in whose module is in a stored file that failed, or a later
load that installs it, takes the file off the list.
- plugin.retry {file?} loads one of those files again, or all of them,
with the same checks as the load it failed in, and reports for each
whether this retry installed it. A folder file's row in the folder
report moves to loaded or keeps its new error. Under automation read
roots, a file outside them is not read again, its row stays listed,
and the reply names it and its folder by their names. Safe Mode
returns an error.
- plugin.setEnabled {file} also takes the name failed gives a file
outside the read roots.
- Object › Plug-ins › Plug-ins That Didn't Load… lists the files with
why; Retry All loads them again under the read roots the list opened
under, and the status bar says how many loaded. The item is disabled
while nothing failed.
- A command.batch that runs a filter and then retries a module with
its id turns Apply Last Filter off, as a reinstall does.
Docs: docs/plugins.md (Plug-ins that didn't load), docs/mcp.md.
- A panic while a held run's output is applied ends the run, so the
documents go back to their state before it, and ending a held run
drops the output handed in for it.
- The worker loads a plug-in with the limits the page sends with the
run, so its memory limit applies.
- A worker that is ready only after the run's deadline is not sent the
run, with or without a dialog open.
- A run that holds the documents and fails while a dialog is open ends
at once and frees them.
- A plug-in command's dialog that automation confirms runs the command
on the page and returns its result.
- A plug-in file opened or dropped on the web whose worker check fails
is reported in the Can't open dialog, not only in the status bar.
- The web README lists connect-src among the CSP directives the app
needs.
The plug-in loader, registry and dialog unit tests decided their results with
yield-count spins (up to 100,000,000 tries) and a 10 s recv_timeout. On a
loaded machine a spin could run out before a worker sent, and a test failed
without a fault.
- Loader tests block on the workers' outcome channel (Loads::record_next) and
on the jobs' start channel. The stuck-thread tests keep the outcome channel
of the dropped load and receive the stuck job's outcome, which its worker
sends after it stops counting the thread as stuck. The window test checks
that taking outcomes leaves the start limit where it was.
- The registry revision test holds the set and waits for a hook that install
runs right before it asks for the write lock. The folder-order test drives
the load on the test thread and receives the other two files' outcomes
while the first file waits.
- The dialog test counts the conditions Manifest::visible checks and fails
once it checks more than one per named parameter, so a check that does not
end fails the test.
Every assertion is kept.
Three tests in crates/plugins/tests/abi.rs passed or failed on how long a
run took (under 5 s or 3 s), so a slow or loaded runner could fail them and
a fast one could hide a run stopped by the wrong limit.
- hostile_modules_fail_within_their_budget (was _fail_quickly) checks each
module's error. The endless ones must end with the instruction budget, so
a run stopped by the 60 s time budget fails the test.
- wall_clock_budget_stops_runaway_plugins gives an endless loop two slices
of instructions: with a time budget of 0 it ends with the time budget at
the end of the first slice, and with the default one it ends with the
instruction budget.
- cancelling_stops_a_run_between_two_slices_of_its_budget gives the loop
two slices: cancelled, it comes back Cancelled; not cancelled, the same
plug-in ends with the instruction budget.
Each test fails when its check in Plugin::call_with is removed.
wasmi 2.0.0 miscompiles a multi-value br_table whose targets take the
same values when another operand sits under those values: the targets
read their values from slots the branch never wrote
(https://github.com/wasmi-labs/wasmi/pull/2106, fixed in 2.0.2). A
plug-in that branched that way got wrong results. 2.0.1 to 2.0.3 also
fix other miscompilations, a use-after-free on resuming a call on
another store, and memory.grow past a declared maximum bypassing the
resource limiter
(https://github.com/wasmi-labs/wasmi/blob/main/CHANGELOG.md).
Only Cargo.lock changes: the workspace requirement "2.0.0" allows
2.0.3, and wasmi 2.0.3 still uses wasmparser 0.228.
The new abi test runs such a branch table for each of its targets; it
fails on 2.0.0 with the plug-in's unreachable trap.
The example filter parsed its input with serde_json's default float
parser and handed every object back with its `path`. A coordinate could
come back changed in its last digit, which the host reads as a new path:
a live shape became a plain path after a color-only run, and a compound
path with a hidden, locked or guide member was refused.
The filter now leaves `path` out of each object it returns, so each
object keeps its geometry, as docs/plugins.md advises for a filter that
does not change it. The fixture desaturate.wasm is rebuilt from the
source with build.sh.
Docs: docs/plugins.md.
A paragraph style's hyphenation, justification, tab stops and list, and a
character style's stroke dash, now refuse a key they don't read, naming the
field, as the style's own keys already did. A misspelled nested key no longer
leaves that setting unchanged without an error.
Loading a JavaScript plug-in read its JSON into a map that sorts its keys and
wrote it out again before parsing the manifest, so `params` and each command's
`params` reached dialogs in alphabetical order. The manifest is now parsed from
the plug-in's own JSON (`Manifest::parse_text`), with its size still counted
without `script` and `source`, and a `.vcplugin` read from a folder has
`source` added to its own text instead of being written out again.
The Safe Mode choice after a stopped launch moves to main's dialog host and keeps listing every
plug-in that was loading: one name in the sentence, or the list with "Disable Listed Plug-ins and
Continue". Automation requests wait in the queue while plug-ins load, and one past its deadline is
answered as expired. File > Open and opening a file still wait for the plug-ins still loading.
- The grant test accepts only a missing grants file as an empty list; any other read error fails it.
- The same-stamp replacement test asserts that the callback rewrote the file before it checks that
nothing installed.
- The loader's ordering test binds the job senders after `loads`, so a failing assertion releases
the held jobs before `loads` waits on them under the manual clock.
A menu.after value with a control character at either end, or longer than 64 characters before its
spaces are trimmed, is refused with the same error as other wrongly shaped values.
- A stored module's file is read again on its worker thread once the module
has loaded, whatever the file's modified time, and the install still skips
a file whose stamp changed since. The UI thread no longer reads the file.
- Stored and folder modules install through registry::install_for_load,
which checks for an install or removal of the id elsewhere while the
plug-ins' write lock is held, and records the module's grant in the same
step. A grant is forgotten only while the plug-in that took that revision
is still installed (registry::revoke_if_installed).
- A grant that a stored load removed and must put back for a later file is
written to grants.json first; when that write fails, the module is not
installed, and a grant put back for a module that then did not install is
removed again.
- A folder load in which a file found no loader thread is loaded again the
next time the preferences are applied. A plugin.reload keeps its report as
the folder last loaded only when no load started after it.
- Loads: a job's time is read while it is marked finished, the deadline check
reads the clock under the same lock, and only the jobs taken from the queue
fail when no worker is left. wait() counts outcomes taken with ready() as
released, so the jobs after them start.
- File › Open checks the path again after waiting for the plug-in loads.
- Tests wait for workers with bounded receives.
A member that is not a path (a compound path inside a compound path) is
not in the input's `path`, so a changed `path` or `type: "path"` deleted
it, together with any hidden or locked members it held. The host now
refuses such an output with an error naming the compound path. A
compound handed back as it was still keeps the member.
docs/plugins.md also says that new members keep the old ids by position
but not their names or live shapes. The test covers a nested compound
member and turning a compound with a guide member into a guide path.
A filter that handed a compound path back rebuilt every member from the
returned path, even when the path was unchanged, so its hidden members
were shown and its locked members unlocked after any run.
- A compound path whose path comes back as it was, or is left out, keeps
its members as they are.
- While a member is hidden, locked or a guide, a changed path or
`type: "path"` is refused with an error naming the compound path. A
guide member is allowed when the output also sets `guide`.
- A changed path still replaces the members, one per subpath, keeping
the old members' ids by position.
Docs: docs/plugins.md.