ledger: 2026-11-02 commit census by author, top 15
This commit is contained in:
1 parent
de0f0a7250
commit
a777fe7ee6
3 files changed
+104
No files matched your search
@@ -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
|
||||
|
@@ -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`).
|
||||
@@ -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()
|
||||
Reference in new issue
Block a user