@henryqw/pi-pr 6.2.6 → 6.2.7

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.
package/README.md CHANGED
@@ -82,5 +82,5 @@ In-progress feedback sweeps keep private recovery under `<agent-dir>/config/pi-p
82
82
  - `/pr` does not open a browser, run `/done` or `/sweep`, enable auto-merge, or use a merge queue. It only starts workflows when explicitly invoked.
83
83
  - Pushes use a saved exact remote OID lease and revalidate the destination. Concurrent updates block publication instead of being overwritten. Creation does not change the base branch, and a configured push target does not change upstream settings.
84
84
  - Direct merge requires a clean, safe local Git state and fresh matching head; it always squashes. GitHub repository policy may still reject it. No branch or worktree is deleted.
85
- - A Git operation in progress blocks direct merge. An unverified conflict rebase needs manual recovery; a verified rebase can resume through `/pr`. Branches with merge commits since the fork point require manual rebase resolution.
85
+ - A Git operation in progress blocks direct merge. An unverified conflict rebase needs manual recovery; a verified rebase can resume through `/pr`. Rebasing leaves other local branch refs unchanged, even with `rebase.updateRefs=true`. Branches with merge commits since the fork point require manual rebase resolution.
86
86
  - Only authenticated GitHub.com and GitHub Enterprise repositories are supported. Resolve ambiguous remotes, unrelated local changes, or GitHub blockers before retrying `/pr`.
@@ -257,7 +257,7 @@ export class PullRequestBranchUpdater {
257
257
  if (mergeCommits) throw new Error("Branch update cannot rebase a branch with merge commits; preserve its resolutions manually");
258
258
  await this.freshAuthority(this.authority.head.oid, true);
259
259
  await this.writeRecovery("pending", null);
260
- const result = await this.exec("git", ["-c", "core.editor=true", "-c", "rebase.backend=merge", "rebase", "--no-autostash", "--onto", this.authority.base.oid, mergeBase], this.execOptions());
260
+ const result = await this.exec("git", ["-c", "core.editor=true", "-c", "rebase.backend=merge", "-c", "rebase.updateRefs=false", "rebase", "--no-autostash", "--onto", this.authority.base.oid, mergeBase], this.execOptions());
261
261
  if (result.killed) throw new Error("git rebase was killed; its outcome is unknown");
262
262
  if (result.code === 0) return await this.verifyRebase();
263
263
  try {
@@ -289,7 +289,7 @@ export class PullRequestBranchUpdater {
289
289
  await runChecked(this.exec, "git", ["--literal-pathspecs", "add", "--", ...paths], this.execOptions());
290
290
  const unmerged = parseNulPaths((await runChecked(this.exec, "git", ["diff", "--name-only", "-z", "--diff-filter=U"], this.execOptions())).stdout, "Unmerged paths");
291
291
  if (unmerged.length) throw new Error(`Conflict paths remain unresolved: ${unmerged.join(", ")}`);
292
- const result = await this.exec("git", ["-c", "core.editor=true", "rebase", "--continue"], this.execOptions());
292
+ const result = await this.exec("git", ["-c", "core.editor=true", "-c", "rebase.updateRefs=false", "rebase", "--continue"], this.execOptions());
293
293
  if (result.killed) throw new Error("git rebase continuation was killed; its outcome is unknown");
294
294
  if (result.code === 0) return await this.verifyRebase();
295
295
  return await this.captureConflict();
package/extensions/pr.ts CHANGED
@@ -432,6 +432,8 @@ export default function pullRequestExtension(
432
432
  selected.controller.signal.throwIfAborted();
433
433
  if (worktree !== selected.worktree) throw new Error("PR workflow worktree is wrong or stale");
434
434
  selected.usedSinceSettlement = true;
435
+ // Drained follow-ups need not emit before_agent_start; this run has been consumed.
436
+ selected.queuedPrompt = undefined;
435
437
  return toolResult(await action(selected as Extract<WorkflowContext, { route: Route }>));
436
438
  } finally {
437
439
  signal?.removeEventListener("abort", abortRun);
@@ -783,7 +785,8 @@ export default function pullRequestExtension(
783
785
 
784
786
  pi.on("agent_before_settle", async (event, ctx) => {
785
787
  const selected = workflowContext;
786
- if (event.outcome !== "completed" || !event.context.canContinue || !selected?.completed ||
788
+ // Pi evaluates continuation again after this handler queues the next workflow.
789
+ if (event.outcome !== "completed" || !selected?.completed ||
787
790
  selected.queuedPrompt || selected.sessionGeneration !== sessionGeneration) return;
788
791
  const invocation = [...activeInvocations].find(([, phase]) => phase === "workflow" || phase === "create-workflow")?.[0];
789
792
  if (invocation === undefined) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-pr",
3
- "version": "6.2.6",
3
+ "version": "6.2.7",
4
4
  "description": "Run /pr to safely discover or link the current pull request, then create, update, address feedback, fix CI, or merge when ready.",
5
5
  "keywords": [
6
6
  "pi-package",