Skip to content

fix: avoid coverage guard artifact probe loop - #2165

Closed
stranske wants to merge 1 commit into
mainfrom
codex/sync-review-1836-coverage-guard
Closed

fix: avoid coverage guard artifact probe loop#2165
stranske wants to merge 1 commit into
mainfrom
codex/sync-review-1836-coverage-guard

Conversation

@stranske

@stranske stranske commented May 26, 2026

Copy link
Copy Markdown
Owner

Source: Issue #1836

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 by maint-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-codex work is queued.

Summary

Context for Agent

Related Issues/PRs

Tasks

  • Updated: 2026-05-26T07:32:44.928Z
  • Current sync hash: f823f728bf45
  • Repos checked: 12/12
  • Open sync PRs: 13
  • Open Dependabot PRs: 6
  • Active review threads queued: 9
  • Items needing local Codex: 4
  • Actionable local Codex items: 4
  • Claimable local Codex items: 4
  • Source-fixed candidates: 0
  • Superseded sync candidates: 1
  • Source sync states: current=5, superseded=1
  • Finished local results without published source changes: 1
  • Claimed local Codex items: 0
  • Next claim lease expires: -

Acceptance criteria

  • Kind: sync-review-comments
  • Source repo: stranske/Workflows
  • Preferred local workdir: Workflows
  • Head: sync/workflows-f823f728bf45 (f164565bc1ec)
  • Source sync state: current (PR f823f728bf45 / current f823f728bf45)
  • Attempts: 0

Head SHA: 036064d
Latest Runs: ✅ success — Gate
Required: gate: ✅ success

Workflow / Job Result Logs
Auto-label Dependabot PRs ⏭️ skipped View run
Gate ✅ success View run
Health 40 Sweep ❔ startup failure View run
Health 44 Gate Branch Protection ❔ in progress View run
Health 45 Agents Guard ✅ success View run
Health 50 Security Scan ✅ success View run
Health 73 Template Completeness ✅ success View run
Health 74 Template Drift ✅ success View run
Maint 52 Validate Workflows ✅ success View run
PR 11 - Minimal invariant CI ✅ success View run
Running Copilot Code Review ❔ in progress View run
Selftest CI ✅ success View run
Validate Sync Manifest ✅ success View run

Copilot AI review requested due to automatic review settings May 26, 2026 07:42
@agents-workflows-bot

agents-workflows-bot Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Workflow source detected

PR #2165 now has valid workflow source context (origin=github_issue ref=#1836).

A linked GitHub issue is present for this PR.

@stranske
stranske temporarily deployed to agent-high-privilege May 26, 2026 07:42 — with GitHub Actions Inactive
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: 2342c50
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 0

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +153 to +154
const candidate =
runs.find((run) => ['success', 'neutral'].includes(run.conclusion || '')) || runs[0];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +153 to +157
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.');
Comment on lines +163 to +167
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.');
@stranske

Copy link
Copy Markdown
Owner Author

Closing as superseded by #2166, which carries the bounded coverage guard artifact discovery fix with the follow-up review feedback addressed.

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.

2 participants