[PR #817] [MERGED] CORPUS-WATCH: add counts-only corpus regression watch tool and tests #857

Closed
opened 2026-11-26 20:19:17 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/817
Author: @fitzypopper
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142

Base: main ← Head: corpus-watch-tool


📝 Commits (1)

  • 5ba7f35 Add counts-only corpus regression watch tool and tests (CORPUS-WATCH)

📊 Changes

2 files changed (+262 additions, -0 deletions)

View changed files

➕ scripts/corpus_watch.py (+195 -0)
➕ tests/test_corpus_watch.py (+67 -0)

📄 Description

Claimed in the coordination issue as: CORPUS-WATCH — counts-only corpus regression watch tool (claim comment).

What

Adds scripts/corpus_watch.py: a repeatable, counts-only corpus regression watch. It runs make_game.py --stages check,shaders against the user's own copy, then records carved / translated / spirv-val-validated counts per stage against the checked-out commit, using the same counting rule as progress_dashboard.py. Each run appends one JSONL record and logs a before/after delta so a drop in validated count is visible as a regression.

Why: the standing corpus watch on main was one of the unclaimed tasks in the original tracker. This makes it cheap to run by anyone with a supported copy, and keeps the published artifacts to counts only.

No game data

Results contain only commit SHA, counts, exit code and timestamp — no shader names, carved file names or paths into the package. Diagnostic logs may contain paths and are marked local-only in the tool's docstring and CLI help. Verified with python3 -I scripts/check_no_game_data.py scripts/corpus_watch.py tests/test_corpus_watch.py.

Conventions

  • Standard library only, runs under python3 -I.
  • All text writes use newline="\n".
  • Report paths are checked with tools/report_paths.same_report_path so an output cannot name the work folder or another output.
  • New tests cover both dxbc index shapes, legacy layout, error entries, missing indexes and path collisions.

Tests

  • python3 -I tests/test_corpus_watch.py — 4 tests pass.
  • python3 -I tests/test_text_write_line_endings.py — 3 tests pass.
  • python3 -m compileall -q scripts/corpus_watch.py tests/test_corpus_watch.py — OK.
  • python3 -I scripts/check_no_game_data.py — clean.

Manual run on a validated Xbox Series 1.0.2.1 copy at upstream pre-shutdown commit 867d922f: carved 26,503 / spirv 26,503 / validated 26,503, per-stage counts matching the project's published numbers.

AI-assisted: yes. The tool was prepared with AI assistance and verified locally as above.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/817 **Author:** [@fitzypopper](https://github.com/fitzypopper) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/25/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `corpus-watch-tool` --- ### 📝 Commits (1) - [`5ba7f35`](https://github.com/ubiquitarianism/leonida/commit/5ba7f3548f4dbeb429feb912f2fa87a1ed33fe3f) Add counts-only corpus regression watch tool and tests (CORPUS-WATCH) ### 📊 Changes **2 files changed** (+262 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `scripts/corpus_watch.py` (+195 -0) ➕ `tests/test_corpus_watch.py` (+67 -0) </details> ### 📄 Description Claimed in the coordination issue as: `CORPUS-WATCH — counts-only corpus regression watch tool` ([claim comment](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133930458)). ## What Adds `scripts/corpus_watch.py`: a repeatable, counts-only corpus regression watch. It runs `make_game.py --stages check,shaders` against the user's own copy, then records carved / translated / spirv-val-validated counts per stage against the checked-out commit, using the same counting rule as `progress_dashboard.py`. Each run appends one JSONL record and logs a before/after delta so a drop in validated count is visible as a regression. Why: the standing corpus watch on `main` was one of the unclaimed tasks in the original tracker. This makes it cheap to run by anyone with a supported copy, and keeps the published artifacts to counts only. ## No game data Results contain only commit SHA, counts, exit code and timestamp — no shader names, carved file names or paths into the package. Diagnostic logs may contain paths and are marked local-only in the tool's docstring and CLI help. Verified with `python3 -I scripts/check_no_game_data.py scripts/corpus_watch.py tests/test_corpus_watch.py`. ## Conventions - Standard library only, runs under `python3 -I`. - All text writes use `newline="\n"`. - Report paths are checked with `tools/report_paths.same_report_path` so an output cannot name the work folder or another output. - New tests cover both dxbc index shapes, legacy layout, error entries, missing indexes and path collisions. ## Tests - `python3 -I tests/test_corpus_watch.py` — 4 tests pass. - `python3 -I tests/test_text_write_line_endings.py` — 3 tests pass. - `python3 -m compileall -q scripts/corpus_watch.py tests/test_corpus_watch.py` — OK. - `python3 -I scripts/check_no_game_data.py` — clean. Manual run on a validated Xbox Series 1.0.2.1 copy at upstream pre-shutdown commit `867d922f`: carved 26,503 / spirv 26,503 / validated 26,503, per-stage counts matching the project's published numbers. AI-assisted: yes. The tool was prepared with AI assistance and verified locally as above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:17 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#857
No description provided.