nx-affected releases: stop plugin-only changes releasing agent-team - #236
nx-affected releases: stop plugin-only changes releasing agent-team#236jack-nsheaps[bot] wants to merge 2 commits into
Conversation
…elease agent-team release.yaml ran on every push to main, cutting a repo-wide release-it GitHub release + Homebrew formula PR even for plugins/**-only changes. The agent-team / claude-team formulas ship only bin/** scripts, so those releases installed byte-identical binaries — pure churn. Lean into the nx monorepo pattern instead: - Add a per-module `release` target (nx run-script). Only modules that actually release define one: root -> `release-it --ci`; @nsheaps/agents-plugins -> plugins/release.sh (version bump + marketplace.json, self-contained commit/push, lifted from cd.yaml's main job). - nx.json: `release` targetDefault with dependsOn [build, test, lint, ^release]. - release.yaml: resolve base = floating `last-released` tag (fallback HEAD~1), run `nx affected --target=release --parallel=1`, open the Homebrew PR only when root actually cut a new v* tag, then move `last-released` to the released commit. - cd.yaml: now PR-preview-only; its main bump job moved into the plugins release target. Retire the `cd/last-release` tag in favor of `last-released`. - Docs: document the release pipeline in docs/MONOREPO.md. Net: plugins-only change -> only the plugins module releases (verified locally via `nx show projects --affected --withTarget=release`). bin/** change -> root releases.
release-it (root) pushes a commit to main and can't tolerate main advancing under it; the other modules' release scripts resync + retry. When a single merge affects both, run root:release first, then nx affected --exclude=root for the resilient rest.
Plugin Version PreviewPreview only — plugin versions and
|
🤖 Code review (fallback self-review)
Verdict: 🟢 sound and achieves the goal. One P1 to address-or-consciously-accept; rest are minor. P1 — partial-failure drops the Homebrew update non-self-healinglyIn
Because release-it's commit is P2 — release is now gated on repo-wide
|
Problem
release.yamlran on every push tomainwith no path filter, so aplugins/**-only change cut a repo-widerelease-itGitHub release and openedan
agent-team/claude-teamHomebrew formula bump PR. Those formulas ship onlybin/**scripts (bin/claude-team,bin/ct,bin/agent-launch.ts,bin/lib/*),so a plugins change produced a release that installs byte-identical binaries —
pure churn.
Approach — lean into the nx monorepo pattern
Releases are now affected-driven, mirroring the existing
nx run-manyfan-out:releasetarget (nx run-script), defined only on modules thatactually publish:
root→release-it --ci(version + tag + GitHub release + Homebrew).@nsheaps/agents-plugins→plugins/release.sh(per-plugin version bump +marketplace.json, self-contained commit/push, lifted fromcd.yaml's old main job).nx.json:releasedependsOn: ["build", "test", "lint", "^release"]— a modulebuilds/tests/lints (and upstream deps release) before it releases.
release.yaml: resolve base = floatinglast-releasedtag (fallbackHEAD~1),compute
nx show projects --affected --withTarget=release, run root's release first(release-it can't tolerate
mainadvancing under it) thennx affected --target=release --exclude=root, open the Homebrew PR only when root cuta new
v*tag, and on success movelast-releasedto the released commit.cd.yaml→ PR-preview-only (the main bump job moved into the pluginsreleasetarget). Retires the
cd/last-releasetag in favor oflast-released.docs/MONOREPO.mddocuments the release pipeline.Net effect
plugins/**only["@nsheaps/agents-plugins"]bin/**["root"]Verified locally
nx show projects --affected --withTarget=release --files=…returns the table above.releasetargets with thedependsOngraph;--exclude=rootandroot:releaseresolve; JSON/YAML parse; markdown + shell lint clean.Needs CI / review (not exercisable in the sandbox — no GitHub API / cross-repo)
release-itGitHub release, the cross-repo Homebrew formula PR, thelast-releasedtag move, and the serialized concurrent-push behavior.Plan:
.claude/plans/nx-affected-release-pipeline.md.🤖 Opened by an AI agent (jack-nsheaps[bot]) on behalf of @nsheaps.