patchrelay 0.52.5 → 0.52.6

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.52.5",
4
- "commit": "eea06016664a",
5
- "builtAt": "2026-04-22T21:13:17.024Z"
3
+ "version": "0.52.6",
4
+ "commit": "cc8a389260f0",
5
+ "builtAt": "2026-04-22T23:52:25.456Z"
6
6
  }
package/dist/cli/data.js CHANGED
@@ -272,6 +272,7 @@ export class CliDataAccess extends CliOperatorApiClient {
272
272
  this.db.issueSessions.upsertIssueRespectingActiveLease(issue.projectId, issue.linearIssueId, {
273
273
  projectId: issue.projectId,
274
274
  linearIssueId: issue.linearIssueId,
275
+ delegatedToPatchRelay: false,
275
276
  factoryState: terminalState,
276
277
  activeRunId: null,
277
278
  pendingRunType: null,
@@ -63,7 +63,7 @@ export class MergedLinearCompletionReconciler {
63
63
  this.settleIssue(issue, now);
64
64
  continue;
65
65
  }
66
- if (issue.factoryState === "done" && !isCompletedLinearState(liveIssue.stateType, liveIssue.stateName)) {
66
+ if (issue.factoryState === "done" && !isTerminalLinearState(liveIssue.stateType, liveIssue.stateName)) {
67
67
  this.reopenStaleLocalDoneIssue(issue, liveIssue);
68
68
  }
69
69
  else {
@@ -182,6 +182,14 @@ function isRateLimitedError(error) {
182
182
  const message = error instanceof Error ? error.message : String(error);
183
183
  return /ratelimit|rate limit/i.test(message);
184
184
  }
185
+ function isTerminalLinearState(currentLinearStateType, currentLinearState) {
186
+ const normalizedType = currentLinearStateType?.trim().toLowerCase();
187
+ if (normalizedType === "completed" || normalizedType === "canceled" || normalizedType === "cancelled") {
188
+ return true;
189
+ }
190
+ const normalizedName = currentLinearState?.trim().toLowerCase();
191
+ return normalizedName === "done" || normalizedName === "completed" || normalizedName === "canceled" || normalizedName === "cancelled";
192
+ }
185
193
  function resolveOpenWorkflowState(issue) {
186
194
  const reactiveIntent = deriveIssueSessionReactiveIntent({
187
195
  delegatedToPatchRelay: issue.delegatedToPatchRelay,
@@ -181,6 +181,7 @@ export class ServiceIssueActions {
181
181
  this.db.issueSessions.upsertIssueRespectingActiveLease(issue.projectId, issue.linearIssueId, {
182
182
  projectId: issue.projectId,
183
183
  linearIssueId: issue.linearIssueId,
184
+ delegatedToPatchRelay: false,
184
185
  factoryState: terminalState,
185
186
  activeRunId: null,
186
187
  pendingRunType: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchrelay",
3
- "version": "0.52.5",
3
+ "version": "0.52.6",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {