Expand description
The attest-inputs declaration (SPEC.md, “Input fingerprints”) and the
canonical-tree opt-out it governs (SPEC.md, “Canonical tree”).
Structs§
- Findings
- What
check_coveragefound. Empty means every required gate declares every tracked file. - PathTok
- One declared path.
?src/build.rsin the spec isoptional: it may be absent, and its absence is then part of the fingerprint. The marker is stripped here, once, so no consumer can ever hand?xto git — where it would match nothing and silently drop out of the fingerprint. - Spec
- The committed declaration of which paths each gate reads.
Enums§
- AtError
- Why a tree has a spec that cannot be used. Each disables the input-fingerprint route only.
- Coverage
Error - Why the coverage question cannot be answered. A guard that cannot answer fails, unlike the verifier, whose contract is fail-open.
- Error
- Why a spec is invalid. Any one invalidates the whole spec.
Displayis the reason the verifier reports, after the spec’s path. - Path
Problem - Why a path token is not a literal, root-relative file or directory.
git ls-treedoes not glob, so a wildcard would match nothing and silently fingerprint nothing; every other shape here is a path git would interpret rather than look up. - Plan
Exempt - What a tree says about the canonical route.
Constants§
- DEPRECATED_
OPT_ OUT - The line a verifier reports when only the deprecated opt-out is present.
- EXEMPT
- Paths no gate reads, exempt from the coverage check: the plans a change keeps rewriting. Everything else a repository tracks is either declared or the check fails.
- MAX_
SPEC_ BYTES - MAX_
SPEC_ GATES - MAX_
SPEC_ PATHS - PLAN_
EXEMPT_ DIRECTIVE - The one directive a spec may hold (1.6.0): the canonical opt-out.
- SPEC_
PATHS - Where a repository declares which paths each gate reads, in order of precedence. Both are always part of every fingerprint’s listing.
Functions§
- at
- The spec committed in
treeand where it was found;Ok(None)when the tree has none. Read from the TREE, never the working copy: the bytes hashed into every fingerprint and the bytes parsed here are then the same object. Presence comes from a listing that must itself succeed, never from acat-file -eprobe, which cannot tell an absent file from a git that failed: “absent” opens the canonical route, and “cannot tell” must not. - check_
coverage - Do the required gates declare, completely, everything
treetracks? - conf_
says_ plan_ exempt_ off - Does this
amont.confsayset planExempt off? One tolerant reading, shared with amont andverify.sh: strip CR, trim blanks, split on blanks, and compare the three wordsset,planExemptandoffASCII case-insensitively. A line that is not exactly those three words (a trailing comment, another value) does not match; any match anywhere is off. - coverage
- The pure half of
check_coverage: coverage offilesby each required gate ofspec, with the fingerprint question answered bycan_fingerprint. - implicit_
inputs - The paths every fingerprint lists besides the gate’s own: both spec
locations (so adding, removing or editing either invalidates),
.gitmodules, and.gitattributesat the root and at every ancestor directory of every token — they change the bytes a checkout yields without changing any listed blob. Deduplicated; order does not affect the value. - is_
plan_ exempt_ directive - Is this spec line the opt-out directive? Blanks around and between the two words are tolerated, nothing else.
- parse_
spec - The spec grammar, byte-strict. Every violation is a distinct reason, and any violation invalidates the WHOLE spec: a line that silently dropped out would be one the author believes is protecting something.
- plan_
exempt - Is the canonical route switched off for
tree? Read from the committed bytes, never through a tool’s trust-gated settings:offonly narrows, so it is honoured whoever wrote it. The directive is found in either spec location even when the spec is otherwise invalid, for the same reason.