Skip to content

fix(release): restore two-component config + linked-versions to fix CLI starvation#227

Merged
theagenticguy merged 1 commit into
mainfrom
fix/release-please-restore-linked-versions
Jun 11, 2026
Merged

fix(release): restore two-component config + linked-versions to fix CLI starvation#227
theagenticguy merged 1 commit into
mainfrom
fix/release-please-restore-linked-versions

Conversation

@theagenticguy

Copy link
Copy Markdown
Owner

Why the single-component approach failed (proven from source)

The collapse to one root package (#222, #226) structurally cannot create a release in release-please v17.6.0:

  • this.component = options.component || normalizeComponent(packageName) — the || falsy-coerces component: "", so it derives cli from @opencodehub/cli.
  • buildRelease's standalone-component check (single release entry) then compares the release PR's component (undefined — branch release-please--branches--main) against cli → mismatch → zero releases built, release_created=false, npm never publishes.
  • Observed live: ⚠ PR component: undefined does not match configured component: cli. component: "" provably can't fix it.

Why two components is the correct shape

With 2 components the aggregate release PR has 2 release entries (length === 2), so that broken standalone-component check is skipped entirely — which is exactly why this scheme released reliably for 20+ versions. Reverting is the proven path, not a regression.

The original bug, fixed properly

The starvation bug you hit (private root absorbs every commit → ran to 0.8.5, while the published cli only saw packages/cli/** → starved at 0.7.4) is now fixed with the purpose-built linked-versions plugin:

"plugins": [{ "type": "linked-versions", "groupName": "opencodehub", "components": ["root", "cli"] }]

linked-versions keeps root + cli in lockstep — any commit that bumps root bumps cli to the same version. The published CLI now advances on every release, which is the actual fix you asked for.

State reconciliation

  • Manifest reseeded to the last component-format tags: root 0.8.5, cli 0.7.4 (both tags exist → clean boundary detection, no giant-changelog risk).
  • package.json versions aligned (root 0.8.5, cli 0.7.4 = npm latest).
  • Cleared the stuck autorelease: pending label on the abandoned single-component PR chore: release main #225.
  • The bare v0.7.4/v0.7.5 bootstrap tags from the abandoned attempt are inert under this config (no component → don't match).

Expected on merge

release-please opens a release PR bumping both components to 0.8.6 (linked, highest+patch). Merging it → release_created=true → tags root-v0.8.6 + cli-v0.8.6 → automated release-please.yml → release.yml chain → npm publishes @opencodehub/cli@0.8.6 via the matching trusted-publisher OIDC path. (npm jumps 0.7.4 → 0.8.6; forward + valid. cli now tracks the unified line.)

…LI starvation

The single-component collapse (#222, #226) was the wrong shape. release-please
v17.6.0 cannot create a release for a single root package with a scoped
package-name: `this.component = options.component || normalizeComponent(name)`
falsy-coerces any empty component and derives `cli` from `@opencodehub/cli`,
then buildRelease's standalone-component check rejects the component-less
release PR (`PR component: undefined does not match configured component: cli`)
and tags nothing → release_created=false → npm never publishes. Proven from
source; `component: ""` provably cannot work (the `||`).

Why two components is correct: with 2 release entries the aggregate PR has
length===2, so that standalone-component check is SKIPPED entirely — which is
why this scheme released reliably for 20+ versions. The ORIGINAL starvation bug
(root absorbs all commits → 0.8.5 while published cli starves at 0.7.4) is now
fixed the purpose-built way: the `linked-versions` plugin links root+cli so any
commit that bumps root bumps cli in lockstep. cli publishes every release.

Manifest reseeded to the last component-format tags (root 0.8.5, cli 0.7.4 —
both tags exist, so boundary detection is clean and there's no giant-changelog
risk). package.json versions aligned. The bare v0.7.4/v0.7.5 bootstrap tags from
the abandoned single-component attempt are inert under this config (no
component → don't match).
@theagenticguy theagenticguy merged commit f849f24 into main Jun 11, 2026
37 checks passed
@theagenticguy theagenticguy deleted the fix/release-please-restore-linked-versions branch June 11, 2026 17:21
@github-actions github-actions Bot mentioned this pull request Jun 11, 2026
theagenticguy pushed a commit that referenced this pull request Jun 11, 2026
🤖 Automated release via release-please
---


<details><summary>root: 0.8.6</summary>

##
[0.8.6](root-v0.8.5...root-v0.8.6)
(2026-06-11)


### Bug Fixes

* **release:** collapse release-please to one published @opencodehub/cli
component
([#222](#222))
([ab749bd](ab749bd))
* **release:** make npm publish idempotent on stuck-release re-runs
([#224](#224))
([12e1c66](12e1c66))
* **release:** restore two-component config + linked-versions to fix CLI
starvation
([#227](#227))
([f849f24](f849f24))
* **release:** set explicit empty component so the CLI release PR
matches
([#226](#226))
([4188b52](4188b52))
</details>

<details><summary>cli: 0.8.6</summary>

##
[0.8.6](cli-v0.7.4...cli-v0.8.6)
(2026-06-11)


### Bug Fixes

* **release:** restore two-component config + linked-versions to fix CLI
starvation
([#227](#227))
([f849f24](f849f24))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant