Repository navigation
The symptom index is regenerated on main by CI, so a reference entry no longer needs it in the PR - #472
Open
v0lumehi wants to merge 2 commits into
Open
The symptom index is regenerated on main by CI, so a reference entry no longer needs it in the PR#472v0lumehi wants to merge 2 commits into
v0lumehi wants to merge 2 commits into
Conversation
26 of 42 tasks
v0lumehi
force-pushed
the
docs-index-ci
branch
6 times, most recently
from
October 29, 2026 16:09
454b658 to
64c4080
Compare
About four in five new reference entries go at the end of their file (437 of 551 new ### entries in the last 400 commits to docs/reference), and docs/agents/symptoms.md is generated from them line for line. So two pull requests that each add an entry to the same file, rendering.md or shaders.md most often, conflict twice: in the reference file and in the index, both at the end of the same group. .gitattributes sets merge=union for docs/reference/*.md and docs/agents/symptoms.md. Git's built-in union driver keeps both sides' new lines; it needs no setup and applies to merges, rebases and cherry-picks. Checked in a clone: two branches that each append an entry to rendering.md and regenerate the index rebase onto each other without a conflict, the index is current afterwards (docs_symptoms.py --check), and without the attribute the same rebase conflicts in both files. Where both sides change the same line, the union driver keeps both versions without a conflict. test_docs now fails on an entry with a Symptom, Cause, Fix or Found on bullet more than once, or a heading twice in one file: checked with two branches that each add a game to the same Found on line, which merge into two Found on lines that the test reports. The seven entries that already have a bullet twice are listed as the baseline, and a count there may only go down.
A workflow on pushes to main runs docs_symptoms.py and commits the index when it changed. A stale index no longer fails test_docs unless DM_DOCS_INDEX_STRICT=1, which the workflow sets; the links of the index to entries with a Symptom bullet are still always checked.
v0lumehi
force-pushed
the
docs-index-ci
branch
from
October 29, 2026 16:20
64c4080 to
bf67417
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Stacked on #400 (the union merge driver for
docs/referenceand the symptom index). The first commit here is #400's, which I rebased onto currentmainand pushed to #400 too. Review only the last commit.Roadmap #313, "Docs de-conflict: … regenerate
symptoms.mdin CI". Today every PR that adds a reference entry also has to rundocs_symptoms.pyand commitdocs/agents/symptoms.md, andtest_docsfails when that was forgotten. Two such PRs touch the same index. Even with #400's union driver, the merged index can come out in an order the script wouldn't write, and thentest_docsfails until someone regenerates it. This moves the index to CI:.github/workflows/docs-index.ymlruns on a push tomainonly, never on a pull request, so no PR code runs with write access. It runs on changes todocs/reference/**,docs_symptoms.pyor the index, plus by hand. The steps:test_docsstrictly, so a bad union merge stops here instead of being committed.github-actions[bot]("Regenerate the symptom index") and pushes tomain. It rebases and retries once on a race.A push made with
GITHUB_TOKENstarts no further workflows, so there is no loop.test_docs: the "index equals a fresh one" check runs only withDM_DOCS_INDEX_STRICT=1, which the workflow sets. A new always-on check makes sure every link in the index points to an existing entry with a Symptom bullet. The link and anchor checks are unchanged.AGENTS.md: the rule now says "CI adds it to the symptom index" instead of asking for the script. The file is at 1,498 words.06-dev-loop.md, the script's header and the index's intro say the same.Questions for @seedds:
github-actions[bot]push tomain? If branch protection doesn't allow it, the job turns red visibly. In that case the bot could be allowed to bypass the rule, or this PR closed and the index kept by hand as today.docs/reference/<subsystem>/<entry>.md), I left out on purpose. It would move hundreds of entries and change everydocs/reference/<file>.md#anchorlink in the game notes, which would conflict with almost every open PR. With Merge docs/reference and the symptom index with git's union driver #400 and this, I think it isn't needed. Would you want it anyway?Checked
test_docspasses plain (12 tests, 1 skipped) and withDM_DOCS_INDEX_STRICT=1(12 tests). In both directions:docs_symptoms.py --check: current.actionlintwas not available.main. The bot push is untested until then.Docs