patchrelay 0.41.2 → 0.41.4

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,6 +1,6 @@
1
1
  {
2
2
  "service": "patchrelay",
3
- "version": "0.41.2",
4
- "commit": "38957f5ecfcf",
5
- "builtAt": "2026-04-12T21:34:29.741Z"
3
+ "version": "0.41.4",
4
+ "commit": "f0bf37346e5e",
5
+ "builtAt": "2026-04-13T10:48:22.890Z"
6
6
  }
@@ -77,6 +77,8 @@ function buildScopeDiscipline(issue) {
77
77
  "Stay inside the delegated task.",
78
78
  "Finish the issue completely enough to satisfy its stated scope and acceptance criteria, but do not widen it into unrelated product polish or follow-up cleanup.",
79
79
  "Only broaden to adjacent routes, copy, or supporting surfaces when the issue text or repository guidance explicitly says they are the same user flow.",
80
+ "Your implementation goal is to leave the branch review-ready, not merely locally working: look for likely regressions or invariant breaks in the touched flow before you stop.",
81
+ "If a narrow patch fixes the immediate symptom but leaves the same underlying risk elsewhere in the changed flow, keep going until the branch is likely to survive strict review or clearly explain the blocker.",
80
82
  "If you notice a worthwhile broader inconsistency that is not required to make this task correct, mention it in your summary as follow-up context instead of expanding the implementation.",
81
83
  "",
82
84
  ...(scope ? ["### In Scope", "", scope, ""] : []),
@@ -189,7 +191,7 @@ function buildRequestedChangesContext(runType, context) {
189
191
  else {
190
192
  const reviewer = typeof context?.reviewerName === "string" ? context.reviewerName : undefined;
191
193
  const reviewBody = typeof context?.reviewBody === "string" ? context.reviewBody.trim() : "";
192
- lines.push("## Review Changes Requested", "", "Goal: restore review readiness on the existing PR branch, not merely patch the latest cited line.", "Treat the reviewer comments as evidence of what still makes the branch unready. Your job is to return the branch to a state that is likely to pass the next full review.", "", reviewer ? `Reviewer: ${reviewer}` : "", reviewBody ? `Review summary:\n${reviewBody}` : "", "", "1. Start with the structured review context below, then inspect the current diff (`git diff origin/main`) and current code before deciding what still needs work.", "2. Infer the underlying concern or invariant behind the review feedback. Do not assume each comment is an isolated chore.", "3. For each review point: if already resolved on the current head, note why. If not, fix it. Then inspect adjacent code paths and flows that could fail for the same reason.", "4. If the structured review context looks incomplete, inspect the latest GitHub review threads directly before deciding you are done.", "5. Verify the branch as a whole for the relevant concern class: current review issue, nearby regressions, relevant tests, and compatibility with the latest base branch.", "6. Only finish when you believe the branch is review-ready again. If you cannot get it there, stop and surface the blocker clearly.", "7. Commit and push a newer head on the existing PR branch. Do not try to hand the same head back to review.", "8. GitHub review happens after the new head is pushed and CI is green. Do not use `gh pr edit --add-reviewer` as part of this workflow.", "");
194
+ lines.push("## Review Changes Requested", "", "Goal: restore review readiness on the existing PR branch, not merely patch the latest cited line.", "Treat the reviewer comments as evidence of what still makes the branch unready. Your job is to return the branch to a state that is likely to pass the next full review.", "", reviewer ? `Reviewer: ${reviewer}` : "", reviewBody ? `Review summary:\n${reviewBody}` : "", "", "1. Start with the structured review context below, then inspect the PR's inline review comments with `gh api repos/<owner>/<repo>/pulls/<pr>/comments?per_page=100` so you begin from the full code-review context, not just the latest triggering comment.", "2. Inspect the current diff with `review-quill diff` when available so you see the reviewer-oriented diff view from this checkout; use `git diff origin/main` as a fallback, then inspect the current code before deciding what still needs work.", "3. Infer the underlying concern or invariant behind the review feedback. Do not assume each comment is an isolated chore.", "4. For each review point: if already resolved on the current head, note why. If not, fix it. Then inspect adjacent code paths and flows that could fail for the same reason.", "5. Verify the branch as a whole for the relevant concern class: current review issue, nearby regressions, relevant tests, and compatibility with the latest base branch.", "6. Only finish when you believe the branch is review-ready again. If you cannot get it there, stop and surface the blocker clearly.", "7. Commit and push a newer head on the existing PR branch. Do not try to hand the same head back to review.", "8. GitHub review happens after the new head is pushed and CI is green. Do not use `gh pr edit --add-reviewer` as part of this workflow.", "");
193
195
  appendStructuredReviewContext(lines, context);
194
196
  }
195
197
  return lines.join("\n").trim();
@@ -120,6 +120,7 @@ export class DesiredStageRecorder {
120
120
  triggerEvent: params.normalized.triggerEvent,
121
121
  delegated,
122
122
  });
123
+ const terminalRunRelease = effectiveRunRelease.release && terminal;
123
124
  const commitIssueUpdate = () => {
124
125
  const record = this.db.issues.upsertIssue({
125
126
  projectId: params.project.id,
@@ -148,6 +149,7 @@ export class DesiredStageRecorder {
148
149
  ...(clearPending ? { pendingRunType: null, pendingRunContextJson: null } : {}),
149
150
  ...(agentSessionId !== undefined ? { agentSessionId } : {}),
150
151
  ...(effectiveRunRelease.release ? { activeRunId: null } : {}),
152
+ ...(terminalRunRelease ? { factoryState: "done", pendingRunType: null, pendingRunContextJson: null } : {}),
151
153
  ...(blockerPausedImplementation ? { factoryState: "delegated" } : {}),
152
154
  ...(undelegation.factoryState ? { factoryState: undelegation.factoryState } : {}),
153
155
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchrelay",
3
- "version": "0.41.2",
3
+ "version": "0.41.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {