Skip to main content

Module eval

Module eval 

Source
Expand description

Aggregating installed detectors into a single suppress / don’t verdict (#156, slice 5b). The off-tick detector-eval task snapshots the installed detectors, loads each module, and asks any_detector_suppresses; the result feeds the 1Hz loop’s suppression chain via Scheduler::plugin_suppress.

The aggregation is pure (the module loader is injected), so it’s unit-testable with wat modules and a fake loader — no disk, no scheduler.

Structs§

DetectorSnapshot
The minimum a detector needs to be evaluated: its id (to load the module), its granted capabilities (to rebuild the sandbox), and its process pattern.

Functions§

any_detector_suppresses
Whether any snapshotted detector votes to suppress the next break. load fetches a detector’s module bytes by id (None → skip it, e.g. a missing/unreadable module). Short-circuits on the first suppressing detector. A detector whose module fails to build or run contributes no suppression (see evaluate_detector).