CI never runs the workflow-run cleanup test

Open Beginner friendly
#6,687 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, shell
Domain
ci-cd

Research direction

Start in .github/workflows/ci.yaml by comparing the existing cask-pr-handoff and eks-smoke-scripts changes filters and jobs, then inspect require-checks-in-pr. Add coverage for the cleanup script, its test, and .github/fixtures/workflow-run-cleanup/**, including shellcheck and the test run, and wire the job into the required checks. Confirm with a deliberate regression that the new job fails.

Written by the indexing model from the issue text.

Description

automation

🤖 Generated by the Agentic Engineer

Evidence

.github/scripts/delete-old-workflow-runs.test.sh exists and passes, but no CI job ever runs it.

.github/workflows/ci.yaml gates shell-script tests behind an explicit allow-list — one changes
path filter plus one job per script group. Two such groups exist today (cask-pr-handoff,
eks-smoke-scripts). The workflow-run cleanup script is in neither, and the only other reference to
it anywhere under .github/ is the delete-old-workflow-runs job name in maintenance.yaml, which
invokes the script in production but never its test.

Verified at head 4d8dbcb0 of #6685: grep -rn "delete-old-workflow-runs" .github/ returns exactly
one hit, in maintenance.yaml.

Impact

The nightly Maintenance workflow is the only thing that exercises this script, and it does so
directly against main. A regression is therefore discovered by the default branch going red — which
is precisely what happened in #6683 — rather than by a pull request failing.

That makes the test added in #6685 a one-time proof rather than a standing guard: nothing stops the
same class of failure returning.

Expected

A change to the cleanup script or its test runs that test in CI, and a failure blocks the pull
request instead of reaching main.

Acceptance criteria

  • A changes path filter covering .github/scripts/delete-old-workflow-runs.sh,
    .github/scripts/delete-old-workflow-runs.test.sh, .github/fixtures/workflow-run-cleanup/**,
    and .github/workflows/ci.yaml.
  • A job that shellchecks the script, its test, and its fixture gh, then runs the test — mirroring
    the existing eks-smoke-scripts job.
  • The job is wired into require-checks-in-pr (both needs and job-results), as cask-pr-handoff
    already is, so it actually gates. A skipped path-filtered job is treated as a pass there today, so
    this does not block unrelated PRs.
  • Proven by a deliberate regression: ablate the fix, confirm the new job fails.

Size

Small — configuration only, mirroring a pattern already present twice in the same file.

Dominant language
Go
Stars
165
Forks
13
Avg merge
4h 17m
Merged PRs (30d)
362

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from devantler-tech/ksail

All issues in devantler-tech/ksail

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.