Skip to content

Game fixes reach players faster: one game's pull requests get their own lane, and every profile meets the same rules - #1810

Merged
igawa6 merged 6 commits into
igawa6:devfrom
davdxpx:game-lane
Dec 6, 2026
Merged

igawa6 merged 6 commits into
igawa6:devfrom
davdxpx:game-lane

Conversation

@davdxpx

@davdxpx davdxpx commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Contributors who fix one game now get a clear path. A pull request that changes only that game's files is labeled game-lane, the people who made the game are asked to review it, and its checks run for that game alone. The maintainer lands the day's green ones together and publishes them as kit fixes, so players get the fix without waiting for an app release. New profiles meet every rule from the first commit, and a script says how to fix each finding, so a profile no longer goes back and forth in review for things a machine can see.

What changes:

  • The split rule. pr_ready.py refuses any engine change beside a game profile: every file that is not the game's own (dm/games/<title ID>/, its kit notes), not docs and not a test. Before, only every-game code counted; tools, tables and launcher resources slipped through. On the 214 profile pull requests opened since 2026-11-27, the old rule caught 63 and the new one 71. A new shader_split.py reader beside its profile stays a warning.
  • The profile rules, in one place. pr_ready.py runs every rule that was spread over CONTRIBUTING.md, NEW-GAME.md, check-profiles.sh, test_docs.py and pr_checks.sh, each with how to fix it. A new profile meets all of them: a Switch 1 title ID; name, build, package and shader_note rows; package the highest build; shader_files.tsv; frame times for its frame-rate rows; a smoke route; a note with Status, Tested on, Builds and Open; its row in the games table; and no other game in the pull request. A changed profile meets the rules of what it touches.
  • Smoke routes. A new game brings smoke.tsv, the boot route the regression harness runs, in the format scripts/regress.py reads; a changed route must still read.
  • The kit notes of a change. A change to what a release game's kit carries comes with the kit's next version in peanuts/kits/games/<title ID>.tsv: readable by kits.py, one per pull request, naming who made it and the pull request's number.
  • The game lane. .github/workflows/game-lane.yml has two jobs.
    • Game rules (read-only token) runs on every pull request that touches a game: the rules, then check-profiles.sh, kits.py equivalence and the docs test for that game. It reads the pull request's body, so a stacked one that says "Depends on: #" is a warning, as on the contributor's machine.
    • Game lane (pull_request_target) labels a one-game pull request and mentions the accounts its kit notes name, since GitHub requests reviews only from accounts with access. It runs nothing of the pull request.
    • game_lane.py batch lists the day's green game-lane pull requests and prints the commands that land them and publish their kits (release-kits.sh --only). It merges nothing.
  • The game form. .github/PULL_REQUEST_TEMPLATE/game.md asks for what no script checks, as what was run: device, OS, drivers, build ID, play, frame times, memory.

Checked:

  • test_pr_ready.py: the split rule, every new-profile rule, routes, package and frame times, kit notes, deletions, and that the route keys equal regress.py's.
  • test_game_lane.py: the lane, the authors, the batch, and the lane job's script against a stand-in gh.
  • test_docs.py.
  • The peanuts/tests loop on Linux against its merge base.

Players see nothing: no profile, kit or kit tool changes. pr_checks.sh is unchanged.

Not checked: the workflow on GitHub. pull_request_target runs the default branch's copy, so the label job starts once a release brings it to main. Game rules runs on dev pull requests as soon as this lands.

…them

A third of the pull requests since 2026-11-27 touch a game profile, and a
third of those also change engine code, so a game's fix waits for an engine
review and an engine change reaches players inside a game's fix. The rules a
profile must meet were spread over CONTRIBUTING.md, NEW-GAME.md,
check-profiles.sh, test_docs.py, pr_checks.sh and pr_ready.py, and most were
words only.

pr_ready.py's split rule now refuses any engine change beside a game
profile: every file that is not a game's own (dm/games/<title ID>/, its kit
notes, game_lane.py), not docs (.md) and not a test. Before, only every-game
code counted, so tools, tables and launcher resources slipped through. A new
shader_split.py reader beside its profile stays a warning, and a new switch
keeps its own finding.

The profile rules run in pr_ready.py, each finding with how to fix it. A new
profile meets all of them: a Switch 1 title ID, name, build, package and
shader_note rows, package the highest build, shader_files.tsv unless every
shader is captured at run time, frame times for its frame-rate rows, a smoke
route (smoke.tsv) that regress.py reads, with save and reach, a note with
Status, Tested on, Builds and Open, its row in the games table, and no other
game in the same pull request. A changed profile meets the rules of what it
touches; a change to what a release game's build kit carries needs the
kit's next version in peanuts/kits/games/<title ID>.tsv, readable by
kits.py, one per pull request, with who made it, and the pull request's
number in a GitHub Actions run. pr_checks.sh's new-game warnings are these
rules now. CONTRIBUTING.md and NEW-GAME.md state them, with the smoke route
and the kit notes of a change.

Checked: test_pr_ready.py on Windows (27 tests, OK); test_docs.py OK. Not
run on a device (no runtime code changes).
…ed per game

A fix that changes one game's files only can reach players as a kit fix in a
day, without an app release, but it waited in the same queue as engine
changes and nobody who made the game was asked to look.

.github/workflows/game-lane.yml has two jobs. Game rules runs on every pull
request that touches a game, with a read-only token: pr_ready.py (the split
and profile rules and every other mechanical rule), then for each game
check-profiles.sh and kits.py equivalence, and the docs test. Game lane runs
on pull_request_target: a pull request whose files are one game's own (its
folder, its kit notes, its row in the games table, the patches index) gets
the label game-lane, and a comment mentions the accounts its kit notes name,
since GitHub requests reviews only from accounts with access to the
repository. It checks out only the default branch's game_lane.py and reads
the pull request's file names and patches from the API; nothing of the pull
request runs with that token.

game_lane.py batch lists the day's game-lane pull requests, which are green
and what the others wait for, and prints the commands that land the green
ones and publish their kits with release-kits.sh --only. It merges nothing.
The game form (.github/PULL_REQUEST_TEMPLATE/game.md) asks for what no script
checks, as what was run: device, OS, drivers, build ID, play, frame times.

Checked: test_game_lane.py on Windows (13 tests, OK), the lane job's script
run against a stand-in gh. Not run on GitHub: pull_request_target runs the
default branch's copy of the workflow, so the label job starts once a
release brings it to main.
…closed

game_lane.py batch printed v<version>-1 for the release tree, which is the
wrong tag after a re-release; it now prints the latest release's tag as
published (--tag picks another). pr_ready.py now checks the kit notes of a
change that only deletes a release game's files, counts the merge-base's
versions even where kits.py cannot read those notes, and reports a
build.gradle kit rule kits.py cannot read as a finding instead of a
traceback. The lane job stops when the label lookup fails, rather than
labeling and asking the authors a second time.

Checked: test_pr_ready.py and test_game_lane.py.
… body

pr_checks.sh keeps step 4: pr-checks is the check every pull request to dev
already gets, so the refusal of a prewarm seed stays there; the Game rules
check runs the same rules again for a pull request that touches a game.
Game rules hands the pull request's body to pr_ready.py (--body, through an
environment variable), so a stacked pull request that says
"Depends on: #<n>" is a warning there, as on the contributor's machine,
rather than a must-fix.

Checked: test_game_lane.py, test_pr_ready.py, pr_ready.py.
…ts, the kit rule of the head

Three gaps in the profile rules:
- Only nxGames counted as kit games, so a game a signed kit index adds (a data-only profile the APK does not list) had no kit notes rule
  and the batch offered it no kit fix. Now a kit game is a release game, a game whose kit notes have a version, or a row of a signed game
  index given with --kit-index (pr_ready.py, game_lane.py batch). Without an index and with no such notes nothing changes.
- A row of a shared per-game list (peanuts/game-ids-allowlist.tsv, peanuts/aspect-tested.tsv; either may not exist) counted as an engine
  change. When every changed row names only the pull request's games it is now the game's own, in the split rule and the lane alike. A row
  of another game, or a changed comment line, is still an engine change.
- kit_files() read build.gradle's kit rule from the checkout pr_ready.py runs from. It now reads it from the head being checked; a head
  without build.gradle says so.

Checked: test_pr_ready.py (the head's rule, kit-added games with and without an index or kit notes, list rows of this game and of another)
and test_game_lane.py (list rows in the lane, index rows, a kit fix for an added game) pass; the peanuts/tests loop passes.
…ns as notes

A migration moves a game's special case out of shared code into its profile in one change, so its engine side and profile side cannot
land apart. pr_ready.py held every such pull request of ours to the split rule ("engine change with the profile of ...") and to a kit
notes version per release game it touches, so each was red although nothing in it can be split.

With the label migration, which only a maintainer can add, and an "Identical output:" line in the body, pr_ready.py now reports those
two as migration notes, not must fix; the release writes one combined kit version per game (kits.py next). Labeled without the line, both
stay must fix with a warning that says why. Without the label nothing changes, so a contributor's game pull request stays profile-only.
--labels takes the labels and --body-file is another name for --body. The Game rules job passes the event's labels and body as
environment variables, keeps its read-only token, and runs again when a label or the body changes. CONTRIBUTING.md ("Migrations"),
NEW-GAME.md and the pull request template say what a migration is and what it proves.

Checked: test_pr_ready.py (with and without the label, the body line missing, no body, other rules still must fix) and
test_game_lane.py (the job passes labels and body, its event types) pass; test_docs.py and docs_patches.py --check pass.
@igawa6

igawa6 commented Dec 6, 2026

Copy link
Copy Markdown
Owner

@davdxpx I added two commits on top of yours so the restructure series (#1854 and the PRs stacked on it) can live with the game lane, and I'm merging this now:

  • c6ee8c1: a game a signed kit index adds counts as a kit game (--kit-index); a row that names only the PR's own title IDs in peanuts/game-ids-allowlist.tsv or peanuts/aspect-tested.tsv counts as the game's own file; the kit rule is read from the head under test.
  • a0b322d: a maintainer migration (label migration plus an Identical output: line in the body) gets the split rule, the new-switch rule and the kit-notes version rule as notes instead of must-fixes; the release then writes one combined kit-notes version per game. Without the label nothing changes. The Game rules job passes labels and body and reruns on labeled/edited.

Your commits are unchanged. Tests: test_pr_ready 39, test_game_lane 19, the whole peanuts/tests loop green.

@igawa6
igawa6 merged commit 28986f8 into igawa6:dev Dec 6, 2026
10 checks passed
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.

2 participants