← back to AbramsEgo
build-queue/failed/27-raise-the-bar-audit.md
38 lines
# Task 27 — Raise-the-bar audit (SPEC is met; now exceed it)
The 26-replenish audit confirmed 8/8 SPEC panels live via curl. Steve says KEEP GOING —
so this audit raises the bar past curl-level SPEC-minimum. Audit the LIVE :9773 instance
(Basic Auth admin:DW2024!) on THREE deeper dimensions the previous audits never touched:
## 1. DOM wiring completeness (the API is proven; the UI is not)
The replenishers verified /api/data fields exist — NOT that public/index.html actually
renders every one of them. Cross-check: for each top-level key in /api/data (activity,
canaries, cost, crons, kamatera, localFleet, officers, pnl, revenue, sessions, system,
usage, usageSummary, wins), grep public/index.html for the render path. Any field fetched
but never rendered = dead data (gap). Any panel rendering a field the API no longer sends
= dead UI (gap).
## 2. Failure-mode drills (graceful degradation)
Simulate each data source failing and confirm the panel degrades visibly, never blank/dead:
- temporarily move data/local-fleet.json aside → does Fleet·Local show last-good + note?
- point the canary scan at an empty dir (env or code inspection is fine) → honest empty state?
- cost-ledger.jsonl missing → P&L shows $0 with a "no ledger" note, not NaN?
Restore everything after. Code-inspection is acceptable where simulation risks the live
instance — but say which method you used per drill.
## 3. Leave a regression net behind
Create scripts/smoke.sh — a fast (<10s) no-deps check that curls /api/data on the running
instance and asserts: HTTP 200 with auth, all 14 top-level keys present, crons length > 100,
cost.byProvider length >= 5, canaries verdicts all non-null, localFleet.error == null.
Exit non-zero with a named failing assertion. Run it, confirm green, commit it. Future
replenishers should run scripts/smoke.sh FIRST instead of re-deriving curl checks.
## Rules (unchanged)
- Enqueue at most 3 surgical (<15-min) tasks starting at NN=28 for REAL gaps only, then
re-queue a replenisher (NN after those) that continues at THIS raised bar.
- If dimensions 1+2 are genuinely clean, still ship dimension 3 (smoke.sh is mandatory),
commit, and rest — do NOT re-queue a replenisher just to have one.
- pm2 restart abramsego to test; NEVER a second node on 9773. Commit after each success
(author steve@designerwallcoverings.com). Gated actions → draft only.
- Commit message: `chore: raise-the-bar audit (fable) — <verdict>`