Expand description
amont run --stamp and amont stamps (ADR-0015): a runner other than the
commit hook earns amont’s verdict for a tree, and anyone can ask which
gates a tree carries a verdict for.
The commit hook stamps the tree it is about to seal and the push hook the
tips it pushes. A tool that verifies a tree of its own (relais, in a clean
candidate worktree) had no way to leave the same record, so the person’s
later commit and push of that exact tree ran the suite again. run --stamp
runs the named gates on HEAD of a clean worktree and writes the same tokens
the hooks write, through the same writers:
- a commit-time declaration that blocks is stamped on the TREE note, under
its script name (
crate::gate_stamp::stamp_tree), which is what the pre-commit hook (crate::gate_stamp::vouched_for_staged_tree) and the push twin’s pairing read. Not the one-shot marker: that lives in the worktree-private gitdir and dies with a throwaway worktree; - a push gate is stamped on the tree and the commit
(
crate::gate_stamp::stamp_push), as a rehearsal does; - a built-in pre-commit check gets its built-in token on the tree note. The
commit hook reruns built-ins whatever the note says (they read the index);
the token is evidence for
amont stampsand the tools that read it.
Nothing here signs. Signing stays at push time, with the key the pre-push hook already uses, over the stamps it finds (decisions programme “one verdict per tree”, t02).
Every failure points the usual way: a gate that did not pass, was deferred, could not run or had nothing to judge writes no token, and no token means the hooks run it.
Enums§
- Ended
- What became of one gate in a
run --stamp. - Output
- How
amont stampsprints its answer. - State
- One gate’s state on a tree, as
amont stampsreports it.
Constants§
- EXIT_
FAILED - EXIT_
REFUSED - EXIT_
STAMPED - Exit codes of
amont run --stamp. - EXIT_
UNSTAMPED - A gate was deferred, could not run, or had nothing to judge: no token was written for it, and nothing failed.
Functions§
- default_
gates - Every gate the hooks honour a stamp for: the blocking commit-time
declarations, and the scoped push gates this repository opted into.
hook.skipremoves a gate here as it does from a stage. - stamp
amont run --stamp [<gate>…].- stamps_
command amont stamps [--json] [--tree <rev>] [<gate>…]. Exit 0 with an answer, 2 on usage (an unknown gate, a rev that names no tree).- states
- Each gate’s state on
tree: a valid local token (its own or its twin’s), else a signed attestation for it on this platform, else a recorded deferral, else nothing.commitis the committreewas asked for by, if it was asked for by one.