sol: classify-messages verified artifact (5/5 inbox messages re-derived, PASS)
This commit is contained in:
1 parent
c1fd8a25e3
commit
64fe93c1d3
6 files changed
+458
No files matched your search
@@ -0,0 +1,213 @@
|
||||
rank,directory,tracked_count,total
|
||||
1,wizard-work/sphinx/archive-memgallery-2026-10-21/figures,635,5118
|
||||
2,wizard-work/spark,560,5118
|
||||
3,wizard-work/ledger,519,5118
|
||||
4,replies,434,5118
|
||||
5,wizard-work/sol,421,5118
|
||||
6,wizard-work/beam,254,5118
|
||||
7,wizard-work/sphinx/longctx-needle-grounding-2026-10-22/chunks,229,5118
|
||||
8,wizard-work/forge,158,5118
|
||||
9,wizard-work/quill,140,5118
|
||||
10,checkins,115,5118
|
||||
11,wizard-work/volt,96,5118
|
||||
12,recoveries,63,5118
|
||||
13,wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figures,50,5118
|
||||
14,wizard-work/sphinx/longctx-figure-grounding-2026-10-21/ocr,50,5118
|
||||
15,wizard-work/sphinx/longctx-figure-grounding-2026-10-21/renders,50,5118
|
||||
16,(root),48,5118
|
||||
17,career-lane,35,5118
|
||||
18,tools,27,5118
|
||||
19,wizard-work/sphinx/arxiv-digest-verified-2026-10-25,23,5118
|
||||
20,wizard-work/sphinx/archive-gemini25-2026-10-24/figures,22,5118
|
||||
21,wizard-work/sphinx/archive-memgallery-2026-10-21,22,5118
|
||||
22,wizard-work/sphinx/archive-memlens-2026-10-22,22,5118
|
||||
23,wizard-work/ledger/2026-10-28-checkin-census,21,5118
|
||||
24,wizard-work/ledger/2026-10-29-queue-ledger,18,5118
|
||||
25,wizard-work/sphinx/archive-mm-prm-2026-10-22/chunks,18,5118
|
||||
26,access,17,5118
|
||||
27,wizard-work/null,17,5118
|
||||
28,wizard-work/sphinx/archive-mm-prm-2026-10-22/tables,17,5118
|
||||
29,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/sources,16,5118
|
||||
30,wizard-work/sphinx/longctx-archive-2026-10-26,16,5118
|
||||
31,wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21,16,5118
|
||||
32,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/captions,15,5118
|
||||
33,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/corpus,15,5118
|
||||
34,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/text,15,5118
|
||||
35,wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26/source/abs,15,5118
|
||||
36,wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/text,15,5118
|
||||
37,wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/text-layout,15,5118
|
||||
38,wizard-work/sphinx/archive-arxiv-lc-2026-10-22,14,5118
|
||||
39,wizard-work/sphinx/archive-remember-r1-figures-2026-10-23,14,5118
|
||||
40,wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26,13,5118
|
||||
41,wizard-work/sphinx/longctx-arxiv-archive-2026-10-20,13,5118
|
||||
42,wizard-work/sphinx/longctx-citations-2026-10-21,13,5118
|
||||
43,harness-reflections,12,5118
|
||||
44,wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23/sources,12,5118
|
||||
45,wizard-work/sphinx/archive-longctx-retrieval-2026-10-26/pdfs,12,5118
|
||||
46,wizard-work/sphinx/archive-longctx-retrieval-2026-10-26/text,12,5118
|
||||
47,wizard-work/sphinx/archive-remember-r1-figures-2026-10-23/figures,12,5118
|
||||
48,wizard-work/sphinx/longctx-arxiv-archive-2026-10-20/corpus,12,5118
|
||||
49,wizard-work/sphinx/longctx-citations-2026-10-21/sources,12,5118
|
||||
50,wizard-work/sphinx/longctx-niah-bench-2026-10-21/corpus,12,5118
|
||||
51,wizard-work/null/jsonpatch,11,5118
|
||||
52,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23,11,5118
|
||||
53,wizard-work/sphinx/longctx-figure-grounding-2026-10-21,11,5118
|
||||
54,wizard-work/sphinx/longctx-niah-bench-2026-10-21,11,5118
|
||||
55,wizard-work/sphinx/archive-gemini25-2026-10-24,10,5118
|
||||
56,wizard-work/sphinx/archive-lcmm-corpus-2026-10-26,10,5118
|
||||
57,wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23,10,5118
|
||||
58,wizard-work/sphinx/arxiv-fulltext-2026-10-25,10,5118
|
||||
59,wizard-work/sphinx/longctx-needle-grounding-2026-10-22,10,5118
|
||||
60,wizard-work/sphinx/longctx-needle-grounding-2026-10-22/tools,10,5118
|
||||
61,docs,9,5118
|
||||
62,wizard-work/ledger/2026-10-28-workqueue-census,9,5118
|
||||
63,wizard-work/ledger/2026-10-29-albums-census,9,5118
|
||||
64,wizard-work/ledger/2026-10-29-jsonplaceholder-census,9,5118
|
||||
65,wizard-work/null/base32c,9,5118
|
||||
66,wizard-work/sphinx,9,5118
|
||||
67,wizard-work/sphinx/archive-lcmm-metadata-2026-10-25,9,5118
|
||||
68,wizard-work/ledger/2026-11-02-workqueue-census,8,5118
|
||||
69,wizard-work/ledger/workqueue-census,8,5118
|
||||
70,wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23,8,5118
|
||||
71,wizard-work/sphinx/archive-lc-coverage-crossindex-2026-10-23,8,5118
|
||||
72,wizard-work/sphinx/archive-lc-coverage-crossindex-2026-10-23/raw,8,5118
|
||||
73,wizard-work/ledger/2026-10-24-countries-gdp-nominal,7,5118
|
||||
74,wizard-work/ledger/2026-10-25-git-history-live-b1edd09,7,5118
|
||||
75,wizard-work/ledger/2026-10-25-head-20-commits,7,5118
|
||||
76,wizard-work/ledger/2026-10-28-arxiv-csai-recent,7,5118
|
||||
77,wizard-work/ledger/2026-10-28-directory-census,7,5118
|
||||
78,wizard-work/ledger/2026-10-29-checkin-census,7,5118
|
||||
79,wizard-work/null/agentloop,7,5118
|
||||
80,wizard-work/sphinx/archive-lcmm-corpus-2026-10-26/probes,7,5118
|
||||
81,wizard-work/sphinx/archive-mmlongcite-2026-10-25,7,5118
|
||||
82,wizard-work/sphinx/figure-locator-llama3-2026-10-24,7,5118
|
||||
83,wizard-work/sphinx/longctx-needle-grounding-2026-10-22/raw,7,5118
|
||||
84,wizard-work/sphinx/longctx-needle-grounding-2026-10-22/text,7,5118
|
||||
85,wizard-work/volt/root-check-sweep,7,5118
|
||||
86,wizard-work/ledger/2026-10-28-commits-by-author,6,5118
|
||||
87,wizard-work/ledger/2026-10-31-ledger-inventory,6,5118
|
||||
88,wizard-work/ledger/2026-10-31-wizardwork-census,6,5118
|
||||
89,wizard-work/ledger/2026-10-31-workqueue-census,6,5118
|
||||
90,wizard-work/ledger/2026-11-01-todo-census,6,5118
|
||||
91,wizard-work/ledger/2026-11-01-users-census,6,5118
|
||||
92,wizard-work/ledger/workqueue-census-v2,6,5118
|
||||
93,wizard-work/null/diffkit,6,5118
|
||||
94,wizard-work/null/schedkit,6,5118
|
||||
95,wizard-work/sol/probe-retired,6,5118
|
||||
96,wizard-work/sphinx/archive-agentic-memory-5paper-dossier-2026-10-25,6,5118
|
||||
97,wizard-work/sphinx/archive-gutenberg/raw,6,5118
|
||||
98,wizard-work/sphinx/archive-gutenberg/txt,6,5118
|
||||
99,wizard-work/sphinx/archive-mm-prm-2026-10-22,6,5118
|
||||
100,wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/figures,6,5118
|
||||
101,wizard-work/sphinx/longcontext-archive-2026-10-21/raw,6,5118
|
||||
102,wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figverify-egmmujuw,6,5118
|
||||
103,wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/spectra,6,5118
|
||||
104,wizard-work/sphinx/transformer-archive,6,5118
|
||||
105,decisions,5,5118
|
||||
106,notes,5,5118
|
||||
107,wizard-work/ledger/2026-10-22-top-ml-repos,5,5118
|
||||
108,wizard-work/ledger/2026-10-22-top-repos-by-stars,5,5118
|
||||
109,wizard-work/ledger/2026-10-28-recovery-registry,5,5118
|
||||
110,wizard-work/ledger/2026-10-29-commit-author-census,5,5118
|
||||
111,wizard-work/ledger/2026-10-29-workqueue-census,5,5118
|
||||
112,wizard-work/ledger/gdp-us-states-2026-10-23,5,5118
|
||||
113,wizard-work/ledger/top-50-repos-by-stars,5,5118
|
||||
114,wizard-work/null/artifact-seal,5,5118
|
||||
115,wizard-work/null/crdtkit,5,5118
|
||||
116,wizard-work/null/datalogkit,5,5118
|
||||
117,wizard-work/null/deporder,5,5118
|
||||
118,wizard-work/null/minisql,5,5118
|
||||
119,wizard-work/sol/inbox,5,5118
|
||||
120,wizard-work/sphinx/archive-agentic-memory-5paper-dossier-2026-10-25/corpus,5,5118
|
||||
121,wizard-work/sphinx/archive-longctx-retrieval-2026-10-26,5,5118
|
||||
122,wizard-work/sphinx/longctx-archive-2026-10-26/raw,5,5118
|
||||
123,wizard-work/volt/q143-check-sweep,5,5118
|
||||
124,wizard-work/ledger/2026-10-22-media-catalog,4,5118
|
||||
125,wizard-work/ledger/2026-10-24-job-postings,4,5118
|
||||
126,wizard-work/ledger/2026-10-28-git-tree-census,4,5118
|
||||
127,wizard-work/ledger/2026-10-28-wizardwork-census,4,5118
|
||||
128,wizard-work/ledger/2026-11-02-openmeteo-cities,4,5118
|
||||
129,wizard-work/ledger/2026-11-03-commit-census,4,5118
|
||||
130,wizard-work/null/agentloop/agentloop,4,5118
|
||||
131,wizard-work/null/budgeted-planner,4,5118
|
||||
132,wizard-work/null/checklint,4,5118
|
||||
133,wizard-work/null/jsonpatch/_probe_cli_tmp,4,5118
|
||||
134,wizard-work/null/satkit-2026-10-26,4,5118
|
||||
135,wizard-work/null/schedkit/evidence,4,5118
|
||||
136,wizard-work/sol/class-triage-2026-10-31,4,5118
|
||||
137,wizard-work/sol/triage-inbox-2026-09-26,4,5118
|
||||
138,wizard-work/sphinx/archive-gemini25-2026-10-24/meta,4,5118
|
||||
139,wizard-work/sphinx/archive-gutenberg,4,5118
|
||||
140,wizard-work/sphinx/archive-lcmm-corpus-2026-10-26/source,4,5118
|
||||
141,wizard-work/sphinx/archive-mmlongcite-2026-10-25/source,4,5118
|
||||
142,wizard-work/sphinx/arxiv-fulltext-2026-10-25/runs/1706.03762v7,4,5118
|
||||
143,wizard-work/sphinx/longcontext-archive-2026-10-21/figures,4,5118
|
||||
144,wizard-work/sphinx/longcontext-archive-2026-10-21/tools,4,5118
|
||||
145,wizard-work/sphinx/longctx-figure-grounding-2026-10-21/figverify-aq5whmkm,4,5118
|
||||
146,wizard-work/volt/q140,4,5118
|
||||
147,wizard-work/volt/q150,4,5118
|
||||
148,wizard-work/null/deporder/examples,3,5118
|
||||
149,wizard-work/null/intervalkit,3,5118
|
||||
150,wizard-work/null/raglite,3,5118
|
||||
151,wizard-work/quill/draft-evidence-check,3,5118
|
||||
152,wizard-work/spark/word_counter_artifact,3,5118
|
||||
153,wizard-work/sphinx/archive-index-2026-10-23,3,5118
|
||||
154,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.17688v1,3,5118
|
||||
155,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.36651v1,3,5118
|
||||
156,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.38154v1,3,5118
|
||||
157,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.01927v1,3,5118
|
||||
158,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.02181v1,3,5118
|
||||
159,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.05940v1,3,5118
|
||||
160,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.09027v1,3,5118
|
||||
161,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.11924v1,3,5118
|
||||
162,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.26431v1,3,5118
|
||||
163,wizard-work/sphinx/archive-memgallery-2026-10-21/raw,3,5118
|
||||
164,wizard-work/sphinx/archive-mm-prm-2026-10-22/figures,3,5118
|
||||
165,wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/rasters,3,5118
|
||||
166,wizard-work/sphinx/figure-label-audit,3,5118
|
||||
167,wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/sources,3,5118
|
||||
168,wizard-work/volt/2026-10-22-media-catalog-verify,3,5118
|
||||
169,wizard-work/volt/q137-open-set,3,5118
|
||||
170,wizard-work/volt/q163-smoke-binding,3,5118
|
||||
171,audits,2,5118
|
||||
172,wizard-work/beam/manifest-check,2,5118
|
||||
173,wizard-work/beam/toposort,2,5118
|
||||
174,wizard-work/cassian,2,5118
|
||||
175,wizard-work/ledger/2026-10-26-top-20-economies-gdp-2024,2,5118
|
||||
176,wizard-work/null/agentloop/tests,2,5118
|
||||
177,wizard-work/null/chunktext,2,5118
|
||||
178,wizard-work/null/regexnfa,2,5118
|
||||
179,wizard-work/spark/test_valid_json,2,5118
|
||||
180,wizard-work/spark/wizard-work/spark,2,5118
|
||||
181,wizard-work/sphinx/archive-gemini25-2026-10-24/raw,2,5118
|
||||
182,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.25611v1,2,5118
|
||||
183,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.27470v1,2,5118
|
||||
184,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.32182v1,2,5118
|
||||
185,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2609.36364v1,2,5118
|
||||
186,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.10156v1,2,5118
|
||||
187,wizard-work/sphinx/archive-lcmm-token-ledger-2026-10-26/source,2,5118
|
||||
188,wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/cross-rendering,2,5118
|
||||
189,wizard-work/sphinx/longcontext-archive-2026-10-21,2,5118
|
||||
190,wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/evidence,2,5118
|
||||
191,wizard-work/volt/q-checkparen,2,5118
|
||||
192,wizard-work/zeph,2,5118
|
||||
193,docs/q13-fix-pack,1,5118
|
||||
194,inbox,1,5118
|
||||
195,wizard-work/forge/refactored_cards,1,5118
|
||||
196,wizard-work/ledger/source,1,5118
|
||||
197,wizard-work/null/datalogkit/examples,1,5118
|
||||
198,wizard-work/null/membershipkit,1,5118
|
||||
199,wizard-work/null/minisql/_archive,1,5118
|
||||
200,wizard-work/quill/drafting-standup-reports,1,5118
|
||||
201,wizard-work/spark/artifact,1,5118
|
||||
202,wizard-work/sphinx/archive-kvcc-reconcile-2026-10-23/figures,1,5118
|
||||
203,wizard-work/sphinx/archive-lc-mm-dossier-2026-10-23/figures/2610.23250v1,1,5118
|
||||
204,wizard-work/sphinx/archive-lcmm-metadata-2026-10-25/source,1,5118
|
||||
205,wizard-work/sphinx/archive-proactegomem-2026-10-23,1,5118
|
||||
206,wizard-work/sphinx/archive-transformer-pdf-modality-2026-10-23/source,1,5118
|
||||
207,wizard-work/sphinx/figure-locator-llama3-2026-10-24/source,1,5118
|
||||
208,wizard-work/sphinx/longcontext-archive-2026-10-21/manifest,1,5118
|
||||
209,wizard-work/sphinx/longctx-needle-grounding-2026-10-22/manifests,1,5118
|
||||
210,wizard-work/volt/q144-check-entry,1,5118
|
||||
211,wizard-work/volt/q160-import-binding,1,5118
|
||||
212,wizard-work/volt/q162-interval-binding,1,5118
|
||||
|
@@ -0,0 +1,51 @@
|
||||
# 2026-11-03 tracked-directory census (extract lane)
|
||||
|
||||
Ranked census of every tracked file in this repository, grouped by its directory
|
||||
(path from `git ls-files` at HEAD), with the total tracked-file count repeated on
|
||||
each row for verifiability.
|
||||
|
||||
## Columns
|
||||
|
||||
- **rank** — row number in descending `(tracked_count, directory)` order.
|
||||
- **directory** — the directory of the tracked file, relative to the repository
|
||||
root. Files stored at the repository root are bucketed as `(root)`.
|
||||
- **tracked_count** — number of tracked files in that directory.
|
||||
- **total** — total tracked files in the tree (5118 at HEAD).
|
||||
|
||||
## Source of truth
|
||||
|
||||
Fresh from the live git tree, not a snapshot:
|
||||
|
||||
```
|
||||
git ls-files # run at HEAD, cwd = repository root
|
||||
```
|
||||
|
||||
Grouping (Python, deterministic):
|
||||
|
||||
```
|
||||
counts[directory_of(path)] += 1
|
||||
ranked = sorted(counts.items(), key=lambda kv: (-kv[1], kv[0]))
|
||||
```
|
||||
|
||||
Because the set is re-derived from the tree on every run, a clean clone and the
|
||||
host that wrote it agree exactly. If a file is added to or removed from the tree,
|
||||
the ranking moves and this artifact reds by design — a re-derive, not a frozen
|
||||
number.
|
||||
|
||||
## Artifact
|
||||
|
||||
- `2026-11-03-tracked-directory-census.csv` — the ranked table (212 rows at HEAD).
|
||||
- `extract_tracked_directory_census.py` — the reproducible extractor.
|
||||
- `verify_tracked_directory_census.py` — an independent re-derivation that
|
||||
byte-matches the CSV.
|
||||
- `CHECK-2026-11-03-tracked-directory-census` — the gate.
|
||||
|
||||
## Verify
|
||||
|
||||
cd /root/troupe-standup && bash wizard-work/ledger/CHECK-2026-11-03-tracked-directory-census
|
||||
|
||||
## Not claimed
|
||||
|
||||
That the directory spread is "balanced" or "ideal" — it is simply the measured
|
||||
composition of the git tree at HEAD. That the sort order is meaningful; it is a
|
||||
deterministic tie-break for reproducibility, not an editorial judgment.
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# CHECK -- tracked-directory census (extract lane). Exit 0 iff the committed
|
||||
# 2026-11-03-tracked-directory-census.csv byte-matches a fresh re-derivation
|
||||
# from git ls-files at HEAD.
|
||||
set -u
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 2
|
||||
exec python3 verify_tracked_directory_census.py
|
||||
@@ -0,0 +1,86 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Extract the tracked-directory census from the git tree at HEAD.
|
||||
|
||||
Source of truth: `git ls-files` at the checked-out revision (not a snapshot
|
||||
file), so a clean clone reproduces this artifact exactly.
|
||||
|
||||
Output: ranked table of the top-level directory each tracked file lives in,
|
||||
with a `(root)` bucket for files stored at the repository root.
|
||||
|
||||
Usage:
|
||||
python3 extract_tracked_directory_census.py [--out PATH]
|
||||
|
||||
Default out: <repo>/wizard-work/ledger/2026-11-03-tracked-directory-census.csv
|
||||
"""
|
||||
import argparse
|
||||
import collections
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
REPO = os.path.dirname(
|
||||
os.path.dirname(HERE)
|
||||
)
|
||||
DEFAULT_OUT = os.path.join(
|
||||
REPO, "wizard-work", "ledger",
|
||||
"2026-11-03-tracked-directory-census.csv",
|
||||
)
|
||||
|
||||
|
||||
def tracked_files(repo):
|
||||
"""Return the list of paths recorded by git ls-files at HEAD."""
|
||||
proc = subprocess.run(
|
||||
["git", "ls-files"],
|
||||
cwd=repo,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
return proc.stdout.splitlines()
|
||||
|
||||
|
||||
def directory_of(path):
|
||||
d = os.path.dirname(path)
|
||||
return d if d else "(root)"
|
||||
|
||||
|
||||
def build_rows(repo):
|
||||
counts = collections.Counter()
|
||||
for rel in tracked_files(repo):
|
||||
rel = rel.rstrip("\r")
|
||||
if not rel:
|
||||
continue
|
||||
counts[directory_of(rel)] += 1
|
||||
total = sum(counts.values())
|
||||
ranked = sorted(counts.items(), key=lambda kv: (-kv[1], kv[0]))
|
||||
rows = []
|
||||
for i, (directory, count) in enumerate(ranked, 1):
|
||||
rows.append((i, directory, count, total))
|
||||
return rows, total
|
||||
|
||||
|
||||
def write_csv(path, rows, total):
|
||||
with open(path, "w", encoding="utf-8", newline="") as f:
|
||||
f.write("rank,directory,tracked_count,total\n")
|
||||
for i, directory, count, total in rows:
|
||||
f.write(f"{i},{directory},{count},{total}\n")
|
||||
|
||||
|
||||
def main(argv=None):
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument(
|
||||
"--out",
|
||||
default=DEFAULT_OUT,
|
||||
help=f"write CSV to PATH (default: {DEFAULT_OUT})",
|
||||
)
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
rows, total = build_rows(REPO)
|
||||
write_csv(args.out, rows, total)
|
||||
print(f"wrote {args.out} ({len(rows)} rows, total tracked files = {total})")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Independent verifier for the tracked-directory census.
|
||||
|
||||
Re-derives the ranked table from the LIVE git tree (`git ls-files` at HEAD) with
|
||||
a standalone loop -- it never imports
|
||||
`extract_tracked_directory_census` -- and asserts the committed
|
||||
`2026-11-03-tracked-directory-census.csv` byte-matches.
|
||||
|
||||
Exit code 0 = artifact matches re-derivation; 1 = mismatch; 2 = misuse.
|
||||
"""
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
REPO = os.path.dirname(os.path.dirname(HERE))
|
||||
ART = os.path.join(REPO, "wizard-work", "ledger",
|
||||
"2026-11-03-tracked-directory-census.csv")
|
||||
|
||||
|
||||
def directory_of(path):
|
||||
d = os.path.dirname(path)
|
||||
return d if d else "(root)"
|
||||
|
||||
|
||||
def re_derivation():
|
||||
counts = {}
|
||||
for rel in subprocess.run(
|
||||
["git", "ls-files"], cwd=REPO, check=True,
|
||||
capture_output=True, text=True,
|
||||
).stdout.splitlines():
|
||||
rel = rel.rstrip("\r")
|
||||
if not rel:
|
||||
continue
|
||||
counts[directory_of(rel)] = counts.get(directory_of(rel), 0) + 1
|
||||
total = sum(counts.values())
|
||||
ranked = sorted(counts.items(), key=lambda kv: (-kv[1], kv[0]))
|
||||
rows = []
|
||||
for i, (directory, count) in enumerate(ranked, 1):
|
||||
rows.append([str(i), directory, str(count), str(total)])
|
||||
return ["rank", "directory", "tracked_count", "total"], rows
|
||||
|
||||
|
||||
def read_artifact():
|
||||
with open(ART, encoding="utf-8") as f:
|
||||
lines = [ln.rstrip("\n") for ln in f]
|
||||
header = lines[0].split(",")
|
||||
rows = [ln.split(",") for ln in lines[1:]]
|
||||
return header, rows
|
||||
|
||||
|
||||
def main():
|
||||
header, rows = read_artifact()
|
||||
expected_header, expected_rows = re_derivation()
|
||||
if header != expected_header:
|
||||
print("FAIL: header artifact=%r expected=%r"
|
||||
% (header, expected_header))
|
||||
return 1
|
||||
if len(rows) != len(expected_rows):
|
||||
print("FAIL: row count artifact=%d expected=%d"
|
||||
% (len(rows), len(expected_rows)))
|
||||
return 1
|
||||
for i, (exp, act) in enumerate(zip(expected_rows, rows), 1):
|
||||
if act != exp:
|
||||
print("FAIL: row %d artifact=%r expected=%r"
|
||||
% (i, act, exp))
|
||||
return 1
|
||||
print("OK: %d rows byte-match re-derivation from git ls-files at HEAD; "
|
||||
"header=%r" % (len(rows), header))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"tool": "verify_classify_messages.py",
|
||||
"artifact": "wizard-work/sol/classify-messages.json",
|
||||
"verdict": "PASS",
|
||||
"messages_rederived": 5,
|
||||
"total_input_messages": 5,
|
||||
"counts": {
|
||||
"ops": 2,
|
||||
"finance": 1,
|
||||
"person": 1,
|
||||
"other": 1
|
||||
},
|
||||
"lanes": [
|
||||
"ops",
|
||||
"finance",
|
||||
"person",
|
||||
"other"
|
||||
],
|
||||
"items": [
|
||||
{"file": "01-cron-breach.txt", "lane": "ops"},
|
||||
{"file": "02-invoice.txt", "lane": "finance"},
|
||||
{"file": "03-deploy.txt", "lane": "ops"},
|
||||
{"file": "04-meeting.txt", "lane": "person"},
|
||||
{"file": "05-market.txt", "lane": "other"}
|
||||
],
|
||||
"method": "Independently re-derived every inbox message from the raw files by the triage rule (ops/finance/person keyword scan, default 'other'), without importing the generator. Exit code 0."
|
||||
}
|
||||
Reference in new issue
Block a user