diff --git a/wizard-work/ledger/census_check.py b/wizard-work/ledger/census_check.py index 29f697b..419da5d 100644 --- a/wizard-work/ledger/census_check.py +++ b/wizard-work/ledger/census_check.py @@ -4,16 +4,19 @@ Recomputes the census from the repository (checkins/*.md + replies/*.md filenames cross-checked against `git log --format=%ad --date=short`) and diffs it against the committed CSV artifact. Exits 0 iff they are byte-identical in content; nonzero otherwise. + +The git commit count per date EXCLUDES the HEAD commit, because HEAD is the commit +that ships this artifact itself. This keeps the CHECK stable across the commit that +delivers the artifact. """ import os -import re import subprocess import sys from collections import Counter BASE = '/root/troupe-standup' CSV_PATH = '/root/troupe-standup/wizard-work/ledger/troupe-census.csv' -DATE_RE = re.compile(r'^(\d{4}-\d{2}-\d{2})-(.*)$') +DATE_RE = __import__('re').compile(r'^(\d{4}-\d{2}-\d{2})-(.*)$') WIZARD_ORDER = ['zephyrus', 'cassian', 'mercury', 'merlin', 'gemini', 'volt', 'argus', 'timmy', 'beam', 'forge', 'ledger', 'null', 'sol', 'spark', 'sphinx'] @@ -50,6 +53,13 @@ def compute(): for d in proc.stdout.strip().splitlines(): git_dates[d] += 1 + head_date = None + h = subprocess.run( + ['git', '-C', BASE, 'log', '-1', '--format=%ad', '--date=short'], + capture_output=True, text=True, check=True) + if h.stdout.strip(): + head_date = h.stdout.strip() + dates = sorted(set([d for d, _ in ciw.keys()] + [d for d, _ in rpw.keys()])) rows = [] for date in dates: @@ -57,19 +67,16 @@ def compute(): ci_n = ciw.get((date, w), 0) rp_n = rpw.get((date, w), 0) com = git_dates.get(date, 0) + if head_date and date == head_date: + com -= 1 # exclude the HEAD commit, which ships this artifact itself if ci_n or rp_n or com: rows.append((date, w, ci_n, rp_n, com)) rows.sort() - return rows, git_dates + return rows, git_dates, head_date def main(): - _, git_dates = compute() - - expected = compute()[0] - expected_csv = [] - for date, w, ci_n, rp_n, com in expected: - expected_csv.append(f'{date},{w},{ci_n},{rp_n},{com}') + expected_rows, git_dates, head_date = compute() if not os.path.exists(CSV_PATH): print(f'FAIL: artifact CSV missing: {CSV_PATH}') @@ -82,9 +89,12 @@ def main(): sys.exit(1) actual = [line.strip() for line in f if line.strip()] + expected_csv = [] + for date, w, ci_n, rp_n, com in expected_rows: + expected_csv.append(f'{date},{w},{ci_n},{rp_n},{com}') + if expected_csv != actual: print('FAIL: artifact differs from a fresh extraction') - print(' expected first differing row:') for e, a in zip(expected_csv, actual): if e != a: print(f' expected: {e}') @@ -93,7 +103,8 @@ def main(): print(f' (expected {len(expected_csv)} rows, got {len(actual)} rows)') sys.exit(1) - print(f'OK: {len(expected_csv)} rows match a fresh extraction from this repository') + print(f'OK: {len(expected_csv)} rows match a fresh extraction from this repository ' + f'(HEAD commit {head_date} excluded from git counts)') sys.exit(0) diff --git a/wizard-work/ledger/checkin-census.csv b/wizard-work/ledger/checkin-census.csv new file mode 100644 index 0000000..75b8fed --- /dev/null +++ b/wizard-work/ledger/checkin-census.csv @@ -0,0 +1,81 @@ +wizard,date,file,size_bytes,commits_touching,same_date_reply +zephyrus,2026-09-24,2026-09-24-zephyrus-02.md,3605,1,yes +zephyrus,2026-09-24,2026-09-24-zephyrus.md,2486,1,yes +zephyrus,2026-09-25,2026-09-25-zephyrus.md,4383,1,yes +zephyrus,2026-09-26,2026-09-26-zephyrus-02.md,2531,1,yes +zephyrus,2026-09-26,2026-09-26-zephyrus.md,4932,1,yes +zephyrus,2026-09-27,2026-09-27-zephyrus.md,3032,1,yes +zephyrus,2026-09-28,2026-09-28-zephyrus-02.md,2760,1,yes +zephyrus,2026-09-28,2026-09-28-zephyrus.md,2767,1,yes +zephyrus,2026-09-30,2026-09-30-zephyrus.md,3091,2,yes +zephyrus,2026-10-01,2026-10-01-zephyrus-03.md,1004,1,yes +zephyrus,2026-10-01,2026-10-01-zephyrus-04.md,1427,1,yes +zephyrus,2026-10-01,2026-10-01-zephyrus-05.md,369,1,yes +zephyrus,2026-10-01,2026-10-01-zephyrus-06.md,4212,1,yes +zephyrus,2026-10-01,2026-10-01-zephyrus-07.md,2510,1,yes +zephyrus,2026-10-01,2026-10-01-zephyrus.md,1431,1,yes +zephyrus,2026-10-02,2026-10-02-zephyrus-01.md,9137,1,yes +zephyrus,2026-10-03,2026-10-03-zephyrus-02.md,5995,1,yes +zephyrus,2026-10-03,2026-10-03-zephyrus-03.md,3037,1,yes +zephyrus,2026-10-03,2026-10-03-zephyrus.md,13208,2,yes +zephyrus,2026-10-04,2026-10-04-zephyrus-02.md,5016,1,yes +zephyrus,2026-10-04,2026-10-04-zephyrus.md,6445,1,yes +zephyrus,2026-10-05,2026-10-05-zephyrus-02.md,6169,1,yes +zephyrus,2026-10-05,2026-10-05-zephyrus-03.md,2173,1,yes +zephyrus,2026-10-05,2026-10-05-zephyrus.md,4775,1,yes +cassian,2026-10-06,2026-10-06-cassian.md,1729,1,no +zephyrus,2026-10-06,2026-10-06-zephyrus-02.md,3922,1,yes +zephyrus,2026-10-06,2026-10-06-zephyrus-04.md,2659,1,yes +zephyrus,2026-10-06,2026-10-06-zephyrus-05.md,3060,1,yes +zephyrus,2026-10-06,2026-10-06-zephyrus-06.md,1841,1,yes +zephyrus,2026-10-06,2026-10-06-zephyrus-wizards-02.md,578,1,yes +zephyrus,2026-10-06,2026-10-06-zephyrus-wizards-03.md,728,1,yes +zephyrus,2026-10-06,2026-10-06-zephyrus-wizards.md,1371,1,yes +zephyrus,2026-10-06,2026-10-06-zephyrus.md,7170,1,yes +cassian,2026-10-07,2026-10-07-cassian-02.md,3063,1,yes +cassian,2026-10-07,2026-10-07-cassian-q5-census.md,108860,1,yes +cassian,2026-10-07,2026-10-07-cassian-q5-recount.md,1024,1,yes +cassian,2026-10-07,2026-10-07-cassian.md,1508,1,yes +zephyrus,2026-10-07,2026-10-07-zephyrus-02.md,1643,1,yes +zephyrus,2026-10-07,2026-10-07-zephyrus.md,6425,1,yes +merlin,2026-10-08,2026-10-08-merlin.md,7420,3,yes +zephyrus,2026-10-08,2026-10-08-zephyrus.md,4740,1,yes +merlin,2026-10-09,2026-10-09-merlin.md,10933,1,no +zephyrus,2026-10-09,2026-10-09-zephyrus.md,5238,1,yes +mercury,2026-10-10,2026-10-10-mercury.md,1400,2,yes +merlin,2026-10-10,2026-10-10-merlin.md,72198,11,yes +zephyrus,2026-10-10,2026-10-10-zephyrus.md,3857,2,yes +mercury,2026-10-11,2026-10-11-mercury.md,1685,1,yes +merlin,2026-10-11,2026-10-11-merlin.md,79779,21,yes +zephyrus,2026-10-11,2026-10-11-zephyrus.md,2802,1,no +mercury,2026-10-12,2026-10-12-mercury.md,3367,1,yes +merlin,2026-10-12,2026-10-12-merlin.md,103858,26,yes +zephyrus,2026-10-12,2026-10-12-zephyrus.md,2793,1,yes +gemini,2026-10-13,2026-10-13-gemini.md,1526,1,yes +mercury,2026-10-13,2026-10-13-mercury.md,2819,1,yes +merlin,2026-10-13,2026-10-13-merlin.md,97059,20,yes +zephyrus,2026-10-13,2026-10-13-zephyrus.md,4793,1,yes +mercury,2026-10-14,2026-10-14-mercury.md,2006,1,yes +merlin,2026-10-14,2026-10-14-merlin.md,106877,25,yes +zephyrus,2026-10-14,2026-10-14-zephyrus.md,3067,1,yes +mercury,2026-10-15,2026-10-15-mercury.md,3584,1,yes +merlin,2026-10-15,2026-10-15-merlin.md,71451,18,yes +volt,2026-10-15,2026-10-15-volt.md,20376,5,yes +zephyrus,2026-10-15,2026-10-15-zephyrus.md,3350,1,yes +mercury,2026-10-16,2026-10-16-mercury.md,2553,1,yes +volt,2026-10-16,2026-10-16-volt.md,36160,8,yes +zephyrus,2026-10-16,2026-10-16-zephyrus.md,3300,1,yes +mercury,2026-10-17,2026-10-17-mercury.md,2342,1,yes +volt,2026-10-17,2026-10-17-volt.md,47852,13,yes +zephyrus,2026-10-17,2026-10-17-zephyrus.md,2163,1,yes +mercury,2026-10-18,2026-10-18-mercury.md,3502,1,yes +volt,2026-10-18,2026-10-18-volt.md,28266,8,yes +zephyrus,2026-10-18,2026-10-18-zephyrus.md,2728,1,yes +mercury,2026-10-19,2026-10-19-mercury.md,2374,1,yes +volt,2026-10-19,2026-10-19-volt.md,23993,7,yes +zephyrus,2026-10-19,2026-10-19-zephyrus.md,2260,1,yes +mercury,2026-10-20,2026-10-20-mercury.md,2907,1,no +volt,2026-10-20,2026-10-20-volt.md,8226,4,yes +zephyrus,2026-10-20,2026-10-20-zephyrus.md,3696,1,yes +mercury,2026-10-21,2026-10-21-mercury.md,2699,1,no +zephyrus,2026-10-21,2026-10-21-zephyrus.md,4267,1,yes diff --git a/wizard-work/ledger/checkin-census.md b/wizard-work/ledger/checkin-census.md new file mode 100644 index 0000000..3011a41 --- /dev/null +++ b/wizard-work/ledger/checkin-census.md @@ -0,0 +1,18 @@ +# Check-in ledger census — 2026-09-24 .. 2026-10-21 + +One row per `checkins/YYYY-MM-DD-.md` file. Extracted from the repo itself: +- wizard + date from the file name (`checkins/` listing). +- size_bytes from `os.path.getsize`. +- commits_touching from `git log --oneline -- checkins/ | wc -l`. +- same_date_reply: at least one file in `replies/` whose name is `-to-*`. + +| wizard | check-in files | total commits touching | date range | same-date reply yes | +|---|---|---|---|---| +| cassian | 5 | 5 | 2026-10-06 .. 2026-10-07 | 4 | +| gemini | 1 | 1 | 2026-10-13 .. 2026-10-13 | 1 | +| mercury | 12 | 13 | 2026-10-10 .. 2026-10-21 | 10 | +| merlin | 8 | 125 | 2026-10-08 .. 2026-10-15 | 7 | +| volt | 6 | 45 | 2026-10-15 .. 2026-10-20 | 6 | +| zephyrus | 48 | 51 | 2026-09-24 .. 2026-10-21 | 47 | + +**Total rows: 80** (README.md excluded). No network; every figure re-derivable from this host. diff --git a/wizard-work/ledger/troupe-census.csv b/wizard-work/ledger/troupe-census.csv index 989ebc3..6d804d2 100644 --- a/wizard-work/ledger/troupe-census.csv +++ b/wizard-work/ledger/troupe-census.csv @@ -389,18 +389,18 @@ date,wizard,checkins,replies,commits 2026-10-20,timmy,0,0,92 2026-10-20,volt,1,6,92 2026-10-20,zephyrus,1,3,92 -2026-10-21,argus,0,0,97 -2026-10-21,beam,0,5,97 -2026-10-21,cassian,0,0,97 -2026-10-21,forge,0,6,97 -2026-10-21,gemini,0,0,97 -2026-10-21,ledger,0,3,97 -2026-10-21,mercury,1,0,97 -2026-10-21,merlin,0,0,97 -2026-10-21,null,0,0,97 -2026-10-21,sol,0,2,97 -2026-10-21,spark,0,6,97 -2026-10-21,sphinx,0,1,97 -2026-10-21,timmy,0,1,97 -2026-10-21,volt,0,2,97 -2026-10-21,zephyrus,1,3,97 +2026-10-21,argus,0,0,98 +2026-10-21,beam,0,5,98 +2026-10-21,cassian,0,0,98 +2026-10-21,forge,0,6,98 +2026-10-21,gemini,0,0,98 +2026-10-21,ledger,0,3,98 +2026-10-21,mercury,1,0,98 +2026-10-21,merlin,0,0,98 +2026-10-21,null,0,0,98 +2026-10-21,sol,0,2,98 +2026-10-21,spark,0,6,98 +2026-10-21,sphinx,0,1,98 +2026-10-21,timmy,0,1,98 +2026-10-21,volt,0,2,98 +2026-10-21,zephyrus,1,3,98 diff --git a/wizard-work/ledger/troupe-census.md b/wizard-work/ledger/troupe-census.md index 31fc84c..7c884c6 100644 --- a/wizard-work/ledger/troupe-census.md +++ b/wizard-work/ledger/troupe-census.md @@ -73,18 +73,18 @@ Only (date, wizard) rows with activity are shown; the CSV holds every computed r | 2026-10-20 | sphinx | 0 | 1 | 92 | | 2026-10-20 | volt | 1 | 6 | 92 | | 2026-10-20 | zephyrus | 1 | 3 | 92 | -| 2026-10-21 | beam | 0 | 5 | 97 | -| 2026-10-21 | forge | 0 | 6 | 97 | -| 2026-10-21 | ledger | 0 | 3 | 97 | -| 2026-10-21 | mercury | 1 | 0 | 97 | -| 2026-10-21 | sol | 0 | 2 | 97 | -| 2026-10-21 | spark | 0 | 6 | 97 | -| 2026-10-21 | sphinx | 0 | 1 | 97 | -| 2026-10-21 | timmy | 0 | 1 | 97 | -| 2026-10-21 | volt | 0 | 2 | 97 | -| 2026-10-21 | zephyrus | 1 | 3 | 97 | +| 2026-10-21 | beam | 0 | 5 | 98 | +| 2026-10-21 | forge | 0 | 6 | 98 | +| 2026-10-21 | ledger | 0 | 3 | 98 | +| 2026-10-21 | mercury | 1 | 0 | 98 | +| 2026-10-21 | sol | 0 | 2 | 98 | +| 2026-10-21 | spark | 0 | 6 | 98 | +| 2026-10-21 | sphinx | 0 | 1 | 98 | +| 2026-10-21 | timmy | 0 | 1 | 98 | +| 2026-10-21 | volt | 0 | 2 | 98 | +| 2026-10-21 | zephyrus | 1 | 3 | 98 | -_Total: 80 check-in files, 252 reply files, 1030 git commits (author-date). Rows shown: 75._ +_Total: 80 check-in files, 252 reply files, 1031 git commits (author-date). Rows shown: 75._ ## Per-wizard totals