patchrelay 0.80.0 → 0.80.2
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.
- package/dist/build-info.json +3 -3
- package/dist/idle-reconciliation.js +16 -1
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -579,6 +579,13 @@ export class IdleIssueReconciler {
|
|
|
579
579
|
projectId: issue.projectId,
|
|
580
580
|
linearIssueId: issue.linearIssueId,
|
|
581
581
|
...buildPrStateUpdates(pr, gateCheckStatus, gateCheckNames[0] ?? "verify"),
|
|
582
|
+
// A newly observed head is the poll-side equivalent of a lost
|
|
583
|
+
// pr_synchronize: the webhook path resets the repair budgets for
|
|
584
|
+
// the fresh head, so re-derivation must too — otherwise the new
|
|
585
|
+
// head inherits the old head's consumed budget and escalates
|
|
586
|
+
// earlier. Provenance clearing stays governed by
|
|
587
|
+
// mayClearFailureProvenance at the advance sites below.
|
|
588
|
+
...(headAdvanced ? { ciRepairAttempts: 0, queueRepairAttempts: 0 } : {}),
|
|
582
589
|
},
|
|
583
590
|
});
|
|
584
591
|
// Continue the pass with the refreshed row so later version-checked
|
|
@@ -775,7 +782,7 @@ export class IdleIssueReconciler {
|
|
|
775
782
|
return;
|
|
776
783
|
}
|
|
777
784
|
if (isReviewDecisionApproved(pr.reviewDecision)) {
|
|
778
|
-
this.db.issueSessions.commitIssueState({
|
|
785
|
+
const reviewCommit = this.db.issueSessions.commitIssueState({
|
|
779
786
|
writer: WRITER,
|
|
780
787
|
update: {
|
|
781
788
|
projectId: issue.projectId,
|
|
@@ -783,6 +790,14 @@ export class IdleIssueReconciler {
|
|
|
783
790
|
prReviewState: "approved",
|
|
784
791
|
},
|
|
785
792
|
});
|
|
793
|
+
// Continue with the refreshed row so the version-checked advance
|
|
794
|
+
// below doesn't see our own review-state write as a conflict (same
|
|
795
|
+
// pattern as the facts commit above). Without this the advance was
|
|
796
|
+
// conflict-skipped on EVERY pass while the poll succeeded, so a lost
|
|
797
|
+
// review_approved webhook never converged to awaiting_queue.
|
|
798
|
+
if (reviewCommit.outcome === "applied") {
|
|
799
|
+
issue = reviewCommit.issue;
|
|
800
|
+
}
|
|
786
801
|
const approvedState = deriveFactoryStateFromPrFacts(observed, currentFacts(issue));
|
|
787
802
|
if (approvedState === "awaiting_queue") {
|
|
788
803
|
// Provenance survives unless the polled evidence is newer than the
|