diff --git a/wizard-work/ledger/2026-11-02-wizard-handle-census.csv b/wizard-work/ledger/2026-11-02-wizard-handle-census.csv index 7350d95..d8daf8a 100644 --- a/wizard-work/ledger/2026-11-02-wizard-handle-census.csv +++ b/wizard-work/ledger/2026-11-02-wizard-handle-census.csv @@ -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 diff --git a/wizard-work/ledger/2026-11-02-wizard-handle-census.manifest.json b/wizard-work/ledger/2026-11-02-wizard-handle-census.manifest.json index 4acb06b..f793a03 100644 --- a/wizard-work/ledger/2026-11-02-wizard-handle-census.manifest.json +++ b/wizard-work/ledger/2026-11-02-wizard-handle-census.manifest.json @@ -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 " } \ No newline at end of file diff --git a/wizard-work/ledger/2026-11-02-wizard-handle-census.md b/wizard-work/ledger/2026-11-02-wizard-handle-census.md index c2b827c..9c08014 100644 --- a/wizard-work/ledger/2026-11-02-wizard-handle-census.md +++ b/wizard-work/ledger/2026-11-02-wizard-handle-census.md @@ -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). diff --git a/wizard-work/ledger/CHECK-2026-11-02-wizard-handle-census b/wizard-work/ledger/CHECK-2026-11-02-wizard-handle-census index 9787d48..6d219ea 100755 --- a/wizard-work/ledger/CHECK-2026-11-02-wizard-handle-census +++ b/wizard-work/ledger/CHECK-2026-11-02-wizard-handle-census @@ -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 diff --git a/wizard-work/ledger/verify_2026-11-02_wizard_handle_census.py b/wizard-work/ledger/verify_2026-11-02_wizard_handle_census.py index 74d789b..fe4f3e8 100644 --- a/wizard-work/ledger/verify_2026-11-02_wizard_handle_census.py +++ b/wizard-work/ledger/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 - 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])) +# 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 + 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 +with open(CSV_PATH, newline="") as f: + 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)