@tablation/crew 0.49.2 → 0.49.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +19 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -4125,7 +4125,17 @@ function levelRemoteBranch(cwd, remote, branch) {
4125
4125
  }
4126
4126
  const remoteTip2 = gitOk(cwd, ["rev-parse", "-q", "--verify", `refs/remotes/${remote}/${branch}`]);
4127
4127
  if (!remoteTip2 || remoteTip2 === local) return { exists: true };
4128
- if (!isAncestor(cwd, local, remoteTip2)) return { exists: true };
4128
+ if (!isAncestor(cwd, local, remoteTip2)) {
4129
+ const diverged = !isAncestor(cwd, remoteTip2, local);
4130
+ const holder2 = diverged ? worktrees(cwd).find((w) => w.branch === branch && !w.prunable) : void 0;
4131
+ if (holder2) {
4132
+ return {
4133
+ exists: true,
4134
+ problem: `local ${branch} at ${local.slice(0, 8)} has commits not on ${remote}/${branch} at ${remoteTip2.slice(0, 8)}; worktree ${holder2.path}`
4135
+ };
4136
+ }
4137
+ return { exists: true };
4138
+ }
4129
4139
  const holder = worktrees(cwd).find((w) => w.branch === branch && !w.prunable);
4130
4140
  if (holder) {
4131
4141
  if (gitOk(holder.path, ["status", "--porcelain"])) {
@@ -9784,6 +9794,14 @@ async function runReleaseCycle(o, movedPast2) {
9784
9794
  const moved = branch ? movedPastVerified(o.cwd, branch, verified) : null;
9785
9795
  if (!moved) continue;
9786
9796
  drop.add(t.id);
9797
+ const remoteTip2 = branch ? gitOk(o.cwd, ["rev-parse", "-q", "--verify", `refs/remotes/${o.repo.branch.remote}/${branch}^{commit}`]) : null;
9798
+ if (remoteTip2 && remoteTip2 !== moved.tip) {
9799
+ o.emit.error(
9800
+ `not releasing ${t.issue_id}: local ${branch} at ${moved.tip.slice(0, 8)} is not on ${o.repo.branch.remote}/${branch} (${remoteTip2.slice(0, 8)}); not requeuing it`,
9801
+ { ticket: t.issue_id }
9802
+ );
9803
+ continue;
9804
+ }
9787
9805
  movedPast2.push({ ticket: t, verified: moved.verified, head: moved.tip, branch: pushedBranchForTicket(o.repo, t) });
9788
9806
  o.emit.error(
9789
9807
  `not releasing ${t.issue_id}: ${branch} is at ${moved.tip.slice(0, 8)}, past the ${moved.verified.slice(0, 8)} QA verified`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.49.2",
3
+ "version": "0.49.3",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",