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

Manually merged
github merged 2 commits from github-bot/gh-3318 into gh-pr/3318/base 2026-12-03 11:04:30 +00:00 AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-03 10:39 UTC · original
MoonEyes:org/switches-no-conflict → main · +71 −11 · 3 files · 2 commits · merged 2026-12-03 11:02 UTC

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

**@⁠MoonEyes** on GitHub · 2026-12-03 10:39 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3318) `MoonEyes:org/switches-no-conflict` → `main` · +71 −11 · 3 files · 2 commits · merged 2026-12-03 11:02 UTC 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)
Claim ORG-SWITCHES-NO-CONFLICT (#3312).

Every pull request that adds a LEONIDA_* name regenerates d3d12/docs/switches.md,
and the page opened with "N names; M have a sentence of a comment", which each
addition changes, so two such pull requests conflicted on that line however far
apart their rows were. The "Only in tests" and "Only in comments" sections were
one comma-joined line each, the same trap.

The generator now writes no total (the sentence is replaced by a fixed one) and
lists the test-only and comment-only names one per line. An addition touches
only its own row. Two additions conflict only when they land in the same gap
between two existing rows. --check reads the new list form; a test asserts that
an added name adds exactly one line and that no "N names" line exists.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 10:45:18 +00:00
github-bot changed target branch from main to gh-pr/3318/base 2026-12-03 11:03:34 +00:00
github manually merged commit ea761afc75 into gh-pr/3318/base 2026-12-03 11:04:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3318
No description provided.