Repository navigation
progress_dashboard: handle null comment authors, require --run-tests for --tests, and catch I/O and history errors (DASH-HARDEN-CLI) - #625
Conversation
…for --tests, and catch I/O and history errors (DASH-HARDEN-CLI)
|
Independent Windows 10 check at The new history schema check still accepts a row with missing or null [{"content_hash":"old","metrics":null}]With that file in the output directory, the CLI returns 0 and writes Could Local synthetic history only. AI-assisted (Codex). |
Good catch, thanks for testing this on Windows! Since every valid snapshot entry emitted by Rows with missing Re-verified locally ( AI-assisted: yes |
|
Tested
No blocker from my side. AI-assisted (Claude Code). |
|
Merged after TheGeogeo's red/green check (#625 (comment)) and a local re-check here: merged onto AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes. |
Claimed in the coordination issue as: DASH-HARDEN-CLI (#14 (comment))
Depends on: none
What and why
Fixes four CLI/error-handling gaps in
tools/progress_dashboard.py:collect_github()(--github --login) calledc.get("author", {}).get("login")andc["body"].lower(), crashing withAttributeErrorwhen a coordination issue comment has"author": null(deleted/ghost GitHub account) or"body": null.--tests REGEXwithout--run-testswas silently ignored instead of callingap.error(...)like--loginand--d3d-issue.ci_test_files()ran beforemain()'stry ... except OSErrorblock, letting directory/permission errors escape as raw tracebacks despite the_walk_errorcontract.write_outputs()ran outsidemain()'s error handler, and corrupt or non-listhistory.jsonfiles (or UTF-8 BOM-prefixed ones) caused unhandled exceptions instead of a clean exit2(or loading cleanly with BOM stripped).The fix
authorandbodyincollect_github()._load_history()to strip UTF-8 BOM and raiseValueErroron malformed JSON or non-list/malformedhistory.json.ap.error("--tests requires --run-tests")and caughtOSError/ValueErroraroundci_test_files()andwrite_outputs()inmain()(exiting2).Hardeningintests/test_progress_dashboard.py.Tested
Windows 11 (26200.9974), Python 3.12.10, CPU only, no game files.
python -I tests/test_progress_dashboard.py -v: 55/55 OKHardeningagainstmain21625bca8'stools/progress_dashboard.py): FAILED (failures=1, errors=4)python -m compileall -q tools/progress_dashboard.py tests/test_progress_dashboard.py: exit 0python -I scripts/check_no_game_data.py tools/progress_dashboard.py tests/test_progress_dashboard.py: exit 0python -I tests/test_text_write_line_endings.py: 3/3 OKgit diff --check: cleanAI-assisted: yes.