Skip to content

Contentrain/ai

v@contentrain/[email protected] Feature

This release adds 3 notable features for engineering teams evaluating rollout.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

ai-agents claude-code content-governance contentrain cursor developer-tools
+8 more
git i18n mcp mcp-server model-context-protocol sdk typescript windsurf

Affected surfaces

breaking_upgrade

Summary

AI summary

Merge and delete actions now automatically remove remote cr/* branches, fixing stale branch accumulation.

Changes in this release

Feature Low

Adds `contentrain prune` CLI command to remove leaked merged remote branches.

Adds `contentrain prune` CLI command to remove leaked merged remote branches.

Source: llm_adapter@2026-07-16

Confidence: high

Feature Low

Introduces `contentrain_doctor` "Remote branches" health check.

Introduces `contentrain_doctor` "Remote branches" health check.

Source: llm_adapter@2026-07-16

Confidence: high

Feature Low

Adds `contentrain_branch_list` option to view remote branches (`remote: true`).

Adds `contentrain_branch_list` option to view remote branches (`remote: true`).

Source: llm_adapter@2026-07-16

Confidence: high

Feature Low

Exports new branch‑lifecycle utilities from `@contentrain/mcp/git/branch-lifecycle`.

Exports new branch‑lifecycle utilities from `@contentrain/mcp/git/branch-lifecycle`.

Source: llm_adapter@2026-07-16

Confidence: high

Bugfix Medium

Improves merged‑branch detection using patch‑id equivalence when ancestry breaks.

Improves merged‑branch detection using patch‑id equivalence when ancestry breaks.

Source: llm_adapter@2026-07-16

Confidence: high

Bugfix Medium

Fixes fast‑forward guard in transaction layer that previously never fired.

Fixes fast‑forward guard in transaction layer that previously never fired.

Source: llm_adapter@2026-07-16

Confidence: high

Bugfix Medium

Deletes remote cr/* branches after merge or deletion.

Deletes remote cr/* branches after merge or deletion.

Source: llm_adapter@2026-07-16

Confidence: low

Full changelog

Minor Changes

  • ee8da2d: Delete remote cr/* branches on merge/delete and harden merged-branch detection

    Every review-mode save pushed its cr/* branch to origin, but nothing ever deleted the remote copy after a merge — stale branches accumulated monotonically (one per save+merge cycle) and rendered as phantom pending reviews in Studio.

    • mergeBranch (and therefore contentrain_merge, contentrain merge, contentrain diff, the Serve UI approve endpoints, and LocalProvider.mergeBranch) now deletes the merged branch's remote copy — best-effort: failures surface as a remote.warning, never as a failed merge. Default on; opt out with remoteBranchCleanup: false in config.json. Note: deleting a pushed branch closes any open PR/MR on it.
    • contentrain_branch_delete, the Serve UI reject endpoint, contentrain diff's delete action, and LocalProvider.deleteBranch remove the remote copy too. contentrain_branch_delete also supports remote-only deletion when the local ref is already gone.
    • GitHub/GitLab providers delete the source branch after a successful API merge (opt out per call with mergeBranch(..., { removeSourceBranch: false })).
    • Merged-branch detection (isMerged, cleanupMergedBranches, checkBranchHealth) now falls back to patch-id equivalence (git cherry) when ancestry breaks — merged branches no longer flip to "unmerged" after a base-history rewrite. Also fixes the fast-forward guard in the transaction layer, which previously never fired (merge-base --is-ancestor signals via exit code with empty stderr, which simple-git reports as success).
    • contentrain_doctor gains a "Remote branches" check (authoritative ls-remote count, offline-safe); contentrain_branch_list accepts remote: true for a remote view.
    • New contentrain prune CLI command drains already-leaked merged remote branches (--dry-run / --yes / --json), and contentrain_submit lazily prunes up to 20 merged remote leftovers per run.
    • New exports from @contentrain/mcp/git/branch-lifecycle: deleteRemoteBranch, listRemoteCrBranches, pruneMergedRemoteBranches, isRefMerged, classifyMergedBranches.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track Contentrain/ai

Get notified when new releases ship.

Sign up free

About Contentrain/ai

Local-first MCP server for AI content governance — 13 tools for model/content CRUD, validation, normalization, and i18n across any framework.

All releases →

Related context

Earlier breaking changes

Beta — feedback welcome: [email protected]