pr-shepherd 2.2.11 → 2.2.13

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.11",
4
+ "version": "2.2.13",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
7
7
  "email": "jonathanrichardong@gmail.com"
@@ -44,11 +44,12 @@ export function buildSimpleIterateInstructions(result) {
44
44
  return [
45
45
  `Run the REST merge command exactly as printed: ${command}. \`enqueued\` is not merged.`,
46
46
  ...tickWaitSteps(result.nextCheck),
47
+ "If your other run has these flags, add this PR there.",
47
48
  ];
48
49
  if (result.merge.mode === "rest")
49
50
  return [
50
51
  `Run the REST merge command exactly as printed: ${command}. If its status is \`pending\`, rerun that same command at the configured polling cadence to resume the recorded request; \`enqueued\` is not merged.`,
51
- "Then iterate with the same options until GitHub confirms the PR merged or needs work.",
52
+ "Rerun with the same options until GitHub confirms the PR merged or needs work. If your other run has these flags, add this PR there.",
52
53
  ];
53
54
  const instructions = [];
54
55
  const stale = result.merge.ghCacheStaleRateLimit;
@@ -65,9 +66,12 @@ export function buildSimpleIterateInstructions(result) {
65
66
  if (result.merge.restFallbackCommand) {
66
67
  instructions.push(`If \`gh\` reports a GraphQL rate limit, run: ${inlineCode(renderShellCommand(result.merge.restFallbackCommand.argv))}.`);
67
68
  }
68
- instructions.push(result.quotaWarning
69
- ? buildQuotaAwareContinuation(result.quotaWarning, "After running the merge command.")
70
- : "Then iterate immediately with the same options until the PR merges or needs work.");
69
+ if (result.quotaWarning) {
70
+ instructions.push(buildQuotaAwareContinuation(result.quotaWarning, "After running the merge command."), "If your other run has these flags, add this PR there.");
71
+ }
72
+ else {
73
+ instructions.push("Rerun with the same options until it merges or needs work. If your other run has these flags, add this PR there.");
74
+ }
71
75
  return instructions;
72
76
  }
73
77
  case "cancel":
@@ -401,10 +401,6 @@ async function recordReadyReceipt(key, report, context) {
401
401
  let summary;
402
402
  try {
403
403
  raw = await receiptSummaryForReport(key, report, context);
404
- const fresh = fingerprintRawSummaryPr(raw);
405
- if (fresh === null)
406
- return failed("fresh summary has no fingerprint");
407
- fingerprint = fresh;
408
404
  if (raw.state !== "OPEN")
409
405
  return failed(`fresh summary shows PR ${raw.state}, not OPEN`);
410
406
  if (raw.isDraft)
@@ -413,8 +409,13 @@ async function recordReadyReceipt(key, report, context) {
413
409
  return failed(`head moved (report ${short(report.headSha)}, fresh ${short(raw.headRefOid)})`);
414
410
  if (raw.baseRefOid !== report.baseRefOid)
415
411
  return failed(`base moved (report ${short(report.baseRefOid)}, fresh ${short(raw.baseRefOid)})`);
416
- // Summarize hydrates annotation totals onto the snapshot before the stored hash.
412
+ // Summarize hydrates annotation totals onto the snapshot; hash only after,
413
+ // so the stored hash matches the stack side's (which hashes hydrated evidence).
417
414
  summary = await summarizePollSummaryPr(raw, { owner: key.owner, name: key.repo }, { stackPrNumber: report.pr });
415
+ const fresh = fingerprintRawSummaryPr(raw);
416
+ if (fresh === null)
417
+ return failed("fresh summary has no fingerprint");
418
+ fingerprint = fresh;
418
419
  }
419
420
  catch (e) {
420
421
  // The receipt is supplementary evidence. A transient summary fetch failure
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
- "version": "2.2.11",
3
+ "version": "2.2.13",
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.11",
4
+ "version": "2.2.13",
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.11",
3
+ "version": "2.2.13",
4
4
  "description": "Autonomous PR CI monitor and review-comment resolver for Codex.",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
@@ -11,4 +11,4 @@ Then:
11
11
 
12
12
  1. This PR's changes caused it: fix it and push. A failure the PR did not cause stays unchanged, even if a code change could work around it.
13
13
  2. Transient and the output printed a rerun command for it: run that command. Without one, do not rerun; the allowance is spent or the check is not rerunnable.
14
- 3. Otherwise investigate first, including the check's details URL. If you are still unsure of the cause, or it is outside this PR (CI configuration, repository settings, approving a gated run), change nothing, rerun Shepherd so it escalates `check-follow-up-unavailable` if the checks are unchanged, and report your findings.
14
+ 3. Otherwise investigate first, including the check's details URL. Then change nothing and rerun Shepherd once. If the checks are unchanged, stop: report your findings and say a human must decide, naming the kind of decision (provider status, CI configuration, repository settings, approving a gated run). Do not keep rerunning or polling for the escalation.