Skip to content

release: v3.2.0 - #11

Merged
Shinrai merged 9 commits into
masterfrom
feat/agent-scaffolding-guide
May 21, 2026
Merged

Shinrai merged 9 commits into
masterfrom
feat/agent-scaffolding-guide

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

  • feat(release): differentiate release-PR titles sharing the same version (5c539fb)
  • feat(docs): add AGENT-SCAFFOLDING.md for AI-assisted consumer setup (4e128b2)

🐛 Bug Fixes

  • fix(changelog): broaden bot filter to use isBotCommit (author + subject) (711206c)
  • fix(changelog): strip bot-authored chore-bump commits from PR body (debb308)
  • fix(local): let sync-fan-out fire on cldmv-bot[bot] merges (3a6e36c)
  • fix(release): refresh PR body when version already bumped on branch (bf9f4ce)
  • fix(local): allow docs-only commits to trigger the release flow (edc31e3)

🔧 Other Changes

  • chore: bump version to 3.2.0 (6d7a717)
👥 Contributors

Shinrai and others added 3 commits May 20, 2026 15:28
A self-contained guide an AI agent can read top-to-bottom to scaffold
the org workflows into a new (or existing) consumer repo. Drop it in,
say "follow AGENT-SCAFFOLDING.md", and the agent runs through five
phases:

  1. Discovery — 10 questions to ask the user (package name, npm vs
     meta-package, Docker, docs, CLA, etc.)
  2. Decision — table mapping discovery answers to the template set
  3. Scaffold — fetch templates from v3, customize, write to
     .github/workflows/, drop the category subfolder, create orphan
     `badges`/`gh-pages` branches as needed
  4. Manual steps — a checklist of UI-only changes (settings, secrets,
     bot App permissions) the agent reports back to the user
  5. Validate — YAML parse + actionlint + open a test PR

Includes a `Common pitfalls` section covering the gotchas we hit during
v3 rollout (badges branch missing, dependabot auto-merge prerequisite,
meta-package mode for publish.yml, etc.) so the agent can avoid them.

References the deeper docs (WORKFLOW-SETUP-GUIDE, DRY-RUN-GUIDE,
v2-to-v3 migration) for cases that need more detail than the agent
needs to scaffold a baseline.

examples/README.md updated to link the new guide as the first
recommended read.
local-release.yml's `paths-ignore` listed `**.md` and `docs/**`, which
silently swallowed any docs-only push. Today's symptom: the
agent-scaffolding-guide branch (one commit touching only
examples/guides/AGENT-SCAFFOLDING.md + examples/README.md) was pushed
and NO workflow ran — the release flow saw all-paths-ignored and didn't
fire, so no release PR ever opened.

For this repo, docs ship as part of the @V3 tag — consumers fetch them
from the tagged ref — so a docs-only change is releasable. Tighten the
ignore list to truly-metadata files (LICENSE, .gitignore, .gitattributes)
and leave docs/markdown in-scope.

Note left at the bottom of the ignore list so this doesn't get re-added
by reflex on the next pass.
@cldmv-bot cldmv-bot Bot added release Marks a pull request as a pending release — merge to publish a new version semver: minor This release adds new functionality in a backwards-compatible way type: ci type: documentation Relates to docs, README updates, guides, or inline code comments labels May 21, 2026
Shinrai added 3 commits May 20, 2026 20:54
When the same branch receives a second release-worthy commit (e.g. a
second fix:) after the bot already pushed its 'chore: bump version to
X.Y.Z' commit, check-release-commit's early-exit was discarding the
new commit from the changelog and PR body.

Concrete failure: PR #10 on the v3 line — first push landed
fix(actions); workflow updated the PR body with that commit and
pushed 'chore: bump version to 3.1.2'. A later push added
fix(security) — the workflow re-ran but exited at the 'already bumped
to 3.1.2' check, skipping changelog regen + PR body refresh. The PR
description never gained the fix(security) bullet, and the release
notes (had we merged then) would have lost it too.

Fix:
- check-release-commit: new opt-in input 'allow-already-bumped'.
  When true, instead of exiting should-create-pr=false on duplicate
  target version, emit should-create-pr=true + bump-already-applied=true
  with all the usual outputs so downstream steps can refresh state.
- update-release-pr: pass allow-already-bumped=true and split the
  step gates. Version-mutating steps (install, build, update-pkg,
  restore-src, commit) gate on bump-already-applied != 'true'.
  Body-refresh steps (range, changelog, PR description, labels)
  gate only on should-create-pr == 'true'.

Callers create-release-pr and create-release are unchanged — they
omit the new input (default 'false'), preserving the short-circuit
behavior they actually want (nothing to create / nothing to publish
when target is already bumped).

