Repository navigation
[RFC] Slim maintenance-prs: tests + security weekly, capped, ready for review, announced after green CI - #9023
Draft
isaacroldan wants to merge 2 commits into
Draft
isaacroldan wants to merge 2 commits into
isaacroldan wants to merge 2 commits into
Conversation
Run tests and security weekly, cap open PRs per task at 2, open ready-for-review PRs with a non-GITHUB_TOKEN token so CI runs, announce them only after required CI passes, and bump claude-code-action to v1.0.263. Remove the refactor and performance task prompts. Co-authored-by: Claude Code <[email protected]>
The pinning test matched the 'uses:' inside 'statuses: read' and reported 'read' as an unpinned action. Match 'uses:' only at a word boundary. Co-authored-by: Claude Code <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC — do not merge. For discussion in the gardener-unification work; maintenance-prs stays as-is until the team agrees.
WHY are these changes introduced?
maintenance-prsproduces PRs that almost nobody picks up, and right now it doesn't run at all. Numbers are from a read-only inventory collected on 2026-10-27:Output: 71 PRs between 2026-09-10 and 2026-10-23 ([Tests] Add unit tests for Admin REST request helpers #8521 to [Refactor] Name the char-token spacing rule in terminal UI token rendering #8991). 10 were merged, 9 were closed by
stale.yml, and 52 are still open. Another 11 open drafts already haveno-pr-activity, sostale.ymlwill close them next.No CI: the PRs are opened with
GITHUB_TOKEN, so CI never runs on its own. Looking at the firstPRworkflow run on each of the 71 PRs:action_required. That covers every PR since [Tests] Cover buildCartURLIfNeeded branches #8678, for example [Refactor] Name the char-token spacing rule in terminal UI token rendering #8991 → 39879832056.No reviewer: drafts get no review request.
Shopify/dev_experienceis only requested after a human clicks "Ready for review", so these PRs never show up in the gardener'steam-review-requested:Shopify/dev_experiencequeue.Broken since Oct 26: the
claude-code-actionpin (36a69b6, v1.0.134) bundles Claude Code 2.1.161. Runs 40249213977 and 40426069655 fail withClaude Code 2.1.161 does not support this model; version 2.1.280 or newer is required.WHAT is this pull request doing?
Changes to
.github/workflows/maintenance-prs.yml:task: [tests, security], scheduled for Mondays at 00:00 UTC (0 0 * * 1). The Monday-only gate step is gone. This PR also deletes.agents/automated-tasks/refactor.mdandperformance.md; nothing else referenced them.<task>-maintenance-. If there are 2 or more, it logsSkipping: N open <task> PRs (cap 2)and every later step is skipped. Drafts count too: today there are 20 opentests-and 5 opensecurity-maintenance PRs, so both tasks would skip until that backlog is triaged.claude-code-action'sgithub_token, andGH_TOKENnow usesecrets.SHOPIFY_GH_ACCESS_TOKEN. This is the pattern shopify-app-js (main-release.yml,release-candidate.yml) and graphql-codegen (release.yml) already use: their PRs are authored byapp/shopify-github-actions-accessand CI runs on them (for example shopify-app-js#3494 got 13 checks). That secret does not exist on Shopify/cli yet, so a new early step fails the run with a clear error when it's empty. The workflow's ownGITHUB_TOKENis now read-only in the maintenance job.gh pr createwithout--draft. It still says "Never merge or approve" and no longer says "never mark ready". CODEOWNERS (* @shopify/dev_experience) then requests the team automatically, which is the queue Mission Control's gardener hub reads. The workflow doesn't add thedevtools-gardenerlabel, because in this repo that label makesgardener-notify-*post a second, bare Slack message. The prompt also tells Claude not to add labels or request reviewers.tests.mdandsecurity.mddon't mention drafts or "ready", so they are unchanged.announcejob (needs: maintenance, 90-minute timeout).<task>-maintenance-<run_id>. It doesn't use job outputs, because outputs from matrix legs share names and the last leg to finish overwrites the others.gh pr checks --required.gh pr checks --required --watchbecause it reports green too early. The requiredUnit testscheck comes from a gate job withneeds: unit-tests, and that job only registers once the unit-test matrix is done. In 40484089545 the other jobs were created at 09:52:21 andUnit testsat 10:02:41. On Remove unused Gardener - Investigate Issue workflow #9022, while itsPRrun was still in progress,gh pr checks --requiredlisted 6 required checks (noUnit tests) and exited 0.SLACK_GARDENER_BOT_TOKEN/slack-github-actionstep, with the title still HTML-escaped:CLI maintenance · <url|[Tests] …> · CI green · Needs: review + merge from the Dev Exp gardener. The task prompts already put[Tests]or[Security]in the PR title.GITHUB_TOKENwith explicit permissions (actions, checks and statuses read; contents and pull-requests write). None of its actions need to trigger other workflows.anthropics/claude-code-actionfrom36a69b6(v1.0.134) to8041f1d17e0e7d2f2cfe35002962e9f26237c0bb(the commit behind the annotated tag v1.0.263, which bundles Claude Code 2.1.311).--model claude-opus-lateststays. Every input this workflow uses exists in v1.0.263'saction.yml.packages/cli/src/cli/repo-health.test.ts. The action-pinning test matched theuses:inside the announce job'sstatuses: readand reportedreadas an unpinned action. It now matchesuses:only at a word boundary. Across all 16 workflows, the only match that changes is that false positive.Open questions
SHOPIFY_GH_ACCESS_TOKENto Shopify/cli? It needs to be able to push branches and open PRs, plus read access to Actions and issues, because the tests task reviews recent CI failures throughgh. The alternative is a dedicated GitHub App, with a token minted per run byactions/create-github-app-token(pinned by SHA). Commits are still authored asgithub-actions[bot]; we could switch that to the App's bot identity if we prefer..agents/automated-tasks/tests.mdandsecurity.md, and who reviews changes to them?Not in this PR
gardener-backlog-prs.yml(Remove Gardener backlog PR workflow #9008 removes it) andgardener-investigate-issue.yml(Remove unused Gardener - Investigate Issue workflow #9022 removes it).How to manually test your changes?
Please don't dispatch this workflow before open question #1 is settled, because it opens real PRs and posts to Slack. I only checked the workflow statically: actionlint 1.7.12 reports nothing, the YAML parses, and every
run:script passesbash -n. Once a token exists, dispatchmaintenance-prson this branch and check that:@shopify/dev_experience;Checklist
patchfor bug fixes ·minorfor new features ·majorfor breaking changes) and added a changeset withpnpm changeset add