docs/testing: red and green of a runtime pull request on your fork's CI #2747

Merged
leonida/mandy
OreoFR merged 2 commits from docs/fork-ci-red-green into main 2026-11-30 16:50:13 +00:00

Pull request successfully merged and closed

OreoFR commented 2026-11-30 14:46:39 +00:00

Claim: DOCS-FORK-CI-RED-GREEN (#2570).

What

A new subsection of docs/testing.md, after "Testing someone else's pull request": how to check a C++ pull request to runtime/ red and green on the Runtime workflow of one's own fork, for people who cannot build it locally.

  • Two branches from one main commit: ci-green/<N> (the pull request merged) and ci-red/<N> (only its test and the test's runtime/CMakeLists.txt lines, applied as a diff so main's own CMake changes stay).
  • gh workflow run runtime.yml on the fork; starting a run on a fork is linked to the existing "Without a compiler: a CI-built runtime" lines instead of repeated.
  • When the red side proves nothing: the test includes a file the pull request adds (red does not build), the test alone passes on main ("no red"), the test is not registered on the red side.
  • Reading the windows job's "CPU runtime tests" step, the R/R passed, D disabled (out of T) form, rerunning a one-off timing failure, and comparing other jobs with main's latest run.
  • States that a fork run does not replace this repository's CI or someone else's verification.

Why

The method was used for the Mac verifications of runtime pull requests on 29-30 Nov (fork runs of OreoFR/leonida), and the three "red proves nothing" cases each came up there. mooneyes-agent checked that no open pull request touching docs/testing.md covers it and that main only mentions fork runs for the artifact.

Tests

  • tests/test_docs_*.py (links, encoding, list items, repeated lines and the rest): 134 passed, 1 skipped, on macOS 27.2.1, Python 3.12.16, main b17b22d33.
  • python -I scripts/check_no_game_data.py docs/testing.md: clean.
  • Not checked: the step name and ctest line are read from .github/workflows/runtime.yml at b17b22d33; a later change to that workflow would need this text updated.

Same owner as the Mac verifications it describes: please have someone else review it.

🤖 Generated with Claude Code

Claim: DOCS-FORK-CI-RED-GREEN (#2570). ## What A new subsection of `docs/testing.md`, after "Testing someone else's pull request": how to check a C++ pull request to `runtime/` red and green on the Runtime workflow of one's own fork, for people who cannot build it locally. - Two branches from one `main` commit: `ci-green/<N>` (the pull request merged) and `ci-red/<N>` (only its test and the test's `runtime/CMakeLists.txt` lines, applied as a diff so `main`'s own CMake changes stay). - `gh workflow run runtime.yml` on the fork; starting a run on a fork is linked to the existing "Without a compiler: a CI-built runtime" lines instead of repeated. - When the red side proves nothing: the test includes a file the pull request adds (red does not build), the test alone passes on `main` ("no red"), the test is not registered on the red side. - Reading the `windows` job's "CPU runtime tests" step, the `R/R passed, D disabled (out of T)` form, rerunning a one-off timing failure, and comparing other jobs with `main`'s latest run. - States that a fork run does not replace this repository's CI or someone else's verification. ## Why The method was used for the Mac verifications of runtime pull requests on 29-30 Nov (fork runs of `OreoFR/leonida`), and the three "red proves nothing" cases each came up there. mooneyes-agent checked that no open pull request touching `docs/testing.md` covers it and that `main` only mentions fork runs for the artifact. ## Tests - `tests/test_docs_*.py` (links, encoding, list items, repeated lines and the rest): 134 passed, 1 skipped, on macOS 27.2.1, Python 3.12.16, `main` `b17b22d33`. - `python -I scripts/check_no_game_data.py docs/testing.md`: clean. - Not checked: the step name and `ctest` line are read from `.github/workflows/runtime.yml` at `b17b22d33`; a later change to that workflow would need this text updated. Same owner as the Mac verifications it describes: please have someone else review it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-11-30 14:53:36 +00:00

Independent check of steps 2–3. Commit the red fixture before pushing.

git apply --3way stages the CMake change. The checklist goes directly from applying the diff to pushing the branches. I tried it against main 232f9e603 with the test source and CMake hunk from #2734, using a local bare repository as the fork. I staged the test source too. The push succeeded, but the fork's ci-red/2734 still pointed at the baseline commit. Its tree was missing both the test source and the add_test registration. After committing the staged pair and pushing again, the fork's tree contained the test source and its registration. A second agent reproduced the result independently.

Please add a step before pushing. Stage the test files, verify with git diff --cached that the patch contains just the intended test and registration, and commit them on ci-red/<N>. That makes the ref passed to gh workflow run contain the fixture.

The Runtime workflow's workflow_dispatch, CPU runtime tests step and CTest command match the guide. On 0703aebb4 merged with 232f9e603 (tree a25ba0e3d), the documentation suite passed 57 tests and 133 subtests with Python 3.14.10 and pytest 9.2.0. AI-assisted with OpenAI Codex.

**Independent check of steps 2–3. Commit the red fixture before pushing.** `git apply --3way` stages the CMake change. The checklist goes directly from applying the diff to pushing the branches. I tried it against `main` `232f9e603` with the test source and CMake hunk from #2734, using a local bare repository as the fork. I staged the test source too. The push succeeded, but the fork's `ci-red/2734` still pointed at the baseline commit. Its tree was missing both the test source and the `add_test` registration. After committing the staged pair and pushing again, the fork's tree contained the test source and its registration. A second agent reproduced the result independently. Please add a step before pushing. Stage the test files, verify with `git diff --cached` that the patch contains just the intended test and registration, and commit them on `ci-red/<N>`. That makes the ref passed to `gh workflow run` contain the fixture. The Runtime workflow's `workflow_dispatch`, `CPU runtime tests` step and CTest command match the guide. On `0703aebb4` merged with `232f9e603` (tree `a25ba0e3d`), the documentation suite passed 57 tests and 133 subtests with Python 3.14.10 and pytest 9.2.0. AI-assisted with OpenAI Codex.
OreoFR commented 2026-11-30 14:56:58 +00:00

Thanks @merzleckeier, right: the list went from git apply --3way straight to the push. 9f2ca5899 adds step 3: stage the test file(s), check git diff --cached holds only the test and its registration, commit on ci-red/<N>, and says what happens without it (the pushed branch is still plain main, so the red run has no such test). Push and run are now step 4.

tests/test_docs_*.py: 57 passed, 133 subtests passed (macOS, Python 3.12.16); check_no_game_data.py docs/testing.md: clean.

AI-assisted: Claude Code

Thanks @merzleckeier, right: the list went from `git apply --3way` straight to the push. `9f2ca5899` adds step 3: stage the test file(s), check `git diff --cached` holds only the test and its registration, commit on `ci-red/<N>`, and says what happens without it (the pushed branch is still plain `main`, so the red run has no such test). Push and run are now step 4. `tests/test_docs_*.py`: 57 passed, 133 subtests passed (macOS, Python 3.12.16); `check_no_game_data.py docs/testing.md`: clean. AI-assisted: Claude Code
MoonEyes commented 2026-11-30 15:11:36 +00:00

Read by MoonEyes (another owner than OreoFR) on head 9f2ca5899, the whole diff, against main b17b22d33: the workflow has workflow_dispatch, the step "CPU runtime tests" and its ctest command match runtime.yml, the anchor it links to is in the page, and step 3 (merzleckeier's remark) is there. Documentation only; I did not run the procedure on a fork.

AI-assisted (Claude Code).

Read by MoonEyes (another owner than OreoFR) on head `9f2ca5899`, the whole diff, against `main` `b17b22d33`: the workflow has `workflow_dispatch`, the step "CPU runtime tests" and its `ctest` command match `runtime.yml`, the anchor it links to is in the page, and step 3 (merzleckeier's remark) is there. Documentation only; I did not run the procedure on a fork. AI-assisted (Claude Code).
MoonEyes commented 2026-11-30 16:50:10 +00:00

Merging. Head 9f2ca5899 merges cleanly with main 1ad7867a2 and does not force a rebase of #2566. Documentation only, read in full by another owner. Merged by MoonEyes.

AI-assisted (Claude Code).

Merging. Head `9f2ca5899` merges cleanly with `main` `1ad7867a2` and does not force a rebase of #2566. Documentation only, read in full by another owner. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.