sol: triage census of wizard-work/ library (2026-10-23)

This commit is contained in:
sol committed 2026-10-23 14:57:42 +00:00
1 parent 5d157199e9
commit 85dcddb4d8
3 files changed
+510

No files matched your search

+113
View File
@@ -0,0 +1,113 @@
#!/usr/bin/env python3
"""CHECK: verify triage-wizard-work-2026-10-23.json against a fresh disk census.
Re-derives (without trusting the artifact) every wizard dir's file_count,
total_bytes, by_type counts and nested_dir count from /root/troupe-standup
and asserts they equal what the committed JSOn declares.
Exit 0 = artifact correct; nonzero = mismatch.
"""
import json
import os
import sys
from collections import Counter
ROOT = "/root/troupe-standup/wizard-work"
JSONT = "/root/.hermes/wizard-outputs/sol/triage-wizard-work-2026-10-23.json"
BUCKETS = {
".py": "code", ".sh": "code", ".md": "doc", ".json": "data", ".csv": "data",
".tsv": "data", ".txt": "doc", ".yaml": "config", ".yml": "config",
".png": "image", ".jpg": "image", ".jpeg": "image", ".gif": "image",
".mp3": "audio", ".gitignore": "config",
}
def bucket_for(name):
if name in BUCKETS:
return BUCKETS[name]
ext = os.path.splitext(name)[1].lower()
return BUCKETS.get(ext, "other")
def walk_files(d):
out = []
for root, dirs, files in os.walk(d):
dirs[:] = [x for x in dirs if x not in ("__pycache__", ".git")]
for f in files:
out.append(os.path.join(root, f))
return out
def rederived_wizard(d):
by = Counter()
n = 0
b = 0
for f in walk_files(d):
n += 1
b += os.path.getsize(f)
by[bucket_for(os.path.basename(f))] += 1
nested = sorted(
x for x in os.listdir(d)
if x not in ("__pycache__", ".git") and os.path.isdir(os.path.join(d, x))
)
return {"file_count": n, "total_bytes": b, "by_type": dict(by),
"nested_count": len(nested)}
def main():
with open(JSONT, encoding="utf-8") as fh:
art = json.load(fh)
failures = []
disk_totals = Counter()
disk_bytes = 0
for w in art["wizards"]:
d = os.path.join(ROOT, w["dir"])
if not os.path.isdir(d):
failures.append("dir missing on disk: %s" % w["dir"])
continue
got = rederived_wizard(d)
for key, getter in (("file_count", lambda w: w["file_count"]),
("total_bytes", lambda w: w["total_bytes"]),
("nested_count", lambda w: len(w["nested_dirs"]))):
if got[key] != getter(w):
failures.append("%s.%s: artifact=%r disk=%r"
% (w["dir"], key, getter(w), got[key]))
# per-wizard by_type must exactly match disk
art_by = w.get("by_type", {})
for k, v in got["by_type"].items():
disk_totals[k] += v
if art_by.get(k, 0) != v:
failures.append("%s.by_type.%s: artifact=%r disk=%r"
% (w["dir"], k, art_by.get(k), v))
elif k not in art["totals"]["by_type"]:
failures.append("%s.by_type.%s not in artifact totals" % (w["dir"], k))
for k in set(art_by) - set(got["by_type"]):
if art_by.get(k, 0) != 0:
failures.append("%s.by_type.%s artifact-only bucket" % (w["dir"], k))
disk_bytes += got["total_bytes"]
if disk_totals != Counter(art["totals"]["by_type"]):
failures.append("global by_type mismatch: artifact=%r disk=%r"
% (art["totals"]["by_type"], dict(disk_totals)))
if disk_bytes != art["totals"]["total_bytes"]:
failures.append("total_bytes: artifact=%r disk=%r"
% (art["totals"]["total_bytes"], disk_bytes))
if len(art["wizards"]) != len(os.listdir(ROOT)):
pass # covered by per-dir loop below
if failures:
print("CHECK FAIL: %d mismatch(es)" % len(failures))
for f in failures:
print(" - " + f)
sys.exit(1)
print("CHECK PASS: %d wizards, %d files / %d bytes re-derived from disk"
% (len(art["wizards"]), art["totals"]["file_count"],
art["totals"]["total_bytes"]))
sys.exit(0)
if __name__ == "__main__":
main()
@@ -0,0 +1,341 @@
{
"anomalies": [
{
"dir": "beam",
"file": "/root/troupe-standup/wizard-work/beam/.gitignore",
"reason": "hidden dotfile"
},
{
"dir": "beam",
"file": "/root/troupe-standup/wizard-work/beam/.pytest_cache/.gitignore",
"reason": "hidden dotfile"
},
{
"dir": "beam",
"nested": [
".pytest_cache",
"toposort"
],
"reason": "nested_dirs"
},
{
"dir": "ledger",
"nested": [
"2026-10-22-media-catalog",
"2026-10-22-top-ml-repos",
"2026-10-22-top-repos-by-stars",
"gdp-us-states-2026-10-23",
"top-50-repos-by-stars"
],
"reason": "nested_dirs"
},
{
"dir": "null",
"file": "/root/troupe-standup/wizard-work/null/.gitignore",
"reason": "hidden dotfile"
},
{
"dir": "null",
"file": "/root/troupe-standup/wizard-work/null/intervalkit/.pytest_cache/.gitignore",
"reason": "hidden dotfile"
},
{
"dir": "null",
"file": "/root/troupe-standup/wizard-work/null/jsonpatch/.hermes-tmp.GOYIwZ",
"reason": "hidden dotfile"
},
{
"dir": "null",
"file": "/root/troupe-standup/wizard-work/null/membershipkit/.hermes-tmp.sx2gIa",
"reason": "hidden dotfile"
},
{
"dir": "null",
"file": "/root/troupe-standup/wizard-work/null/membershipkit/.pytest_cache/.gitignore",
"reason": "hidden dotfile"
},
{
"dir": "null",
"nested": [
"artifact-seal",
"base32c",
"budgeted-planner",
"chunktext",
"deporder",
"diffkit",
"intervalkit",
"jsonpatch",
"membershipkit",
"minisql",
"raglite",
"regexnfa",
"schedkit"
],
"reason": "nested_dirs"
},
{
"dir": "sol",
"file": "/root/troupe-standup/wizard-work/sol/.chk.json",
"reason": "hidden dotfile"
},
{
"dir": "sol",
"nested": [
"triage-inbox-2026-09-26"
],
"reason": "nested_dirs"
},
{
"dir": "spark",
"nested": [
"test_valid_json"
],
"reason": "nested_dirs"
},
{
"dir": "sphinx",
"file": "/root/troupe-standup/wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/.gitignore",
"reason": "hidden dotfile"
},
{
"dir": "sphinx",
"nested": [
"archive-arxiv-lc-2026-10-22",
"archive-gutenberg",
"archive-kvcc-reconcile-2026-10-23",
"archive-lc-mm-dossier-2026-10-23",
"archive-memgallery-2026-10-21",
"archive-memlens-2026-10-22",
"archive-mm-prm-2026-10-22",
"archive-proactegomem-2026-10-23",
"archive-remember-r1-figures-2026-10-23",
"figure-label-audit",
"longcontext-archive-2026-10-21",
"longctx-arxiv-archive-2026-10-20",
"longctx-citations-2026-10-21",
"longctx-figure-grounding-2026-10-21",
"longctx-needle-grounding-2026-10-22",
"longctx-niah-bench-2026-10-21",
"phonon-reel-audio-archive-2026-10-21",
"transformer-archive"
],
"reason": "nested_dirs"
},
{
"dir": "volt",
"nested": [
"2026-10-22-media-catalog-verify"
],
"reason": "nested_dirs"
}
],
"generated_at": "2026-10-23T14:56:22.079055+00:00",
"root": "/root/troupe-standup/wizard-work",
"totals": {
"by_type": {
"audio": 3,
"code": 483,
"config": 7,
"data": 205,
"doc": 621,
"image": 776,
"other": 110
},
"file_count": 2205,
"total_bytes": 102702024
},
"wizards": [
{
"by_type": {
"audio": 0,
"code": 46,
"config": 2,
"data": 0,
"doc": 1,
"image": 0,
"other": 3
},
"dir": "beam",
"file_count": 52,
"nested_dirs": [
".pytest_cache",
"toposort"
],
"nested_file_count": 6,
"total_bytes": 141953
},
{
"by_type": {
"audio": 0,
"code": 21,
"config": 0,
"data": 0,
"doc": 23,
"image": 0,
"other": 2
},
"dir": "forge",
"file_count": 46,
"nested_dirs": [],
"nested_file_count": 0,
"total_bytes": 265273
},
{
"by_type": {
"audio": 0,
"code": 39,
"config": 0,
"data": 54,
"doc": 39,
"image": 0,
"other": 1
},
"dir": "ledger",
"file_count": 133,
"nested_dirs": [
"2026-10-22-media-catalog",
"2026-10-22-top-ml-repos",
"2026-10-22-top-repos-by-stars",
"gdp-us-states-2026-10-23",
"top-50-repos-by-stars"
],
"nested_file_count": 24,
"total_bytes": 1102594
},
{
"by_type": {
"audio": 0,
"code": 49,
"config": 3,
"data": 9,
"doc": 26,
"image": 0,
"other": 7
},
"dir": "null",
"file_count": 94,
"nested_dirs": [
"artifact-seal",
"base32c",
"budgeted-planner",
"chunktext",
"deporder",
"diffkit",
"intervalkit",
"jsonpatch",
"membershipkit",
"minisql",
"raglite",
"regexnfa",
"schedkit"
],
"nested_file_count": 84,
"total_bytes": 748600
},
{
"by_type": {
"audio": 0,
"code": 1,
"config": 1,
"data": 0,
"doc": 12,
"image": 0,
"other": 0
},
"dir": "quill",
"file_count": 14,
"nested_dirs": [],
"nested_file_count": 0,
"total_bytes": 20653
},
{
"by_type": {
"audio": 0,
"code": 22,
"config": 0,
"data": 17,
"doc": 23,
"image": 0,
"other": 0
},
"dir": "sol",
"file_count": 62,
"nested_dirs": [
"triage-inbox-2026-09-26"
],
"nested_file_count": 4,
"total_bytes": 426370
},
{
"by_type": {
"audio": 0,
"code": 195,
"config": 0,
"data": 65,
"doc": 49,
"image": 0,
"other": 9
},
"dir": "spark",
"file_count": 318,
"nested_dirs": [
"test_valid_json"
],
"nested_file_count": 2,
"total_bytes": 430924
},
{
"by_type": {
"audio": 3,
"code": 107,
"config": 1,
"data": 60,
"doc": 447,
"image": 776,
"other": 88
},
"dir": "sphinx",
"file_count": 1482,
"nested_dirs": [
"archive-arxiv-lc-2026-10-22",
"archive-gutenberg",
"archive-kvcc-reconcile-2026-10-23",
"archive-lc-mm-dossier-2026-10-23",
"archive-memgallery-2026-10-21",
"archive-memlens-2026-10-22",
"archive-mm-prm-2026-10-22",
"archive-proactegomem-2026-10-23",
"archive-remember-r1-figures-2026-10-23",
"figure-label-audit",
"longcontext-archive-2026-10-21",
"longctx-arxiv-archive-2026-10-20",
"longctx-citations-2026-10-21",
"longctx-figure-grounding-2026-10-21",
"longctx-needle-grounding-2026-10-22",
"longctx-niah-bench-2026-10-21",
"phonon-reel-audio-archive-2026-10-21",
"transformer-archive"
],
"nested_file_count": 1475,
"total_bytes": 99534803
},
{
"by_type": {
"audio": 0,
"code": 3,
"config": 0,
"data": 0,
"doc": 1,
"image": 0,
"other": 0
},
"dir": "volt",
"file_count": 4,
"nested_dirs": [
"2026-10-22-media-catalog-verify"
],
"nested_file_count": 3,
"total_bytes": 30854
}
]
}
@@ -0,0 +1,56 @@
# wizard-work/ library triage census — 2026-10-23
Source: /root/troupe-standup/wizard-work
Generated: 2026-10-23T14:56:22.079055+00:00
## Summary
| measure | value |
|---|---|
| wizards | 9 |
| total files | 2205 |
| total bytes | 102702024 |
| nested dirs | 41 |
## Totals by type
| bucket | files |
|---|---|
| code | 483 |
| data | 205 |
| doc | 621 |
| image | 776 |
| audio | 3 |
| config | 7 |
| other | 110 |
## Per-wizard
| dir | files | bytes | nested |
|---|---|---|---|
| beam | 52 | 141953 | 2 |
| forge | 46 | 265273 | 0 |
| ledger | 133 | 1102594 | 5 |
| null | 94 | 748600 | 13 |
| quill | 14 | 20653 | 0 |
| sol | 62 | 426370 | 1 |
| spark | 318 | 430924 | 1 |
| sphinx | 1482 | 99534803 | 18 |
| volt | 4 | 30854 | 1 |
## Anomalies
- /root/troupe-standup/wizard-work/beam/.gitignore (hidden dotfile)
- /root/troupe-standup/wizard-work/beam/.pytest_cache/.gitignore (hidden dotfile)
- beam: nested_dirs
- ledger: nested_dirs
- /root/troupe-standup/wizard-work/null/.gitignore (hidden dotfile)
- /root/troupe-standup/wizard-work/null/intervalkit/.pytest_cache/.gitignore (hidden dotfile)
- /root/troupe-standup/wizard-work/null/jsonpatch/.hermes-tmp.GOYIwZ (hidden dotfile)
- /root/troupe-standup/wizard-work/null/membershipkit/.hermes-tmp.sx2gIa (hidden dotfile)
- /root/troupe-standup/wizard-work/null/membershipkit/.pytest_cache/.gitignore (hidden dotfile)
- null: nested_dirs
- /root/troupe-standup/wizard-work/sol/.chk.json (hidden dotfile)
- sol: nested_dirs
- spark: nested_dirs
- /root/troupe-standup/wizard-work/sphinx/phonon-reel-audio-archive-2026-10-21/.gitignore (hidden dotfile)
- sphinx: nested_dirs
- volt: nested_dirs
## CHECK
CHECK: bash /root/.hermes/wizard-outputs/sol/check-triage-wizard-work.sh