vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Issues and requests are frontmatter, not JSON
307cbc2aa624ca9b76b79849e8ce8926414be435 · Keenan Nemetz · 17d ago · parent 427c4761
Issues and requests are frontmatter, not JSON
issues/<ulid>/issue.md and requests/<ulid>/request.md replace meta.json plus
description.md, and approvals/<account>.md replaces approvals/<account>.json.
Every file on refs/heads/vole is now frontmatter markdown read by one package, so
there is one reader and one writer for issues, requests, comments and approvals
instead of a JSON path and a hand-rolled key/value path.
The diff is the interface. A JSON array rewrites its neighbour to add a comma, so
one label cost two changed lines and removing one cost three; a block sequence
costs one. docs/spikes/issue-frontmatter measured the same six edits at 25 changed
lines as meta.json and 10 as frontmatter, and one file per entity means one path
to diff, blame and log.
Three rules make YAML safe to hand-edit rather than something to police:
- the writer always double-quotes free text, so no indicator, reserved word or
" # " can change what a title means
- a label is quoted only when the parser would not read it back bare ("null"),
which leaves ordinary labels as they were
- a reader refuses an unquoted title that the parser read differently: "title:
fix #12 crash" would otherwise be stored as "fix" and nobody would find out
Control characters are refused on both sides, so a tree the server accepts is a
tree it can always rewrite.
`updated` is gone from issues, requests and the index's issues table. It cost a
changed line on every edit — 11 of the 21 frontmatter lines in the spike's
sequence — and the commit that changed the file already carries the time.
Verified: TestRenderParseRoundTrip puts 13 titles that break naive YAML (hash,
colon, leading dash, null, quotes, backslash, unicode, 190 bytes) through the
writer and the reader; the server tests push a rendered issue over SSH and render
it, and the approval-ownership tests withdraw approvals/<account>.md. Then
scripts/ci.sh green (gofmt, vet, build, markdown links, go test -race ./...).
docs/spikes/README.md +4
| @@ -10,6 +10,7 @@ decision it produced. Nothing here ships; the code exists to be re-run. | |||
| 10 | 10 | | [smart-http](smart-http/README.md) | Is `git http-backend` as a subprocess correct and fast enough? | Yes. Hook messages propagate, aborts are clean. 1 GiB push peaks 1.13 GB RSS — needs a size cap. | | |
| 11 | 11 | | [tree-serving](tree-serving/README.md) | Can sites be served straight from git trees? | Yes. Cold 1.2 ms p50 from git; 170k req/s warm with an 18 MiB cache. No export step needed. | | |
| 12 | 12 | | [archive-streaming](archive-streaming/README.md) | Can release tarballs be generated per request instead of stored? | Yes. Real repo 54 ms plain / 221 ms gzipped, byte-identical across runs and clones. gzip is 14× slower than zstd and its level knob does nothing. | | |
| 13 | | [issue-frontmatter](issue-frontmatter/README.md) | Is YAML frontmatter a cleaner on-disk format for issues than `meta.json` + `description.md`? | Yes. 25 → 10 changed lines over the same six edits; always-quoting the writer removes the title edge cases instead of policing them. Drop `updated`, which alone was 11 of the 21. | | ||
| 13 | 14 | ||
| 14 | 15 | Run any of them with: | |
| 15 | 16 | ||
| @@ -19,6 +20,9 @@ go run ./smart-http -sizemb 1024 | |||
| 19 | 20 | go run ./tree-serving -files 10000 -conc 16 -reqs 4000 | |
| 20 | 21 | go run ./archive-streaming -build-fixture /tmp/fix -files 20000 -dirs 200 -binarymb 2 | |
| 21 | 22 | go run ./archive-streaming -repo /tmp/fix -rev HEAD | |
| 23 | go run ./issue-frontmatter -mode probe | ||
| 24 | go run ./issue-frontmatter -mode diffs | ||
| 25 | go run ./issue-frontmatter -mode diffs -no-updated | ||
| 22 | 26 | ``` | |
| 23 | 27 | ||
| 24 | 28 | Shared conventions worth keeping if these are ever rewritten: | |