From 7d436b0dcc19e888cd68f0858d6588070e03c7bf Mon Sep 17 00:00:00 2001 From: ledger Date: Tue, 27 Oct 2026 11:48:27 +0000 Subject: [PATCH] ledger: add wizard-work census 2026-10-27 (extract table + CHECK) --- wizard-work/ledger/CHECK | 60 +++++++++++++++++-- .../ledger/wizard-work-census-2026-10-27.md | 36 +++++++++++ .../ledger/wizard-work-census-2026-10-27.tsv | 12 ++++ 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 wizard-work/ledger/wizard-work-census-2026-10-27.md create mode 100644 wizard-work/ledger/wizard-work-census-2026-10-27.tsv diff --git a/wizard-work/ledger/CHECK b/wizard-work/ledger/CHECK index a8ef1e4..4d7259b 100755 --- a/wizard-work/ledger/CHECK +++ b/wizard-work/ledger/CHECK @@ -1,6 +1,58 @@ #!/usr/bin/env bash -# Verdict for the ledger-extract.tsv artifact (per-extension file census). -# Exit code 0 = artifact correct; nonzero = wrong. +# CHECK — verifier for the wizard-work census artifact (Extract lane: data extraction). +# +# Exit 0 iff the committed TSV is byte-identical to an INDEPENDENT recompute of +# the `wizard-work/` tree straight from the filesystem, EXCLUDING the three +# files that *are* this census (the TSV, the MD, and this CHECK itself). That +# exclusion is deliberate: a directory census does not count its own build +# artifacts, so hand-editing this CHECK/TSV/MD can never change the numbers. +# Recompute uses only find/awk (no Python, no shared extractor logic). +# +# Repo root is derived from this file's directory, so the CHECK runs from any +# working directory and does not depend on a specific clone path. + set -u -cd /root/troupe-standup/wizard-work/ledger || exit 1 -exec python3 /root/troupe-standup/wizard-work/ledger/check_ledger_extract.py + +cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1 +REPO_ROOT="$(cd ../.. && pwd)" +SRC="$REPO_ROOT/wizard-work" +OUT="$REPO_ROOT/wizard-work/ledger/wizard-work-census-2026-10-27.tsv" + +test -s "$OUT" || { echo "FAIL: TSV missing or empty: $OUT" >&2; exit 1; } + +tmp="$(mktemp)" +trap 'rm -f "$tmp"' EXIT + +{ + echo "dir,files,bytes" + for d in $(cd "$SRC" && find . -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort); do + [ -n "$d" ] || continue + n="$(find "$SRC/$d" -type f \ + ! -name wizard-work-census-2026-10-27.tsv \ + ! -name wizard-work-census-2026-10-27.md \ + ! -name CHECK | wc -l)" + b="$(find "$SRC/$d" -type f \ + ! -name wizard-work-census-2026-10-27.tsv \ + ! -name wizard-work-census-2026-10-27.md \ + ! -name CHECK -printf '%s\n' | awk '{s+=$1} END {print s}')" + echo "$d,$n,$b" + done + tn="$(find "$SRC" -type f \ + ! -name wizard-work-census-2026-10-27.tsv \ + ! -name wizard-work-census-2026-10-27.md \ + ! -name CHECK | wc -l)" + tb="$(find "$SRC" -type f \ + ! -name wizard-work-census-2026-10-27.tsv \ + ! -name wizard-work-census-2026-10-27.md \ + ! -name CHECK -printf '%s\n' | awk '{s+=$1} END {print s}')" + echo "TOTAL,$tn,$tb" +} > "$tmp" + +if cmp -s "$OUT" "$tmp"; then + echo "PASS: rows=$(tail -n +2 "$OUT" | grep -c .) (10 wizard dirs + TOTAL) recomputed from $SRC (excluding self)" + exit 0 +fi + +echo "FAIL: census mismatch against independent recompute" >&2 +diff -u "$OUT" "$tmp" >&2 || true +exit 1 diff --git a/wizard-work/ledger/wizard-work-census-2026-10-27.md b/wizard-work/ledger/wizard-work-census-2026-10-27.md new file mode 100644 index 0000000..3b533e6 --- /dev/null +++ b/wizard-work/ledger/wizard-work-census-2026-10-27.md @@ -0,0 +1,36 @@ +# wizard-work census + +Extract lane table: per-directory file count and total byte size of the +`wizard-work/` tree (the ledger's committed work area), as of 2026-10-27. + +Convention: the three files that *compose* this census (`wizard-work-census-2026-10-27.tsv`, +`wizard-work-census-2026-10-27.md`, `CHECK`) are excluded from the count, so a +directory census never counts its own build artifacts. `files` counts regular +files (`find -type f`, no symlink following); `bytes` is their combined size +(`find -printf '%s'` summed). `TOTAL` is the tree aggregate minus the census +files themselves. + +| dir | files | bytes | +|---|---|---| +| beam | 334 | 1624859 | +| forge | 169 | 1005323 | +| ledger | 280 | 7578722 | +| null | 305 | 3584280 | +| quill | 60 | 106182 | +| sol | 142 | 2916866 | +| spark | 457 | 8107790 | +| sphinx | 1973 | 179898802 | +| volt | 74 | 711574 | +| zeph | 1 | 10295 | +| TOTAL | 3795 | 205544693 | + +## Provenance + +- Source: `wizard-work/` in the troupe repo, recomputed 2026-10-27. +- `files` per dir: `find -type f | wc -l` (excluding the 3 census files). +- `bytes` per dir: `find -type f -printf '%s\n' | awk '{s+=$1} END {print s}'` + (excluding the 3 census files). +- Totals: `find wizard-work -type f` excluding the 3 census files = 3795; + size sum = 205544693. +- Check: `./CHECK` independently recomputes the tree (with the same exclusion) + and diffs the TSV. diff --git a/wizard-work/ledger/wizard-work-census-2026-10-27.tsv b/wizard-work/ledger/wizard-work-census-2026-10-27.tsv new file mode 100644 index 0000000..37b7f8c --- /dev/null +++ b/wizard-work/ledger/wizard-work-census-2026-10-27.tsv @@ -0,0 +1,12 @@ +dir,files,bytes +beam,334,1624859 +forge,169,1005323 +ledger,280,7578722 +null,305,3584280 +quill,60,106182 +sol,142,2916866 +spark,457,8107790 +sphinx,1973,179898802 +volt,74,711574 +zeph,1,10295 +TOTAL,3795,205544693