Skip to content

release: v4.18.4 - resolve the release base branch instead of hardcoding… - #197

Merged
Shinrai merged 9 commits into
masterfrom
next
Aug 3, 2026
Merged

Shinrai merged 9 commits into
masterfrom
next

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

Shinrai and others added 6 commits August 2, 2026 20:55
…aster

main-default repos (no `master` branch) couldn't cut a release: the next/hotfixes
release workflows failed at `git fetch origin master`, so the persistent
`next → <default>` release PR was never created (CLDMV/polyfillme, CLDMV/cpm).

Add a dedicated `git/utilities/resolve-release-base` action that resolves the
base in priority order: the `CLDMV_RELEASE_BASE` Actions variable → the reusable
workflow's `default_branch` input → the API `repository.default_branch` →
`master`. Thread it through the release path:
- workflow-next-release.yml / workflow-hotfixes-release.yml resolve once in the
  plan job and use it for fetch / rev-list / `gh pr list --base`, passing it to
  create/update-release-pr.
- create-release-pr / update-release-pr fetch the resolved base and feed it to
  divergence.mjs / find-divergence (which use it when set, else keep the
  master→main heuristic) and to the changelog's release-PR filter.
- pending-release-reminder queries the resolved base instead of `master`.

Backward compatible: master-default repos resolve to `master` and every step
behaves exactly as before. New action ships via @v4.

Known follow-ups (non-blocking): the `! release → master` flow label stays a
fixed marker (changing it risks label-keyed release-PR detection); the reminder
honors the var + API default but not a yaml-input-only base config.

Fixes #192
The `! release → <base>` / `! hotfix release → <base>` flow labels were still
hardcoded to `master`, so a main-default repo's release PR was mislabeled
"→ master" even though its base was correct. Derive the base from the same
resolved value as the PR's base branch so the label reflects the actual target.

The managed-labels allowlist now includes the master/main (and, when custom, the
resolved-base) flow-label variants so a stale lane label prunes across a
default-branch change — and update-release-pr re-derives the label on every
refresh, so the no-var + default-changed case self-heals. Added the
`! release → main` / `! hotfix release → main` entries to data/github-labels.json
so they're defined + styled rather than auto-created gray.
… reset

workflow-next-reset's "wait for the released major tag" gate ran an
unauthenticated `git ls-remote https://github.com/<repo>.git`, which exit-128s
on PRIVATE repos. Under the default `bash -eo pipefail` that non-zero status
(hidden by `2>/dev/null`) silently killed the gate job, so the downstream
sync-branches job was skipped and next/hotfixes were never recreated after a
release — stranding the staging flow (feature-pr then dies on "couldn't find
remote ref next"). Public repos read anonymously, so only private repos hit it.

Authenticate the lookup with the job's GITHUB_TOKEN (contents: write, already
present) via an x-access-token remote, drop the `2>/dev/null` so failures are
visible, and make the lookup non-fatal (a failure degrades to "proceed anyway"
— the gate is only a safety delay — instead of aborting the reset).

Fixes #194
…eQL)

The #192 change interpolated the resolved DEFAULT_BRANCH into the git command
STRING passed to tryGit → execSync (a shell), which CodeQL flags as
js/indirect-command-line-injection (the two alerts blocking PR #193). The base
is repo config (a variable / workflow input / API default_branch), never PR
content, so it is effectively a false positive — but the correct, gate-clearing
fix is real: add an argv-based tryGitArgs (execFileSync, no shell) and route the
base-interpolated merge-base + `git show <base>:package.json` calls through it.
The literal master/main heuristic calls stay on the shell path unchanged.
@cldmv-bot cldmv-bot Bot added ! release → master v4 flow: persistent next → master release PR (carries the next feature release) release Marks a pull request as a pending release — merge to publish a new version semver: major This release includes breaking changes and bumps the major version type: bug Something is broken or not behaving as expected area: core Touches core library / runtime source code type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files labels Aug 3, 2026
Shinrai added 2 commits August 2, 2026 22:47
…elease opener

resolve-release-base (added in #193) isn't on the @v4 tag yet, and .github runs
its own release from next's copy of workflow-next-release.yml, which referenced
the action @v4 — so the Plan job failed at action-download and no release PR
opened. Pin the resolver step in both release workflows to a next commit that
has the action; a follow-up flips the pin back to @v4 once it ships to the tag.
…a substring match

The categorizer flagged a commit as a major-bump change if its SUBJECT merely
contained the substring "break" (lower.includes, lower = subject) — so an
ordinary fix whose subject read "… to <verb> the deadlock" was mis-classified
and forced a major bump. On .github itself that produced a spurious
release: v5.0.0, which forks a v5 line and strands @v4 consumers.

Detect a major bump the Conventional Commits way instead: the `!` mark
(isBreaking) or a proper `BREAKING CHANGE:` / `BREAKING-CHANGE:` footer in the
body — the same regex compute-highest-commit-type already uses. Drops the loose
substring checks.
@cldmv-bot cldmv-bot Bot changed the title release: v5.0.0 - pin resolve-release-base to a next SHA to break the… release: v4.18.4 - resolve the release base branch instead of hardcoding… Aug 3, 2026
@cldmv-bot cldmv-bot Bot added semver: patch This release contains only backwards-compatible bug fixes and removed semver: major This release includes breaking changes and bumps the major version labels Aug 3, 2026
@Shinrai
Shinrai merged commit 5e7a09f into master Aug 3, 2026
16 checks passed
Shinrai added a commit that referenced this pull request Aug 3, 2026
resolve-release-base shipped to the @v4 tag in v4.18.4 (#197), so the temporary
next-SHA pin in both release workflows can go back to @v4. Verified the action
is present at @v4 (v4.18.4) before flipping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code ! release → master v4 flow: persistent next → master release PR (carries the next feature release) release Marks a pull request as a pending release — merge to publish a new version semver: patch This release contains only backwards-compatible bug fixes type: bug Something is broken or not behaving as expected type: ci Changes to CI workflows, actions, or build pipelines type: config Changes to repository or project configuration files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant