JavaScript port of NetHack 3.7
“You gaze into the Oracle’s crystal ball…”
This directory contains the Test Statistics Dashboard - a visual interface for tracking test health over time.
Live Dashboard: https://davidbau.github.io/mazesofmenace/oracle/
Local: Open index.html in your browser
index.html - The Dashboard“A blessed scroll of Dashboard UI”
Interactive web interface showing:
Open in browser to view test history.
dashboard.js - Visualization Logic“A wand of Visualization (0:∞)”
JavaScript that:
results.jsonl via fetch APIdashboard.css - Styling“A cloak of Styling [+0]”
CSS for:
rebuild.sh - Sync Script“A scroll of Rebuild”
Standalone script that fetches git notes from remote, rebuilds results.jsonl, and commits+pushes if there are changes. Run periodically or manually.
results.jsonl - Test History“The Book of Testing (one entry per commit)”
Newline-delimited JSON (JSONL) format:
Data Source: Rebuilt from refs/notes/test-results by oracle/rebuild.sh
Example line:
{"commit":"abc123","date":"2026-02-11T10:30:00Z","stats":{"total":631,"pass":137,"fail":494},"regression":false}
schema.json - Log Format Documentation“The Sacred Format of Test Logs”
JSON Schema defining the structure of test log entries. Includes:
Use this to understand or validate the log format.
Git Notes (authoritative)
refs/notes/test-results
↓
oracle/rebuild.sh
↓
results.jsonl (mirror)
↓
Dashboard (loads via fetch)
Process:
oracle/rebuild.sh fetches notes, rebuilds results.jsonl, commits and pushes if changedresults.jsonl and visualizesRun oracle/rebuild.sh periodically or manually to keep the dashboard up-to-date.
Once pushed to GitHub:
https://davidbau.github.io/mazesofmenace/oracle/
Requirements:
_config.yml includes oracle directoryresults.jsonl# Option 1: Direct file
open oracle/index.html
# Option 2: Local server (avoids CORS issues)
cd oracle
python3 -m http.server 8000
# Open http://localhost:8000
Why JSONL?
Example:
{"commit":"abc123","date":"2026-02-11T09:00:00Z","stats":{"pass":100,"fail":10}}
{"commit":"def456","date":"2026-02-11T10:00:00Z","stats":{"pass":105,"fail":5}}
{"commit":"ghi789","date":"2026-02-11T11:00:00Z","stats":{"pass":110,"fail":0}}
Each line is independent. Load all lines, parse each as JSON, sort by date.
# Rebuild results.jsonl from all git notes, commit and push if changed
oracle/rebuild.sh
This fetches notes from remote, merges with local notes, rebuilds the JSONL file, and commits/pushes if anything changed.
# View all test notes
git notes --ref=test-results list
# Show specific note
git notes --ref=test-results show abc123
# View last 5 test results
tail -5 oracle/results.jsonl | jq '.'
# Check current pass rate
jq -r '.stats.pass' oracle/results.jsonl | tail -1
# Count total entries
wc -l oracle/results.jsonl
Edit dashboard.js:
results.jsonlrenderCharts() functionEdit dashboard.css:
:root variables define colors.dark-theme class for dark modedashboard.js (Chart.js config)schema.json with new fielddashboard.js to display it# Check if results.jsonl exists
ls -la oracle/results.jsonl
# Validate JSONL format
while IFS= read -r line; do
echo "$line" | jq empty || echo "Invalid line";
done < oracle/results.jsonl
# Check if file is empty
wc -l oracle/results.jsonl
Common causes:
results.jsonlFix:
results.jsonl loads (Network tab)# Verify _config.yml includes oracle
grep -A 5 "include:" _config.yml
# Force rebuild by pushing a change
git commit --allow-empty -m "Trigger Pages rebuild"
git push
GitHub Pages can take 1-2 minutes to update after push.
“The crystal ball shows all. Your tests’ past, present, and future.”
May your pass rate ever increase!