Skip to main content

Module gate

Module gate 

Source
Expand description

Gates at their point: each runs where the checks run, in the same sandbox, and only a clean exit 0 lets the point through. A gate that is not trusted, cannot run sandboxed, crashes, times out or changes a file the tick would commit blocks — never passes. Its words are for the person; nothing here reaches a model.

Structs§

Facts
Where a point stands: what a gate is told in SPECCODER_*.

Constants§

AWAITS_TRUST
The words of a gate that waits for a person’s trust.
CHANGED
The words of a gate whose bytes changed since they were trusted.

Functions§

run
Runs the gates of facts.point declared in the configuration of the project at worktree (the project’s folder in the worktree, where its checks run), in name order, through runner (the checks’ runner); trust and runs are read from speccoder’s state directory state. The first block stops the point; the gates after it are not_run. No gates: empty.
test
speccoder hooks test: the gate def alone, on root, as it would stand at its point.