Skip to content

fix(release-please): drop root from managed packages; reset cli to 0.1.1#33

Merged
znat merged 2 commits intomainfrom
fix/release-please-drop-root
May 4, 2026
Merged

fix(release-please): drop root from managed packages; reset cli to 0.1.1#33
znat merged 2 commits intomainfrom
fix/release-please-drop-root

Conversation

@znat
Copy link
Copy Markdown
Owner

@znat znat commented May 4, 2026

Why

The recurring release wedges (PRs #27#28#29#30#31, none of which actually landed cli on npm) all trace to the same root cause: with two packages managed under `include-component-in-tag: false`, release-please-action wants them to share one tag namespace, but uses the highest version's tag for all of them — producing `Duplicate release tag: vX.Y.Z` collisions whenever versions diverge (which happens any time only one package has changes).

linked-versions tried to keep them in lockstep but introduced its own deadlock when only one package had new commits ("0 candidates"). Removing linked-versions kept the underlying tag-sharing collision.

Fix

Make `@gitpulse/cli` the only package release-please manages. Root is private, never published, no consumer reads its version. With a single package:

  • One tag namespace, no collision possible
  • Bare release-please-action outputs (`release_created`, `tag_name`, `major`) reflect cli directly — no per-package gating gymnastics
  • Whatever changes affect root files (workflows, root `package.json`) just no-op for releases

Changes

  • `release-please-config.json`: drop `.` entry, keep only `cli`.
  • `.release-please-manifest.json`: drop `.` entry; reset cli to `0.1.1` (the last version that's actually tagged on git via `v0.1.1`).
  • `cli/package.json`: revert version `0.1.2` → `0.1.1` (the `0.1.2` was bumped by release-please PRs that failed to publish — phantom version, never on npm, never tagged).
  • `cli/CHANGELOG.md`: deleted, release-please will recreate on next release.
  • `.github/workflows/release-please.yml`: revert `publish-cli` and `move-major-tag` gating to bare `release_created` / `tag_name` / `major` (cli is now the only managed package).

Expected outcome on merge

The rollback commit itself is a `fix(cli):` change affecting `cli/` paths, so:

  1. release-please opens a release PR proposing cli `0.1.1 → 0.1.2`.
  2. Merging that PR creates fresh `v0.1.2` tag (the v0.1.2 namespace is empty — earlier attempts collided on `v0.1.3`, leaving v0.1.2 unused).
  3. `publish-cli` fires via OIDC → `@gitpulse/cli@0.1.2` lands on npm.
  4. `move-major-tag` floats `v0` → `v0.1.2`.

Side effects (acceptable)

  • Root `package.json` stays at `0.1.3` forever (no harm — never published).
  • Root `CHANGELOG.md` no longer auto-updated; existing entries stay as historical record.
  • `v0.1.3` git tag and GH release exist but are orphaned (cli was never published at that version). Harmless artifacts of the wedge — not worth deleting since git tags are usually treated as immutable.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Streamlined release automation outputs so downstream steps use a single, consistent release/tag signal.
    • Adjusted CLI package version metadata and cleaned up related changelog entries.
    • Removed an obsolete root package entry from release configuration.

…cli@0.1.2

Root cause of the recent release wedges: with two packages managed under
include-component-in-tag: false, release-please-action wants both packages
to share a single tag namespace but uses the highest version's tag for all
of them — producing duplicate-tag collisions whenever versions diverge
(which happens any time only one package has changes).

Fix the architecture: only release-please-manage @gitpulse/cli. Root is
private, never published, no consumer reads its version — it doesn't need
automated release management. Single-package mode = one tag, one release,
no collision possible.

Changes:
- release-please-config.json: drop "." entry; only "cli" remains
- .release-please-manifest.json: drop "." entry; cli reset to 0.1.1
  (the last cli version that actually got tagged on git)
- cli/package.json: revert version 0.1.2 → 0.1.1 (the 0.1.2 was bumped
  by a release-please PR that failed to publish — phantom version that
  never landed on npm or got tagged)
- cli/CHANGELOG.md: deleted, release-please will recreate on next release
- release-please.yml: revert downstream gating to bare release_created /
  tag_name / major (with cli as the sole managed package, bare = cli)

Expected outcome on merge:
  release-please sees the rollback as a fix(cli) commit affecting cli/,
  proposes cli 0.1.1 → 0.1.2, opens release PR. Merging that PR creates
  a fresh v0.1.2 tag, fires publish-cli via OIDC, lands @gitpulse/cli@0.1.2
  on npm.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 986774bf-3dcd-4a96-aa3b-d2f180ca5298

📥 Commits

Reviewing files that changed from the base of the PR and between 6618b4a and 47daeb1.

📒 Files selected for processing (1)
  • .github/workflows/release-please.yml

📝 Walkthrough

Walkthrough

The PR consolidates per-package release outputs into three generic outputs in the release-please workflow, updates downstream jobs to use those outputs, removes the root package entry from release-please config/manifest, and reverts the CLI package version and changelog entries to 0.1.1.

Changes

Release Workflow & Package Configuration Simplification

Layer / File(s) Summary
Configuration & Manifest Setup
release-please-config.json, .release-please-manifest.json
Removed the root package (".") entry from release-please-config.json. .release-please-manifest.json now contains only "cli": "0.1.1" (was "cli": "0.1.2" and a "." : "0.1.3" entry).
Workflow Output Consolidation
.github/workflows/release-please.yml
release-please job outputs reduced to release_created, tag_name, and major, each derived from `steps.rp.outputs.
Downstream Job Wiring
.github/workflows/release-please.yml
move-major-tag and publish-cli now gate on needs.release-please.outputs.release_created; MAJOR/TAG env values read from needs.release-please.outputs.major and needs.release-please.outputs.tag_name; publish-cli checks out ref: ${{ needs.release-please.outputs.tag_name }}.
Package & Documentation Updates
cli/package.json, cli/CHANGELOG.md
cli/package.json version changed from 0.1.20.1.1. cli/CHANGELOG.md entries for 0.1.2 and 0.1.1 were removed from the diffed content.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Hopping through YAML with a twitch of my nose,
I bundled outputs tight where the breezy action blows.
Root package tucked away, the CLI turned back time,
A tidy little workflow, neat as a rhyme.
Carrots for commits, and cookies for CI 🍪🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: dropping the root package from release-please management and resetting the CLI version to 0.1.1.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-please-drop-root

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 4, 2026

Greptile Summary

This PR fixes a chronic release-please deadlock caused by managing two packages (root . and cli) under include-component-in-tag: false, which forced them to share a single tag namespace and produced Duplicate release tag collisions whenever only one package had changes. The fix removes the root package from release-please management entirely, resets cli to the last actually-published version (0.1.1), and simplifies workflow gating to use coalesced bare/namespaced outputs.

Confidence Score: 5/5

Safe to merge — all changes are release-tooling config with no runtime code affected

No logic bugs found. The || coalescing for release-please outputs is sound: bare string 'false' short-circuits correctly and downstream jobs gate on == 'true'. Config changes are consistent with each other (manifest, config, package.json all aligned on 0.1.1). The root cause analysis is accurate and the fix is appropriately scoped.

No files require special attention

Important Files Changed

Filename Overview
.github/workflows/release-please.yml Simplified job outputs: drops cli-namespaced outputs, coalesces bare and cli--* forms via `
.release-please-manifest.json Drops root . entry; resets cli version to 0.1.1 — the last version actually tagged and published on npm
release-please-config.json Removes the root . package entry; cli remains the sole managed package, eliminating the dual-package tag-namespace collision
cli/package.json Reverts version from phantom 0.1.2 back to 0.1.1 to align with the last successfully published and git-tagged release
cli/CHANGELOG.md Deleted — release-please will regenerate from scratch on next release, discarding phantom 0.1.2 entry that was never published

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[push to main] --> B[release-please job]
    B --> C{release created?}
    C -- "release_created == 'true'\n(bare OR cli-- form)" --> D[move-major-tag]
    C -- "release_created == 'true'\n(bare OR cli-- form)" --> E[publish-cli]
    C -- no release --> F[no-op]

    D --> G["git tag -f v{major} {tag_name}\ngit push --force"]
    E --> H[checkout at tag_name]
    H --> I[yarn install + build]
    I --> J[npm publish via OIDC]

    style F fill:#ccc,color:#333
    style J fill:#2da44e,color:#fff
    style G fill:#0969da,color:#fff
Loading

Reviews (2): Last reviewed commit: "fix(release-please): coalesce bare and c..." | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release-please.yml:
- Around line 29-34: The workflow is using unscoped release-please outputs
(release_created, tag_name, major) but release-please emits path-scoped outputs
for non-root packages; update the job outputs to use the path-scoped keys for
the configured package (prefix each output with the package path and two dashes,
e.g. "cli--release_created", "cli--tag_name", "cli--major") so downstream steps
that reference these outputs will receive the correct values from the
release-please step (replace occurrences of release_created, tag_name, major
with their "cli--" counterparts wherever referenced).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0da7eb7f-2851-40dd-bfd1-dc4e501ec5d8

📥 Commits

Reviewing files that changed from the base of the PR and between 08107cf and 6618b4a.

📒 Files selected for processing (5)
  • .github/workflows/release-please.yml
  • .release-please-manifest.json
  • cli/CHANGELOG.md
  • cli/package.json
  • release-please-config.json
💤 Files with no reviewable changes (2)
  • release-please-config.json
  • cli/CHANGELOG.md

Comment thread .github/workflows/release-please.yml Outdated
Coderabbit flagged that with no root path in release-please-config.json,
release-please-action may emit path-scoped outputs (cli--release_created,
cli--tag_name, cli--major) instead of the bare ones. Without empirical
evidence either way for the no-root-package case, hedge by coalescing
both shapes so dependent jobs (publish-cli, move-major-tag) work
regardless of which shape the action emits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@znat znat merged commit 3953a36 into main May 4, 2026
4 checks passed
This was referenced May 4, 2026
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