Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Phase 4: the runner publishes its result as a signed commit

90fdaf397a1120677a1246201369e6dcc82b0aed · Keenan Nemetz · 17d ago · parent 96cbb6fa

Phase 4: the runner publishes its result as a signed commit

A finished run's result existed only in data/runs.db and the object store, so a
clone carried the commits and the workflow but not the fact that CI passed, who
said so, or the log it said it with. And the previous cut of this change had the
server commit the record — which is the box vouching for a party, the same
mistake as the instance signing key that was deleted.

The runner now publishes it. When an attempt ends the runner commits
runs/<run id>/<attempt>/ — record.md (repo, ref, sha, workflow blob, job, steps
digest, exit, finish time, signer, key) plus an LFS pointer for the log and one
per artifact — together with any release pointers the build published, and
pushes that once. One push per run: the result and the artifacts it produced are
one fact, so a release cannot carry bytes whose build has no record.

The commit is signed with the runner's SSH key, and that signature is the whole
attestation: it covers the tree, the parents and the message, so the separate
claim and signature file are gone, and there is no second statement to keep in
step with the files it describes. pre-receive checks it against an
allowed-signers file built from the pushing account's keys, so identity comes
from the key and not from a name typed into a commit.

Who may report is the repository's runner allowlist — the same list that decides
who may lease a job — and the record must describe the job the queue handed that
account: same run, same attempt, same commit, workflow, job and steps digest.
Without that an allowed runner could report a green result for a commit nobody
asked it to build, or invent attempt 99 and have the next rebuild believe it.
Records are append-only, with no admin override: an edit or a deletion is a
rewrite of evidence, and the alternative to refusing is running the job again.

runs.db keeps the queue (queued and leased jobs have no record because they have
not happened) and mirrors finished runs as derived rows, which vole index
rebuild reconstructs from the branch. The attestation row now names the commit
instead of storing a claim and a signature.

Measured: a real run finished, a bare clone carried runs/<id>/1/record.md, git
verify-commit accepted that commit under the roster and refused an unsigned one;
a writer who is not a runner was refused by pre-receive naming the allowlist;
one CI release commit carried both the record and releases/v1.0.0/tool-linux;
deleting runs.db and rebuilding restored the row, the attestation and the log.

internal/issues/issues.go +10−2

@@ -37,6 +37,7 @@ import (
37 37 "github.com/rodent-software/vole/internal/frontmatter"
38 38 "github.com/rodent-software/vole/internal/gitx"
39 39 "github.com/rodent-software/vole/internal/releases"
40 "github.com/rodent-software/vole/internal/runs"
40 41 )
41 42
42 43 const (
@@ -382,10 +383,17 @@ func Validate(g *gitx.Repo, commit string) []string {
382 383 // Release artifacts: their own validator runs below, and they are not
383 384 // part of the entity set this function parses.
384 385 continue
386 case strings.HasPrefix(e.Name, runs.Dir+"/"):
387 // Run records: machine-written. The server validates each one as it
388 // writes it, and no client can push here (pre-receive refuses the
389 // prefix), so there is nothing at the boundary to check — and reading
390 // every record blob on every push would make an issue edit cost a walk
391 // over the whole CI history.
392 continue
385 393 default:
386 394 problems = append(problems, fmt.Sprintf(
387 "%s: metadata may only contain %s/, %s/ and %s/",
388 e.Name, Dir, RequestsDir, releases.Dir))
395 "%s: metadata may only contain %s/, %s/, %s/ and %s/",
396 e.Name, Dir, RequestsDir, releases.Dir, runs.Dir))
389 397 continue
390 398 }
391 399 data, err := g.BlobBySHA(e.SHA)