Discovery. A probe is a law stated as a tiny script with an expected stdout, run in the runtime under study.
printed exactly :expect -> :yes (law holds here) ran, printed anything else -> :no (law refuted here) never ran (launch error, timeout) -> :unknown prerequisite (:needs) not :yes -> :unknown, probe skipped
Every verdict becomes Evidence carrying the script, exit status and output, so any later choice can be traced back to what was observed. This namespace is pure: the runner is passed in.
Discovery. A probe is a law stated as a tiny script with an expected stdout, run in the runtime under study. printed exactly :expect -> :yes (law holds here) ran, printed anything else -> :no (law refuted here) never ran (launch error, timeout) -> :unknown prerequisite (:needs) not :yes -> :unknown, probe skipped Every verdict becomes Evidence carrying the script, exit status and output, so any later choice can be traced back to what was observed. This namespace is pure: the runner is passed in.
(discover runtime-id run!)(discover runtime-id run! probes)Run every probe through run! (fn [script] -> {:argv :exit :out :err} or {:argv :error}), in order, folding the evidence into a fresh profile.
Run every probe through run! (fn [script] -> {:argv :exit :out :err} or
{:argv :error}), in order, folding the evidence into a fresh profile.(judge {:keys [expect]} {:keys [out error]})Verdict of one probe run. A run that never happened proves nothing.
Verdict of one probe run. A run that never happened proves nothing.
Ordered so that every :needs is probed before the probes that rely on it. Probe scripts avoid output redirection on purpose: a restricted shell must still be able to answer every other question.
Ordered so that every :needs is probed before the probes that rely on it. Probe scripts avoid output redirection on purpose: a restricted shell must still be able to answer every other question.
(run-evidence runtime-id {:keys [cap script expect] :as probe} result)Evidence for a probe that ran (or tried to).
Evidence for a probe that ran (or tried to).
(skip-evidence runtime-id {:keys [cap script expect]} profile unproven)Evidence for a probe not run because a prerequisite was not proven.
Evidence for a probe not run because a prerequisite was not proven.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |