tooling: add a measured progress dashboard #141

Manually merged
github merged 8 commits from gh-pr/141/head into gh-pr/141/base 2026-11-26 21:29:57 +00:00
Owner

@⁠Kha73k on GitHub · 2026-11-21 17:01 UTC · original
Kha73k:tooling/progress-dashboard → main · +5333 −2 · 10 files · 8 commits · merged 2026-11-21 18:43 UTC

Measures instruction-form coverage from a CTest run. This PR holds only the measurement and its tests; README graphics would be a separate, later PR.

This is not a measure of port completion: it counts which forms from a reference list appear in a source-built fixture whose translation test passed.

  • tools/form_coverage.py out/test-results.xml [--json …] (stdlib only). A fixture's forms count only when its test passed. Skipped or failed tests add nothing; forms held back only by a skip are listed separately.
  • Denominators in docs/coverage/, built by tools/form_reference.py: 948 x64 mnemonics Zen 2 runs in user mode (iced-x86), 1,968 gfx1013 and 1,863 gfx1030 forms (LLVM 15's generated AMDGPU syntax docs).
  • tests/form_coverage_check.py (Linux Python job) checks the denominators, the example below, and the pass/skip/fail rules.

Example: tests/cpu/branch.asm contains mov cmp jb jae add jmp sub ret (jae is the INVERT_BRANCH build). These are 8 Integer forms, covered when cpu_leaf_aot_branches passes; when it is skipped, 0 are covered and the 8 are listed as held back.

Run at 3f1e504 (Windows 10, RTX 3070 Ti; 66 passed, 12 skipped): x64 34/948, gfx1013 34/1968, gfx1030 34/1863. If pixel_aot_warp and pixel_aot_hardware were skipped, gfx1013 would drop to 0 with 34 held back.

🤖 Generated with Claude Code

**@⁠Kha73k** on GitHub · 2026-11-21 17:01 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141) `Kha73k:tooling/progress-dashboard` → `main` · +5333 −2 · 10 files · 8 commits · merged 2026-11-21 18:43 UTC Measures instruction-form coverage from a CTest run. This PR holds only the measurement and its tests; README graphics would be a separate, later PR. This is not a measure of port completion: it counts which forms from a reference list appear in a source-built fixture whose translation test passed. - `tools/form_coverage.py out/test-results.xml [--json …]` (stdlib only). A fixture's forms count only when its test passed. Skipped or failed tests add nothing; forms held back only by a skip are listed separately. - Denominators in `docs/coverage/`, built by `tools/form_reference.py`: 948 x64 mnemonics Zen 2 runs in user mode (iced-x86), 1,968 gfx1013 and 1,863 gfx1030 forms (LLVM 15's generated AMDGPU syntax docs). - `tests/form_coverage_check.py` (Linux Python job) checks the denominators, the example below, and the pass/skip/fail rules. Example: `tests/cpu/branch.asm` contains `mov cmp jb jae add jmp sub ret` (`jae` is the `INVERT_BRANCH` build). These are 8 Integer forms, covered when `cpu_leaf_aot_branches` passes; when it is skipped, 0 are covered and the 8 are listed as held back. Run at 3f1e504 (Windows 10, RTX 3070 Ti; 66 passed, 12 skipped): x64 34/948, gfx1013 34/1968, gfx1030 34/1863. If `pixel_aot_warp` and `pixel_aot_hardware` were skipped, gfx1013 would drop to 0 with 34 held back. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tools/progress.py reads a CTest JUnit file and counts, per instruction form,
whether a passing translation test covers it. References in
docs/progress/reference/ list every gfx1013 and gfx1030 instruction form
(from LLVM 15's generated AMDGPU syntax docs) and every x64 mnemonic Zen 2
runs in user mode (from iced-x86, already in requirements-dev.txt).
tools/progress_svg.py draws treemaps, test and throw-site bars and a
still-needed list into docs/progress/dashboard.svg, linked from the README.
Both scripts are stdlib-only and self-test in the Linux Python job.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Per review: this PR now holds only the measurement and its tests.
- tools/form_coverage.py (was progress.py) reads a CTest JUnit file and
  reports instruction-form coverage as text or JSON. A fixture's forms
  count only when its test passed; forms held back by a skip are listed
  separately. Output states it is not a measure of port completion.
- tools/form_reference.py and docs/coverage/*.tsv hold the denominators.
- tests/form_coverage_check.py checks the denominators (x64 regenerated
  from iced-x86, gfx encodings and parser), the branch.asm example and
  the pass/skip/fail rules; it runs in the Linux Python job.
- Removed the SVG renderer, generated dashboard, badges and README change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	.github/workflows/windows.yml
switch.asm (#86) is covered by cpu_aot_jump_tables; two_imports.asm runs
unchanged under pe_map, so its forms are known but never covered.
form_coverage_check.py pins switch.asm's 18 forms and checks that a
skipped cpu_aot_jump_tables run contributes zero covered forms, alone and
next to a passing fixture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keeps both Python check lines in windows.yml (form_coverage_check.py now
sits after bcpack_check.py, rdna2_tools_check.py stays at the end).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bink_descriptors.asm (#157) maps to cpu_bink_descriptors, and
rdna2_tools_check.py is classified as non-translation input.

A fixture not yet listed in CPU_FIXTURES or SHADER_FIXTURES no longer
stops the run. It is never counted and is listed in the report as
unclassified, so a new fixture on main cannot break this check or
inflate the numbers.

form_coverage_check.py now measures small fixtures written inside the
test, in a temporary tests/ tree, instead of the repository's own
branch.asm and switch.asm, so edits like #129 do not change its expected
counts. The pass, skip and fail cases are unchanged, and a new case
checks that unclassified CPU and gfx fixtures add no coverage even when
every test passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
form_coverage.py used to read gfx mnemonics from every string constant in
pixel_aot_check.py. That credited opcodes the test feeds only to
must_reject (s_nop), and it missed programs built by f-strings and
replace() (the v_cmp_<predicate> groups).

pixel_aot_check.py now wraps pixel_aot.lower and records the first word
of each line of every program that lowered without an error. At exit it
writes the record to FORM_COVERAGE_RECORD, which CMake sets for
pixel_aot_warp and pixel_aot_hardware. form_coverage.py counts a record
only when its test passed in the JUnit run, and only if the record was
written during that run's time window.

form_coverage_check.py covers the review's case: a program with s_nop is
rejected and leaves no trace, the accepted program alone is covered, a
leaked s_nop would add exactly one form, and the real check_controls()
never records s_nop. It also checks the pass, skip and fail cases for
records, and that a stale record is ignored.

repeat_call.asm and working_set_delta.asm are classified.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:29:55 +00:00
github manually merged commit 4e90a617c7 into gh-pr/141/base 2026-11-26 21:29:57 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-21 17:17 UTC · original

Please separate the measurement tool and its source/denominator tests from the generated README graphics. For the first review, include one fixture-to-instruction example and show how a skipped test affects the count. Keep instruction-form coverage separate from a percentage of overall port completion.

**@⁠R0Y00** on GitHub · 2026-11-21 17:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141#issuecomment-7066368986) Please separate the measurement tool and its source/denominator tests from the generated README graphics. For the first review, include one fixture-to-instruction example and show how a skipped test affects the count. Keep instruction-form coverage separate from a percentage of overall port completion.
Author
Owner

@⁠Kha73k on GitHub · 2026-11-21 17:22 UTC · original

Thanks, done in 06c874a:

  • Split: the PR now contains only the measurement (tools/form_coverage.py), its denominators (docs/coverage/*.tsv, tools/form_reference.py) and tests/form_coverage_check.py. The renderer, generated dashboard, badges and README change are removed.
  • Example: branch.asm gives mov cmp jb jae add jmp sub ret, 8 Integer forms, covered only while cpu_leaf_aot_branches passes. The test also checks the denominators (x64 regenerated from iced-x86, gfx encodings and the doc parser).
  • Skips: a skipped or failed test adds nothing. Skips are reported separately as "held back": with cpu_leaf_aot_branches skipped the example covers 0 and lists 8 held back, and with both pixel_aot_* skipped gfx1013 drops from 34 to 0.
  • Wording: the output and docs say "instruction-form coverage" and state that it is not a measure of port completion.
**@⁠Kha73k** on GitHub · 2026-11-21 17:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141#issuecomment-7066434951) Thanks, done in 06c874a: - Split: the PR now contains only the measurement (`tools/form_coverage.py`), its denominators (`docs/coverage/*.tsv`, `tools/form_reference.py`) and `tests/form_coverage_check.py`. The renderer, generated dashboard, badges and README change are removed. - Example: `branch.asm` gives `mov cmp jb jae add jmp sub ret`, 8 Integer forms, covered only while `cpu_leaf_aot_branches` passes. The test also checks the denominators (x64 regenerated from iced-x86, gfx encodings and the doc parser). - Skips: a skipped or failed test adds nothing. Skips are reported separately as "held back": with `cpu_leaf_aot_branches` skipped the example covers 0 and lists 8 held back, and with both `pixel_aot_*` skipped gfx1013 drops from 34 to 0. - Wording: the output and docs say "instruction-form coverage" and state that it is not a measure of port completion.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-21 17:26 UTC · original

The split and skipped-test example address the dashboard review. Linux CI on 06c874a now stops with Classify the new CPU fixture switch.asm in CPU_FIXTURES. Please classify the merged #86 fixture and verify that a skipped jump-table run contributes zero covered forms. Job.

**@⁠R0Y00** on GitHub · 2026-11-21 17:26 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141#issuecomment-7066488265) The split and skipped-test example address the dashboard review. Linux CI on 06c874a now stops with `Classify the new CPU fixture switch.asm in CPU_FIXTURES`. Please classify the merged #86 fixture and verify that a skipped jump-table run contributes zero covered forms. [Job](https://github.com/R0Y00/Xbox2Windows/actions/runs/44929684076/job/136923347607).
Author
Owner

@⁠Kha73k on GitHub · 2026-11-21 17:30 UTC · original

Done in the latest commits: main is merged in, and the CI conflict is resolved by keeping both Python check lines.

  • switch.asm maps to cpu_aot_jump_tables. two_imports.asm runs unchanged under pe_map, so its forms are known but never covered.
  • check_jump_tables() pins switch.asm's 18 forms. Passed, they cover 18. Skipped, they cover 0 and all 18 are listed as held back. Skipped next to a passing cpu_leaf_aot_branches, only branch.asm's 8 count.
  • Real run on current main (Windows 10, RTX 3070 Ti, 82 tests: 70 passed, 12 skipped): x64 38/948. With cpu_aot_jump_tables marked skipped it falls to 34, and neg not sar shr are listed as held back.
**@⁠Kha73k** on GitHub · 2026-11-21 17:30 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141#issuecomment-7066528345) Done in the latest commits: main is merged in, and the CI conflict is resolved by keeping both Python check lines. - `switch.asm` maps to `cpu_aot_jump_tables`. `two_imports.asm` runs unchanged under `pe_map`, so its forms are known but never covered. - `check_jump_tables()` pins switch.asm's 18 forms. Passed, they cover 18. Skipped, they cover 0 and all 18 are listed as held back. Skipped next to a passing `cpu_leaf_aot_branches`, only branch.asm's 8 count. - Real run on current main (Windows 10, RTX 3070 Ti, 82 tests: 70 passed, 12 skipped): x64 38/948. With `cpu_aot_jump_tables` marked skipped it falls to 34, and `neg not sar shr` are listed as held back.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-21 17:57 UTC · original

The switch.asm mapping and the zero-coverage case for skipped jump-table tests address the previous review. Two merged changes now affect this test on main. #157 added tests/cpu/bink_descriptors.asm, which is missing from CPU_FIXTURES and triggers the unclassified-fixture exit. #129 expanded branch.asm with additional conditional branches, while check_example still expects eight forms. Please cover both fixtures on current main and rerun tests/form_coverage_check.py, including the skip cases.

**@⁠R0Y00** on GitHub · 2026-11-21 17:57 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141#issuecomment-7066899979) The switch.asm mapping and the zero-coverage case for skipped jump-table tests address the previous review. Two merged changes now affect this test on main. #157 added tests/cpu/bink_descriptors.asm, which is missing from CPU_FIXTURES and triggers the unclassified-fixture exit. #129 expanded branch.asm with additional conditional branches, while check_example still expects eight forms. Please cover both fixtures on current main and rerun tests/form_coverage_check.py, including the skip cases.
Author
Owner

@⁠Kha73k on GitHub · 2026-11-21 18:06 UTC · original

Done, and the check no longer depends on fixtures that change on main:

  • bink_descriptors.asm (#157) maps to cpu_bink_descriptors. rdna2_tools_check.py contains gfx text and is classified as non-translation input.
  • A fixture not yet in CPU_FIXTURES/SHADER_FIXTURES no longer exits. It is never counted and is listed as "Not counted until classified". A new fixture on main can no longer break this check or raise the numbers.
  • form_coverage_check.py measures small fixtures written inside the test (in a temporary tests/ tree) instead of the live branch.asm and switch.asm, so edits like #129 do not change its expectations. The cases are the same: branch passed gives 8 covered, skipped gives 0 with 8 held back, failed gives 0 with none held back. A skipped jump-table run gives 0, alone and next to a passing fixture. A new case checks that unclassified CPU and gfx fixtures add 0 even when every test passes.
  • Mutation checks: counting skips as passes, or counting unclassified fixtures, both make the check fail.
  • The CI line moved up the Python-check list, away from the end where new checks are appended.
  • Real run on current main (a352292; Windows 10 19045, RTX 3070 Ti driver 32.0.16.2124; 102 tests: 86 passed, 15 skipped, 1 failed): x64 40/948, gfx1013 42/1968, gfx1030 42/1863, nothing unclassified. cpu_bink_descriptors and cpu_leaf_aot_branches pass. Marking either one skipped drops x64 to 39, holding back int and jbe respectively.
  • The one failure is pixel_aot_warp in check_predicate_draws (the predicates.case draw exits 1) on the Windows 10 inbox WARP, driver 10.0.19041.7811. pixel_aot_hardware passes, and this PR does not touch the pixel files. Since no pixel test passed, marking pixel_aot_hardware skipped drops gfx1013 to 0 with 42 held back.
**@⁠Kha73k** on GitHub · 2026-11-21 18:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141#issuecomment-7067011953) Done, and the check no longer depends on fixtures that change on main: - `bink_descriptors.asm` (#157) maps to `cpu_bink_descriptors`. `rdna2_tools_check.py` contains gfx text and is classified as non-translation input. - A fixture not yet in `CPU_FIXTURES`/`SHADER_FIXTURES` no longer exits. It is never counted and is listed as "Not counted until classified". A new fixture on main can no longer break this check or raise the numbers. - `form_coverage_check.py` measures small fixtures written inside the test (in a temporary `tests/` tree) instead of the live `branch.asm` and `switch.asm`, so edits like #129 do not change its expectations. The cases are the same: branch passed gives 8 covered, skipped gives 0 with 8 held back, failed gives 0 with none held back. A skipped jump-table run gives 0, alone and next to a passing fixture. A new case checks that unclassified CPU and gfx fixtures add 0 even when every test passes. - Mutation checks: counting skips as passes, or counting unclassified fixtures, both make the check fail. - The CI line moved up the Python-check list, away from the end where new checks are appended. - Real run on current main (a352292; Windows 10 19045, RTX 3070 Ti driver 32.0.16.2124; 102 tests: 86 passed, 15 skipped, 1 failed): x64 40/948, gfx1013 42/1968, gfx1030 42/1863, nothing unclassified. `cpu_bink_descriptors` and `cpu_leaf_aot_branches` pass. Marking either one skipped drops x64 to 39, holding back `int` and `jbe` respectively. - The one failure is `pixel_aot_warp` in `check_predicate_draws` (the `predicates.case` draw exits 1) on the Windows 10 inbox WARP, driver 10.0.19041.7811. `pixel_aot_hardware` passes, and this PR does not touch the pixel files. Since no pixel test passed, marking `pixel_aot_hardware` skipped drops gfx1013 to 0 with 42 held back.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-21 18:11 UTC · original

The independent CPU fixtures and unclassified-file control address the previous review. One measurable overcount remains at a3522920: gfx_mnemonics collects all Python string constants in pixel_aot_check.py, including s_nop 0, which is supplied to must_reject. A passing WARP run consequently credits s_nop as covered although that case was rejected. Please count the successful translation inputs, and add a regression where a rejection-only opcode stays out of covered.

**@⁠R0Y00** on GitHub · 2026-11-21 18:11 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141#issuecomment-7067075441) The independent CPU fixtures and unclassified-file control address the previous review. One measurable overcount remains at `a3522920`: `gfx_mnemonics` collects all Python string constants in `pixel_aot_check.py`, including `s_nop 0`, which is supplied to `must_reject`. A passing WARP run consequently credits `s_nop` as covered although that case was rejected. Please count the successful translation inputs, and add a regression where a rejection-only opcode stays out of `covered`.
Author
Owner

@⁠Kha73k on GitHub · 2026-11-21 18:25 UTC · original

Fixed in 4e90a61 (on current main, 7232663): gfx coverage now counts only programs the translator accepted.

  • pixel_aot_check.py wraps pixel_aot.lower and records the first word of each line of every program that lowered without an error. A program given to must_reject raises before it is recorded. At exit the record goes to FORM_COVERAGE_RECORD, which CMake sets for pixel_aot_warp and pixel_aot_hardware. The string scan of test files is removed.
  • form_coverage.py counts a record only when its test passed in the JUnit run, and only if the record was written inside that run's time window (timestamp + time), so a record and a status always come from the same run.
  • Regression in form_coverage_check.py:
    • assembly(False) with s_nop 0 in place of s_waitcnt lgkmcnt(0) is rejected and leaves nothing recorded.
    • The accepted program alone is covered.
    • Adding s_nop to the record raises covered by exactly one form.
    • The real check_controls() never records s_nop.
    • Pass gives the record's forms, skip gives 0 with all of them held back, fail gives 0. A stale record is ignored.
  • Mutation checks: each of the following makes the check fail.
    • Recording before lower returns.
    • Accepting stale records.
    • Counting skips as passes.
    • Ignoring the shader test's status.
  • Against the old scan of pixel_aot_check.py, on the same run:
    • s_nop, s_branch, v_cmp_class_f32 and v_cmpx_ge_f32_e64 drop out; they only reach must_reject.
    • Thirteen v_cmp_<predicate>_f32 forms built by predicate_group() f-strings are now counted.
  • x64 checked for the same issue:
    • The only fixture code that is not lifted is neighbor in chained.asm and BinkSetMemory in bink_heap.asm. Both contain only mov and ret, which lifted code also covers.
    • The rejected cpu_repeat_dropped variant only removes an instruction.
    • So no x64 form is credited by untranslated or rejection-only code.
    • repeat_call.asm and working_set_delta.asm are now classified.
  • Real run on 4e90a61 (Windows 10 19045, RTX 3070 Ti driver 32.0.16.2124; 107 tests: 91 passed, 15 skipped, 1 failed):
    • Coverage: x64 40/948, gfx1013 57/1968, gfx1030 57/1863.
    • Records were read from both pixel tests.
    • Marking pixel_aot_hardware skipped gives gfx1013 0 with 57 held back.
    • The failure is pixel_aot_warp in check_predicate_draws on the Windows 10 inbox WARP (10.0.19041.7811), unchanged by this PR. pixel_aot_hardware passes.
**@⁠Kha73k** on GitHub · 2026-11-21 18:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/141#issuecomment-7067242974) Fixed in 4e90a61 (on current main, 7232663): gfx coverage now counts only programs the translator accepted. - `pixel_aot_check.py` wraps `pixel_aot.lower` and records the first word of each line of every program that lowered without an error. A program given to `must_reject` raises before it is recorded. At exit the record goes to `FORM_COVERAGE_RECORD`, which CMake sets for `pixel_aot_warp` and `pixel_aot_hardware`. The string scan of test files is removed. - `form_coverage.py` counts a record only when its test passed in the JUnit run, and only if the record was written inside that run's time window (`timestamp` + `time`), so a record and a status always come from the same run. - Regression in `form_coverage_check.py`: - `assembly(False)` with `s_nop 0` in place of `s_waitcnt lgkmcnt(0)` is rejected and leaves nothing recorded. - The accepted program alone is covered. - Adding `s_nop` to the record raises covered by exactly one form. - The real `check_controls()` never records `s_nop`. - Pass gives the record's forms, skip gives 0 with all of them held back, fail gives 0. A stale record is ignored. - Mutation checks: each of the following makes the check fail. - Recording before `lower` returns. - Accepting stale records. - Counting skips as passes. - Ignoring the shader test's status. - Against the old scan of `pixel_aot_check.py`, on the same run: - `s_nop`, `s_branch`, `v_cmp_class_f32` and `v_cmpx_ge_f32_e64` drop out; they only reach `must_reject`. - Thirteen `v_cmp_<predicate>_f32` forms built by `predicate_group()` f-strings are now counted. - x64 checked for the same issue: - The only fixture code that is not lifted is `neighbor` in `chained.asm` and `BinkSetMemory` in `bink_heap.asm`. Both contain only `mov` and `ret`, which lifted code also covers. - The rejected `cpu_repeat_dropped` variant only removes an instruction. - So no x64 form is credited by untranslated or rejection-only code. - `repeat_call.asm` and `working_set_delta.asm` are now classified. - Real run on 4e90a61 (Windows 10 19045, RTX 3070 Ti driver 32.0.16.2124; 107 tests: 91 passed, 15 skipped, 1 failed): - Coverage: x64 40/948, gfx1013 57/1968, gfx1030 57/1863. - Records were read from both pixel tests. - Marking `pixel_aot_hardware` skipped gives gfx1013 0 with 57 held back. - The failure is `pixel_aot_warp` in `check_predicate_draws` on the Windows 10 inbox WARP (10.0.19041.7811), unchanged by this PR. `pixel_aot_hardware` passes.
This discussion has been locked. Commenting is limited to contributors.
No description provided.