test: collect the unregistered fast CPU tests and update cpu ci python to 3.12 - #85
Merged
Merged
Conversation
6 tasks
Rockdu
force-pushed
the
test/collect-fast-cpu-tests
branch
from
July 30, 2026 19:42
f3719af to
bd36099
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
monkeypatch.setattr(backend, "_is_primary", False)line fromtest_collector_startup_failure_disables_dashboard.tests/fastfiles that no CI registration marker covered, so the suite runner collects them.Why
miles/dashboard/backend.pyhas never had an_is_primaryattribute — it exposes_handleand_resolution_failed, both since the module landed in #58.monkeypatch.setattrdefaults toraising=True, so that line raisesAttributeErrorand the test has been failing since the day it was merged. The meaningful part of the setup is the_handle = Nonepatch right above it, so deleting the stale line restores the intended assertion (actor creation raises ->init_dashboardreturns False and warns).It went unnoticed because
tests/ci/run_suite.pyglobstests/fast/**/test_*.pybutcollect_testsonly keeps files whose source contains aregister_*_ci(...)marker (parsed via AST). Three files had none, so CI never ran them:tests/fast/dashboard/test_async_collector.pytests/fast/utils/test_diffusion_rollout_response.pytests/fast/utils/test_processing_utils.pyRegistering them means a future stale patch like this one fails a PR instead of only failing for whoever happens to run
pytest tests/fastby hand.Registering
test_async_collector.pyalso exposed thatmiles/dashboard/events.pyandstore.pyuseenum.StrEnum(3.11+) whilestage-a-cpu— the one job that does not run inside the container image — set up Python 3.10 to matchsetup.py'spython_requires=">=3.10". The declaration and the code have disagreed since the dashboard landed. The dev/CI container image is Python 3.12, so the third commit raises the declared floor to 3.12 (setup.py, classifiers, isortpy_version, and the two workflow jobs that pin a bare-runner Python) rather than adding a dependency or shimmingStrEnum. It is the same commit as in #84, which needs it for the test it adds; whichever lands first makes it a no-op in the other.Validation
collect_testsnow returns all three asHWBackend.CPU / stage-a-cpu / est_time=15 / labels=[].pytest tests/fast -q-> 138 passed (was 137 passed + 1 failed).pre-commit run --all-filespasses;isortaccepts the marker-before-imports layout already used bytests/fast/utils/test_misc.py.Commits are ordered fix-then-register so the registration never lands while the test is red.
Files
tests/fast/dashboard/test_async_collector.py— stale monkeypatch removed, CPU CI registration added.tests/fast/utils/test_diffusion_rollout_response.py— CPU CI registration added.tests/fast/utils/test_processing_utils.py— CPU CI registration added.setup.py,pyproject.toml,.github/workflows/_run-ci.yml,.github/workflows/pre-commit.yml— python floor raised to 3.12.Checklist
pre-commit run --all-filespassespytest -xis green —pytest tests/fastis 138 passedpython3 train.py --helpstill parses — n/a, no flag changes