Repository navigation
Description
Preflight
- I searched existing issues and discussions for this behavior. Closest: Ideas for making your CI faster #8787 (external CI-speed suggestions, noted shards approaching the deadline on 11-13/14); this report is the regression past that point — every recent run now fails. CI: chat-bundle-browser and dashboard-browser shards time out on main #7389 covers browser lanes, not the Python shards.
- This report is not an unpatched security vulnerability.
- The report and attachments contain no credentials or private/internal material.
Issue origin
Observed or reproduced in a real environment (public CI run logs on this repository).
LoopX version or commit
main at 811c1a1f6 (also reproduced on PR heads based on b34f0e615).
Host or runtime surface
Not host-specific
LoopX area
Build, packaging, installer, or CI
Problem
Every recent Python Tests run on main fails: all six test-shard jobs are interrupted by the shard session deadline with most of their assigned cases never executed, so main's Python suite currently has no complete green verification. On the latest main run (46099466649, 2026-11-28T02:43Z) each shard was assigned 7307–7308 cases and the deadline hit with only 3694–6891 finished (LOOPX_PYTEST_DEADLINE, exit code 2). The two prior main runs (46092879228, 46098530667) fail the same way. PR runs inherit the same failures, which makes every open PR's Python check red for reasons unrelated to its diff.
Minimal reproduction
- Open any recent
Python Testsrun onmain(e.g. 46099466649). - Open
test-shard (1)(job140838830232): the step log ends withLOOPX_PYTEST_DEADLINE {"deadline_seconds":3262.992,...,"selected_cases":7308,"finished_cases":4632,...}and##[error]Process completed with exit code 2. - Shards 2–6 show the same deadline interruption with 3694–6891 of ~7308 cases finished.
Expected behavior
main's Python Tests runs complete their assigned cases inside the shard budget and pass when the code is correct (the suite's own health signal; see also the budget design in scripts/ci/shard_budget.py).
Actual behavior
All six shards are terminated at the deadline (session_deadline ≈ 3243–3268s of a 3600s job budget) with thousands of cases unexecuted, and the run is red. Additionally, a handful of genuine test failures are currently mixed into the interruption noise on main (latest run: test_checkpoint_provider_fence, test_quota_authority_settlement_journey, test_delegation_turn_context, test_distribution_runtime_identity, test_stride_comparison_followthrough_cli, test_connected_adapter_status_vocabulary_owner, test_research_execution_loop, test_long_chain_projected_closeout, and tests/test_runtime_subprocess_utf8.py flags loopx/hosts/agy/__init__.py:581 — a text=True subprocess read without encoding="utf-8", which reopens the #4155 locale bug the guard exists for). #8787 already observed shards at ~59.5 minutes on 11-13/14; since 2026-11-26 they exceed it every run.
Sanitized diagnostics
# main run 46099466649, test-shard (1), step tail
LOOPX_PYTEST_DEADLINE {"version":1,"deadline_seconds":3262.992,"deadline_elapsed_seconds":3262.9995,"selected_cases":7308,"finished_cases":4632,...}
##[error]Process completed with exit code 2.
# shards 2-6: selected 7307-7308, finished 3694 / 4708 / 3993 / 6275 / 6891Additional context
Related: #8787 (CI-speed suggestions; its 11-13/14 measurements already showed ~59.5-minute shard steps), #7389 (browser lanes, different workflow). The per-case timing telemetry (LOOPX_PYTEST_TIMING) and the diagnostics file the harness already emits should make the slowest contributors identifiable without new instrumentation.
Activity
LIHUA919 commentedon Nov 29, 2026
Addition — a second gate is red on main, and it is upstream of the shards. While attributing the red
Python Testson PR #9435 I found that thekernel-contractsjob now fails onmainby itself, and becausetest-shardandwindows-powershelllist it underneeds, pull-request runs skip the Python shards entirely instead of running them into the deadline:kernel-contractstest-shard83bbed022on baseb34f0e615811c1a1f689b2ee479on base811c1a1f6The failing step is
Type-check kernel contracts(python -m mypy). On main it ends with:I reproduce the same count locally on a pristine
811c1a1f6withpython -m mypy --platform linux --no-incremental(3834 errors), so it is the tree, not the runner. Every main run in the window that actually executed this job (five, from 2026-11-27T16:34Z on509360fb0onward) showsfailure; the later ones onmainwere cancelled by concurrency before the job started. The lastsuccessI can find is the 2026-11-25 pull-request run above, so the regression is somewhere betweenb34f0e615and509360fb0; I did not bisect it.Consequence for contributors: a PR based on current
maingets no Python shard result at all, whatever its own diff does, so "the Python suite passed on this head" cannot be shown from CI until this is fixed or the step is given a main-relative baseline.LIHUA919 commentedon Nov 29, 2026
A more complete report of the same regression is now tracked in #9586 (per-shard failure counts, attribution to the zero-
Anymodularization wave, PR-side skip history back to 2026-11-21, and a merged-without-suite precedent #9304). Keeping this issue open only for the two data points it adds — the run-record regression window (b34f0e615..509360fb0, last success 2026-11-25, first failure 2026-11-27T16:34Z) and the note that later "green-looking" main runs were concurrency-cancelled before the job started. Maintainers: feel free to close this as a duplicate of #9586 once those are noted there (they are, in my cross-reference comment).gcl-coder commentedon Nov 30, 2026
量化复核:超时由「等数量分配 + 容量不足」两件独立的事叠加而成
我在
811c1a1f6上把 #9567 的数字重新算了一遍,结论是这里有两个彼此独立的问题,只修其中一个都不会让分片跑完。
一、分片是按「数量」而不是「耗时」均分的
--splitting-algorithm least_duration需要一份耗时基线(pytest-split 默认读.test_durations)。这个仓库里没有该文件,git log --all -- .test_durations也查不到任何历史提交,因此该算法退化为「等数量轮转」。
两条独立证据:
不相等的用例数——相等恰恰说明只按数量分。
python-tests.yml第 686–688 行的注释本身就写着:Without timing history least_duration alternates equal-weight tests.代价是把重文件整块塞进同一个分片:同一段 3263s 里,各分片完成数为
3694 / 3993 / 4632 / 4708 / 6275 / 6891,相差 1.86 倍。
换算成单用例成本:最轻的 0.947 s,最重的 1.766 s。
二、总容量已经不敷使用(即使完美均衡)
用你报告的 deadline ≈ 3263s、2 worker、6 分片:
按分片成本区间给一个边界:
也就是说:即使分片完全按耗时均衡,这套用例也只是「勉强塞得进」到「差一倍」之间,
现实值大约 1.5 倍。 单靠修正分片算法无法转绿。
三、我没拿到的证据
python-diagnostics-*产物下载返回 401(当前凭据没有 artifact 读取权限),所以longest_cases的精确排名我拿不到。上面的需求估算是从你报告里的selected_cases/finished_cases推出的下界,不是逐用例实测。如果维护者能贴出任一
python-diagnostics-N里的longest_cases与phase_seconds,就能定位到具体用例,把「削减成本」这条路径变成可执行的。四、可选的三个方向(互不替代)
actions/cache+--store-durations/--durations-path让分片按真实耗时均衡。修的是失衡,预计挽回 30–40%,单独不足以转绿。
--splits 6 → 8/10,或提高 worker 数。立刻有效,直接增加 CI 分钟消耗。五、一个前置依赖
在
kernel-contracts修复之前(#9602),PR 运行的test-shard仍因needs不满足而被 skip,本 issue 的修复在 PR 路径上无法被验证。两者需要一起看。