fix(ci): make benchmark_regression job fast and correctly fail on regressions #87
No reviewers
Labels
No labels
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
#86 fix(ci): benchmark_regression job intermittently hangs/times out and never signals real regressions correctly
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core!87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/m2-quick-benchmark-regression-ci"
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?
Summary
Three compounding issues in the
benchmark_regressionCI check, found while investigating a 41m13s hang/timeout on PR #85's run (job 205876):ASV calibration overhead:
asv continuousran with no speed-oriented flags, fully calibrating/repeating every one of 138 benchmark runs (69 benchmarks × 2 commits).noxfile.py'sbenchmark_regressionsession now forwards*session.posargstoasv continuous(its own default, full-accuracy behavior is unchanged when called without extra args);.gitea/workflows/ci.yml'sbenchmarkjob now invokesnox -s benchmark_regression -- --quick, scoping ASV's single-run mode to this informational job only.Packaging bottleneck (surfaced once --quick was applied):
asv.conf.json's build/install/uninstall commands used plainpython -m build/pip, which silently spent ~11 minutes per run in pip's resolver (uncached, per-commit dependency install with no progress output). Switched touv build/uv pip install/uv pip uninstall. Since ASV'sfind_executableonly searches each managed venv's ownbin/(not$PATH), addeduvto asv'smatrixconfig so it gets pip-installed during venv bootstrap, and pass--python {env_dir}/bin/pythonexplicitly to each command (standaloneuv, unlikepython -m pip, can't otherwise infer which of asv's several per-commit venvs to target). Also added--force-reinstallto the install command per ASV's own documented rationale.Exit-code / success_codes mismatch:
asv continuousreturns the booleanworsenedas its exit code (0 = no significant regression, 1 = a benchmark measurably worsened past--factor) — there is no exit code 2 in this ASV version.noxfile.py'ssuccess_codes=[0, 2]never matched the real "worsened" code, so the session failed unconditionally on any regression signal. Corrected tosuccess_codes=[0], so the session (and CI job step) now fails specifically when ASV reports a real, significant regression —continue-on-error: trueon the job is what keeps this from blocking the PR merge, not this success list.This is a CI/tooling-only change — no business logic, no
src/changes.Closes #86
Test plan
python3 -m py_compile noxfile.pyasv.conf.json/.gitea/workflows/ci.ymlnox -s lintrm -rf .asv/env .asv/resultsbetween runs:uv-based build/install/uninstall correctly targets each per-commit venv (no moreModuleNotFoundError)failedwhenasv continuousdetects a significant regression between the compared commits (confirms the fix doesn't mask real regressions)benchmarkjob completes quickly and its pass/fail conclusion matches whether a real regression was detected🤖 Generated with Claude Code
cc31d40aeda1fd36932ffix(ci): scope asv --quick to the benchmark_regression CI job onlyto fix(ci): make benchmark_regression job fast and correctly fail on regressionsPR Review: !87 (Ticket #86)
Verdict: Approve
This PR correctly addresses the three compounding issues described in #86: ASV calibration overhead, pip packaging bottleneck, and the incorrect
success_codeslist. The changes are well-scoped, limited to CI/tooling files, and thoroughly documented with inline comments. No business logic is modified, so coverage and functional behavior are unaffected.Critical Issues
None
Major Issues
None
Minor Issues
None
Nits
None
Summary
noxfile.py: Forwarding*session.posargstoasv continuousis the right way to let CI opt into--quickwithout changing the session's default behavior. Correctingsuccess_codesfrom[0, 2]to[0]aligns the session with ASV's actual exit-code semantics (0 = no regression, 1 = regression detected), so the job now fails specifically on real regressions rather than unconditionally.asv.conf.json: Switching build/install/uninstall commands touvwith explicit--python {env_dir}/bin/pythonand bootstrappinguvvia thematrixconfig solves the per-commit pip resolver bottleneck while correctly targeting each ASV-managed venv..gitea/workflows/ci.yml: Passing--quickonly in the CI benchmark job keeps the fast, informational regression check scoped appropriately; the existingcontinue-on-error: trueon the job remains the non-blocking mechanism.The commit is atomic, the message matches the issue metadata, and the body explains the rationale clearly. This is ready to merge.