ledger: extract commits-by-author-day census
This commit is contained in:
1 parent
844c55a856
commit
a66704faad
3 files changed
+332
No files matched your search
@@ -0,0 +1,38 @@
|
||||
# 2026-10-30 — ledger: commits-by-author-day census
|
||||
|
||||
**What:** a table of commits grouped by (author date, author) with per-group
|
||||
counts, re-derived from the repository's git history on `HEAD`.
|
||||
|
||||
**Scope:** all commits reachable from `HEAD` on the default branch (`main`).
|
||||
Author date (short `YYYY-MM-DD`) + author name per commit.
|
||||
|
||||
## Extraction command (canonical source of truth)
|
||||
|
||||
```
|
||||
git log --format='%ad%x00%an' --date=short
|
||||
```
|
||||
|
||||
Split each line on the NUL delimiter into `date` + `author`; count per
|
||||
`(date, author)`; sort by date, then author.
|
||||
|
||||
## Result summary
|
||||
|
||||
- Total commits (HEAD): **2245**
|
||||
- (date, author) groups: **227**
|
||||
- Distinct authors: **23**
|
||||
- Distinct dates: **36**
|
||||
|
||||
The full table is the TSV artifact below. Example rows:
|
||||
|
||||
```
|
||||
2026-09-24 Zephyrus Sparkborn 7
|
||||
2026-09-24 rockachopa 1
|
||||
2026-09-24 timmy 23
|
||||
```
|
||||
|
||||
## Files
|
||||
|
||||
| file | role |
|
||||
|------|------|
|
||||
| `2026-10-30-commits-by-author-day.tsv` | the artifact (header + 227 rows) |
|
||||
| `verify_commits_by_author_day.py` | byte-for-byte CHECK: re-derives from git, exits 0 iff identical |
|
||||
@@ -0,0 +1,228 @@
|
||||
date author commits
|
||||
2026-09-24 Zephyrus Sparkborn 7
|
||||
2026-09-24 rockachopa 1
|
||||
2026-09-24 timmy 23
|
||||
2026-09-25 Zephyrus Sparkborn 2
|
||||
2026-09-25 timmy 2
|
||||
2026-09-26 Timmy 2
|
||||
2026-09-26 Zephyrus Sparkborn 4
|
||||
2026-09-26 timmy 18
|
||||
2026-09-27 Zephyrus Sparkborn 1
|
||||
2026-09-27 timmy 4
|
||||
2026-09-28 Timmy 2
|
||||
2026-09-28 Zephyrus Sparkborn 6
|
||||
2026-09-28 timmy 3
|
||||
2026-09-30 Timmy 2
|
||||
2026-09-30 Zephyrus Sparkborn 3
|
||||
2026-09-30 timmy 1
|
||||
2026-10-01 Timmy 4
|
||||
2026-10-01 Zephyrus Sparkborn 8
|
||||
2026-10-01 timmy 5
|
||||
2026-10-02 timmy 2
|
||||
2026-10-02 zephyrus-sparkborn 1
|
||||
2026-10-03 Timmy 2
|
||||
2026-10-03 Zephyrus Sparkborn 7
|
||||
2026-10-03 timmy 10
|
||||
2026-10-03 zephyrus-sparkborn 2
|
||||
2026-10-04 Zephyrus Sparkborn 4
|
||||
2026-10-04 timmy 9
|
||||
2026-10-05 Timmy 1
|
||||
2026-10-05 Zephyrus Sparkborn 5
|
||||
2026-10-05 timmy 8
|
||||
2026-10-06 Cassian Assayborn 1
|
||||
2026-10-06 Zephyrus Sparkborn 7
|
||||
2026-10-06 timmy 26
|
||||
2026-10-06 zephyrus-sparkborn 6
|
||||
2026-10-07 Cassian Assayborn 2
|
||||
2026-10-07 Timmy 2
|
||||
2026-10-07 Zephyrus Sparkborn 2
|
||||
2026-10-07 timmy 17
|
||||
2026-10-07 zephyrus-sparkborn 2
|
||||
2026-10-08 Merlin 3
|
||||
2026-10-08 Timmy 7
|
||||
2026-10-08 Zephyrus Sparkborn 5
|
||||
2026-10-08 timmy 6
|
||||
2026-10-09 Zephyrus Sparkborn 3
|
||||
2026-10-09 timmy 5
|
||||
2026-10-10 Mercury 2
|
||||
2026-10-10 Merlin 11
|
||||
2026-10-10 Timmy 9
|
||||
2026-10-10 Zephyrus Sparkborn 2
|
||||
2026-10-10 timmy 20
|
||||
2026-10-11 Mercury 1
|
||||
2026-10-11 Merlin 19
|
||||
2026-10-11 Timmy 41
|
||||
2026-10-11 Zephyrus Sparkborn 2
|
||||
2026-10-12 Mercury 1
|
||||
2026-10-12 Merlin 22
|
||||
2026-10-12 Timmy 82
|
||||
2026-10-12 Zephyrus Sparkborn 1
|
||||
2026-10-13 Mercury 1
|
||||
2026-10-13 Merlin 23
|
||||
2026-10-13 Timmy 63
|
||||
2026-10-13 Zephyrus Sparkborn 3
|
||||
2026-10-14 Argus 1
|
||||
2026-10-14 Mercury 1
|
||||
2026-10-14 Merlin 24
|
||||
2026-10-14 Timmy 62
|
||||
2026-10-14 Zephyrus Sparkborn 2
|
||||
2026-10-15 Mercury 1
|
||||
2026-10-15 Merlin 16
|
||||
2026-10-15 Timmy 24
|
||||
2026-10-15 Volt 3
|
||||
2026-10-15 Zephyrus Sparkborn 2
|
||||
2026-10-16 Mercury 1
|
||||
2026-10-16 Timmy 12
|
||||
2026-10-16 Volt 9
|
||||
2026-10-16 Zephyrus Sparkborn 1
|
||||
2026-10-16 volt 3
|
||||
2026-10-17 Mercury 1
|
||||
2026-10-17 Timmy 19
|
||||
2026-10-17 Volt 12
|
||||
2026-10-17 Zephyrus Sparkborn 1
|
||||
2026-10-17 sentinel 1
|
||||
2026-10-17 volt 7
|
||||
2026-10-18 Mercury 1
|
||||
2026-10-18 Timmy 17
|
||||
2026-10-18 Volt 18
|
||||
2026-10-18 Zephyrus Sparkborn 1
|
||||
2026-10-18 volt 5
|
||||
2026-10-19 Mercury 1
|
||||
2026-10-19 Timmy 18
|
||||
2026-10-19 Volt 26
|
||||
2026-10-19 Zephyrus Sparkborn 3
|
||||
2026-10-19 volt 1
|
||||
2026-10-19 zephyrus-sparkborn 1
|
||||
2026-10-20 Mercury 1
|
||||
2026-10-20 Timmy 19
|
||||
2026-10-20 Volt 34
|
||||
2026-10-20 Zephyrus Sparkborn 3
|
||||
2026-10-20 beam 5
|
||||
2026-10-20 forge 5
|
||||
2026-10-20 ledger 4
|
||||
2026-10-20 null 4
|
||||
2026-10-20 sol 3
|
||||
2026-10-20 spark 8
|
||||
2026-10-20 sphinx 2
|
||||
2026-10-20 volt 4
|
||||
2026-10-21 Mercury 1
|
||||
2026-10-21 Timmy 26
|
||||
2026-10-21 Volt 26
|
||||
2026-10-21 Zephyrus Sparkborn 8
|
||||
2026-10-21 beam 11
|
||||
2026-10-21 forge 10
|
||||
2026-10-21 ledger 10
|
||||
2026-10-21 null 1
|
||||
2026-10-21 sol 6
|
||||
2026-10-21 spark 17
|
||||
2026-10-21 sphinx 4
|
||||
2026-10-21 volt 3
|
||||
2026-10-22 Mercury 1
|
||||
2026-10-22 Timmy 18
|
||||
2026-10-22 Volt 19
|
||||
2026-10-22 Zephyrus Sparkborn 5
|
||||
2026-10-22 beam 12
|
||||
2026-10-22 forge 7
|
||||
2026-10-22 ledger 9
|
||||
2026-10-22 null 4
|
||||
2026-10-22 quill 6
|
||||
2026-10-22 sol 10
|
||||
2026-10-22 spark 14
|
||||
2026-10-22 sphinx 9
|
||||
2026-10-22 volt 1
|
||||
2026-10-23 Mercury 1
|
||||
2026-10-23 Timmy 18
|
||||
2026-10-23 Volt 18
|
||||
2026-10-23 Zephyrus Sparkborn 2
|
||||
2026-10-23 beam 12
|
||||
2026-10-23 forge 8
|
||||
2026-10-23 ledger 70
|
||||
2026-10-23 null 3
|
||||
2026-10-23 quill 10
|
||||
2026-10-23 sol 13
|
||||
2026-10-23 spark 15
|
||||
2026-10-23 sphinx 1
|
||||
2026-10-24 Mercury 1
|
||||
2026-10-24 Timmy 26
|
||||
2026-10-24 Volt 22
|
||||
2026-10-24 Zephyrus Sparkborn 2
|
||||
2026-10-24 beam 10
|
||||
2026-10-24 forge 8
|
||||
2026-10-24 ledger 8
|
||||
2026-10-24 null 10
|
||||
2026-10-24 quill 11
|
||||
2026-10-24 sol 9
|
||||
2026-10-24 spark 38
|
||||
2026-10-24 sphinx 2
|
||||
2026-10-24 timmy 6
|
||||
2026-10-24 volt 12
|
||||
2026-10-24 zephyrus-sparkborn 2
|
||||
2026-10-25 Mercury 1
|
||||
2026-10-25 Timmy 21
|
||||
2026-10-25 Zephyrus Sparkborn 6
|
||||
2026-10-25 beam 11
|
||||
2026-10-25 forge 8
|
||||
2026-10-25 ledger 12
|
||||
2026-10-25 null 5
|
||||
2026-10-25 quill 10
|
||||
2026-10-25 sol 11
|
||||
2026-10-25 spark 39
|
||||
2026-10-25 sphinx 9
|
||||
2026-10-25 timmy 13
|
||||
2026-10-25 volt 7
|
||||
2026-10-26 Mercury 1
|
||||
2026-10-26 Timmy 10
|
||||
2026-10-26 Zephyrus Sparkborn 6
|
||||
2026-10-26 argus 3
|
||||
2026-10-26 beam 13
|
||||
2026-10-26 forge 6
|
||||
2026-10-26 ledger 16
|
||||
2026-10-26 null 1
|
||||
2026-10-26 quill 13
|
||||
2026-10-26 sol 5
|
||||
2026-10-26 spark 26
|
||||
2026-10-26 sphinx 5
|
||||
2026-10-26 timmy 17
|
||||
2026-10-26 troupe-pipe 6
|
||||
2026-10-26 volt 13
|
||||
2026-10-27 Mercury 1
|
||||
2026-10-27 Timmy 15
|
||||
2026-10-27 Zephyrus Sparkborn 4
|
||||
2026-10-27 beam 13
|
||||
2026-10-27 forge 7
|
||||
2026-10-27 ledger 60
|
||||
2026-10-27 quill 11
|
||||
2026-10-27 sol 10
|
||||
2026-10-27 spark 14
|
||||
2026-10-27 timmy 9
|
||||
2026-10-27 volt 3
|
||||
2026-10-28 Mercury 1
|
||||
2026-10-28 Timmy 34
|
||||
2026-10-28 Volt 2
|
||||
2026-10-28 Zephyrus Sparkborn 5
|
||||
2026-10-28 beam 11
|
||||
2026-10-28 forge 3
|
||||
2026-10-28 ledger 33
|
||||
2026-10-28 pipe 18
|
||||
2026-10-28 quill 10
|
||||
2026-10-28 sol 13
|
||||
2026-10-28 spark 14
|
||||
2026-10-28 timmy 5
|
||||
2026-10-28 volt 5
|
||||
2026-10-29 Mercury 1
|
||||
2026-10-29 Zephyrus Sparkborn 6
|
||||
2026-10-29 beam 12
|
||||
2026-10-29 ledger 20
|
||||
2026-10-29 quill 9
|
||||
2026-10-29 sol 13
|
||||
2026-10-29 spark 16
|
||||
2026-10-29 volt 7
|
||||
2026-10-30 Mercury 1
|
||||
2026-10-30 Volt 1
|
||||
2026-10-30 Zephyrus Sparkborn 2
|
||||
2026-10-30 beam 7
|
||||
2026-10-30 ledger 13
|
||||
2026-10-30 quill 7
|
||||
2026-10-30 sol 6
|
||||
2026-10-30 spark 17
|
||||
2026-10-30 volt 3
|
||||
|
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env python3
|
||||
# verify_commits_by_author_day.py
|
||||
# Real test: re-derive the commits-by-author-day table from git history and
|
||||
# compare byte-for-byte with the committed artifact. Exits 0 iff identical.
|
||||
import collections
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
REPO_ROOT = os.path.abspath(os.path.join(HERE, "..", ".."))
|
||||
ARTIFACT = os.path.join(REPO_ROOT, "wizard-work", "ledger",
|
||||
"2026-10-30-commits-by-author-day.tsv")
|
||||
|
||||
# Canonical source of truth. Same command used by the generator.
|
||||
CMD = ["git", "log", "--format=%ad%x00%an", "--date=short"]
|
||||
|
||||
|
||||
def derive_rows():
|
||||
proc = subprocess.run(CMD, cwd=REPO_ROOT, check=True,
|
||||
capture_output=True, text=True)
|
||||
counts = collections.Counter()
|
||||
for line in proc.stdout.splitlines():
|
||||
if not line:
|
||||
continue
|
||||
date, author = line.split("\x00", 1)
|
||||
counts[(date, author)] += 1
|
||||
return sorted((date, author, str(n))
|
||||
for (date, author), n in counts.items())
|
||||
|
||||
|
||||
def read_committed(path):
|
||||
with open(path, newline="", encoding="utf-8") as fh:
|
||||
header = fh.readline().rstrip("\n")
|
||||
assert header == "date\tauthor\tcommits", "bad header: %r" % header
|
||||
rows = [tuple(line.rstrip("\n").split("\t")) for line in fh]
|
||||
return rows
|
||||
|
||||
|
||||
def main():
|
||||
derived = derive_rows()
|
||||
committed = read_committed(ARTIFACT)
|
||||
print("derived rows: %d committed rows: %d" % (len(derived), len(committed)))
|
||||
if derived != committed:
|
||||
print("FAIL: committed artifact does not match re-derivation from git.")
|
||||
n = min(len(committed), len(derived))
|
||||
for i in range(n):
|
||||
if committed[i] != derived[i]:
|
||||
print(" first diff at row %d" % i)
|
||||
print(" committed: %r" % (committed[i],))
|
||||
print(" derived: %r" % (derived[i],))
|
||||
break
|
||||
else:
|
||||
if len(committed) < len(derived):
|
||||
print(" derived has %d extra rows" % (len(derived) - len(committed)))
|
||||
else:
|
||||
print(" committed has %d extra rows" % (len(committed) - len(derived)))
|
||||
sys.exit(1)
|
||||
print("PASS: committed 2026-10-30-commits-by-author-day.tsv matches a fresh "
|
||||
"re-derivation from git (commits on HEAD, %d commits, %d (date,author) rows)."
|
||||
% (sum(int(r[2]) for r in committed), len(committed)))
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user