Scripting: design an out-of-process (pre-emptible) script runner #750

Open
opened 2026-11-06 15:27:07 -05:00 by dohertj2 · 0 comments
Owner

The 2026-10-21 review remediation (Lane E, #734, E2) added Scripting:MaxAllocBytesPerRun and a timeout quarantine. Both are sampled or decided only after a run returns, so an in-process script still cannot be pre-empted:

  • a script that allocates fast enough can OOM the server before the sample is taken;
  • a CPU-bound loop keeps running on its abandoned thread until it returns.

The docs and review reports name an out-of-process script runner as the only true fix. The remediation plan said to file a follow-up issue for it, and none exists.

Scope: design an out-of-process (or otherwise pre-emptible) evaluator for virtual tags, scripted alarms and Calculation tags, and weigh its latency and IPC cost against the current in-process TimedScriptEvaluator. Design first. This is not urgent, because script authoring is admin-gated.

Source: docs/VirtualTags.md:37; docs/ScriptEditor.md:~205-211; docs/superpowers/plans/2026-10-22-review-remediation.md:250 (Lane E2); docs/reviews/2026-10-21/05-core.md:103, 03-host-controlplane-security-config.md:38. Related: #734.

The 2026-10-21 review remediation (Lane E, #734, E2) added `Scripting:MaxAllocBytesPerRun` and a timeout quarantine. Both are sampled or decided only *after* a run returns, so an in-process script still cannot be pre-empted: - a script that allocates fast enough can OOM the server before the sample is taken; - a CPU-bound loop keeps running on its abandoned thread until it returns. The docs and review reports name an out-of-process script runner as the only true fix. The remediation plan said to file a follow-up issue for it, and none exists. Scope: design an out-of-process (or otherwise pre-emptible) evaluator for virtual tags, scripted alarms and Calculation tags, and weigh its latency and IPC cost against the current in-process `TimedScriptEvaluator`. Design first. This is not urgent, because script authoring is admin-gated. Source: docs/VirtualTags.md:37; docs/ScriptEditor.md:~205-211; docs/superpowers/plans/2026-10-22-review-remediation.md:250 (Lane E2); docs/reviews/2026-10-21/05-core.md:103, 03-host-controlplane-security-config.md:38. Related: #734.
dohertj2 added the priority:p3migratedtype:feature labels 2026-11-06 15:28:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#750