Skip to content

ci: separate Python test budgets and deduplicate runs (CHE-2461) [squash] - #244

Merged
congvc-dev merged 2 commits into
mainfrom
agent/x99-codex-sol/che-2461-f61a3682e691
Nov 2, 2026
Merged

congvc-dev merged 2 commits into
mainfrom
agent/x99-codex-sol/che-2461-f61a3682e691

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Status

Draft mitigation for the Python 3.12 push-run timeout. Full CI recovery is not established.
x99-claude-opus returned an independent code-only PASS on head 85a63a553b815825146ed07030a95f36f39a8959.
CI run 40862414724, attempt 1, failed. The deterministic suite exhausted its own 60-minute job budget at 26% progress.
Do not mark ready until CI is green and x99-claude-opus returns an exact-head PASS.

Conditions

Builds and tests stay on X99. Fork guards and the browser-specific runner label stay unchanged.
Both full test passes, the 60% coverage floor, and the B2 ADB/tunnel gate remain required.
No skipped suite, runner reconfiguration, merge, or deployment is included. The follow-up commit d8c4a4d6 raises the python-tests timeout to 90 minutes per matrix leg (see the last section).

Change

  • Run push CI only on main. Keep pull-request and manual runs. Previously every PR update scheduled duplicate workflows with distinct branch/PR concurrency groups.
  • Give deterministic and reverse-order suites separate matrix jobs with their own budgets (60 minutes at 85a63a55, 90 minutes at d8c4a4d6). Run one matrix leg at a time, with fail-fast disabled, to avoid adding runner contention.
  • Preserve the required check name Python 3.12 as an aggregate gate. The gate fails for failure, cancellation, skipped results, or missing results.
  • Report the 20 slowest tests in each suite for subsequent timing diagnosis.

Evidence

The previous job combined two full-suite passes within one 60-minute timeout on 3-CPU X99 containers.

Run Observed Python result
40672287973 Green main push: deterministic 22m38s; reverse 14m05s; job 38m57s.
40807954125 Main push: deterministic 38m23s passed; reverse cancelled at the shared job timeout.
40807922467 PR #240 push, attempt 1: deterministic step 41m13s passed; reverse cancelled. Attempt 4 also cancelled, with unusually slow setup and only 5% test progress.
40807925889 Same PR #240 head, pull-request event: both steps passed in 31m54s and 25m40s. Both events ran independently.
40836984949 Not a timeout: failed after 45m11s on the existing retention test's 5-second thread-start assertion. Coverage reached 75.48%.
40862414724, attempt 1 Candidate head 85a63a55: deterministic cancelled after 60m41s, at 26% progress. Reverse passed. Frontend test:shell-cleanup failed. The aggregate Python 3.12 gate failed.

These logs establish shared-budget exhaustion and duplicate work. They do not prove the cause of every per-test slowdown.
The attempt-4 slowdown and retention timing failure remain validation risks; this PR does not claim they are independently repaired.
The retention module passed locally: 43 tests in 20.69s on Python 3.13.

Failed-candidate follow-up

The candidate removes duplicate events and the shared budget, but the individual deterministic timeout remains unresolved.
The completed-job log endpoints for frontend and reverse returned HTTP 404. The full-run archive also omitted both jobs.
The original frontend assertion output is not available. The frontend-only debug retry passed in attempt 2 on the unchanged head.
The cancelled deterministic result and failed aggregate gate remain. The overall attempt-2 workflow conclusion is cancelled.
The frontend retry does not repair the deterministic timeout or make this PR ready.

Targeted Python 3.12 flow tests passed on the root filesystem, SSD2 and an isolated 3-CPU/8-GB runner-image container.
These probes used the CI dependency files, with Python 3.12.3 rather than CI's Python 3.12.16.
The probes did not reproduce the CI slowdown and do not establish its remaining root cause.
Whole-suite collection with one selected flow test passed in 159.90s; the selected test took 0.10s.
That follow-up added no source change. The later commit d8c4a4d6 raises the timeout to 90 minutes. No runner mutation is made. The earlier PASS covers 85a63a55 only; d8c4a4d6 has no PASS yet.

Observed test-first receipt

Parent: aedadace39389fdfd11176b43eb16c8ef5266e5c.
New regression tests were added and run before the workflow implementation changed.

PYTHONDONTWRITEBYTECODE=1 /home/congvc/services/artemis-qa/.venv/bin/python -B -m pytest --noconftest tests/unit/test_workflow_runner_policy.py -q -k 'does_not_duplicate or independent_budgets or required_python_check' -o cache_dir=../evidence/pytest-cache

Observed red on Python 3.13:

test_ci_does_not_duplicate_pull_request_runs_on_branch_pushes:
AssertionError: assert None == {'branches': ['main']}
test_python_passes_have_independent_budgets_without_extra_runner_contention:
KeyError: 'python-tests'
test_required_python_check_fails_unless_both_matrix_passes_succeed:
KeyError: 'needs'
3 failed, 9 deselected in 0.36s
exit status: 1

The same command after implementation:

3 passed, 9 deselected in 0.12s
exit status: 0

Additional observed checks:

  • Python 3.12: all 3 new regressions passed in 0.15s. The policy, runner-routing and receipt-fetch selection passed 16 tests plus 4 subtests in 0.87s.
  • Python 3.13: policy, runner-routing and the complete CHE-844 receipt regression module passed 47 tests plus 4 subtests in 106.62s.
  • Ruff formatting, Ruff lint and git diff --check passed.
  • Full Python 3.12 suites: candidate CI attempt 1 failed as recorded above. No local full-suite pass is claimed.

Closes CHE-2461

Follow-up commit d8c4a4d (30 Oct 2026)

CI attempt 1 on 85a63a5: deterministic leg hit its own 60 min cap at 26%. Diagnosis in CHE-2461: suite grew from about 21 to 42 min on 28 to 29 Oct, plus runner contention up to 2.6x. Fix: python-tests timeout-minutes 60 to 90 (applies per matrix leg).

  • Red (tests expect 90, ci.yml still 60): uv run pytest tests/unit/test_workflow_runner_policy.py gives 2 failed, 10 passed (assert 60 == 90).
  • Green (after ci.yml change): 12 passed. .github/tests/test_runner_routing.py OK. Ruff format and check pass.
  • CI on the new head is the real validation; PR stays draft until it is green. If the deterministic leg still times out, next step is sharding.

@congvc-bot-x99
congvc-bot-x99 Bot marked this pull request as ready for review October 31, 2026 06:16
@congvc-dev
congvc-dev merged commit 6084f82 into main Nov 2, 2026
6 checks passed
@congvc-dev
congvc-dev deleted the agent/x99-codex-sol/che-2461-f61a3682e691 branch November 2, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant