d3d12_switches: no count lines, one name per line, so two added switches do not conflict #3318

Merged
MoonEyes merged 2 commits from upstream-pr/3318 into main 2026-12-03 11:02:16 +00:00
MoonEyes commented 2026-12-03 10:39:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T10:39:05Z.


Claim: ORG-SWITCHES-NO-CONFLICT in #3312.

41 of the 214 open pull requests touch d3d12/docs/switches.md, and each merge put the others in conflict. The page had two kinds of global lines that every added switch rewrote:

  • the header count ("684 names; 644 have a sentence of a comment below..."), which conflicted whenever two pull requests changed it differently;
  • the "Only in tests" and "Only in comments" sections, each one long comma-joined line.

tools/d3d12_switches.py now writes no totals (a fixed note says so) and lists the test-only and comment-only names one per line; --check reads the new list. Rows were already sorted, one per line. The tracked page is regenerated.

Effect

  • Demo in a throwaway repository (100 synthetic names, two branches each adding one far-apart name, one with a doc comment as real pull requests have): git merge conflicted on the count line with the old generator, and merges cleanly with the new one.
  • Two additions still conflict when they land in the same gap between two existing rows: about 0.14 to 0.29 % of pairs on the real page, so about 1 or 2 pairs among the open pull requests instead of most of them.
  • Pull requests already open against the old page conflict once more, on the header and the two bulleted sections; regenerating with the new generator fixes it.

Tested

  • python -I tests/test_d3d12_switches.py: 21 OK, including a new test that an added name adds exactly one line, removes none, and that no "N names" line is left.
  • All 14 tests/test_docs_*.py: OK. python -I tools/d3d12_switches.py --check d3d12/docs/switches.md: exit 0, after merging main.
  • scripts/check_no_game_data.py on the changed files: clean. No GPU or game files involved.

AI-assisted (Claude Code, Claude Opus 5.5). Independent review: a separate Claude Opus 5.5 agent before merge.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5624801667 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3318). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T10:39:05Z. --- Claim: `ORG-SWITCHES-NO-CONFLICT` in #3312. 41 of the 214 open pull requests touch `d3d12/docs/switches.md`, and each merge put the others in conflict. The page had two kinds of global lines that every added switch rewrote: - the header count ("684 names; 644 have a sentence of a comment below..."), which conflicted whenever two pull requests changed it differently; - the "Only in tests" and "Only in comments" sections, each one long comma-joined line. `tools/d3d12_switches.py` now writes no totals (a fixed note says so) and lists the test-only and comment-only names one per line; `--check` reads the new list. Rows were already sorted, one per line. The tracked page is regenerated. ## Effect - Demo in a throwaway repository (100 synthetic names, two branches each adding one far-apart name, one with a doc comment as real pull requests have): `git merge` conflicted on the count line with the old generator, and merges cleanly with the new one. - Two additions still conflict when they land in the same gap between two existing rows: about 0.14 to 0.29 % of pairs on the real page, so about 1 or 2 pairs among the open pull requests instead of most of them. - Pull requests already open against the old page conflict once more, on the header and the two bulleted sections; regenerating with the new generator fixes it. ## Tested - `python -I tests/test_d3d12_switches.py`: 21 OK, including a new test that an added name adds exactly one line, removes none, and that no "N names" line is left. - All 14 `tests/test_docs_*.py`: OK. `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md`: exit 0, after merging main. - `scripts/check_no_game_data.py` on the changed files: clean. No GPU or game files involved. AI-assisted (Claude Code, Claude Opus 5.5). Independent review: a separate Claude Opus 5.5 agent before merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!3318
No description provided.