Skip to content

ci: run Release one at a time, and release what an earlier run left unreleased - #864

Merged
trieloff merged 1 commit into
mainfrom
bb/ci-serialize-release-runs-on-main-thr_9bkzmae5w6
Dec 2, 2026
Merged

trieloff merged 1 commit into
mainfrom
bb/ci-serialize-release-runs-on-main-thr_9bkzmae5w6

Conversation

@trieloff

@trieloff trieloff commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

What and why

Two Release runs on main ran at the same time, and a release was lost each time:

The push that beat the release each time was the next merge, not the other Release run. #855 was committed at 02:54:37Z and run 1's push was rejected at 02:54:39Z, before run 2 had started. The real loss comes from how a run picks what to release: only the directories that its own push changed (changed.mjs … "$BEFORE..$AFTER", with BEFORE = github.event.before). semantic-release does count from the last tag. But a skill only gets a semantic-release run when the push range touches it. So when a run fails, ends up behind main, or never runs, what it would have released waits until someone changes that directory again. On today's main this has stranded more than #854: #777 scrape-webpage, #729 the four appbuilder-* skills, #607 spec, #832 site-scan and #215 slicc-handoff. Their runs were either behind ("The local branch main is behind the remote one…", which exits 0) or rejected.

What changed

  1. concurrency: on release.yml. The group is ${{ github.workflow }}-${{ github.ref }} with cancel-in-progress: false. A run in progress is never cancelled, and a new push waits for it. This stops two release runs from pushing over each other.
  2. changed.mjs --unreleased, used by both detect steps. It lists what the push range touched (as before), and adds every skill, the web CLI and every plugin that has a commit since its highest release tag on HEAD that may release it. Only chore, ci, test and build commits without a breaking change are ignored, which covers release commits, the manifest rebuild and Renovate chores. If in doubt, semantic-release is run; it already handles "nothing to release". The tag prefix comes from the same place as in the release configs: <folder>-v or the package.json name, plugin/<name>/v, and the web CLI's own tagFormat. This is unreleasedDirs and tagPrefix in scripts/lib/release.mjs.
  3. One sentence in CONTRIBUTING.md → Releases. Two comments and the "behind" warning in rebuild-plugins.mjs are updated; the warning used to say that such a release waits for the next change.

GitHub's concurrency semantics, and why a cancelled pending run drops nothing now

Per the workflow syntax docs, the default queue: single keeps one run in progress and at most one pending. A newer push cancels the pending run and takes its place. Say A is running, B is pending, and C arrives: B is cancelled, and C's github.event.before is B. So C's own range B..C does not contain B's commits. Without change 2, the concurrency group alone would drop B's releases. With --unreleased, run C lists every directory with a releasable commit since its last tag, which includes B's. semantic-release then counts from that tag, as it always has.

The same applies when a run is behind or rejected because a merge landed mid-run. That can still happen, since merges aren't serialized with releases. The newest push's run always starts at the tip of main, because release commits are pushed with GITHUB_TOKEN and start no run. That run releases what the earlier runs left.

I didn't use queue: max, which keeps up to 100 pending runs. actionlint 1.7.11/1.7.12 rejects the key (rhysd/actionlint#657), and every older queued run would start behind main and release nothing anyway.

Limits:

  • A skill or plugin with no release tag yet is still found only by the push that changes it. Picking up all ~116 untagged skill directories would set off a wave of first releases, which is out of scope here.
  • If a pending run is cancelled, its Tessl publish of a manifest version that its own push brought in is not repeated. That only affects plugins brought in from another repository (Commerce). Re-running the cancelled run publishes it. Our own plugins publish in the run that releases them, so they are covered.

Will the next Release run release aed6f95 for cja-dimension-analysis by itself?

Yes, after this merges. The merge push starts a Release run that uses the new changed.mjs. On main today (fae9a61), node scripts/changed.mjs release HEAD..HEAD --unreleased lists cja-dimension-analysis: aed6f95 fix(deps): … is its only commit since cja-dimension-analysis-v1.0.0. Run 46564559908 had already computed "The next release version is 1.0.1" for it. That first run should also release what earlier runs left:

  • skills: cja-dimension-analysis, cja-funnel-health-check, scrape-webpage, slicc-handoff, appbuilder-action-scaffolder, appbuilder-e2e-testing, appbuilder-project-init, appbuilder-testing, spec, site-scan
  • plugins: adobe-cja, aem-eds-personalization, app-builder

If a merge lands while that run is releasing, the run for that merge picks them up. Without this PR, nothing would release them until someone changes those directories again. I haven't released or tagged anything by hand, and I haven't re-run any job.

How I checked it

Checklist

  • The change is to one plugin, or to repository tooling
  • npm run validate passes
  • Paths, commands and skills that the change names exist
  • New scripts, hooks, MCP servers or network endpoints are called out above: none are new. changed.mjs gets a flag, and it only runs local git tag and git log.
  • The human label is set, if a person and not an agent wrote this

…nreleased

Signed-off-by: Lars Trieloff <lars@trieloff.net>
@trieloff
trieloff requested a review from shsteimer as a code owner December 2, 2026 12:56
Copilot AI balanced review requested due to automatic review settings December 2, 2026 12:56

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

claude: approved on deb645d

This pull request changes only repository tooling, and I'm approving it. It adds a concurrency group to release.yml so that only one Release run goes at a time, and it never cancels a run in progress. It also adds changed.mjs --unreleased for the release and plugins detect steps. That flag lists every skill, the web CLI and every plugin that has a commit since its highest release tag that HEAD contains, leaving out commits that are only chore, ci, test or build with no breaking change. So a run that failed, fell behind or was cancelled while it waited leaves nothing unreleased.

What I checked:

  • tagPrefix gives the same tag start as each release config: plugin.release.config.cjs uses plugin/<name>/v, the web CLI's own config uses web-cli-v, and the root release.config.cjs uses <folder>-v or the name in package.json. All the project-management skills that have a package.json match their existing tags.
  • A prefix that matches the start of another tag (spec-v and a tag starting spec-validator-v…) is caught by the isVersion check.
  • release-skills.mjs and release-plugins.mjs still skip directories brought in from another repository and skills that share a folder name. A directory that --unreleased adds always has a tag already, so ensureBaseline returns 'tagged' for it and doesn't create a tag.
  • On the head, node scripts/changed.mjs release|plugins HEAD..HEAD --unreleased lists exactly what the description says (10 skills, and the plugins adobe-cja, aem-eds-personalization and app-builder) in under a second.
  • npm test passes 221 of 221, including the new tests. validate and the release config check pass on both trees.

The pull request adds no new script, hook or network endpoint: only local git tag and git log calls. It says plainly that the first run after merging will release the stranded skills and plugins, and that a cancelled pending run's Tessl publish of a Commerce manifest isn't repeated. No skill or plugin content changed, so I didn't probe for redundant lines or run a test drive. Lines probed: 0, lines redundant: 0, lines I couldn't probe: 0.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

codex: approved on deb645d

The change serializes release runs and recovers tagged skills and plugins left unreleased by earlier runs. Head and base validation and release-config checks pass; all 221 script tests pass. Both --unreleased commands identify the expected backlog. No confirmed blocking defects found. No skill instructions changed, so baseline probes and client evals were not applicable.

@trieloff
trieloff merged commit 10daf14 into main Dec 2, 2026
35 checks passed
@trieloff
trieloff deleted the bb/ci-serialize-release-runs-on-main-thr_9bkzmae5w6 branch December 2, 2026 13:19
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