Skip to content

CI: cancel superseded actionlint and skill-docs runs #2046

Closed

Description

@maxpetrusenkoagent

Summary

Two always-on lightweight workflows run on both push and pull_request but do not declare concurrency, so same-repo PR branch updates can leave stale duplicate runs queued/running for the same commit series:

  • .github/workflows/actionlint.yml
  • .github/workflows/skill-docs.yml

The heavier workflows already use this pattern, for example:

  • .github/workflows/evals.yml has concurrency: group: evals-${{ github.head_ref }} + cancel-in-progress: true
  • .github/workflows/windows-free-tests.yml has concurrency: group: windows-free-${{ github.head_ref }} + cancel-in-progress: true
  • .github/workflows/make-pdf-gate.yml, version-gate.yml, and pr-title-sync.yml also cancel superseded runs

Evidence inspected

Repo-local files inspected:

Commands used for duplicate/evidence checks:

gh issue list -R garrytan/gstack --state open --limit 200 --json number,title,body,url
gh pr list -R garrytan/gstack --state open --limit 200 --json number,title,body,url
gh issue list -R garrytan/gstack --state open --search 'concurrency OR "cancel-in-progress" OR "duplicate workflow" OR "double run"' --limit 50 --json number,title,url
gh pr list -R garrytan/gstack --state open --search 'concurrency OR "cancel-in-progress" OR "duplicate workflow" OR "double run"' --limit 50 --json number,title,url
gh issue list -R garrytan/gstack --state open --search '"push + pull_request" "concurrency" "skill-docs" "actionlint"' --limit 20 --json number,title,url
gh pr list -R garrytan/gstack --state open --search '"push + pull_request" "concurrency" "skill-docs" "actionlint"' --limit 20 --json number,title,url

Duplicate search found no open issue or PR specifically covering missing concurrency on actionlint.yml + skill-docs.yml.

Expected impact

Lower CI noise and queue waste for active branches. Contributors see the newest Workflow Lint / Skill Docs Freshness result instead of waiting on obsolete runs from previous pushes.

This is small, but it matches the repo's existing CI posture: expensive or high-frequency workflows should cancel superseded runs.

Suggested fix

Add concurrency blocks to the two missing workflows:

concurrency:
  group: actionlint-${{ github.head_ref || github.ref_name }}
  cancel-in-progress: true
concurrency:
  group: skill-docs-${{ github.head_ref || github.ref_name }}
  cancel-in-progress: true

Also add a static regression test that scans .github/workflows/*.yml and fails when a workflow with both push and pull_request triggers lacks cancel-in-progress: true.

I validated this locally with a small patch:

bun test test/workflow-concurrency.test.ts
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.11 .github/workflows/actionlint.yml .github/workflows/skill-docs.yml

Both passed.

Why not PR here?

I prepared and locally verified a 3-file patch, but the available GitHub token cannot push workflow changes:

remote rejected: refusing to allow an OAuth App to create or update workflow `.github/workflows/actionlint.yml` without `workflow` scope

So filing the focused issue is the safe handoff path.

Activity

  1. added a commit that references this issue on Jul 13, 2026
    2ff29ea
  2. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @16francej — recommend closing this issue only after a corrected #2053 passes same-repository, same-branch, different-repository, and cross-fork concurrency checks. The named workflows still lack cancellation, while the proposed key must avoid repository and branch collisions. Preserve both workflow reproductions and track the equivalent branch-key defect in existing workflow keys separately.

  3. capy-ai commented on Oct 2, 2026

    @capy-ai
    Contributor

    Verified on main (v1.91.13.0): actionlint.yml and skill-docs.yml both declare a PR-keyed concurrency group with cancel-in-progress: true, so a new push cancels superseded runs. Landed in v1.64.0.0 (#2571). Thanks! Reply here if you still see stacked runs and we'll reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions