patchrelay 0.63.0 → 0.64.0

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.63.0",
4
- "commit": "e265b8a2a40d",
5
- "builtAt": "2026-05-04T22:32:17.463Z"
3
+ "version": "0.64.0",
4
+ "commit": "10f9f9c472f8",
5
+ "builtAt": "2026-05-04T22:50:13.432Z"
6
6
  }
@@ -212,6 +212,18 @@ export class IssueStore {
212
212
  sets.push("last_attempted_failure_at = @lastAttemptedFailureAt");
213
213
  values.lastAttemptedFailureAt = params.lastAttemptedFailureAt;
214
214
  }
215
+ if (params.lastPublishedPatchId !== undefined) {
216
+ sets.push("last_published_patch_id = @lastPublishedPatchId");
217
+ values.lastPublishedPatchId = params.lastPublishedPatchId;
218
+ }
219
+ if (params.lastPublishedIntegrationTreeId !== undefined) {
220
+ sets.push("last_published_integration_tree_id = @lastPublishedIntegrationTreeId");
221
+ values.lastPublishedIntegrationTreeId = params.lastPublishedIntegrationTreeId;
222
+ }
223
+ if (params.lastPublishedHeadSha !== undefined) {
224
+ sets.push("last_published_head_sha = @lastPublishedHeadSha");
225
+ values.lastPublishedHeadSha = params.lastPublishedHeadSha;
226
+ }
215
227
  if (params.ciRepairAttempts !== undefined) {
216
228
  sets.push("ci_repair_attempts = @ciRepairAttempts");
217
229
  values.ciRepairAttempts = params.ciRepairAttempts;
@@ -251,6 +263,7 @@ export class IssueStore {
251
263
  last_github_ci_snapshot_head_sha, last_github_ci_snapshot_gate_check_name, last_github_ci_snapshot_gate_check_status, last_github_ci_snapshot_json, last_github_ci_snapshot_settled_at,
252
264
  last_queue_signal_at, last_queue_incident_json,
253
265
  last_attempted_failure_head_sha, last_attempted_failure_signature, last_attempted_failure_at,
266
+ last_published_patch_id, last_published_integration_tree_id, last_published_head_sha,
254
267
  ci_repair_attempts, queue_repair_attempts, review_fix_attempts, zombie_recovery_attempts, last_zombie_recovery_at, orchestration_settle_until,
255
268
  updated_at
256
269
  ) VALUES (
@@ -264,6 +277,7 @@ export class IssueStore {
264
277
  @lastGitHubCiSnapshotHeadSha, @lastGitHubCiSnapshotGateCheckName, @lastGitHubCiSnapshotGateCheckStatus, @lastGitHubCiSnapshotJson, @lastGitHubCiSnapshotSettledAt,
265
278
  @lastQueueSignalAt, @lastQueueIncidentJson,
266
279
  @lastAttemptedFailureHeadSha, @lastAttemptedFailureSignature, @lastAttemptedFailureAt,
280
+ @lastPublishedPatchId, @lastPublishedIntegrationTreeId, @lastPublishedHeadSha,
267
281
  @ciRepairAttempts, @queueRepairAttempts, @reviewFixAttempts, @zombieRecoveryAttempts, @lastZombieRecoveryAt, @orchestrationSettleUntil,
268
282
  @now
269
283
  )
@@ -319,6 +333,9 @@ export class IssueStore {
319
333
  lastAttemptedFailureHeadSha: params.lastAttemptedFailureHeadSha ?? null,
320
334
  lastAttemptedFailureSignature: params.lastAttemptedFailureSignature ?? null,
321
335
  lastAttemptedFailureAt: params.lastAttemptedFailureAt ?? null,
336
+ lastPublishedPatchId: params.lastPublishedPatchId ?? null,
337
+ lastPublishedIntegrationTreeId: params.lastPublishedIntegrationTreeId ?? null,
338
+ lastPublishedHeadSha: params.lastPublishedHeadSha ?? null,
322
339
  ciRepairAttempts: params.ciRepairAttempts ?? 0,
323
340
  queueRepairAttempts: params.queueRepairAttempts ?? 0,
324
341
  reviewFixAttempts: params.reviewFixAttempts ?? 0,
@@ -705,6 +722,15 @@ export function mapIssueRow(row) {
705
722
  ...(row.last_attempted_failure_at !== null && row.last_attempted_failure_at !== undefined
706
723
  ? { lastAttemptedFailureAt: String(row.last_attempted_failure_at) }
707
724
  : {}),
725
+ ...(row.last_published_patch_id !== null && row.last_published_patch_id !== undefined
726
+ ? { lastPublishedPatchId: String(row.last_published_patch_id) }
727
+ : {}),
728
+ ...(row.last_published_integration_tree_id !== null && row.last_published_integration_tree_id !== undefined
729
+ ? { lastPublishedIntegrationTreeId: String(row.last_published_integration_tree_id) }
730
+ : {}),
731
+ ...(row.last_published_head_sha !== null && row.last_published_head_sha !== undefined
732
+ ? { lastPublishedHeadSha: String(row.last_published_head_sha) }
733
+ : {}),
708
734
  ciRepairAttempts: Number(row.ci_repair_attempts ?? 0),
709
735
  queueRepairAttempts: Number(row.queue_repair_attempts ?? 0),
710
736
  reviewFixAttempts: Number(row.review_fix_attempts ?? 0),
@@ -333,6 +333,14 @@ export function runPatchRelayMigrations(connection) {
333
333
  addColumnIfMissing(connection, "issues", "last_attempted_failure_head_sha", "TEXT");
334
334
  addColumnIfMissing(connection, "issues", "last_attempted_failure_signature", "TEXT");
335
335
  addColumnIfMissing(connection, "issues", "last_attempted_failure_at", "TEXT");
336
+ // Plan §4.1: track the last published change identity so future
337
+ // runs can detect patch-id-equivalent re-publishes (no-op pushes).
338
+ // Currently observability-only — populated when patchrelay observes
339
+ // a push it can attribute to itself; consumers (prompt assembly,
340
+ // post-hoc detection) layer in follow-up PRs.
341
+ addColumnIfMissing(connection, "issues", "last_published_patch_id", "TEXT");
342
+ addColumnIfMissing(connection, "issues", "last_published_integration_tree_id", "TEXT");
343
+ addColumnIfMissing(connection, "issues", "last_published_head_sha", "TEXT");
336
344
  addColumnIfMissing(connection, "linear_installations", "health_status", "TEXT NOT NULL DEFAULT 'ok'");
337
345
  addColumnIfMissing(connection, "linear_installations", "health_reason", "TEXT");
338
346
  addColumnIfMissing(connection, "linear_installations", "health_updated_at", "TEXT");
@@ -407,6 +415,9 @@ function removeRetiredIssueColumnsIfPresent(connection) {
407
415
  last_attempted_failure_head_sha TEXT,
408
416
  last_attempted_failure_signature TEXT,
409
417
  last_attempted_failure_at TEXT,
418
+ last_published_patch_id TEXT,
419
+ last_published_integration_tree_id TEXT,
420
+ last_published_head_sha TEXT,
410
421
  ci_repair_attempts INTEGER NOT NULL DEFAULT 0,
411
422
  queue_repair_attempts INTEGER NOT NULL DEFAULT 0,
412
423
  review_fix_attempts INTEGER NOT NULL DEFAULT 0,
@@ -470,6 +481,9 @@ function removeRetiredIssueColumnsIfPresent(connection) {
470
481
  last_attempted_failure_head_sha,
471
482
  last_attempted_failure_signature,
472
483
  last_attempted_failure_at,
484
+ last_published_patch_id,
485
+ last_published_integration_tree_id,
486
+ last_published_head_sha,
473
487
  ci_repair_attempts,
474
488
  queue_repair_attempts,
475
489
  review_fix_attempts,
@@ -531,6 +545,9 @@ function removeRetiredIssueColumnsIfPresent(connection) {
531
545
  last_attempted_failure_head_sha,
532
546
  last_attempted_failure_signature,
533
547
  last_attempted_failure_at,
548
+ last_published_patch_id,
549
+ last_published_integration_tree_id,
550
+ last_published_head_sha,
534
551
  COALESCE(ci_repair_attempts, 0),
535
552
  COALESCE(queue_repair_attempts, 0),
536
553
  COALESCE(review_fix_attempts, 0),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchrelay",
3
- "version": "0.63.0",
3
+ "version": "0.64.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {