Skip to content

feat(cooldown): add cooldown-rescan scheduled rescan workflow#43

Merged
j7an merged 2 commits intomainfrom
feat/cooldown-rescan
Apr 18, 2026
Merged

feat(cooldown): add cooldown-rescan scheduled rescan workflow#43
j7an merged 2 commits intomainfrom
feat/cooldown-rescan

Conversation

@j7an
Copy link
Copy Markdown
Owner

@j7an j7an commented Apr 18, 2026

Summary

  • Adds .github/workflows/cooldown-rescan.yml — a workflow_call-only reusable workflow that sweeps open Dependabot PRs and reruns the most recent dependency-cooldown.yml run for any PR whose gate is still pending.
  • Updates README.md to replace the broken "Recommended: scheduled re-scan" section (which advised schedule: on a pull_request: workflow — silently broken because schedule events have no PR context) with a generic caller pattern.
  • Single optional input dry_run: boolean = false for safe rollout and incident diagnostics. Per-PR isolation via set +e; outer gh pr list failure is loud.

Why

The existing dependency-cooldown.yml only fires on pull_request: [opened, synchronize, reopened]. A Dependabot PR that opens during its dependency's cooldown window scans once, posts a pending gate, and then never re-evaluates without manual @dependabot recreate or rebase. Real incident: j7an/nexus-mcp#163 — scan ran on 2026-04-14 with Earliest unblock: 2026-04-14; on 2026-04-17 the gate was still pending despite cooldown having expired the day of scan.

gh run rerun is the only mechanism that re-evaluates cooldown without duplicating scan logic: it replays the original pull_request payload (head SHA stable) with current runtime clock (age-gates re-evaluate).

Release shape

Both commits use feat(cooldown): so tag-release.yml minor-bumps to v2.4.0.

Reviewer notes (from local two-stage review)

Both spec and code-quality reviews passed locally. Two APPROVED WITH NITS items worth weighing here, neither blocking:

  • actions: write permission scope (flagged by both reviewers): the README example doesn't acknowledge that actions: write grants caller-repo-wide rerun capability — broader than gh run rerun strictly needs, but no narrower GitHub permission exists. Consider a 1-2 line note.
  • Workflow set -e inside the per-PR loop (workflow reviewer): the script opens with set -uo pipefail (no -e); the inner set -e/set +e pairs technically activate strict mode for ~5 lines of jq extraction at the top of the next iteration. Practical risk near zero (jq input is already validated), but the comment "Per-PR work uses set +e" doesn't fully match the actual semantics. Easy follow-up: replace inner set -e with no-ops.

Test plan

  • yq '.' .github/workflows/cooldown-rescan.yml parses successfully (verified locally)
  • ./scripts/lint-workflow-call.sh exits 0 (verified locally; CI re-runs)
  • zizmor --min-severity medium --min-confidence medium produces no findings (verified locally; CI re-runs)
  • PR description renders the new README section correctly (preview tab)
  • Post-merge: tag-release.yml cuts v2.4.0; release.yml publishes the GitHub release; floating @v2 updates
  • Acceptance: nexus-mcp ships its caller (separate PR, separate repo), runs once with dry_run: true, then enables for real and confirms PR #163 unblocks

Fixes #42.

j7an added 2 commits April 17, 2026 17:41
Adds .github/workflows/cooldown-rescan.yml — a workflow_call-only reusable
that consumers can invoke on a schedule to rescan Dependabot PRs whose
dependency-cooldown / gate is pending. Uses gh run rerun on the most
recent dependency-cooldown.yml run for each stuck PR; replays the original
pull_request payload with current runtime clock so age-based gates
re-evaluate freshly.

Single optional input dry_run (default false) for safe rollout and
incident diagnostics. Per-PR error isolation via set +e; outer gh pr list
failure is loud (exit 1).

Refs #42.
Replaces the broken "Recommended: scheduled re-scan for long-pending PRs"
section, which advised adding schedule: to a pull_request: caller workflow
— that approach silently fails because schedule events have no PR
context, so the existing dependency-cooldown.yml scan loop has nothing to
iterate over.

New section documents the cooldown-rescan.yml caller pattern, the four
required permissions, the dry_run rollout flow, cadence guidance, and a
dedicated inputs table.

Refs #42.
@j7an j7an merged commit 68158ca into main Apr 18, 2026
7 checks passed
@j7an j7an deleted the feat/cooldown-rescan branch April 18, 2026 01:13
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.

feat(cooldown): add scheduled rescan workflow for pending Dependabot PRs

1 participant