From 1cb97945fc64339ca610c749e6e64cf2f6d51941 Mon Sep 17 00:00:00 2001 From: ledger Date: Mon, 26 Oct 2026 03:47:06 +0000 Subject: [PATCH] ledger: correct commit-census CHECK and fill census totals in md --- wizard-work/ledger/2026-10-26-commit-census.md | 2 +- wizard-work/ledger/CHECK-commit-census | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wizard-work/ledger/2026-10-26-commit-census.md b/wizard-work/ledger/2026-10-26-commit-census.md index 833bb77..42b628b 100644 --- a/wizard-work/ledger/2026-10-26-commit-census.md +++ b/wizard-work/ledger/2026-10-26-commit-census.md @@ -2,7 +2,7 @@ Source: `git -C /root/troupe-standup log --pretty=format:%ad --date=short | sort | uniq -c | sort -rn` -{date} rows, {total} commits, {total} sum of daily counts. Consistent (sum of rows == total). +32 rows, 1691 commits, 1691 sum of daily counts. Consistent (sum of rows == total). | # | Calendar day (author date) | Commit count | |---|---|---| diff --git a/wizard-work/ledger/CHECK-commit-census b/wizard-work/ledger/CHECK-commit-census index e5f978b..1beedee 100755 --- a/wizard-work/ledger/CHECK-commit-census +++ b/wizard-work/ledger/CHECK-commit-census @@ -6,6 +6,7 @@ set -u DIR=$(cd "$(dirname "$0")" && pwd) tsv="$DIR/2026-10-26-commit-census.tsv" +repo="$DIR/.." [ -f "$tsv" ] || { echo "FAIL: $tsv missing"; exit 1; } fail=0 @@ -14,10 +15,11 @@ fail=0 # (the census in this artifact was taken as of commit 957143e). awk 'NF' keeps # output newline-terminated so sort/uniq cannot drop the final record. PINNED=957143e +cd "$repo" || { echo "FAIL: cannot cd $repo"; exit 1; } expected=$(git log "$PINNED" --pretty=format:%ad --date=short | awk 'NF' | sort | uniq -c | sort -k2) # Per-row comparison: date (col 2 of expected) vs count (col 2 of TSV). -while IFS=$'\t' read -r _ d c; do +while IFS=$'\t' read -r d c; do [ -z "$d" ] && continue case "$d" in date) continue;; esac exp=$(echo "$expected" | awk -v d="$d" '$2==d {print $1}')