ledger: update wizard handle census to pinned rev 70f51f2

This commit is contained in:
ledger committed 2026-11-02 14:37:58 +00:00
1 parent 70f51f2272
commit 220a8aceb5
5 files changed
+23 -27

No files matched your search

@@ -1,10 +1,10 @@
handle,commit_count
timmy,766
ledger,334
ledger,335
volt,309
spark,240
beam,156
zephyrus-sparkborn,152
zephyrus-sparkborn,156
sol,142
quill,122
merlin,118
1 handle commit_count
2 timmy 766
3 ledger 334 335
4 volt 309
5 spark 240
6 beam 156
7 zephyrus-sparkborn 152 156
8 sol 142
9 quill 122
10 merlin 118
@@ -1,9 +1,9 @@
{
"pin_rev": "155e8eb3d959b8ca65704385ac17c964be7da685",
"pin_rev": "70f51f2272b15da6cae37788ee1eaba5cb7d6354",
"row_count": 19,
"schema": {
"handle": "str",
"commit_count": "int"
},
"derived_from": "git log --format=%an%x00%ae across whole history"
"derived_from": "git log --format=%an <pin_rev>"
}
@@ -1,6 +1,6 @@
# wizard handle census — 2026-11-02
**Pin:** `155e8eb3d959b8ca65704385ac17c964be7da685` (HEAD of `troupe-standup`).
**Pin:** `70f51f2272b15da6cae37788ee1eaba5cb7d6354` (HEAD of `troupe-standup`).
Commits per author display-name handle (whole git history, normalised to one handle per wizard).
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
# Single bare command: exit 0 iff the committed CSV re-derives from HEAD.
# Single bare command: exit 0 iff the committed CSV re-derives from the pinned
# revision recorded in manifest.json.
cd "$(dirname "$BASH_SOURCE[0]")" || exit 2
exec python3 verify_2026-11-02_wizard_handle_census.py
@@ -1,14 +1,16 @@
#!/usr/bin/env python3
# CHECK -- re-derive the wizard-handle census from the pinned HEAD rev and
# compare with the committed CSV. Exit 0 iff identical (no drift, no missing).
import subprocess, collections, sys, csv
# CHECK -- re-derive the wizard-handle census from the PINNED revision recorded
# in manifest.json (not from a moving HEAD) and compare with the committed CSV.
# Exit 0 iff identical: no drift at the pinned rev, no missing rows.
import subprocess, collections, json, csv, sys
REPO = "/root/troupe-standup"
CSV_PATH = "/root/troupe-standup/wizard-work/ledger/2026-11-02-wizard-handle-census.csv"
MANIFEST_PATH = "/root/troupe-standup/wizard-work/ledger/2026-11-02-wizard-handle-census.manifest.json"
def head_rev():
return subprocess.run(["git","-C",REPO,"rev-parse","HEAD"],check=True,
capture_output=True,text=True).stdout.strip()
with open(MANIFEST_PATH) as f:
meta = json.load(f)
PIN = meta["pin_rev"]
def canon(name):
n = (name or "").strip().lower()
@@ -18,29 +20,22 @@ def canon(name):
if "volt" in n: return "volt"
return n
def derive():
out = subprocess.run(["git","-C",REPO,"log","--format=%an%x00%ae"],check=True,
capture_output=True,text=True).stdout
# Re-derive from the pinned revision only.
cmd = ["git", "-C", REPO, "log", "--format=%an", PIN]
out = subprocess.run(cmd, check=True, capture_output=True, text=True).stdout
cnt = collections.Counter()
for line in out.split("\n"):
if not line: continue
n, _ = line.split("\x00")
cnt[canon(n)] += 1
return sorted(cnt.items(), key=lambda kv: (-kv[1], kv[0]))
cnt[canon(line)] += 1
expected = sorted(cnt.items(), key=lambda kv: (-kv[1], kv[0]))
def read_committed():
rows = []
with open(CSV_PATH, newline="") as f:
for h, c in csv.reader(f):
if h == "handle": continue
rows.append((h, int(c)))
return rows
actual = [(h, int(c)) for h, c in csv.reader(f) if h != "handle"]
expected = derive()
actual = read_committed()
if expected == actual:
print(f"OK: {len(expected)} rows; derives identically at rev {head_rev()}")
print("OK: %d rows; derives identically at pinned rev %s" % (len(expected), PIN))
sys.exit(0)
print("MISMATCH")
print("expected:", expected)
print("actual: ", actual)