Expand description
Hooks: a person’s own commands around a run. A gate can stop a tick or
a pull request — only exit 0 lets it through; an observer hears what
speccoder decided and never changes it. The pure parts live here: the
[hooks.<name>] grammar, the gate outcome rule, the two public events
and the sentence each carries.
Structs§
- Count
kofn.- Gate
Exit - How a gate’s run ended.
- Gate
Mark - A gate’s mark on an event: its name and how it ended.
- Gate
Record - One gate’s run at its point, as a report and the evidence carry it.
- HookDef
- One
[hooks.<name>]table. - Hook
Entry - One hook as
speccoder hooksshows it. - Hook
File - A file a hook runs, and its content’s digest.
- HookRun
- One run of a hook.
- Hook
Tested - How
speccoder hooks testwent. - Hooks
Report speccoder hooks: every hook, and what atrust,testordeliverjust did.- Task
Stopped task.stopped: an attempt saved without a tick.- Task
Ticked task.ticked: a tick commit on a unit’s branch.
Enums§
- Gate
Outcome - A gate’s verdict on its point.
- Gate
State - How one gate ended at its point.
- Point
- Where a gate stands.
- Role
- A gate or an observer.
- Runner
- What a hook runs.
- Trust
State - Whether a hook may run.
Constants§
- EVENTS
- The events an observer can hear.
- MAX_
REASON - The longest gate reason kept, in characters.
- MAX_
TIMEOUT - The longest timeout a hook may ask for, in seconds.
Functions§
- canonical
- The value with every object’s keys sorted, so key order and comments in the configuration never change a digest.
- clean
- One line, control characters shown as
\u{…}, at mostMAX_REASONcharacters. - first_
block - The first gate that blocked, if one did.
- parse
- Parses
[hooks.<name>](as JSON). - stopped_
summary - T006 blocked by licence in 001-md2csv · T005 stopped in 001-md2csv: verification failed (CHECK-FAILED).
- ticked_
summary - T004 verified in 001-md2csv — 3 scenarios, held-out 2 of 2.
- url_
allowed - Whether a webhook may go to
url: https, or plain http only to this machine. - valid_
name - Whether
namemay name a hook:[a-z0-9_-]+.