fix: wait for exact-base quality artifacts (Fixes #516) - #517
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Performance Report (Linux)Result: ✅ Within regression budgets
|
Performance Report (macOS)Result: ✅ Within regression budgets
|
Test Coverage Report (Linux)Result: ✅ Within regression budget
|
Performance Report (Windows)Result: ✅ Within regression budgets
|
Test Coverage Report (Windows)Result: ✅ Within regression budget
|
There was a problem hiding this comment.
Pull request overview
This PR adds a shared, exact-SHA baseline “wait” helper to prevent false-negative quality checks when performance/coverage comparison jobs start before the base commit’s baseline artifacts are published. It integrates the helper into the PR performance and coverage workflows so they wait (with a bounded timeout) for a successful exact-base run and the required artifact, failing clearly if the workflow fails or artifacts never appear.
Changes:
- Added
scripts/wait_for_baseline.pyto poll for the exact-base push workflow run and required artifact with timeout, clear errors, and fail-fast on unsuccessful conclusions. - Added unit tests covering polling behavior, run selection, input validation, timeout paths, and artifact filtering.
- Updated performance and coverage workflows to wait before downloading exact-base artifacts.
Show a summary per file
| File | Description |
|---|---|
| scripts/wait_for_baseline.py | New helper that waits for an exact-commit baseline workflow + artifact via GitHub API with bounded polling and clear failure modes. |
| scripts/tests/test_wait_for_baseline.py | New unittest coverage for polling, failures, timeouts, artifact selection, and input validation. |
| .github/workflows/perf-tests.yml | Adds a “wait for exact PR base performance” step prior to baseline artifact download. |
| .github/workflows/coverage.yml | Adds a “wait for exact PR base coverage” step prior to baseline artifact download. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
Summary
Prevent false-negative quality checks when a PR starts before its exact-base performance or coverage baseline artifact has been published. A shared helper now waits for the exact SHA's successful push workflow and required artifact without falling back to moving
main.Changes
Validation
python -m unittest discover -s scripts/tests -p 'test_*.py' -v(41 passed)Fixes #516