Skip to content

docs: when a pull request can be merged, for maintainers and their agents (DOCS-MAINTAINING-GUIDE) - #2797

Draft
MoonEyes wants to merge 10 commits into
ProjectLeonida:mainfrom
MoonEyes:docs/maintaining
Draft

MoonEyes wants to merge 10 commits into
ProjectLeonida:mainfrom
MoonEyes:docs/maintaining

Conversation

@MoonEyes

@MoonEyes MoonEyes commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Claimed in the coordination issue as: DOCS-MAINTAINING-GUIDE (#2570 (comment))

What and why

A page that says when a pull request can be merged, for a maintainer and for the agent working for one. It is the long form of the "Maintainer quick guide" in CONTRIBUTING.md: a checklist, the commands that check each line, what an agent may and may not do, the in-game gate, what to do when CI is red, what needs a second human, who merges, the comment under a merge, closing, and what to do when a merge breaks something.

The aim is that an agent never merges what it should not, and that a human can tell in two minutes whether a pull request is ready. One line matters most: if one line of the checklist is unclear, the pull request stays open.

To be merged only after OreoFR and DadaCap have read it and agreed, in writing. A draft until then.

Points to decide while reading

  1. CONTRIBUTING.md says "Don't wait for GitHub CI"; this page asks for green CI and lists itself as new policy on that. CONTRIBUTING.md is not changed here: that line should follow, in a pull request of its own.
  2. Neither CONTRIBUTING.md nor AGENTS.md links this page yet, so an agent may not find it. Same: a separate change (OreoFR agrees with a link from both).
  3. The in-game gate also covers the translator, make_game.py and the launch scripts when they can change what the game does. 900 s for a change to memory or to a queue: a hypothesis from a few runs on one card.
  4. main has no branch protection, so nothing but this page stops a wrong merge. Branch protection is worth its own discussion, with Aslan.

Answered from OreoFR's four questions: who counts as the author in a carry (neither verifies nor merges); mods/gate_driver, the gate scripts, red_green.py and check_no_game_data.py are on the ask-first list, open pull requests included; the closing delay was not written anywhere, so that reason is gone; the 900 s above.

Tested

Docs, plus the list of other programs' flags in tests/test_docs_cli_flags.py (--match-head-commit, --merge, --limit, --detach, --no-ff: gh and git flags the page quotes): the tests/test_docs_*.py pass (each run on this branch; the flags test and four others again on the last edit), check_no_game_data.py is clean. Read by a separate reviewer agent: it refused the first version, accepted the second, refused the version after these reviews, and refused the next one over a single point (a gh flag the test does not know), fixed here by using the short flag. That last fix and small wording edits were not read again.

GPUs tested: n/a

AI-assisted: yes (Claude Code, reviewed by a separate Claude agent)

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption, including in logs or reports quoted here.
  • No translator rule.

🤖 Generated with Claude Code

…ents (DOCS-MAINTAINING-GUIDE)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MoonEyes

Copy link
Copy Markdown
Collaborator Author

@OreoFR @DadaCap ready for your reading, as agreed with MoonEyes: please read docs/maintaining.md and answer here with what you want changed, or with your agreement in writing. It stays a draft, and nobody merges it, until both of you have agreed. The four points to decide are in the description.

Posted by an AI agent (Claude Code) for MoonEyes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@KelboLive KelboLive left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two rules would block work the repository has just merged, so an agent will read them as wrong:

  • "every Depends on: already merged" misreads the template. The line means "every pull request this one builds on or conflicts with" (.github/pull_request_template.md:4); #2783 merged at 21:05:31Z and its declared Depends on: #2782 merged 16 minutes later.
  • "no check is failed" is stricter than the repo's own rule. docs/testing.md:126-127 says those jobs can be red on main and to compare rather than block; #2825 merged at 04:06:07Z with check and linux-python-and-viewer red, inherited from main.

Three more that cannot be followed as written:

  • "wait for main's CI" after a docs-only merge: CI is skipped on a docs-only push (ci.yml:5-11), so there is no run to wait for; and #2825 → #2827 landed 2.7 min apart while main's CI takes 11-26 min, i.e. the policy was not in force for the merges it is written from.
  • reviewDecision is not empty with a changes-requested review — #2472, #221 and #100 all report CHANGES_REQUESTED.
  • Checklist 5 narrows the suite to "when the change is not confined to one module"; CONTRIBUTING.md:118 asks for the full suite once, always. Quote it exactly, or change it there first.

Consistency items, in the order I would fix them:

  1. Agent authority contradicts docs/agent_collaboration.md:121-124 ("It does not open, change or merge a pull request") while the page says an agent may merge under a maintainer's written yes. One of the two needs the qualifier — this is the rule most likely to be cited by an agent in the wrong direction.
  2. Claim requirements are narrower/wider than AGENTS.md:52: the guide and template accept an item ID; the page requires a link to the claim comment. #2827 was merged with "Claim: none in the description", and three of the last 25 merges have no claim line at all.
  3. Invented-but-sensible rules should be labelled as new policy, not described as existing practice: "ask before merging .github/, CI, deps, security, test-weakening" (nothing in AGENTS/CONTRIBUTING, and #2763 — a CI change — was self-merged), "a maintainer asked for a pause", and the "agreed delay" for closing. Also two facts are wrong: the one-open-PR limit does not exist (400 open PRs; CONTRIBUTING.md:20-21 explicitly allows overlapping PRs), and "main has no branch protection" is true (verified: protected: false, no rulesets) — keep that one, it explains why every rule here is manual.
  4. The branch is 74 commits behind main, so its own checklist items 4/5 ("current head merged into current main") are not met by the branch itself. Merge main in; and mention scripts/red_green.py, which landed in #2787 and now does checklist 5 mechanically.

Small: tests/test_docs_cli_flags.py's FOREIGN only really covers --match-head-commit; --merge, --limit, --detach, --no-ff pass because unrelated sources contain the strings, so adding them to FOREIGN would make the test honest. The new docs/README.md row is the only one without a final period.

MoonEyes and others added 4 commits December 1, 2026 07:59
@MoonEyes

MoonEyes commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @KelboLive, and OreoFR for the four questions. Changed on head 58ed1c497, with main merged in:

Not in the page and never was: a limit of one open pull request.

OreoFR's questions are answered in the description. Still a draft: it waits for the written agreement of OreoFR and DadaCap.

Posted by an AI agent (Claude Code) for MoonEyes.

@MoonEyes

MoonEyes commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

@OreoFR @DadaCap a reminder from MoonEyes: the page is ready on head 58ed1c497, CI green. It includes the answers to OreoFR's four questions and the fixes after KelboLive's review (last comment above).

What is needed from each of you, here: "agreed" in writing, or what to change. Nothing is merged before both.

Posted by an AI agent (Claude Code) for MoonEyes.

@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Dec 1, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the needs rebase Conflicts with the base branch: rebase it on main label Dec 1, 2026
@DadaCap

DadaCap commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

I agree with the page, with these changes before it leaves draft:

  1. A world that cannot be reached: say what a merge needs when the gate never reaches the world (ERROR after -MaxMinutes). Run plain main the same way; the pull request must reach at least the same stage, as fast, with no new crash or device loss, and the merge comment names that stage. If neither reaches the world, a human maintainer decides.
  2. Translator changes: add what AGENTS.md already asks: translated and spirv-val-valid counts before and after on a corpus slice (a drop in either is a regression), and a new rule goes into the contract table of docs/design.md.
  3. Agreed CI failures: until the CI is reworked so that all of it must be green, say where such an agreement is written, e.g. "posted in the newest coordination issue".
  4. Screenshots: "never on GitHub" rather than "never post a screenshot"; image comparisons are shared privately.
  5. A pause: "until the same maintainer lifts it, or two other human maintainers agree in writing to lift it", so an absent maintainer cannot block an area forever.
  6. The runtime's ctest: --parallel is fine, but a failure of a real-time test (xmem, silent_audio) is rerun alone before it counts as red; in parallel they fail on their own.

(Written with my agent and posted at my request.)

An unreachable world, translator counts, where an agreed failure is written,
pictures, who lifts a pause and the runtime's real-time tests. Also: do not
close and reopen to run CI again, and what the d3d12 job does not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aegish-zagi

Copy link
Copy Markdown
Contributor

Verification — VERIFY-2797

Verdict: PASS

  • PR: docs: when a pull request can be merged, for maintainers and their agents (DOCS-MAINTAINING-GUIDE) #2797 | head sha: 760019ce1d77d4faa1630fdfac9affdbb08c07eb | merge state vs main: clean merge with current main cd0c52fcf in a scratch worktree (docs/README.md auto-merged, no conflicts)
  • Diff audited: new docs/maintaining.md (when a pull request can be merged, for maintainers and their agents), linked from docs/README.md; tests/test_docs_cli_flags.py allowlist extended with the gh flags the guide uses (--match-head-commit, --merge, --limit, --detach, --no-ff). Docs + test allowlist only, no production code.
  • Tests run (Linux, Python 3.12.3, python -I):
    • PR (merged with main): tests/test_docs_cli_flags.py — 4 tests OK; tests/test_docs_repo_paths.py and tests/test_docs_links.py — OK
    • Main code with the PR's test file: 4 tests OK. No red/green pair: the test change widens the flag allowlist for the new guide's commands, so it passes on both sides; the guide itself is the deliverable and its referenced paths/flags check out (READ IN CODE + the docs tests above).

AI-assisted: yes (Muse Wonder, Muse by Meta)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants