Expand description
2026-09-26: Ed25519 signatures binding a gate record to the commit it measured.
The key is generated on the box on first use, so a signature does not
prove who ran a benchmark. It proves that the record file and the sha
passed to verify_record are the ones the key holder signed: editing
the file or re-pointing it at another commit breaks the signature. A new
signer’s public key is a one-line .pub file under
.github/record-signers/, which a reviewer sees in the diff.
Owner: bench gate (signing). Invariants:
- Private key material is written only by
write_private. On unix it creates a new file with mode0600; elsewhere it is a plain write. verify_recordreturnsOkonly for a valid signature under a key file present inREGISTRY_DIR, or for an unsigned record recorded beforeSIGNATURE_REQUIRED_AFTER.
Structs§
- Identity
- 2026-09-26: The signing identity for this machine.
Enums§
- Verified
- 2026-09-26: The outcome of a successful
verify_record.
Constants§
- REGISTRY_
DIR - 2026-09-26: Where a signer’s public key is published, relative to the repo root.
- SIGNATURE_
REQUIRED_ AFTER - 2026-09-26: Unix seconds (2026-09-01T13:13:20Z). A record whose
recorded_atis below this and that has no.sigverifies asVerified::Exempt; at or after it, a.sigis required.signing_tests::no_committed_record_escapes_the_cutover_unsignedchecks every committed record against it.
Functions§
- committed_
signers - 2026-09-26: Fingerprints of the
.pubfiles git tracks under.github/record-signers/. Asksgit ls-files, so a keyregisterwrote but nobody committed is absent. Errors when git cannot answer. - fingerprint_
of - 2026-09-26: Short name for a public key: the first 16 hex digits (8 bytes) of its SHA-256. It names the key file and appears in messages; the full key is what verifies.
- load_
or_ create - 2026-09-26: Load this machine’s identity from
<metrale_home>/identity/ed25519.pk8, generating and writing one on first use. Prints nothing; an unreadable, unwritable or unusable key is an error. - register
- 2026-09-26: Write this identity’s public key to
<root>/.github/record-signers/<fingerprint>.pubunless that file exists. Returns whether it wrote, so the caller asks for a commit only once. - sig_
path - 2026-09-26:
<record>.json→<record>.json.sig: appends.sigto the whole file name. - sign_
record - 2026-09-26: Sign a record file already on disk with its sha; writes and
returns the
.sigsidecar path. - signer_
notice - 2026-09-26: The operator notice when
fingerprintis not among thecommittedsigners, orNonewhen it is. Pure. - verify_
record - 2026-09-26: Verify a record’s
.sigsidecar againstgit_sha.