mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:45:53 +01:00
[PR #374] ci: a docs-only pull request runs every test that reads the document it changes (OLD-799) #426
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#426
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/374
Author: @ItsMrDubey
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:ci-path-filter-gaps📝 Commits (1)
13d0c9dci: a docs-only pull request runs every test that reads the document it changes📊 Changes
2 files changed (+117 additions, -4 deletions)
View changed files
📝
.github/workflows/ci.yml(+10 -2)📝
tests/test_ci_registration.py(+107 -2)📄 Description
Claimed in the coordination issue as: OLD-799 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121328982)
What and why
OLD-799 asks for the CI path-filter blind spots: a file whose change would not start a job that depends on it. The workflow-linting half is already covered by
jactionlint.yml(.github/**), so this PR only covers the filters.I went through every workflow's filters, and through what each job reads:
runtime.yml(windows, wine, linux, macos)paths:listtools/*.pythroughruntime/test/shaders/build.py,runtime/cmake/translator_deps.cmake,scripts/run_gpu_tests.py, CMake../tools/*.py,scripts/**,.gitattributes,third_party/**tests/test_runtime_paths.pyalready recomputes the import chain and everytools/entry is listed. (build.pynamestests/semantic/fixtures/ps_mullit, but that file isn't tracked and no CI job runsmullit_readback.py.)xma2-decoder.ymlruntime/xma_decoder/**,third_party/xma/**, itselfxmacrate comes from git throughCargo.lock(in the tree)jactionlint.yml.github/**no-game-data.yml,conflict-label.ymlci.ymlcheck,stdlib-tests-linux,macos-pythonchange-scopewhen onlyREADME.md,CONTRIBUTING.md,AGENTS.mdordocs/**/*.mdchangedtests/test_docs_*.pyread those documents from the repositoryThe four documentation readers that a docs-only pull request skips:
tests/test_design_contract_rows.pyreadsdocs/design.md(rows repeated within a table).tests/test_exe_checklist.pytest_this_repositoryrunsexe_checklist.collect(ROOT)over everydocs/*.mdand expects the UNVERIFIED/ASSUMPTION notes inruntime_imports.md,d3d12_vulkan.mdandmodding.md.tests/test_make_game_preflight.pytest_ensure_submodule_names_the_clone_command_the_readme_givesreadsREADME.md.tests/test_progress_dashboard.pytest_default_repo_is_the_one_the_readme_clonesreadsREADME.md.So a PR that only edits the README clone line, drops one of those notes or duplicates a design.md row goes green, and main fails after the merge. To confirm the list, I ran every test file under a
sys.addaudithookopenhook that records each document it reads from the repository. Outsidetest_docs_*/test_i18n_indexit found the first, second and fourth. The make_game file errors out early under 3.11 (ntpath.isjunction, which is 3.12+), so the hook never reached its README case. That case was run on its own and opensREADME.mddirectly (line 690).Fix: the docs-only step now runs
test_design_contract_rows.pyin its loop. For the other three it runs only the cases that read a document, named one by one, so the docs-only job stays a few seconds long. No filter was removed.tests/test_ci_registration.pynow checks this too. It scans every tracked test with the AST foros.path.join(<root>, ...)calls that build a document path, where<root>is__file__or a module-level name derived from it (synthetic trees under a temporary folder don't count). It also keeps a short list of tests that reach the documents through a tool (test_exe_checklist.py). It fails when one of these tests isn't run by the docs-only step. Like the existing docs-only check, it uses the standard library only, with no PyYAML and regex/AST parsing.Tested
Windows 11, Python 3.11.9, no GPU needed.
python -I tests/test_ci_registration.py: 19 tests OK. Before theci.ymlchange, the new repository test fails and lists the four files.python -I tests/test_runtime_paths.py: 5 tests OK (Runtime filter unchanged and complete).test_docs_*.py,test_i18n_index.py,test_design_contract_rows.pyand the three named cases pass.tests/test_*.py(stdlib files underpython -I, pytest files under pytest): document reads only in the files above.python -I scripts/check_no_game_data.py .github/workflows/ci.yml tests/test_ci_registration.py: clean.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. n/a: no translator rule🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.