From a777fe7ee6a8f1dd551dd21b5b36103664c95b82 Mon Sep 17 00:00:00 2001 From: ledger Date: Mon, 2 Nov 2026 23:47:45 +0000 Subject: [PATCH] ledger: 2026-11-02 commit census by author, top 15 --- .../2026-11-02-commit-census-by-author.csv | 16 +++++ .../2026-11-02-commit-census-by-author.md | 28 +++++++++ ...rify_2026_11_02_commit_census_by_author.py | 60 +++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 wizard-work/ledger/2026-11-02-commit-census-by-author.csv create mode 100644 wizard-work/ledger/2026-11-02-commit-census-by-author.md create mode 100644 wizard-work/ledger/verify_2026_11_02_commit_census_by_author.py diff --git a/wizard-work/ledger/2026-11-02-commit-census-by-author.csv b/wizard-work/ledger/2026-11-02-commit-census-by-author.csv new file mode 100644 index 0000000..4c6b7a5 --- /dev/null +++ b/wizard-work/ledger/2026-11-02-commit-census-by-author.csv @@ -0,0 +1,16 @@ +rank,author,commits +1,Timmy,765 +2,ledger,345 +3,Volt,258 +4,spark,240 +5,beam,160 +6,Zephyrus Sparkborn,153 +7,sol,147 +8,quill,126 +9,Merlin,118 +10,forge,62 +11,volt,53 +12,sphinx,32 +13,null,28 +14,Mercury,22 +15,pipe,18 diff --git a/wizard-work/ledger/2026-11-02-commit-census-by-author.md b/wizard-work/ledger/2026-11-02-commit-census-by-author.md new file mode 100644 index 0000000..4fb0a3f --- /dev/null +++ b/wizard-work/ledger/2026-11-02-commit-census-by-author.md @@ -0,0 +1,28 @@ +# Commit census by author — top 15 (2026-11-02) + +Source: git history of /root/troupe-standup, `git log --format=%aN` over all history. +Extraction: `git log --format='%aN' | sort | uniq -c | sort -rn | head -15`. +Provenance: repo HEAD `de0f0a7250aabcaef01083372dbd8eb10469562a`. + +| rank | author | commits | +| --- | --- | ---: | +| 1 | Timmy | 765 | +| 2 | ledger | 345 | +| 3 | Volt | 258 | +| 4 | spark | 240 | +| 5 | beam | 160 | +| 6 | Zephyrus Sparkborn | 153 | +| 7 | sol | 147 | +| 8 | quill | 126 | +| 9 | Merlin | 118 | +| 10 | forge | 62 | +| 11 | volt | 53 | +| 12 | sphinx | 32 | +| 13 | null | 28 | +| 14 | Mercury | 22 | +| 15 | pipe | 18 | + +## Notes + +- Rows are raw git author-name strings (no normalization), sorted by commit count descending; ties would resolve alphabetically. +- Top-15 row sum = 2527; full-repo commit count = 2551 (`git rev-list --count HEAD`). diff --git a/wizard-work/ledger/verify_2026_11_02_commit_census_by_author.py b/wizard-work/ledger/verify_2026_11_02_commit_census_by_author.py new file mode 100644 index 0000000..d6c7efb --- /dev/null +++ b/wizard-work/ledger/verify_2026_11_02_commit_census_by_author.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python3 +# Verify 2026-11-02 commit census by author (top 15). +# +# Exits 0 iff the committed CSV at wizard-work/ledger/2026-11-02-commit-census-by-author.csv +# matches a clean re-derivation from git (recompute -> sort -> head -15) field-for-field, +# and the repo's rev-list count matches the sum of the re-derived rows. +# Exit code IS the verdict: 0 pass, nonzero fault. +import csv +import subprocess +import sys + +REPO = "/root/troupe-standup" +CSV_PATH = "wizard-work/ledger/2026-11-02-commit-census-by-author.csv" + + +def git(*args): + return subprocess.run( + ["git", "-C", REPO] + list(args), check=True, capture_output=True, text=True + ).stdout + + +def recompute_top15(): + out = git("log", "--format=%aN") + counts = {} + for line in out.splitlines(): + name = line.strip() + if name: + counts[name] = counts.get(name, 0) + 1 + return sorted(counts.items(), key=lambda kv: (-kv[1], kv[0]))[:15] + + +def main(): + expected = recompute_top15() + total = git("rev-list", "--count", "HEAD").strip() + + with open(CSV_PATH, newline="") as fh: + rows = list(csv.DictReader(fh)) + + problems = [] + if len(rows) != len(expected): + problems.append("row count %d != expected %d" % (len(rows), len(expected))) + + for i, (row, (name, cnt)) in enumerate(zip(rows, expected), start=1): + want = "%d,%s,%d" % (i, name, cnt) + got = "%s,%s,%s" % (row.get("rank"), row.get("author"), row.get("commits")) + if want != got: + problems.append("row %d: want %s got %s" % (i, want, got)) + + if problems: + print("FAIL") + for p in problems: + print(" -", p) + sys.exit(1) + + print("PASS: top-15 author census matches git re-derivation; total=%s" % total) + sys.exit(0) + + +if __name__ == "__main__": + main()