You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Branches are auto-merged or held for review depending on your workflow config.
187
+
Branches are auto-merged or held for review depending on your workflow config. When a review branch is merged or rejected, its remote copy is deleted too, so merged branches don't linger as phantom pending reviews — run `contentrain prune` to drain any existing backlog, or set `remoteBranchCleanup: false` to opt out.
Non-interactive single-branch sibling of `contentrain diff`. Delegates to MCP's `mergeBranch` so dirty-file protections + selective sync warnings behave identically.
242
+
Non-interactive single-branch sibling of `contentrain diff`. Delegates to MCP's `mergeBranch` so dirty-file protections + selective sync warnings behave identically. After a successful merge it also deletes the branch's copy on the remote — best-effort, so an offline or permission failure only prints a warning. Opt out with `remoteBranchCleanup: false` in `config.json`.
contentrain prune --json # Machine-readable output (mutates only with --yes)
253
+
```
254
+
255
+
Drains already-merged `cr/*` branches: local ones past their retention period plus every merged copy left on the remote. This is the operator-facing cleanup for backlogs the per-merge deletion could not remove — e.g. branches merged before remote cleanup shipped, or after an offline/permission failure. Merged detection uses the same ancestry + patch-id classification as the rest of the toolchain, so branches orphaned by a base-history rewrite are still recognised. Governed by `remoteBranchCleanup` in `config.json`; exits non-zero if any remote deletion fails.
|`contentrain_merge`| Merge branches | Merge a review-mode branch into contentrain locally (by exact branch or model; no external platform needed) |
95
-
|`contentrain_branch_list`| Inspect branches | List pending `cr/*` branches with merge status and branch-health pressure |
96
-
|`contentrain_branch_delete`| Clean up branches | Delete a stale/failed `cr/*` branch (the contentrain branch is protected) |
93
+
|`contentrain_submit`| Push branches | Push `cr/*` review branches to remote, then lazily prune merged local + remote leftovers|
94
+
|`contentrain_merge`| Merge branches | Merge a review-mode branch into contentrain locally (by exact branch or model; no external platform needed); deletes the branch's remote copy|
95
+
|`contentrain_branch_list`| Inspect branches | List pending `cr/*` branches with merge status and branch-health pressure (`remote: true` adds a remote view + remote-only leftovers) |
96
+
|`contentrain_branch_delete`| Clean up branches | Delete a stale/failed `cr/*` branch locally and on the remote (the contentrain branch is protected; supports remote-only deletion) |
97
97
98
98
### Normalize Tools (Scan + Apply)
99
99
@@ -133,7 +133,9 @@ All write operations create or update `cr/*` branches:
133
133
- Content changes go to isolated branches (`cr/{scope}/{target}[/{locale}]/{timestamp}-{suffix}`)
134
134
- Humans review via `contentrain diff` or the serve UI
135
135
- Approved changes merge into the `contentrain` branch, baseBranch is advanced via update-ref
136
-
- Branch health is tracked and surfaced via `contentrain_status` (warning at 50, blocked at 80 active branches)
136
+
- Merging (or deleting) a branch also removes its copy on the remote, so merged branches don't pile up as phantom pending reviews — best-effort, opt out with `remoteBranchCleanup: false` in `config.json`. Drain an existing backlog with `contentrain prune`
137
+
- Merged-branch detection survives base-history rewrites (ancestry check with a patch-id fallback)
138
+
- Branch health is tracked and surfaced via `contentrain_status` (warning at 50, blocked at 80 active branches); `contentrain_doctor` adds a remote `cr/*` count
137
139
- Legacy `contentrain/*` branches are auto-migrated on first init
138
140
139
141
### 4. Local-First by Default, Remote Providers Opt-In
0 commit comments