Expand description
The notes refs as origin’s mirror (SPEC.md, “Which refs are read”).
Structs§
- Publish
- How a publish is carried out. Every producer and every signed-notes ref (attestations, their inputs, provenance) goes through the same loop.
- Synced
- What one name set’s sync came to: the state of its notes ref and of its inputs ref, and the lines that report a change to the repository’s refs (a mirror deleted, with how to restore it).
Enums§
- Mirror
- What became of one notes ref. SPEC.md, “Lookup”.
- Published
- What a publish came to.
- Push
Failure - Why a push that exited non-zero failed, read from git’s stderr.
Functions§
- classify_
push - The markers behind
PushFailure. Raced wins over Unreachable: a message naming both is a race that happened on a reachable remote. A hook’s own output rides the same stream, so Unreachable is read only from the lines git and ssh themselves print. - publish
- Attach each
(object, block)on the REMOTE’s copy ofnotes_ref(short name, underrefs/notes/) and push. Nevernotes add -f, which erases every other producer’s block, and never a push of the local ref, which would re-publish a block origin revoked: - publish_
local - The same, into the local
notes_refonly, with no remote involved: whatsign --no-pushwrites underrefs/notes/attest-local/. - sync_
mirrors - Bring both mirrors of the written names (
WRITE) in line with origin: one fetch of both refs into throwaways and, when that fails without timing out, onels-remoteto tell “origin has no such ref” from “origin did not answer” — then, if some refs exist, one more fetch of those. A silent origin costs one call (15 s at most), a dead one two (30 s), the worst case three (45 s). - sync_
mirrors_ of sync_mirrorsfor one name set’s two refs. A verifier syncs each set on its own, so a set origin does not have (the old one after the census, the new one before the writers switch) isDeleted, which judges nothing and changes no verdict, neverUnreachable.