From 9cb1b6c8badf282612221ee16abe30a5a154f18e Mon Sep 17 00:00:00 2001 From: v0lumehi Date: Sat, 31 Oct 2026 17:09:39 +0100 Subject: [PATCH 1/4] CONTRIBUTING: how outside pull requests are handled Add the rules for fixes, features and ideas from outside, and what happens to an outside pull request after it is opened. Mirror them in the Chinese version. --- CONTRIBUTING.md | 16 ++++++++++++++++ CONTRIBUTING.zh-CN.md | 20 ++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9b83bc895..a125bbde0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,22 @@ missing piece. - **`frontend/` and `frontend-qt/` are the fork's own:** change them freely. Run `cd frontend && swift test`. For a UI change also capture the views for visual QA (`NX_LAUNCHER_CAPTURE_DIR`, see [frontend/README.md](frontend/README.md#verification)). - **The engine is not in this repository.** `dm/`, `scripts/`, `docs/` and `ref/` are seedds/nxnative at the commit in `.upstream-ref` with the patches in `patches/` applied, built into `engine/` by `python3 tools/engine.py sync` (a git repository that git ignores here, #214). A PR that adds files under those paths fails the `pr-scope` check, because the next sync would not carry them. A fix to the engine or to a game profile lands here first, as a patch, and goes to seedds/nxnative as a pull request in parallel, as [patches/README.md](patches/README.md#here-first-upstream-in-parallel) states. If you cannot open the upstream pull request, a maintainer sends it. To make the patch, commit the change in `engine/`, run `python3 tools/engine.py export`, fill in the header of the new patch (`Upstream-Status`, `Reason`, `Issue`), run `python3 tools/engine.py check`, and commit `patches/` with it. That page walks through the steps and states the patch policy (what a patch may and may not change). Everything else in the repository root and under `.github/` (this file, `CLAUDE.md`, `AGENTS.md`, the README) is the fork's. +### Fixes, features and ideas + +A fix is welcome without asking first. + +A feature can be opened as a pull request on its own. It needs an issue that describes the idea. Write it within 48 hours of the first reply from a maintainer. One maintainer has to agree to the idea before the PR merges. If the issue is never written, the PR is closed with a note that it can be reopened. A PR is not closed on arrival for a missing issue. + +To talk about an idea before you write code, use [Discussions](https://github.com/LNPANDY/NX2Apple/discussions). + +### What happens to your PR + +A pull request from outside never merges automatically. One maintainer tries the app that CI built for the PR, which is the `NX2Apple-macOS-arm64` artifact of the Build Mac app run. The same maintainer reviews the code. Whoever looks first decides. + +If the maintainers do not want a change, they say so early, explain why, and close the PR. They may keep parts of it and credit you as co-author. + +A PR that waits on its author for 30 days is closed with a note that it can be reopened. + ## For AI agents and other tools Issue forms and the PR template apply in the browser only. `gh issue create`, the API and MCP tools skip the forms, so follow them yourself: diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index b489f0b1b..35d01bb8e 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -14,3 +14,23 @@ 所有人都受益。 带完整 `Documents/log.txt` 的 issue 会优先看——那份日志通常能直接指出缺的是什么。 + +## 提 pull request + +提 pull request 的基本规则(一个 PR 一项改动、PR 模板、截图、引擎与补丁)见[英文版](CONTRIBUTING.md#a-pull-request)。下面是外部贡献者的 PR 如何处理。 + +### 修复、功能和想法 + +修复无需事先询问,直接提交即可。 + +功能可以直接以 pull request 的形式提交。它需要一个描述该想法的 issue,请在维护者第一次回复后的 48 小时内写好。合并前需要一位维护者认可这个想法。如果始终没有人写这个 issue,PR 会被关闭,并附一条说明,之后可以重新打开。PR 不会因为缺少 issue 而在提交时就被关闭。 + +想在写代码之前先聊聊想法,请用 [Discussions](https://github.com/LNPANDY/NX2Apple/discussions)。 + +### 你的 PR 会怎样 + +来自外部的 pull request 不会自动合并。一位维护者会试用 CI 为这个 PR 构建的应用,也就是 Build Mac app 这次运行的 `NX2Apple-macOS-arm64` 构建产物。同一位维护者也会审查代码。谁先看到,谁来决定。 + +如果维护者不想要某项改动,会尽早说明,解释原因,并关闭该 PR。他们可以保留其中一部分,并把你列为共同作者。 + +PR 如果等待作者回复满 30 天,会被关闭,并附一条说明,之后可以重新打开。 From b59ef67cdf1347535e1331efe382b5eddb87d644 Mon Sep 17 00:00:00 2001 From: v0lumehi Date: Sat, 31 Oct 2026 17:11:17 +0100 Subject: [PATCH 2/4] CONTRIBUTING: when a PR merges and how patches are numbered A fix merges when CI is green and no review objection is open. Whoever merges a patch renumbers it from the series on main. Make the template, AGENTS.md, the Copilot instructions and patches/README.md say the same. --- .github/copilot-instructions.md | 2 +- .github/pull_request_template.md | 2 +- AGENTS.md | 2 +- CONTRIBUTING.md | 10 ++++++++++ CONTRIBUTING.zh-CN.md | 10 ++++++++++ patches/README.md | 3 ++- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index d02be12c5..3b29444d5 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -5,7 +5,7 @@ Read [AGENTS.md](../AGENTS.md) (the fork's, at the root) and [CONTRIBUTING.md](. - `frontend/` and `frontend-qt/` are this fork's own: change them directly. `cd frontend && swift test` is the check. - The engine (`dm/`, `scripts/`, `docs/`, `ref/`) is not in this repository: it is seedds/nxnative at `.upstream-ref` plus `patches/`, built into `engine/` by `python3 tools/engine.py sync`. Do not add files under those paths in a PR (the `pr-scope` check fails it). A change to the engine is a pull request to seedds/nxnative first, and a patch in `patches/` (a commit in `engine/`, then `python3 tools/engine.py export`) only while the fork has to carry it. - Never touch the shader translation chain (`dm/gfx/tools/dmsh_*`, `dm/gfx/nvn/dmsh_chain.h`, `dmsh_chain.lock`, the translator). -- A feature PR waits 48 hours for the owner before it merges. Releases (version bumps, tags, update-history rows) are the owner's. +- A fix merges when CI is green and no review objection is open (changes requested or an unanswered review comment). Only the owner overrides an objection. A feature PR waits 48 hours for the owner before it merges. Whoever merges a patch renumbers it from `patches/series` on `main`, so do not rebase to chase free numbers. Releases (version bumps, tags, update-history rows) are the owner's. - No AI attribution anywhere: no "Generated with", no `Co-Authored-By` for a tool, in commits, PRs or issues. - Never attach or commit keys, game files or anything extracted from a game. - You work on a Linux runner and cannot build or run the macOS app. The macOS jobs of `tests.yml` are the check: do not claim a Swift or Metal change works until they are green. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8190995dd..2f42b502e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,7 @@ ## Fix or feature - + - [ ] Fix - [ ] Feature diff --git a/AGENTS.md b/AGENTS.md index eb1d46825..8f09d257a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,6 +7,6 @@ This is the fork's guide. The engine has its own, upstream's: [engine/AGENTS.md] - **Here first, upstream in parallel.** A fix to the engine, to a game profile or to upstream's docs may land here first, as a patch. The same change goes to seedds/nxnative as a pull request in parallel, from a branch off their main (`git -C engine fetch seedds`, `engine/` has the remote). If you cannot open that pull request, a maintainer sends it. A patch here is a bridge until upstream has it, and the next bump drops it once the change is in. [patches/README.md](patches/README.md#here-first-upstream-in-parallel) has the rule and the `Upstream-Status` values. - **How a commit in `engine/` becomes a patch.** Work in `engine/` (it holds upstream's tree with our patches as commits on top): change, test, commit with a message that says what and why. `python3 tools/engine.py export` turns the commits made since the last sync into `patches/NNNN-*.patch` with the header `Upstream-Status`, `Reason` and `Issue` (fill them in, `--status`, `--reason` and `--issue` set them) and adds them to `patches/series`. `python3 tools/engine.py check` must pass (headers, no patch on the shader chain, the series applies to the pin). The same commit goes to seedds/nxnative as a pull request in parallel. The patch says `pending` until that pull request is open, then `forwarded seedds/nxnative#`. Commit `patches/` in a PR here. `sync` never throws away work in `engine/`: it stops and names `export`. - **Never add engine files to this repository.** Files under `dm/`, `scripts/`, `docs/` and `ref/` at the root are ignored by `.gitignore`, and the `pr-scope` check fails a PR that adds them. A direct edit of engine files is lost on the next sync. -- **Issues and pull requests.** Follow [CONTRIBUTING.md](CONTRIBUTING.md), section "For AI agents and other tools", and the forms and the PR template in `.github/`. Fix or feature: a fix merges once CI is green, a feature after 48 hours, releases and version bumps are the owner's. No AI attribution in commits, PRs or issues. Never attach or commit keys, game files or data extracted from a game. +- **Issues and pull requests.** Follow [CONTRIBUTING.md](CONTRIBUTING.md), section "For AI agents and other tools", and the forms and the PR template in `.github/`. Fix or feature: a fix merges when CI is green and no review objection is open (Andy can override one), a feature after 48 hours, a patch is renumbered by whoever merges it, releases and version bumps are the owner's. No AI attribution in commits, PRs or issues. Never attach or commit keys, game files or data extracted from a game. - **Checks.** `cd frontend && swift build && swift test` for the Mac launcher (its tests read `engine/`, so sync first), `python3 -m unittest discover -s frontend-qt/tests` for the Qt front end (and `python3 frontend-qt/gen_localization.py` leaves `frontend-qt/nspb_qt/localization.py` unchanged), `python3 -m unittest discover tools/tests` for the tools. The engine's own tests run in `engine/` as `tests.yml` does. - **Language and text.** Everything is in English except the Chinese pages (`*.zh-CN.md`) and the launcher's strings. No semicolons in UI strings, READMEs and docs. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a125bbde0..25fed5911 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,6 +57,16 @@ If the maintainers do not want a change, they say so early, explain why, and clo A PR that waits on its author for 30 days is closed with a note that it can be reopened. +### When a PR merges + +This holds for every PR. A PR from outside also gets the check above. + +A fix merges when CI is green and every review objection is resolved or overridden by Andy ([@LNPANDY](https://github.com/LNPANDY)). A review is not required. An open objection blocks the merge. That is a review with changes requested or a review comment nobody answered. + +A feature merges after 48 hours. + +A patch in `patches/` takes the next free number from `patches/series` on `main` at merge time. Whoever merges renumbers the patch and notes it in the PR. You do not need to rebase to chase free numbers. + ## For AI agents and other tools Issue forms and the PR template apply in the browser only. `gh issue create`, the API and MCP tools skip the forms, so follow them yourself: diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 35d01bb8e..abeefeb3b 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -34,3 +34,13 @@ 如果维护者不想要某项改动,会尽早说明,解释原因,并关闭该 PR。他们可以保留其中一部分,并把你列为共同作者。 PR 如果等待作者回复满 30 天,会被关闭,并附一条说明,之后可以重新打开。 + +### PR 何时合并 + +以下对所有 PR 都适用。来自外部的 PR 还要先经过上面的检查。 + +修复在 CI 通过、且所有审查异议都已解决或被 Andy([@LNPANDY](https://github.com/LNPANDY))明确推翻后合并。审查不是必需的。未解决的异议会阻止合并,也就是要求修改的审查,或没人回复的审查评论。 + +功能在 48 小时后合并。 + +`patches/` 中的补丁在合并时取 `main` 上 `patches/series` 的下一个空闲编号。执行合并的人负责重新编号,并在 PR 中注明。你不需要为了追空闲编号而反复 rebase。 diff --git a/patches/README.md b/patches/README.md index 1093309b8..4476e9d98 100644 --- a/patches/README.md +++ b/patches/README.md @@ -71,7 +71,8 @@ the system's temporary folder. `dm/fork_patches.txt` is generated by `sync` insi 2. `python3 tools/engine.py export` writes `patches/NNNN-.patch` for each commit made since the last sync, adds it to `series`, and puts the header template into the message (`Upstream-Status: pending`, `Reason: TODO`, `Issue: TODO`, which `--status`, `--reason` and `--issue` set). Fill the three lines in. `export HEAD~2..HEAD` or `export ` names the commits. - Rename the file if you want a shorter name, because the name is what `fork_patches.txt` and `status` show. + Rename the file if you want a shorter name, because the name is what `fork_patches.txt` and `status` show. The number is a placeholder: + whoever merges the pull request renumbers the patch to the next free number in `series` on `main` and says so in the PR. 3. `python3 tools/engine.py check` must pass. Commit `patches/` (and nothing from `engine/`) in a pull request here. The next `sync` rebuilds `engine/` from the series, and keeps your commits on a backup branch. 4. Send the same change to seedds/nxnative as a pull request from a branch off *their* main (`git -C engine fetch seedds`, From 1967a73f11466e6e3d64b458eacbd3c924462634 Mon Sep 17 00:00:00 2001 From: v0lumehi Date: Sat, 31 Oct 2026 17:15:54 +0100 Subject: [PATCH 3/4] CONTRIBUTING: only an unanswered changes-requested review blocks a fix A plain review comment does not block. The maintainer who requested the changes clears their own objection. Andy decides only when the two maintainers disagree. --- .github/copilot-instructions.md | 2 +- .github/pull_request_template.md | 2 +- AGENTS.md | 2 +- CONTRIBUTING.md | 4 +++- CONTRIBUTING.zh-CN.md | 4 +++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 3b29444d5..7162bec62 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -5,7 +5,7 @@ Read [AGENTS.md](../AGENTS.md) (the fork's, at the root) and [CONTRIBUTING.md](. - `frontend/` and `frontend-qt/` are this fork's own: change them directly. `cd frontend && swift test` is the check. - The engine (`dm/`, `scripts/`, `docs/`, `ref/`) is not in this repository: it is seedds/nxnative at `.upstream-ref` plus `patches/`, built into `engine/` by `python3 tools/engine.py sync`. Do not add files under those paths in a PR (the `pr-scope` check fails it). A change to the engine is a pull request to seedds/nxnative first, and a patch in `patches/` (a commit in `engine/`, then `python3 tools/engine.py export`) only while the fork has to carry it. - Never touch the shader translation chain (`dm/gfx/tools/dmsh_*`, `dm/gfx/nvn/dmsh_chain.h`, `dmsh_chain.lock`, the translator). -- A fix merges when CI is green and no review objection is open (changes requested or an unanswered review comment). Only the owner overrides an objection. A feature PR waits 48 hours for the owner before it merges. Whoever merges a patch renumbers it from `patches/series` on `main`, so do not rebase to chase free numbers. Releases (version bumps, tags, update-history rows) are the owner's. +- A fix merges when CI is green, unless a maintainer's "changes requested" review is unanswered. A plain review comment does not block. The maintainer who requested the changes reviews again after your push. The owner decides only when the maintainers disagree. A feature PR waits 48 hours for the owner before it merges. Whoever merges a patch renumbers it from `patches/series` on `main`, so do not rebase to chase free numbers. Releases (version bumps, tags, update-history rows) are the owner's. - No AI attribution anywhere: no "Generated with", no `Co-Authored-By` for a tool, in commits, PRs or issues. - Never attach or commit keys, game files or anything extracted from a game. - You work on a Linux runner and cannot build or run the macOS app. The macOS jobs of `tests.yml` are the check: do not claim a Swift or Metal change works until they are green. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2f42b502e..87ed250cb 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,7 @@ ## Fix or feature - + - [ ] Fix - [ ] Feature diff --git a/AGENTS.md b/AGENTS.md index 8f09d257a..16f8aab71 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,6 +7,6 @@ This is the fork's guide. The engine has its own, upstream's: [engine/AGENTS.md] - **Here first, upstream in parallel.** A fix to the engine, to a game profile or to upstream's docs may land here first, as a patch. The same change goes to seedds/nxnative as a pull request in parallel, from a branch off their main (`git -C engine fetch seedds`, `engine/` has the remote). If you cannot open that pull request, a maintainer sends it. A patch here is a bridge until upstream has it, and the next bump drops it once the change is in. [patches/README.md](patches/README.md#here-first-upstream-in-parallel) has the rule and the `Upstream-Status` values. - **How a commit in `engine/` becomes a patch.** Work in `engine/` (it holds upstream's tree with our patches as commits on top): change, test, commit with a message that says what and why. `python3 tools/engine.py export` turns the commits made since the last sync into `patches/NNNN-*.patch` with the header `Upstream-Status`, `Reason` and `Issue` (fill them in, `--status`, `--reason` and `--issue` set them) and adds them to `patches/series`. `python3 tools/engine.py check` must pass (headers, no patch on the shader chain, the series applies to the pin). The same commit goes to seedds/nxnative as a pull request in parallel. The patch says `pending` until that pull request is open, then `forwarded seedds/nxnative#`. Commit `patches/` in a PR here. `sync` never throws away work in `engine/`: it stops and names `export`. - **Never add engine files to this repository.** Files under `dm/`, `scripts/`, `docs/` and `ref/` at the root are ignored by `.gitignore`, and the `pr-scope` check fails a PR that adds them. A direct edit of engine files is lost on the next sync. -- **Issues and pull requests.** Follow [CONTRIBUTING.md](CONTRIBUTING.md), section "For AI agents and other tools", and the forms and the PR template in `.github/`. Fix or feature: a fix merges when CI is green and no review objection is open (Andy can override one), a feature after 48 hours, a patch is renumbered by whoever merges it, releases and version bumps are the owner's. No AI attribution in commits, PRs or issues. Never attach or commit keys, game files or data extracted from a game. +- **Issues and pull requests.** Follow [CONTRIBUTING.md](CONTRIBUTING.md), section "For AI agents and other tools", and the forms and the PR template in `.github/`. Fix or feature: every fix goes through a PR and merges when CI is green, unless a maintainer's "changes requested" review is unanswered (a plain review comment does not block, and Andy decides only when the maintainers disagree), a feature after 48 hours, a patch is renumbered by whoever merges it, releases and version bumps are the owner's. No AI attribution in commits, PRs or issues. Never attach or commit keys, game files or data extracted from a game. - **Checks.** `cd frontend && swift build && swift test` for the Mac launcher (its tests read `engine/`, so sync first), `python3 -m unittest discover -s frontend-qt/tests` for the Qt front end (and `python3 frontend-qt/gen_localization.py` leaves `frontend-qt/nspb_qt/localization.py` unchanged), `python3 -m unittest discover tools/tests` for the tools. The engine's own tests run in `engine/` as `tests.yml` does. - **Language and text.** Everything is in English except the Chinese pages (`*.zh-CN.md`) and the launcher's strings. No semicolons in UI strings, READMEs and docs. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 25fed5911..33663af5c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,7 +61,9 @@ A PR that waits on its author for 30 days is closed with a note that it can be r This holds for every PR. A PR from outside also gets the check above. -A fix merges when CI is green and every review objection is resolved or overridden by Andy ([@LNPANDY](https://github.com/LNPANDY)). A review is not required. An open objection blocks the merge. That is a review with changes requested or a review comment nobody answered. +Every fix goes through a PR. A fix merges when CI is green. No approval is needed. + +An unanswered review with changes requested from a maintainer blocks the merge. A plain review comment does not block. The maintainer who requested the changes reviews again once the fix is pushed, and approves or withdraws the request. Each maintainer clears their own objections. If the two maintainers disagree about an objection, Andy ([@LNPANDY](https://github.com/LNPANDY)) decides. A feature merges after 48 hours. diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index abeefeb3b..38982d2ad 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -39,7 +39,9 @@ PR 如果等待作者回复满 30 天,会被关闭,并附一条说明,之 以下对所有 PR 都适用。来自外部的 PR 还要先经过上面的检查。 -修复在 CI 通过、且所有审查异议都已解决或被 Andy([@LNPANDY](https://github.com/LNPANDY))明确推翻后合并。审查不是必需的。未解决的异议会阻止合并,也就是要求修改的审查,或没人回复的审查评论。 +每个修复都通过 PR 提交。修复在 CI 通过后合并,不需要批准。 + +维护者提出的、尚未处理的“要求修改”审查会阻止合并。普通的审查评论不会阻止。推送修复后,提出要求的维护者会再次审查,批准或撤回该要求。每位维护者清除自己的异议。如果两位维护者对某个异议有分歧,由 Andy([@LNPANDY](https://github.com/LNPANDY))决定。 功能在 48 小时后合并。 From b224be32f8f58e75d65db0f14eea35931c401bac Mon Sep 17 00:00:00 2001 From: v0lumehi Date: Sat, 31 Oct 2026 17:19:11 +0100 Subject: [PATCH 4/4] CONTRIBUTING: the 48-hour rule is for the maintainers' own features A feature from outside never merges by waiting. It needs a maintainer to agree to the idea, try the app and review the code. Remove the AI attribution rule from AGENTS.md and the Copilot instructions. --- .github/copilot-instructions.md | 3 +-- .github/pull_request_template.md | 2 +- AGENTS.md | 2 +- CONTRIBUTING.md | 4 ++-- CONTRIBUTING.zh-CN.md | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 7162bec62..d407d3665 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -5,8 +5,7 @@ Read [AGENTS.md](../AGENTS.md) (the fork's, at the root) and [CONTRIBUTING.md](. - `frontend/` and `frontend-qt/` are this fork's own: change them directly. `cd frontend && swift test` is the check. - The engine (`dm/`, `scripts/`, `docs/`, `ref/`) is not in this repository: it is seedds/nxnative at `.upstream-ref` plus `patches/`, built into `engine/` by `python3 tools/engine.py sync`. Do not add files under those paths in a PR (the `pr-scope` check fails it). A change to the engine is a pull request to seedds/nxnative first, and a patch in `patches/` (a commit in `engine/`, then `python3 tools/engine.py export`) only while the fork has to carry it. - Never touch the shader translation chain (`dm/gfx/tools/dmsh_*`, `dm/gfx/nvn/dmsh_chain.h`, `dmsh_chain.lock`, the translator). -- A fix merges when CI is green, unless a maintainer's "changes requested" review is unanswered. A plain review comment does not block. The maintainer who requested the changes reviews again after your push. The owner decides only when the maintainers disagree. A feature PR waits 48 hours for the owner before it merges. Whoever merges a patch renumbers it from `patches/series` on `main`, so do not rebase to chase free numbers. Releases (version bumps, tags, update-history rows) are the owner's. -- No AI attribution anywhere: no "Generated with", no `Co-Authored-By` for a tool, in commits, PRs or issues. +- A fix merges when CI is green, unless a maintainer's "changes requested" review is unanswered. A plain review comment does not block. The maintainer who requested the changes reviews again after your push. The owner decides only when the maintainers disagree. A feature PR from a maintainer waits 48 hours before it merges. A feature from outside never merges by waiting: a maintainer has to agree to the idea, try the app and review the code. A fix from outside gets the same maintainer check before it merges. Whoever merges a patch renumbers it from `patches/series` on `main`, so do not rebase to chase free numbers. Releases (version bumps, tags, update-history rows) are the owner's. - Never attach or commit keys, game files or anything extracted from a game. - You work on a Linux runner and cannot build or run the macOS app. The macOS jobs of `tests.yml` are the check: do not claim a Swift or Metal change works until they are green. - A PR that changes the launcher needs before and after screenshots. You cannot capture them on a Linux runner: say so under Screenshots and ask for them in the PR (CONTRIBUTING.md, "For AI agents and other tools"). diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 87ed250cb..dfbfd1a2c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,7 @@ ## Fix or feature - + - [ ] Fix - [ ] Feature diff --git a/AGENTS.md b/AGENTS.md index 16f8aab71..d370f8c9a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,6 +7,6 @@ This is the fork's guide. The engine has its own, upstream's: [engine/AGENTS.md] - **Here first, upstream in parallel.** A fix to the engine, to a game profile or to upstream's docs may land here first, as a patch. The same change goes to seedds/nxnative as a pull request in parallel, from a branch off their main (`git -C engine fetch seedds`, `engine/` has the remote). If you cannot open that pull request, a maintainer sends it. A patch here is a bridge until upstream has it, and the next bump drops it once the change is in. [patches/README.md](patches/README.md#here-first-upstream-in-parallel) has the rule and the `Upstream-Status` values. - **How a commit in `engine/` becomes a patch.** Work in `engine/` (it holds upstream's tree with our patches as commits on top): change, test, commit with a message that says what and why. `python3 tools/engine.py export` turns the commits made since the last sync into `patches/NNNN-*.patch` with the header `Upstream-Status`, `Reason` and `Issue` (fill them in, `--status`, `--reason` and `--issue` set them) and adds them to `patches/series`. `python3 tools/engine.py check` must pass (headers, no patch on the shader chain, the series applies to the pin). The same commit goes to seedds/nxnative as a pull request in parallel. The patch says `pending` until that pull request is open, then `forwarded seedds/nxnative#`. Commit `patches/` in a PR here. `sync` never throws away work in `engine/`: it stops and names `export`. - **Never add engine files to this repository.** Files under `dm/`, `scripts/`, `docs/` and `ref/` at the root are ignored by `.gitignore`, and the `pr-scope` check fails a PR that adds them. A direct edit of engine files is lost on the next sync. -- **Issues and pull requests.** Follow [CONTRIBUTING.md](CONTRIBUTING.md), section "For AI agents and other tools", and the forms and the PR template in `.github/`. Fix or feature: every fix goes through a PR and merges when CI is green, unless a maintainer's "changes requested" review is unanswered (a plain review comment does not block, and Andy decides only when the maintainers disagree), a feature after 48 hours, a patch is renumbered by whoever merges it, releases and version bumps are the owner's. No AI attribution in commits, PRs or issues. Never attach or commit keys, game files or data extracted from a game. +- **Issues and pull requests.** Follow [CONTRIBUTING.md](CONTRIBUTING.md), section "For AI agents and other tools", and the forms and the PR template in `.github/`. Fix or feature: every fix goes through a PR and merges when CI is green, unless a maintainer's "changes requested" review is unanswered (a plain review comment does not block, and Andy decides only when the maintainers disagree), a maintainer's own feature after 48 hours (a feature from outside never merges by waiting, a maintainer has to agree, try the app and review the code), a patch is renumbered by whoever merges it, releases and version bumps are the owner's. Never attach or commit keys, game files or data extracted from a game. - **Checks.** `cd frontend && swift build && swift test` for the Mac launcher (its tests read `engine/`, so sync first), `python3 -m unittest discover -s frontend-qt/tests` for the Qt front end (and `python3 frontend-qt/gen_localization.py` leaves `frontend-qt/nspb_qt/localization.py` unchanged), `python3 -m unittest discover tools/tests` for the tools. The engine's own tests run in `engine/` as `tests.yml` does. - **Language and text.** Everything is in English except the Chinese pages (`*.zh-CN.md`) and the launcher's strings. No semicolons in UI strings, READMEs and docs. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33663af5c..a31b09dbf 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,13 +59,13 @@ A PR that waits on its author for 30 days is closed with a note that it can be r ### When a PR merges -This holds for every PR. A PR from outside also gets the check above. +This holds for every PR. A PR from outside also gets the maintainer check above, and never merges before it. Every fix goes through a PR. A fix merges when CI is green. No approval is needed. An unanswered review with changes requested from a maintainer blocks the merge. A plain review comment does not block. The maintainer who requested the changes reviews again once the fix is pushed, and approves or withdraws the request. Each maintainer clears their own objections. If the two maintainers disagree about an objection, Andy ([@LNPANDY](https://github.com/LNPANDY)) decides. -A feature merges after 48 hours. +A feature from the maintainers (v0lumehi and LNPANDY) merges after 48 hours. A feature from outside never merges by waiting. It merges after a maintainer agreed to the idea, tried the app and reviewed the code. A patch in `patches/` takes the next free number from `patches/series` on `main` at merge time. Whoever merges renumbers the patch and notes it in the PR. You do not need to rebase to chase free numbers. diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 38982d2ad..2952abe8e 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -37,12 +37,12 @@ PR 如果等待作者回复满 30 天,会被关闭,并附一条说明,之 ### PR 何时合并 -以下对所有 PR 都适用。来自外部的 PR 还要先经过上面的检查。 +以下对所有 PR 都适用。来自外部的 PR 还要经过上面的维护者检查,检查之前绝不合并。 每个修复都通过 PR 提交。修复在 CI 通过后合并,不需要批准。 维护者提出的、尚未处理的“要求修改”审查会阻止合并。普通的审查评论不会阻止。推送修复后,提出要求的维护者会再次审查,批准或撤回该要求。每位维护者清除自己的异议。如果两位维护者对某个异议有分歧,由 Andy([@LNPANDY](https://github.com/LNPANDY))决定。 -功能在 48 小时后合并。 +维护者(v0lumehi 和 LNPANDY)的功能在 48 小时后合并。来自外部的功能不会靠等待合并,要在维护者认可想法、试用应用并审查代码之后才合并。 `patches/` 中的补丁在合并时取 `main` 上 `patches/series` 的下一个空闲编号。执行合并的人负责重新编号,并在 PR 中注明。你不需要为了追空闲编号而反复 rebase。