fix: avoid coverage guard artifact probe loop - #2165
Conversation
Automated Status SummaryHead SHA: 2342c50
Coverage Overview
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 036064d977
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const candidate = | ||
| runs.find((run) => ['success', 'neutral'].includes(run.conclusion || '')) || runs[0]; |
There was a problem hiding this comment.
Keep artifact-aware run selection for coverage guard
Selecting the latest success/neutral Gate run without checking artifacts can pick docs-only or otherwise reduced runs that never upload gate-coverage-trend, gate-coverage-trend-history, or gate-coverage. In that case the downstream artifact-cache steps are configured with fail-fast: 'true' (.github/actions/artifact-cache/action.yml + artifact_cache.js discoverCommand), so the scheduled guard job fails even though an older completed run with valid coverage artifacts exists. This regresses the previous behavior that walked runs until one with non-expired coverage artifacts was found.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Removes the per-run coverage artifact probe loop from the maint-coverage-guard workflow’s Gate run discovery logic, and mirrors the change in the consumer template to prevent sync PR drift.
Changes:
- Simplifies Gate run selection to prefer successful/neutral completed runs instead of scanning artifacts per run.
- Removes unused retry helper destructuring (
withRetry) in the discovery script. - Applies the same logic update in both the source workflow and the consumer template.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/maint-coverage-guard.yml |
Updates Gate workflow run discovery logic to avoid per-run artifact probing. |
templates/consumer-repo/.github/workflows/maint-coverage-guard.yml |
Mirrors the discovery logic update in the consumer template to prevent drift. |
| const candidate = | ||
| runs.find((run) => ['success', 'neutral'].includes(run.conclusion || '')) || runs[0]; | ||
|
|
||
| if (!candidate) { | ||
| core.warning( | ||
| 'Unable to locate a completed Gate workflow run with coverage artifacts.', | ||
| ); | ||
| core.warning('Unable to locate a completed Gate workflow run.'); |
| const candidate = | ||
| runs.find((run) => ['success', 'neutral'].includes(run.conclusion || '')) || runs[0]; | ||
|
|
||
| if (!candidate) { | ||
| core.warning( | ||
| 'Unable to locate a completed Gate workflow run with coverage artifacts.', | ||
| ); | ||
| core.warning('Unable to locate a completed Gate workflow run.'); |
|
Closing as superseded by #2166, which carries the bounded coverage guard artifact discovery fix with the follow-up review feedback addressed. |
Related to campaign issue #1836
Automated Status Summary
Scope
Sync/Dependabot Campaign Queue
Durable tracker — see
docs/ops/DURABLE_TRACKING_ISSUES.md. The body below is regenerated each cycle bymaint-82-sync-dependabot-campaign.yml; do not close as part of routine triage.Remote GitHub Actions owns discovery for sync-generated and Dependabot PR rounds. Local Codex should only claim items from this issue when
needs-local-codexwork is queued.Summary
Context for Agent
Related Issues/PRs
Tasks
Acceptance criteria
sync/workflows-f823f728bf45(f164565bc1ec)Head SHA: 036064d
Latest Runs: ✅ success — Gate
Required: gate: ✅ success