Repository navigation
ci(artemis): fast PR lane, full suite on main and nightly (CHE-3276) [squash] - #256
Draft
congvc-bot-x99[bot] wants to merge 9 commits into
Draft
congvc-bot-x99[bot] wants to merge 9 commits into
congvc-bot-x99[bot] wants to merge 9 commits into
Conversation
… PR lane (CHE-3276)
…t mapping (CHE-3276)
…osted What's New (CHE-3276)
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.
Status
Draft. Refs CHE-3276 (slice S4 of CHE-3264). Cheese merges; the agent-merge exception does not apply to workflow changes. Head
741235696f4bbafef7e62e06fd7cc3a8670c6d0d. The review of headbc249899asked for changes; this head answers it (see Review changes). The after-change latency has two samples on this PR (see Evidence).Conditions
cheese-x99pool; no paid or larger runners.ci-policyis not enrolled in artemis yet (S3d). The branch ruleset formainlistedrequired_status_checks: []and the branch-protection API returned 403 for this token, so "required checks" below means the jobs that run onpull_request. NOT-VERIFIED: no rule requires any check by name today. An admin must addB2 ADB allowlist and tunnel fuzz(andPython 3.12) to the ruleset for B2 to be enforced; this PR cannot set that.Change
host-agent.yml:pushnow runs only onmain(path filter kept). It no longer duplicates thepull_requestrun on a branch push.ci.yml: the PR checkPython 3.12(jobpython-quality) is now a fast lane: ruff format and lint, quality ratchet, pyright, the unit tests outsidetests/unit/admin_console, and the B2 ADB and tunnel gate. No coverage, no reverse pass.ci.yml: the full suite (python-tests: deterministic with the coverage floor 60, and reverse order) runs onmainpushes, a nightlyschedule(20:17 UTC, 03:17 ICT) andworkflow_dispatch. It is skipped on a PR.ci.yml: the PR lane also runs thetests/unit/admin_consoletests that match the changed paths (eng review D15 = A).scripts/ci_mapped_tests.pymaps a changed test file to itself, a changedapps/admin_consolemodule to tests named after it and to every test that imports it, a changedconftest.pyor__init__.pyunder the test directory to the whole directory, and an unmatched module totest_access_control.pyandtest_route_tiers.py. The step runs withset -euo pipefail: a git or selector error fails the job, and only an empty selection passes without tests. A change toaccess_control.pymaps to 28 of the 85 test files.ci.ymlconcurrency:cancel-in-progressis true for PR events only, so amainrun is not cancelled by the next push.max-parallel: 1stays on the full matrix, with its reason in a comment.Why
max-parallel: 1existsPR #244 (CHE-2461, merged 2 Nov 2026) split the one Python job into two serial legs. Its test
test_python_passes_have_independent_budgets_without_extra_runner_contentionnames the intent: each leg gets its own timeout budget and a run holds one X99 runner, so it adds no contention on the shared 3-CPU host. The comment on the matrix says the deterministic suite grew from about 21 to 42 min on 28 to 29 Oct and swings up to 2.6x under load. Owner: x99-codex-sol authored it; x99-claude-sonnet owned the follow-up. The reason is runner contention, not a test dependency.Decision: move, do not shard
Rule: shard only if a PR then uses at most 2 concurrent X99 runners and no more total runner-minutes than today. Measured:
uv sync). Sharding fails both conditions, so the full suite moves tomainand nightly.tests/unit/admin_consoleis 1,018 s of 1,382 s (74%) and 2,049 of 6,376 tests. The fast lane leaves it out: 4,330 tests, 6 min 3 s on this host without coverage, plus 8 s for format, lint, ratchet and pyright.tests/unit/admin_console, the coverage floor or the reverse-order pass. A break there is caught onmainwithin one run (about 70 min) and in the nightly run. This is the accepted cost of the 15 min target (Cheese D4 = B).Review changes (head
bc249899, CHANGES REQUESTED)Python 3.12, so no check could require it by name: now the separate jobb2-gate.test_security_boundary.pyforaccess_control.py, and a selector error was swallowed: now import-matching and a fail-closed step.5 failed, 21 passedintests/unit/test_workflow_runner_policy.pyandtests/unit/test_ci_mapped_tests.py(KeyError: 'b2-gate',test_security_boundary.pymissing from the mapped list,[]instead of['tests/unit/admin_console']forconftest.py, noset -euo pipefail). Green:26 passed. Ruff format and check pass;python .github/tests/test_runner_routing.py: OK.Evidence
Red (before the change),
uv run pytest tests/unit/test_workflow_runner_policy.py:6 failed, 10 passed. The failing tests includetest_pull_request_required_job_set_is_the_fast_lane(python-testswas in the PR job set),test_main_runs_queue_instead_of_cancelling_each_other(assert True == "${{ github.event_name == 'pull_request' }}"),test_python_pull_request_lane_runs_checks_and_the_fast_subset('needs'present) andtest_host_agent_does_not_run_on_branch_pushes_beside_pull_requests(KeyError: 'branches').Green (after):
16 passed.python .github/tests/test_runner_routing.py: OK. Ruff format, ruff check and the quality ratchet pass.Red for the path-to-test map (stub script returning no tests):
3 failed, 2 passedintests/unit/test_ci_mapped_tests.py(for exampleassert [] == ['tests/unit/...est_drain.py']), plus1 failedfortest_python_pull_request_lane_runs_tests_mapped_from_the_changed_paths(StopIteration). Green:22 passedfor both test files.The workflow test
test_pull_request_required_job_set_is_the_fast_laneasserts the PR job set containsB2 ADB allowlist and tunnel fuzz;test_b2_gate_is_its_own_pull_request_check_that_can_be_requiredasserts the job runs both gate test files with no|| true.Baseline PR feedback latency, before (earliest
pull_requestcheck-suitecreated_atto the last completed check run for the head SHA, first attempts only; every check run on the PR counted because no required list exists):ccd867be(pre-#244, one Python job)b636f71e(PR #246)e9d56924(PR #254)d8c4a4d6(PR #244)bdc5d242(PR #255)After, this PR. Head
741235696f4bbafef7e62e06fd7cc3a8670c6d0d: all 8 checks pass; the whole PR took 41.8 min from the firstpull_requestrun (07:01:49 UTC) to the last check (07:43:39 UTC). Most of that was runner queue time, not test time.CIrun was created at 07:01:49 UTC. The first job started at 07:22:24 UTC, so no X99 runner was free for about 20 min. No other artemis run was active; the cause is the shared X99 pool (design target 5), not this change.Python 3.12: job time 12.6 min (started 07:27:03, finished 07:39:37 UTC). It ran besideB2 ADB allowlist and tunnel fuzz(2.8 min) andBuild and smoke-test Python packages(3.2 min) on the 3-CPU pool, which is slower than the 8.7 min measured on headbc249899(see below).Frontend tests and production build: job time 3.9 min, but it started at 07:39:43 UTC, 38 min after the run was created, because it waited for acheese-x99-browserrunner.bc249899(before the review changes): 32.6 min for the whole PR,Python 3.12job 8.7 min, frontend waited 28 min for a browser runner.24b2e402failed inRun fast Python tests(exit 1). Its job log is missing on GitHub, so the cause is unknown. The step passes locally (4334 passed on 3 CPUs), and the same lane passed onbc249899. The failure may have been a flaky test or runner state; it is not explained.Closes nothing. Refs CHE-3276.