The misleading 'Release Summary' that previously reported 'updated
successfully' when nothing happened becomes accurate by construction:
the body really does get updated now.
When two release PRs are open against the same target version (e.g. two
patch PRs both bumping to v3.1.2, or a 3.1.2 patch and a 3.2.0 minor
sharing the same descriptive prefix), they currently look identical in
GitHub list views — both render as 'release: v3.1.2'. This makes them
hard to tell apart at a glance.

Add a 'title-suffix' output to check-release-commit, derived from:
  1. An explicit 'release[!]?:' commit subject (highest priority)
  2. The first commit matching the calculated bump type:
       major → first breaking commit
       minor → first feat
       patch → first fix
  3. Fall back to the first actionable commit if nothing matches

The suffix is stripped of its conventional-commit prefix and truncated
at a word boundary near 55 chars. Wired into:

  - create-release-pr: appends to the initial PR title
  - update-release-pr → update-pr-changelog: refreshes on every body update

Final PR title format: 'release: vX.Y.Z - <subject>', or plain
'release: vX.Y.Z' when no suffix can be derived (defensive).
The local-sync-release-prs.yml gate excluded PRs authored by cldmv-bot,
intended to 'avoid recursion'. The reasoning was wrong:

  - sync-fan-out's only side effect is force-pushing a refreshed
    'chore: bump version to X.Y.Z' commit onto each open release PR.
    It never merges anything itself.
  - A force-push to a release branch triggers Local Release PR + Local
    CI, neither of which fire local-sync-release-prs.yml (which is
    gated on pull_request closed). No recursion path exists.

Real-world impact of the bug: EVERY release PR is auto-opened by
cldmv-bot (the release flow creates them), so the gate fired 'skip'
on exactly the merges it was built for. Concrete symptom from PR #12's
merge (35 min ago): sync-fan-out fired and exited in 1s, leaving PR
#10's branch at its pre-merge state ('chore: bump version to 3.1.2'
even though master is now at 3.1.2 and PR #10's target should be
3.1.3).

Fix: drop the cldmv-bot exclusion. Keep the github-actions[bot] guard
as defensive — some workflows post merges under that identity and
genuinely shouldn't trigger fan-out.
@cldmv-bot cldmv-bot Bot added area: core and removed type: documentation Relates to docs, README updates, guides, or inline code comments type: ci labels May 21, 2026
The generate-comprehensive-changelog action surfaces every commit in
range under one of its section headers. That includes the bot-pushed
'chore: bump version to X.Y.Z' commits the release flow creates to
land package.json bumps. Those commits then render in the PR body
under 'Other Changes' — pure noise for human readers, since the
version is already communicated by the PR title ('release: vX.Y.Z').

Strip them up-front via the same regex check-release-commit uses to
identify bot bump commits, so the two stay in sync. Filter is applied
defensively before any section's categorization runs — that way if
a future bot somehow categorizes a bump as something other than
'maintenance', it still gets dropped.
@cldmv-bot cldmv-bot Bot added area: core type: documentation Relates to docs, README updates, guides, or inline code comments and removed type: documentation Relates to docs, README updates, guides, or inline code comments type: ci labels May 21, 2026
Earlier commit (debb308) stripped only 'chore: bump version to X.Y.Z'
by regex. That's too narrow — it leaves other bot-trail commits in the
PR body: 'release: vX.Y.Z' (from cldmv-bot), merge commits, dependabot
bumps, etc.

Use the existing filterBotCommits helper from common/utilities/bot-detection.mjs.
It checks two things:

  1. isBotAuthor — author/email matches a known bot pattern: cldmv-bot,
     github-actions, dependabot, renovate, snyk-bot, etc. Any '[bot]'
     substring catches GitHub App identities generically.
  2. isAutomatedCommit — subject matches automated patterns: 'chore: bump
     version', 'chore(release):', 'release:', 'merge branch',
     'merge pull request', auto-generated dep updates.

Side effect: the '🏷️ Release Information' section never renders now
because all 'release: vX.Y.Z' commits get filtered. Left the rendering
code in place — it's a no-op gated on releaseCommits.length > 0 — in
case we want to re-introduce a way to surface release-class commits
that come from a non-bot author.
@cldmv-bot cldmv-bot Bot added area: core type: documentation Relates to docs, README updates, guides, or inline code comments labels May 21, 2026
@cldmv-bot cldmv-bot Bot removed type: documentation Relates to docs, README updates, guides, or inline code comments type: ci labels May 21, 2026
Shinrai added a commit that referenced this pull request May 21, 2026
Adds a one-line reminder above the pinned ref to re-verify against the
upstream advisory before any future bump. No behavior change — purely a
maintenance comment.

