tooling: distinguish shader census populations #611
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/617"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Joacoorandom on 2026-11-22T16:02:15Z.
Change
Refs #594. Add a separate census command that distinguishes accepted archive record occurrences, distinct DXBC header digests, full-container SHA-256 classification keys and decoded cache-index entries. Each population reports its source and key; missing cache input is null rather than zero.
The current profile audit and its coverage denominator remain unchanged. A fixture deliberately produces four records, two header digests, three complete-container hashes and five cache-index entries. It also checks that the existing audit counts every occurrence while classifying each full-container hash only once.
The optional cache reader handles the PS/9 decoded-index profile described in #594. It requires a caller-established code-area base, checks table/allocation bounds, alignment and overlaps, and reports exact aliases separately. It neither guesses instruction lengths from allocation sizes nor validates the programs inside them.
Verification
Implementation:
42ac4be353. Integration:58920ec, merging main at0a9cc04. Resolved CMake registration alongside the new retarget fixture. Retained the merged #625 population convention and placed the command/reproduction details in a separate subsection, avoiding duplicated definitions.Linux, Python 3.14.4, using the existing development environment:
Seven census test methods and seven DXContainer tests passed. Existing metadata controls accepted two expected cases and rejected seven failure cases. Documentation check passed for 10 Markdown files / 129 links; bidi check passed for 585 tracked source/configuration files; PR diff whitespace check against main passed.
Windows 11 build 26300.9974, MSVC 19.44.35230, Python 3.12.8; configured Debug with INTAKE_PYTHON pointing to that interpreter:
Build succeeded; 4/4 tests passed, including shader_metadata_probe, with no skips. The full repository suite was not run.
Evidence and follow-up
All new inputs are original MIT-licensed Python-built framing fixtures; they contain no executable DXIL or game data. Negative controls cover malformed headers/tables, zero or out-of-range allocations, partial overlaps, invalid archive framing and CLI errors. Alias accounting, reordered entries, empty input and missing cache input have controls.
README and experiments.md document the command, population keys and limits. AGENTS.md and Linux CI include the new check. The population convention and reported counts now come from #625 on main; this PR adds the command and its reproduction details. No private archive totals were remeasured. Cache decompression, automatic code-base discovery and cross-input build identity checks remain outside this change. No other PR is required.
Checklist
AI-assisted implementation, test development and documentation.
Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-22T18:56:13Z.
Coordination note: #617 and #625 both add a new subsection to
docs/experiments.mdat the same place, directly after line 231, before### Fixed-profile archive rescan. Both explain the shader census populations:### Shader census populationstogether withtools/shader_census.pyand its check.### Shader census tiers and what each percentage divides byand only edits the docs.The two branches conflict with each other in
docs/experiments.md(git merge-tree). #617 also conflicts withmainatedc2e54inCMakeLists.txt, while #625 merges cleanly withmain. Since both describe the same three counts for #594, it may help to agree on one section, for example one PR building on the other, so the docs don't end up with two definitions of the same tiers.AI-assisted (Claude Code).