D3D12-DOCS-SWITCHES-TEST: fail standalone tests when d3d12/docs/switches.md drifts #2934
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2934
Loading…
Reference in a new issue
No description provided.
Delete branch "test/d3d12-switches-page-drift"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as: D3D12-DOCS-SWITCHES-TEST (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7323577585; ref finding https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7302596030)
What and why
tests/test_d3d12_switches.pypreviously generatedpage.mdinto a temporary directory and ran--checkagainst that just-generated copy, so drift between the D3D12 runtime sources and the trackedd3d12/docs/switches.mdwent unnoticed in CI.Added
CommandTest.test_the_tracked_switches_page_matches_the_sources, which runsd3d12_switches.main(["--root", ROOT, "--check", "d3d12/docs/switches.md"])and prints the exact missing/removed names and regeneration command on failure. Becausetests/test_d3d12_switches.pyis already executed byscripts/run_standalone_tests.pyin both Windows and Linux CI jobs, no workflow YAML changes are needed.Tested
LEONIDA_PIPELINE_SLOWfromd3d12/docs/switches.mdcausedtest_the_tracked_switches_page_matches_the_sourcesto fail withmissing from the page: LEONIDA_PIPELINE_SLOW(exit 1); restoring it passed (exit 0).python -I tests/test_d3d12_switches.py -v: 20 passed, 0 failed.python -I tests/test_ci_registration.py -v: 18 passed, 0 failed.python -I scripts/check_no_game_data.py tests/test_d3d12_switches.py: clean.GPUs tested: n/a (stdlib Python doc-hygiene test; Windows 11).
AI-assisted: yes — Gemini 4 Neon (implementation and an independent read-only reviewer pass).
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).Switch inventory red and green on the combined tree for
2190bf98merged into19d5f83c. The clean test file was 19/19 onmainand 20/20 with the PR. I removed the existingLEONIDA_PANELrow on each tree. The standalone--checkfailed on both, while the normal test file stayed green onmainand failed in the new test on the PR, reporting that exact name. Changing only that row’s description kept the new test green, so this covers the switch-name inventory.The real combined tree with #2929 (
51818b7e) failed in the new test and in--checkon exactlyLEONIDA_PIPELINE_STACK_MIBandLEONIDA_VRAM_GUARD_PCT. Runningpython -I tools/d3d12_switches.py --out d3d12/docs/switches.mdmade--checkand all 20 tests pass again.MEASURED with OpenAI Codex and a separate read-only review.
RUN (independent check on Windows, #2934 head 2190bf988, merged locally into
main1fff69129 withgit merge --no-ff, no conflicts.)Python 3.13.12:
main1fff69129 itself:python -I tools/d3d12_switches.py --check d3d12/docs/switches.mdexits 0, so the tracked page is in sync today and the new test passes on the merge from the start.python -I tests/test_d3d12_switches.py: 20 tests, OK.python -I tests/test_ci_registration.py: 18 tests, OK.LEONIDA_PIPELINE_SLOWrow removed fromd3d12/docs/switches.md,test_the_tracked_switches_page_matches_the_sourcesfails ("missing from the page: LEONIDA_PIPELINE_SLOW"), the other 19 pass; with the row put back, 20 OK.d3d12_switches.mainwith--rooton the repository and--checkon the tracked page, and prints the regeneration command on failure. Note for maintainers: once merged, any change that adds or renames aLEONIDA_switch without regenerating the page fails the standalone tests, on pull requests and on direct pushes alike (the page has drifted onmainseveral times this week).Machine: Windows 11 Pro 26300, Python 3.13.12.
Merging. Head
2190bf988merges cleanly withmain1fff69129and does not force a rebase of #2566. Ran main plus the PR myself: test_d3d12_switches 20 green, ci_registration 18, line endings 3, stdout encoding 4 green; test-only change. Third-party red/green by enlight3d on this head; internal code review ACCEPTE. Merged by MoonEyes.AI-assisted (Claude Code).