Secondary effect: triggers a fresh release-flow run on this PR. The PR
has been stuck at its pre-PR-#12-merge state ('chore: bump version to
3.1.2'), but master is now AT v3.1.2 — sync-fan-out should have re-
calculated this PR's target to 3.1.3 when PR #12 merged, except its
gate skipped because PR #12 was authored by cldmv-bot (the fix for
that gate is in PR #11, not yet on @V3). Pushing this commit triggers
local-release.yml directly, which calls update-release-pr@v3 — and
that code DOES have the gate fix from PR #12. Expected: a new
'chore: bump version to 3.1.3' commit gets force-pushed onto this
branch, the PR body refreshes with the security fix entry, and the
title goes from 'release: v3.1.2' to 'release: v3.1.3'.
Resolves conflicts with PR #12's gate fix that landed on master as
85c88cf release: v3.1.2. The cherry-picked gate fix on this branch
(bf9f4ce) and master's gate fix (17aec97 via merge) touched the same
lines in check-release-commit/action.mjs and check-release-commit/action.yml.

Resolution: take feat's version everywhere, which is a superset:
  - Gate fix: identical content, no semantic change
  - Title-suffix output: extra lines feat added on top of the gate fix
  - package.json: 3.2.0 (feat target) over 3.1.2 (master) — feat is a
    minor bump so the higher version wins
  - update-release-pr/action.yml: auto-merged cleanly — both branches
    only added lines (feat added title-suffix passthrough, master had
    the gate-split if conditions)
@cldmv-bot cldmv-bot Bot added area: core type: documentation Relates to docs, README updates, guides, or inline code comments labels May 21, 2026
@Shinrai
Shinrai merged commit 62ba273 into master May 21, 2026
4 checks passed
@cldmv-bot
cldmv-bot Bot deleted the feat/agent-scaffolding-guide branch May 21, 2026 05:12
Shinrai added a commit that referenced this pull request May 21, 2026
Adds a one-line note to the docblock showing how to run the validator
ad-hoc from a developer shell (matches how CI runs it). No behavior
change.

Secondary effect: triggers local-release.yml to fire on this PR again.
After PR #11's v3.2.0 merge, @V3 now includes the title-suffix output
and the broadened bot-author filter for the changelog. Expected on this
push:

  - PR title updates from 'release: v3.1.3' to
    'release: v3.1.3 - broken refs + new validator to catch this…'
    (title-suffix derived from first fix commit in the branch).
  - PR body refreshes without ANY bot-trail commits — the bot bump
    commits, release commits, and merges all get filtered out by
    isBotCommit. Only the human-authored fix(security), fix(actions),
    and these chore docs/maintenance commits should appear.
Shinrai added a commit that referenced this pull request May 21, 2026
…race

Real-world failure traced from PR #10's logs: when a release PR merges
to master, two workflows fire in parallel — 🏷️ Update Major Version
Tags (rolls @V3 to the new commit) and 🔄 Local Sync Open Release PRs
(refreshes every open release PR). If sync-fan-out resolves its
`uses: ...@v3` refs BEFORE tag-update lands the new @V3, it pulls
the PREVIOUS release's code.

Concrete symptom: checkout-code without the `ref:` input declared
(fixed in PR #17). update-release-pr's checkout step then ignores the
`ref: ${{ inputs.head-ref }}` input, falls through to
actions/checkout's default = github.ref = refs/heads/master, checks
out master instead of the release branch, runs find-divergence on
master vs master, gets 0 commits in range, and silently exits without
refreshing the PR. Every release merge from PR #11 onward hit this
race; PR #10 was visibly stuck behind master as a result.

Fix: add a wait-for-tags job at the head of the dependency chain.
Polls refs/tags/v3 against github.sha (the merge commit) every 5
seconds for up to 2 minutes. enumerate now `needs: wait-for-tags`;
refresh transitively waits via enumerate. If @V3 never advances
(non-release merges where Update Major Version Tags doesn't fire),
the poll times out and downstream jobs proceed — that's the right
behaviour, since @V3 wouldn't have moved anyway.

User-visible: future release-PR merges will see sync-fan-out fire
~30–60s later than before, but with action code that actually matches
the just-merged master state. The release PRs in flight finally get
their bumps recalculated against the new base.

This also pushes a commit to PR #10, re-triggering its release flow.
Since @V3 has now rolled forward to v3.2.3 (with the ref input
declared), this run will check out PR #10's branch correctly and
recalculate target = patch(3.2.3) = 3.2.4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Marks a pull request as a pending release — merge to publish a new version semver: minor This release adds new functionality in a backwards-compatible way type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant