pr-shepherd 2.2.15 → 2.2.16

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
3
  "description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
4
- "version": "2.2.15",
4
+ "version": "2.2.16",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
7
7
  "email": "jonathanrichardong@gmail.com"
package/README.md CHANGED
@@ -4,10 +4,10 @@ Take pull requests from scratch to merge-ready with a coding agent, as a [Code M
4
4
 
5
5
  ## Benefits
6
6
 
7
- - **Better decisions:** across 59 PR states, it scores 0.94 with the plugin vs. 0.46 with `gh` + the GitHub MCP server ([outcome evals](evals/README.md), 2026-11-19).
8
- - **Lower cost:** modeled cost per PR session is about 36% lower than `gh` and 76% lower than the GitHub MCP server, with 20% / 69% fewer turns ([token bench](evals/tokens/README.md); assumes a warm prompt cache).
7
+ - **Better decisions:** across 71 PR states, it scores 0.95 with the plugin vs. 0.57 with `gh` + the GitHub MCP server ([outcome evals](evals/README.md), 2026-11-23).
8
+ - **Lower cost:** modeled cost per PR session is about 34% lower than `gh` and 75% lower than the GitHub MCP server, with 18% / 69% fewer turns ([token bench](evals/tokens/README.md); assumes a warm prompt cache).
9
9
  - **More PRs on one GitHub quota:** 65% fewer GraphQL points than `gh` per PR session. While CI runs, a 5,000-point hourly budget covers about 80 waiting PRs, vs. about 13 with `gh pr checks --watch` ([GitHub API](docs/github-api.md), [GraphQL usage](docs/graphql-usage.md)). A [GitHub App](docs/github-app.md) and [webhook events](docs/hook-harness.md) cut it more.
10
- - **72 GitHub edge cases handled:** outdated or resolved threads are still shown once, edited comments come back, and conflicts that GraphQL reports as `CLEAN` are caught ([handled cases](docs/handled-cases.md)).
10
+ - **76 GitHub edge cases handled:** outdated or resolved threads are still shown once, edited comments come back, and conflicts that GraphQL reports as `CLEAN` are caught ([handled cases](docs/handled-cases.md)).
11
11
  - **Tidy PRs, less context:** bot and outdated comments are triaged and resolved, human reviews get replies, and known bot noise is minimized and filtered out before it reaches the agent.
12
12
  - **Review hygiene:** it never answers its own replies or minimizes human comments, skips a denied reply once, and hands a repeatedly rejected fix to a human ([comments and reviews](docs/handled-cases.md#comments-and-reviews)).
13
13
  - **CI failures, pre-read:** each failing check comes with its failed step, summary, and log excerpt, so the agent rarely fetches logs. Superseded runs, unstarted required checks, and approval gates are recognized ([failing checks](docs/actions.md#failing-checks-and-reruns), [CI cases](docs/handled-cases.md#ci-checks)).
@@ -14,6 +14,9 @@ export function reportAllowsFingerprintSkip(report) {
14
14
  return false;
15
15
  if (report.mergeQueue?.removalAcknowledged === true)
16
16
  return false;
17
+ // The settle window ends with the clock, not with any change a fingerprint could see.
18
+ if (report.awaitingCheckRegistration === true)
19
+ return false;
17
20
  return (report.threads.actionable.length === 0 &&
18
21
  report.threads.resolutionOnly.length === 0 &&
19
22
  report.threads.firstLook.length === 0 &&
@@ -0,0 +1,11 @@
1
+ /**
2
+ * True while a head with no relevant check and no running Actions suite is younger than the
3
+ * settle window. `headFreshAtUnix` is when the head last reached GitHub; without it the head is
4
+ * treated as settled, so an unknown age never holds a PR back.
5
+ */
6
+ export declare function headStillSettling(input: {
7
+ hasChecks: boolean;
8
+ actionsWorkflowInProgress: boolean;
9
+ headFreshAtUnix?: number | undefined;
10
+ nowUnix: number;
11
+ }): boolean;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Seconds after a head reaches GitHub during which a PR with no relevant check cannot be READY.
3
+ * Apps and Actions register their checks a few seconds after the push, and GitHub reports
4
+ * `CLEAN` with an empty rollup until they do. A constant, not a config key: it is internal
5
+ * tuning with a safe value, and a repository with no CI still finishes once the window passes.
6
+ */
7
+ const CHECK_SETTLE_SECONDS = 60;
8
+ /**
9
+ * True while a head with no relevant check and no running Actions suite is younger than the
10
+ * settle window. `headFreshAtUnix` is when the head last reached GitHub; without it the head is
11
+ * treated as settled, so an unknown age never holds a PR back.
12
+ */
13
+ export function headStillSettling(input) {
14
+ if (input.hasChecks || input.actionsWorkflowInProgress)
15
+ return false;
16
+ if (input.headFreshAtUnix === undefined)
17
+ return false;
18
+ return input.nowUnix - input.headFreshAtUnix < CHECK_SETTLE_SECONDS;
19
+ }
@@ -23,6 +23,7 @@ import { withHeadOid } from "./review-commit.mjs";
23
23
  import { computeStatus } from "./check-status.mjs";
24
24
  import { annotationMarkerBody, attachAndMergeCheckAnnotations, hasCheckDrivenActionableWork, isQueuedConflict, } from "./check-annotations.mjs";
25
25
  import { buildTerminalReport } from "./check-terminal-report.mjs";
26
+ import { headStillSettling } from "./check-settle.mjs";
26
27
  import { isBlockedByFilteredCheck, refreshReadyMergeability, refreshUnknownMergeability, } from "./ready-mergeability.mjs";
27
28
  import { loadSeenMap, markSeen, classifyItem, mutationWasDenied } from "../state/seen-comments.mjs";
28
29
  import { aliasThreadSeenMarkers } from "../github/rest-identities.mjs";
@@ -267,8 +268,17 @@ async function runScopedCheck(opts, context, repo, prNumber, stateKey) {
267
268
  canGenerateItemMutation(review.id, review.body, batchData.viewerAuthorization?.viewerCanAdminister, "dismiss") ||
268
269
  visibleChangesRequestedIds.has(review.id));
269
270
  }).length;
271
+ // A head that reached GitHub moments ago has no checks yet because they are not registered,
272
+ // not because the repository has none; hold READY until the settle window passes.
273
+ const settling = headStillSettling({
274
+ hasChecks: verdict.hasChecks,
275
+ actionsWorkflowInProgress: unreported.actionsWorkflowInProgress === true,
276
+ headFreshAtUnix: batchData.headFreshAtUnix,
277
+ nowUnix: Math.floor(Date.now() / 1000),
278
+ });
270
279
  const awaitingChecks = unreported.hasUnreportedRequired ||
271
- (!verdict.hasChecks && unreported.actionsWorkflowInProgress === true);
280
+ (!verdict.hasChecks && unreported.actionsWorkflowInProgress === true) ||
281
+ settling;
272
282
  let status = computeStatus(verdict, threadVisibility.activeThreads.length + threadVisibility.resolutionOnlyThreads.length, visibleCommentClassification.actionable.length, mergeStatus, changesRequestedReviewCount, awaitingChecks);
273
283
  status = enforceTransportReadiness(status, batchData);
274
284
  // Resolve any pending mergeability refresh (and the resulting MERGED/CLOSED short-circuit)
@@ -497,6 +507,7 @@ async function runScopedCheck(opts, context, repo, prNumber, stateKey) {
497
507
  ...(unreported.actionsWorkflowInProgress && {
498
508
  actionsWorkflowInProgress: true,
499
509
  }),
510
+ ...(settling && { awaitingCheckRegistration: true }),
500
511
  ...(unreported.stackBottomPr !== undefined && {
501
512
  stackBottomPr: unreported.stackBottomPr,
502
513
  }),
@@ -0,0 +1,12 @@
1
+ import type { PollSummaryChecks } from "../../types.mts";
2
+ import type { RawSummaryPr } from "../../github/poll-summary-raw.mts";
3
+ /**
4
+ * Why the fresh read taken just before a READY is certified contradicts that READY report, or
5
+ * `undefined` when it does not. Only evidence the next full check will also see counts: a
6
+ * relevant check still running, a running Actions suite with no relevant check, or a merge
7
+ * state that changed to `UNSTABLE`, `DIRTY` or `BEHIND`. Failing checks, unreported required
8
+ * checks and a transient `UNKNOWN` are left to the next full check, and so is anything the
9
+ * summary cannot confirm (an unavailable read, incomplete pages), so a summary that merely
10
+ * disagrees with the one-PR check cannot hold a PR until the stall timeout.
11
+ */
12
+ export declare function freshSummaryRegression(raw: RawSummaryPr, checks: PollSummaryChecks, reportMergeStateStatus: string): string | undefined;
@@ -0,0 +1,24 @@
1
+ import { hasNoRelevantChecks } from "../../github/poll-summary-unreported.mjs";
2
+ /** Merge states that show the PR left the state its READY report saw. */
3
+ const LEFT_CLEAN_STATES = new Set(["UNSTABLE", "DIRTY", "BEHIND"]);
4
+ /**
5
+ * Why the fresh read taken just before a READY is certified contradicts that READY report, or
6
+ * `undefined` when it does not. Only evidence the next full check will also see counts: a
7
+ * relevant check still running, a running Actions suite with no relevant check, or a merge
8
+ * state that changed to `UNSTABLE`, `DIRTY` or `BEHIND`. Failing checks, unreported required
9
+ * checks and a transient `UNKNOWN` are left to the next full check, and so is anything the
10
+ * summary cannot confirm (an unavailable read, incomplete pages), so a summary that merely
11
+ * disagrees with the one-PR check cannot hold a PR until the stall timeout.
12
+ */
13
+ export function freshSummaryRegression(raw, checks, reportMergeStateStatus) {
14
+ if ((checks.inProgress ?? 0) > 0)
15
+ return "a relevant check is queued or in progress";
16
+ if (checks.actionsWorkflowInProgress === true && hasNoRelevantChecks(checks)) {
17
+ return "an Actions workflow suite is still running";
18
+ }
19
+ if (raw.mergeStateStatus !== reportMergeStateStatus &&
20
+ LEFT_CLEAN_STATES.has(raw.mergeStateStatus)) {
21
+ return `the merge state changed to ${raw.mergeStateStatus}`;
22
+ }
23
+ return undefined;
24
+ }
@@ -23,6 +23,7 @@ import { summarizePollSummaryPr } from "../../github/poll-summary-projector.mjs"
23
23
  import { annotationProbeUnavailable } from "../../github/poll-summary-annotation-probe.mjs";
24
24
  import { fingerprintRawSummaryPr } from "../../github/poll-summary-fingerprint.mjs";
25
25
  import { currentQueueRemovalEvent } from "../../github/poll-summary-queue-removal.mjs";
26
+ import { freshSummaryRegression } from "./fresh-summary-regression.mjs";
26
27
  import { isCurrentSummaryReady } from "../../github/poll-summary-readiness.mjs";
27
28
  import { clearReadyReceipt, isReadyReceiptCurrent, readReadyReceipt, writeReadyReceipt, } from "../../state/ready-receipts.mjs";
28
29
  import { withStackBoundary } from "./stack-boundary.mjs";
@@ -327,13 +328,14 @@ async function runIterateCore(opts, tick) {
327
328
  // still holds it, but without --merge its one-PR session ends like a
328
329
  // single PR's instead of waiting for a stall-timeout.
329
330
  const stackLayer = report.mergeStatus.mergeRequirements?.stack !== undefined;
330
- if (stackLayer &&
331
- (outcome.status === "failed" || (outcome.status === "blocked" && opts.merge))) {
331
+ if ((stackLayer &&
332
+ (outcome.status === "failed" || (outcome.status === "blocked" && opts.merge))) ||
333
+ (outcome.status === "failed" && outcome.regressed)) {
332
334
  const receiptWait = {
333
335
  ...base,
334
336
  action: "wait",
335
337
  shouldCancel: false,
336
- log: receiptWaitLog(base.pr, outcome),
338
+ log: receiptWaitLog(base.pr, outcome, stackLayer),
337
339
  };
338
340
  return annotateBlockedWait(await applyStallGuard(stallKey, stallTimeoutSeconds, headSha, base, prNumber, receiptWait, reportForWork, reviewSummaryIds, opts.stallDeadlineSink, opts.persistSeen !== false), blockerGate);
339
341
  }
@@ -375,10 +377,13 @@ async function runIterateCore(opts, tick) {
375
377
  const short = (oid) => oid.slice(0, 7);
376
378
  const failed = (reason) => ({ status: "failed", reason });
377
379
  const errMessage = (e) => (e instanceof Error ? e.message : String(e));
378
- function receiptWaitLog(pr, outcome) {
380
+ function receiptWaitLog(pr, outcome, stackLayer) {
379
381
  const head = `WAIT: PR #${pr} reached ready-delay but`;
380
382
  if (outcome.status === "blocked")
381
383
  return `${head} GitHub reports BLOCKED, so its stack readiness receipt was not certified`;
384
+ if (outcome.regressed && !stackLayer) {
385
+ return `WAIT: PR #${pr} looked ready but a fresh read shows ${outcome.reason}`;
386
+ }
382
387
  if (outcome.persistFailure)
383
388
  return `${head} its stack readiness receipt could not be persisted: ${outcome.reason}`;
384
389
  return `${head} its stack readiness receipt was not certified: ${outcome.reason}`;
@@ -406,9 +411,11 @@ async function recordReadyReceipt(key, report, context) {
406
411
  if (raw.isDraft)
407
412
  return failed("fresh summary shows PR as a draft");
408
413
  if (raw.headRefOid !== report.headSha)
409
- return failed(`head moved (report ${short(report.headSha)}, fresh ${short(raw.headRefOid)})`);
410
- if (raw.baseRefOid !== report.baseRefOid)
411
- return failed(`base moved (report ${short(report.baseRefOid)}, fresh ${short(raw.baseRefOid)})`);
414
+ return {
415
+ status: "failed",
416
+ reason: `the head moved (report ${short(report.headSha)}, fresh ${short(raw.headRefOid)})`,
417
+ regressed: true,
418
+ };
412
419
  // Summarize hydrates annotation totals onto the snapshot; hash only after,
413
420
  // so the stored hash matches the stack side's (which hashes hydrated evidence).
414
421
  summary = await summarizePollSummaryPr(raw, { owner: key.owner, name: key.repo }, { stackPrNumber: report.pr });
@@ -426,6 +433,12 @@ async function recordReadyReceipt(key, report, context) {
426
433
  return failed("annotation probe unavailable");
427
434
  const checks = summary.checks ?? {};
428
435
  const review = summary.review ?? {};
436
+ const regression = freshSummaryRegression(raw, checks, report.mergeStatus.mergeStateStatus);
437
+ if (regression)
438
+ return { status: "failed", reason: regression, regressed: true };
439
+ // After the regression check: a base move alongside queued CI must still wait.
440
+ if (raw.baseRefOid !== report.baseRefOid)
441
+ return failed(`base moved (report ${short(report.baseRefOid)}, fresh ${short(raw.baseRefOid)})`);
429
442
  if (!isCurrentSummaryReady(raw, checks, review)) {
430
443
  const onlyBlocked = raw.mergeStateStatus === "BLOCKED" &&
431
444
  !raw.isInMergeQueue &&
@@ -1,5 +1,6 @@
1
1
  import { mapAuthorType, parseCreatedAt, latestApprovedLogins, isReviewStale, } from "./batch-parser-helpers.mjs";
2
2
  import { parseCheckNodes } from "./batch-parse-checks.mjs";
3
+ import { headFreshAtUnix } from "./head-freshness.mjs";
3
4
  import { headPushUnixFromCheckNodes } from "./queue-removal-freshness.mjs";
4
5
  import { requireContextNodes } from "./batch-response.mjs";
5
6
  import { buildPrActivitySummary } from "./activity.mjs";
@@ -113,6 +114,13 @@ export function parseRawPr(raw, rawThreadPages, rawCommentNodes, rawReviewNodes,
113
114
  ? requireContextNodes(queueHead.statusCheckRollup.contexts.nodes)
114
115
  : undefined, queueHead?.oid);
115
116
  const headPushedAtUnix = headPushUnixFromCheckNodes(rawCheckNodes);
117
+ const headForcePushedAt = raw.headRefForcePushes?.nodes[0]?.createdAt;
118
+ const freshAtUnix = headFreshAtUnix({
119
+ suiteCreatedAts: (raw.commits.nodes[0]?.commit.checkSuites?.nodes ?? []).map((suite) => suite.createdAt),
120
+ ...(headForcePushedAt && { forcePushedAtUnix: parseCreatedAt(headForcePushedAt) }),
121
+ prCreatedAt: raw.createdAt,
122
+ committedAt: raw.commits.nodes[0]?.commit.committedDate,
123
+ });
116
124
  const removedMergeQueueChecks = parseCheckNodes(removedQueueHead?.statusCheckRollup
117
125
  ? requireContextNodes(removedQueueHead.statusCheckRollup.contexts.nodes)
118
126
  : undefined, removedQueueHead?.oid);
@@ -127,6 +135,7 @@ export function parseRawPr(raw, rawThreadPages, rawCommentNodes, rawReviewNodes,
127
135
  reviewDecision: (raw.reviewDecision ?? null),
128
136
  headRefOid: raw.headRefOid,
129
137
  ...(headPushedAtUnix !== undefined && { headPushedAtUnix }),
138
+ ...(freshAtUnix !== undefined && { headFreshAtUnix: freshAtUnix }),
130
139
  ...(raw.headRefForcePushes?.nodes[0] && {
131
140
  headForcePushedAtUnix: Math.floor(Date.parse(raw.headRefForcePushes.nodes[0].createdAt) / 1000),
132
141
  }),
@@ -18,6 +18,7 @@ export interface RawBatchResponse {
18
18
  export interface RawPr extends RawPrMergeFields {
19
19
  id: string;
20
20
  number: number;
21
+ createdAt?: string;
21
22
  updatedAt?: string;
22
23
  state: string;
23
24
  isDraft: boolean;
@@ -131,6 +132,7 @@ interface RawCheckSuites {
131
132
  };
132
133
  nodes: Array<{
133
134
  id?: string;
135
+ createdAt?: string | null;
134
136
  status?: string | null;
135
137
  conclusion: string | null;
136
138
  app?: {
@@ -21,6 +21,7 @@ query BatchPr($owner: String!, $repo: String!, $pr: Int!) {
21
21
  pullRequest(number: $pr) {
22
22
  id
23
23
  number
24
+ createdAt
24
25
  updatedAt
25
26
  state
26
27
  isDraft
@@ -5,6 +5,7 @@ fragment CommitCheckSuites on Commit {
5
5
  }
6
6
  nodes {
7
7
  id
8
+ createdAt
8
9
  status
9
10
  conclusion
10
11
  app {
@@ -0,0 +1,14 @@
1
+ /**
2
+ * When the current head most recently reached GitHub, as the newest of three signals:
3
+ * any check suite on the head (apps create theirs at push time, whatever their app), the latest
4
+ * head-ref force-push, the head commit's committer date, and the PR's own creation. The
5
+ * committer date only ever raises the result: an old one (a long-local commit) adds nothing,
6
+ * while a fresh one dates an ordinary push to an old PR that has no suite yet. Omitted when no
7
+ * signal is known, and the caller must then treat the head as settled.
8
+ */
9
+ export declare function headFreshAtUnix(input: {
10
+ suiteCreatedAts: ReadonlyArray<string | null | undefined>;
11
+ forcePushedAtUnix?: number | undefined;
12
+ prCreatedAt?: string | null | undefined;
13
+ committedAt?: string | null | undefined;
14
+ }): number | undefined;
@@ -0,0 +1,23 @@
1
+ import { parseCreatedAt } from "./batch-parser-helpers.mjs";
2
+ /**
3
+ * When the current head most recently reached GitHub, as the newest of three signals:
4
+ * any check suite on the head (apps create theirs at push time, whatever their app), the latest
5
+ * head-ref force-push, the head commit's committer date, and the PR's own creation. The
6
+ * committer date only ever raises the result: an old one (a long-local commit) adds nothing,
7
+ * while a fresh one dates an ordinary push to an old PR that has no suite yet. Omitted when no
8
+ * signal is known, and the caller must then treat the head as settled.
9
+ */
10
+ export function headFreshAtUnix(input) {
11
+ const times = [
12
+ ...input.suiteCreatedAts,
13
+ ...(input.prCreatedAt ? [input.prCreatedAt] : []),
14
+ ...(input.committedAt ? [input.committedAt] : []),
15
+ ].flatMap((raw) => {
16
+ const at = raw ? parseCreatedAt(raw) : 0;
17
+ return at > 0 ? [at] : [];
18
+ });
19
+ if (input.forcePushedAtUnix !== undefined && input.forcePushedAtUnix > 0) {
20
+ times.push(input.forcePushedAtUnix);
21
+ }
22
+ return times.length > 0 ? Math.max(...times) : undefined;
23
+ }
@@ -10,6 +10,7 @@ import { parseBranchRules } from "./batch-parsers-rules.mjs";
10
10
  import { isReviewStale } from "./batch-parser-helpers.mjs";
11
11
  import { readRest as rest, restRepoPath, restObject, restString } from "./rest-reader-core.mjs";
12
12
  import { restLatestReviews, restPendingReviews } from "./rest-review-read.mjs";
13
+ import { headFreshAtUnix } from "./head-freshness.mjs";
13
14
  import { REST_BATCH_UNAVAILABLE } from "./rest-batch-unavailable.mjs";
14
15
  export async function readRestSnapshot(pull, repo, context, knownViewerLogin) {
15
16
  const [feedback, checks, rules, stack] = await Promise.all([
@@ -36,8 +37,13 @@ export async function readRestSnapshot(pull, repo, context, knownViewerLogin) {
36
37
  ...rules.unavailable,
37
38
  ...REST_BATCH_UNAVAILABLE,
38
39
  ];
40
+ const freshAtUnix = headFreshAtUnix({
41
+ suiteCreatedAts: checks.suites.map((suite) => suite.created_at),
42
+ prCreatedAt: pull.created_at,
43
+ });
39
44
  const data = {
40
45
  nodeId: pull.node_id,
46
+ ...(freshAtUnix !== undefined && { headFreshAtUnix: freshAtUnix }),
41
47
  ...(feedback.viewerLogin && { viewerLogin: feedback.viewerLogin }),
42
48
  ...restPullRefs(pull),
43
49
  state: restPullRefs(pull).state,
@@ -12,6 +12,7 @@ export interface RestPull {
12
12
  mergeable: boolean | null;
13
13
  mergeable_state: string;
14
14
  updated_at: string;
15
+ created_at?: string;
15
16
  user: {
16
17
  login: string;
17
18
  type?: string;
@@ -207,6 +207,11 @@ export interface BatchPrData extends BatchPrMergeFields {
207
207
  * that signal is unavailable; queue-removal freshness then uses committer time.
208
208
  */
209
209
  headPushedAtUnix?: number;
210
+ /**
211
+ * Newest of the head's check-suite creation times (any app), its latest force-push, and the
212
+ * PR's creation: when the head last reached GitHub. Omitted when none is known.
213
+ */
214
+ headFreshAtUnix?: number;
210
215
  /** Unix times of the last 10 merge-queue removals, oldest first. */
211
216
  mergeQueueRemovalTimesUnix?: number[];
212
217
  /** Unix time of the latest head-ref force-push, when GitHub reports one. */
@@ -139,6 +139,11 @@ export interface ShepherdReport {
139
139
  baseBehindBy?: number;
140
140
  /** A relevant Actions workflow suite on the head has not completed. */
141
141
  actionsWorkflowInProgress?: true;
142
+ /**
143
+ * The head reached GitHub under a minute ago with no relevant check yet, so READY is held
144
+ * while checks register. Omitted otherwise.
145
+ */
146
+ awaitingCheckRegistration?: true;
142
147
  /** Bottom open layer of this PR's native stack. Starts a trunk rebase. */
143
148
  stackBottomPr?: number;
144
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
- "version": "2.2.15",
3
+ "version": "2.2.16",
4
4
  "description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
5
5
  "keywords": [
6
6
  "automation",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
3
  "description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
4
- "version": "2.2.15",
4
+ "version": "2.2.16",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
7
7
  "email": "jonathanrichardong@gmail.com"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
- "version": "2.2.15",
3
+ "version": "2.2.16",
4
4
  "description": "Autonomous PR CI monitor and review-comment resolver for Codex.",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
@@ -9,5 +9,5 @@ Apply when the user asks to make, create, or open a PR, before dispatching.
9
9
  - Rebasing your own PR head onto its base and pushing it with `--force-with-lease` is also part of this workflow. Do not ask first.
10
10
  - Bare `--force`, pushes to any other branch, remote or credential changes, unrelated changes, and ambiguous targets stay outside this workflow.
11
11
  - Creating or opening a PR without merge intent leaves `--merge` off.
12
- - To stack, create a GitHub native stack with `gh stack` instead of pointing branches at each other by hand: `gh extension install github/gh-stack`, `gh stack init <branch>`, `gh stack add <branch>`, `gh stack submit --auto`. If `gh stack` reports stacks are unavailable, open separate PRs on the default branch and merge them in order.
12
+ - To stack, create a GitHub native stack with `gh stack` instead of pointing branches at each other by hand: `gh extension install github/gh-stack`, `gh stack init <branch>`, `gh stack add <branch>`, `gh stack submit --auto`. When the earlier PR is already open, add the new branch with `gh stack link <earlier PR> <new branch>` (or `gh stack link <stack number> <new branch>` when it is already in a stack), not `gh pr create --base <earlier branch>`. If GitHub reports that stacks are unavailable for the repository (not when one `gh stack` subcommand fails or is unknown; use another `gh stack` route), open separate PRs on the default branch and merge them in order.
13
13
  - Merge a native stack with one `gh stack merge <top PR>` (or the merge Shepherd prints), which lands every layer below it; do not `gh pr merge` layer by layer and rebase between merges.