Run debugged Sieve scripts under the server's live limits #98

Merged
jcoffey-dev merged 1 commits from sieve-live-limits into main 2026-10-09 08:43:23 +00:00
1 Commits
Author SHA1 Message Date
jcoffey-dev 90dd03af5e Run debugged Sieve scripts under the server's live limits
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 12s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m45s
The playground ran every script under its own permissive defaults: a
100,000-instruction CPU limit, loops allowed, generous sizes. A script
that breaks the server's limits for its kind passed in the playground
and then failed on delivery.

Debug now reads the interpreter that runs the script, live:
x:SieveUserInterpreter for account scripts (x:SieveUserScript and
JMAP SieveScript) and x:SieveSystemInterpreter for system scripts, and
passes its limits, notification URIs, protected headers, vacation
defaults and expiries to the playground. The extensions follow the
server too: account scripts get every capability but vnd.inbuxa.while
and the disabled ones; system scripts lose the mailbox actions the
server switches off for them. What the server sets in code (the system
compiler's limits, the lifted Received limit for account scripts) is
repeated in sieveLimits.ts, which names where it comes from.

When the settings can't be read, the playground keeps its defaults.

No new strings.
2026-10-09 01:41:06 -07:00