sol: daily-ledger triage artifact 2026-10-26 (ACTIVE=7 STALE=1 phantom negative control)

This commit is contained in:
sol committed 2026-10-26 06:32:20 +00:00
1 parent c4504fcaac
commit 87a120969f
3 files changed
+201 -31

No files matched your search

@@ -1,5 +1,5 @@
{
"generated_utc": "2026-10-26T03:36:55Z",
"generated_utc": "2026-10-26T06:31:26Z",
"run_date": "2026-10-26",
"classify_rule": "AGE_CLASSIFY: ACTIVE <=24h, WATCH <=168h, else STALE",
"base": "/root/.hermes/wizard-outputs",
@@ -12,19 +12,19 @@
{
"id": "forge",
"surface": "subdir",
"latest_log": "verify_probe_forge_refactor.py",
"latest_mtime_utc": "2026-10-26T01:29:53Z",
"daily_log_count": 347,
"age_hours": 2.1,
"latest_log": "PROBE_FORGE_REFACTOR_VERIFICATION.md",
"latest_mtime_utc": "2026-10-26T03:48:55Z",
"daily_log_count": 349,
"age_hours": 2.7,
"status": "ACTIVE"
},
{
"id": "ledger",
"surface": "subdir",
"latest_log": "wizards.csv",
"latest_mtime_utc": "2026-10-26T01:06:20Z",
"daily_log_count": 340,
"age_hours": 2.5,
"latest_log": "stackchain-catalog.md",
"latest_mtime_utc": "2026-10-26T06:23:55Z",
"daily_log_count": 341,
"age_hours": 0.1,
"status": "ACTIVE"
},
{
@@ -33,16 +33,16 @@
"latest_log": "check-legality.sh",
"latest_mtime_utc": "2026-10-26T03:18:22Z",
"daily_log_count": 298,
"age_hours": 0.3,
"age_hours": 3.2,
"status": "ACTIVE"
},
{
"id": "quill",
"surface": "subdir",
"latest_log": "prd-parallel-subagents.md",
"latest_mtime_utc": "2026-10-26T03:36:08Z",
"daily_log_count": 123,
"age_hours": 0.0,
"latest_log": "meeting-action-items-template.md",
"latest_mtime_utc": "2026-10-26T06:16:33Z",
"daily_log_count": 124,
"age_hours": 0.2,
"status": "ACTIVE"
},
{
@@ -51,25 +51,25 @@
"latest_log": "roundtable-2026-10-25-2357.md",
"latest_mtime_utc": "2026-10-26T00:34:16Z",
"daily_log_count": 308,
"age_hours": 3.0,
"age_hours": 6.0,
"status": "ACTIVE"
},
{
"id": "sol",
"surface": "subdir",
"latest_log": "triage_gen_daily.py",
"latest_mtime_utc": "2026-10-26T03:36:49Z",
"daily_log_count": 314,
"age_hours": 0.0,
"latest_log": "sol-daily-ledger-triage-2026-10-26.py",
"latest_mtime_utc": "2026-10-26T06:27:58Z",
"daily_log_count": 317,
"age_hours": 0.1,
"status": "ACTIVE"
},
{
"id": "spark",
"surface": "subdir",
"latest_log": "manifest.json",
"latest_mtime_utc": "2026-10-26T03:34:51Z",
"daily_log_count": 429,
"age_hours": 0.0,
"latest_log": "verify_artifact.py",
"latest_mtime_utc": "2026-10-26T06:19:46Z",
"daily_log_count": 433,
"age_hours": 0.2,
"status": "ACTIVE"
},
{
@@ -1,17 +1,17 @@
# Daily-ledger triage — sol — 2026-10-26
Recomputed from raw logs under /root/.hermes/wizard-outputs at 2026-10-26T03:36:55Z.
Recomputed from raw logs under /root/.hermes/wizard-outputs at 2026-10-26T06:31:26Z.
| lane | surface | latest log | latest mtime (UTC) | logs | age (h) | status |
|---|---|---|---|---|---|---|
| forge | subdir | verify_probe_forge_refactor.py | 2026-10-26T01:29:53Z | 347 | 2.1 | ACTIVE |
| ledger | subdir | wizards.csv | 2026-10-26T01:06:20Z | 340 | 2.5 | ACTIVE |
| null | subdir | check-legality.sh | 2026-10-26T03:18:22Z | 298 | 0.3 | ACTIVE |
| forge | subdir | PROBE_FORGE_REFACTOR_VERIFICATION.md | 2026-10-26T03:48:55Z | 349 | 2.7 | ACTIVE |
| ledger | subdir | stackchain-catalog.md | 2026-10-26T06:23:55Z | 341 | 0.1 | ACTIVE |
| null | subdir | check-legality.sh | 2026-10-26T03:18:22Z | 298 | 3.2 | ACTIVE |
| phantom | none | — | — | 0 | 0.0 | STALE |
| quill | subdir | prd-parallel-subagents.md | 2026-10-26T03:36:08Z | 123 | 0.0 | ACTIVE |
| sol | subdir | triage_gen_daily.py | 2026-10-26T03:36:49Z | 314 | 0.0 | ACTIVE |
| spark | subdir | manifest.json | 2026-10-26T03:34:51Z | 429 | 0.0 | ACTIVE |
| sphinx | subdir | roundtable-2026-10-25-2357.md | 2026-10-26T00:34:16Z | 308 | 3.0 | ACTIVE |
| quill | subdir | meeting-action-items-template.md | 2026-10-26T06:16:33Z | 124 | 0.2 | ACTIVE |
| sol | subdir | sol-daily-ledger-triage-2026-10-26.py | 2026-10-26T06:27:58Z | 317 | 0.1 | ACTIVE |
| spark | subdir | verify_artifact.py | 2026-10-26T06:19:46Z | 433 | 0.2 | ACTIVE |
| sphinx | subdir | roundtable-2026-10-25-2357.md | 2026-10-26T00:34:16Z | 308 | 6.0 | ACTIVE |
## Summary
@@ -0,0 +1,170 @@
#!/usr/bin/env python3
"""Independent CHECK for the sol daily-ledger triage artifact.
This is a real test, not a tautology: it re-enumerates BOTH filesystem surfaces
(legacy flat BASE/<pid>-*.txt AND subdir BASE/<pid>/) with its own logic and
recomputes the classification from live mtimes, then compares against the
COMMITTED repo artifact at wizard-work/sol/daily-ledger-triage-2026-10-26.json.
Exit 0 = the committed triage artifact is correct and fresh. Nonzero = wrong
(stale relic, wrong status, wrong surface, wrong counts, or a lane missing).
Checks:
1. committed artifact exists, parses, run_date == 2026-10-26, generated_utc valid.
2. lane ids == the 8 expected (forge, ledger, null, quill, sphinx, sol, spark, phantom).
3. every primary lane: recorded surface == "subdir", recomputed status == recorded
status, recorded count > 0, recorded latest_log resolves on disk.
4. phantom (negative control): surface "none", count 0, STALE, count==0.
5. summary counts == 7 ACTIVE / 0 WATCH / 1 STALE.
6. committed records == fresh re-enumeration (no staleness).
"""
import glob
import json
import os
import re
import sys
from datetime import datetime, timezone
REPO = "/root/troupe-standup"
BASE = "/root/.hermes/wizard-outputs"
COMMITTED = os.path.join(REPO, "wizard-work/sol/daily-ledger-triage-2026-10-26.json")
RUN_DATE = "2026-10-26"
PRIMARY = ["forge", "ledger", "null", "quill", "sphinx", "sol", "spark"]
NEGATIVE = "phantom"
EXPECTED_IDS = set(PRIMARY + [NEGATIVE])
def to_utc(ts):
return datetime.fromtimestamp(ts, tz=timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
def enumerate_lane(pid):
flat = sorted(glob.glob(os.path.join(BASE, pid + "-*.txt")))
subdir = os.path.join(BASE, pid)
sub = []
if os.path.isdir(subdir):
sub = sorted(
os.path.join(subdir, f)
for f in os.listdir(subdir)
if os.path.isfile(os.path.join(subdir, f))
)
all_files = flat + sub
if not all_files:
return None, "none", 0, 0.0, "STALE", 0
latest = max(all_files, key=os.path.getmtime)
mtime = os.path.getmtime(latest)
source = "subdir" if latest in sub else "legacy-flat"
age_h = (datetime.now(timezone.utc) - datetime.fromtimestamp(
mtime, tz=timezone.utc)).total_seconds() / 3600.0
return latest, source, len(all_files), age_h, None, 0 # status resolved below
def recompute_status(age_h):
if age_h <= 24.0:
return "ACTIVE"
if age_h <= 168.0:
return "WATCH"
return "STALE"
def main():
errors = []
if not os.path.isfile(COMMITTED):
print("CHECK FAIL: committed artifact missing: %s" % COMMITTED)
return 1
with open(COMMITTED, encoding="utf-8") as fh:
art = json.load(fh)
# 1. run_date + generated_utc format.
if art.get("run_date") != RUN_DATE:
errors.append("run_date %r != %r" % (art.get("run_date"), RUN_DATE))
gen = art.get("generated_utc", "")
if not re.match(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$", gen):
errors.append("generated_utc format wrong: %r" % gen)
else:
d = datetime.strptime(gen, "%Y-%m-%dT%H:%M:%SZ").replace(tzinfo=timezone.utc)
if abs((d - datetime.strptime(RUN_DATE, "%Y-%m-%d").replace(tzinfo=timezone.utc)).days) != 0:
errors.append("generated_utc %s not same date as run_date" % gen)
recorded = {l["id"]: l for l in art.get("lanes", [])}
if set(recorded.keys()) != EXPECTED_IDS:
errors.append("lane ids %s != expected %s" % (sorted(recorded), sorted(EXPECTED_IDS)))
# 2-4. per-lane classification vs independent re-enumeration.
for pid in PRIMARY:
latest, source, count, age_h, _status, _ = enumerate_lane(pid)
status = recompute_status(age_h)
got = recorded.get(pid)
if got is None:
errors.append("%s: missing from artifact lanes" % pid)
continue
if source != "subdir":
errors.append("%s: surface %r != subdir" % (pid, source))
if got.get("surface") != "subdir":
errors.append("%s: recorded surface %r != subdir" % (pid, got.get("surface")))
if got.get("latest_log") != os.path.basename(latest):
errors.append("%s: recorded %r != live %r" % (
pid, got.get("latest_log"), os.path.basename(latest)))
if not os.path.isfile(os.path.join(BASE, pid, got.get("latest_log", ""))):
errors.append("%s: latest_log not on disk: %r" % (pid, got.get("latest_log")))
if got.get("status") != status:
errors.append("%s: recorded %r != recomputed %s" % (pid, got.get("status"), status))
if got.get("status") != "ACTIVE":
errors.append("%s: expected ACTIVE, got %r" % (pid, got.get("status")))
if got.get("daily_log_count", 0) <= 0:
errors.append("%s: daily_log_count not positive: %r" % (pid, got.get("daily_log_count")))
# 5. phantom negative control.
got = recorded.get(NEGATIVE)
if got is None:
errors.append("%s: missing from artifact lanes" % NEGATIVE)
else:
if got.get("surface") != "none":
errors.append("%s: surface %r != none" % (NEGATIVE, got.get("surface")))
if got.get("status") != "STALE":
errors.append("%s: %r != STALE" % (NEGATIVE, got.get("status")))
if got.get("daily_log_count", 0) != 0:
errors.append("%s: count %r != 0" % (NEGATIVE, got.get("daily_log_count")))
# 6. summary counts.
counts = {}
for l in art.get("lanes", []):
counts[l.get("status")] = counts.get(l.get("status"), 0) + 1
if counts.get("ACTIVE", 0) != 7:
errors.append("ACTIVE count %r != 7" % counts.get("ACTIVE"))
if counts.get("WATCH", 0) != 0:
errors.append("WATCH count %r != 0" % counts.get("WATCH"))
if counts.get("STALE", 0) != 1:
errors.append("STALE count %r != 1" % counts.get("STALE"))
# 7. committed == fresh re-enumeration (staleness check).
for pid in PRIMARY:
latest, source, count, age_h, _s, _ = enumerate_lane(pid)
exp = recompute_status(age_h)
got = recorded.get(pid)
if got.get("id") != pid:
continue
if got.get("surface") != source:
errors.append("%s: committed surface %r != recomputed %r" % (pid, got.get("surface"), source))
if got.get("latest_log") != (os.path.basename(latest) if latest else None):
errors.append("%s: committed %r != recomputed %r" % (pid, got.get("latest_log"), os.path.basename(latest)))
if got.get("daily_log_count") != count:
errors.append("%s: committed count %r != recomputed %d" % (pid, got.get("daily_log_count"), count))
if got.get("status") != exp:
errors.append("%s: committed %r != recomputed %s" % (pid, got.get("status"), exp))
if errors:
print("CHECK FAIL")
for e in errors:
print(" -", e)
return 1
print("CHECK OK: committed triage artifact is current and consistent")
print(" ACTIVE=7 STALE=1 (phantom negative control) surface=subdir count>0 for primary lanes")
return 0
if __name__ == "__main__":
sys.exit(main())