Why
runs/ holds machine-written CI records, but it lives on the same vole branch as issues and change requests. The package comment in metadata/issues.go says machine-written data must not go there; the code and the layout in docs/architecture.md currently put it there anyway.
The branch today has 45 files under issues/, 65 under requests/, and 849 under runs/ — 118 runs, about 7 files per run. Every issue, comment, edit, approval, and release write reads and rewrites all of them, because of the whole-tree commit path in #79.
So filing an issue gets permanently slower even when nobody files issues. At about 13 ms per file per write, every 100 CI runs adds roughly 9 seconds to every metadata write, on top of the current 12 seconds.
It also means the read limits do not bound the branch. MaxEntries and MaxTreeBytes are checked per prefix (issues/ and requests/), and neither runs/ nor CommitFiles is bounded. Nothing stops machine-written history from making the branch unusable.
Scope
- Decide where run records live: a separate ref (
refs/heads/vole-runsor a sidecarrefs/vole/runs), or keep them onvoleonly if #79 makes the cost independent of tree size. - Move existing records with a migration that preserves their history and still passes
ValidateIssues. - Update
ci/runs.WriteRecord, the runner inci/agent/agent.go, pre-receive, index rebuild, and the docs that name the layout. - Preserve the one-push-per-run property: a result and the artifacts it produced stay one commit.
- Add a test that a run-record write does not touch the issue tree, and an issue write does not read run records.
Acceptance
- Filing an issue and publishing a run record touch disjoint trees.
- The number of files on the human metadata branch depends only on issues, requests, and releases.
- A repository with 10,000 run records still files an issue in the same time as one with none.
vole admin index rebuildandValidateIssuesstill cover everything they are responsible for.
Related
- #79 for the write path itself.