patchrelay 0.35.5 → 0.35.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.
- package/dist/build-info.json +3 -3
- package/dist/run-orchestrator.js +7 -2
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
package/dist/run-orchestrator.js
CHANGED
|
@@ -742,11 +742,12 @@ export class RunOrchestrator {
|
|
|
742
742
|
const inferProject = this.config.projects.find((p) => p.id === issue.projectId);
|
|
743
743
|
const inferProtocol = resolveMergeQueueProtocol(inferProject);
|
|
744
744
|
let inferred = "branch_ci";
|
|
745
|
-
|
|
745
|
+
const probeSha = issue.lastGitHubFailureHeadSha ?? issue.lastGitHubCiSnapshotHeadSha;
|
|
746
|
+
if (inferProject?.github?.repoFullName && issue.prNumber && probeSha) {
|
|
746
747
|
try {
|
|
747
748
|
const { stdout } = await execCommand("gh", [
|
|
748
749
|
"api",
|
|
749
|
-
`repos/${inferProject.github.repoFullName}/commits/${
|
|
750
|
+
`repos/${inferProject.github.repoFullName}/commits/${probeSha}/check-runs`,
|
|
750
751
|
"--jq", `.check_runs[] | select(.name == "${inferProtocol.evictionCheckName}" and .conclusion == "failure") | .name`,
|
|
751
752
|
], { timeoutMs: 10_000 });
|
|
752
753
|
if (stdout.trim().length > 0)
|
|
@@ -823,6 +824,9 @@ export class RunOrchestrator {
|
|
|
823
824
|
return;
|
|
824
825
|
}
|
|
825
826
|
this.logger.info({ issueKey: issue.issueKey, from: issue.factoryState, to: newState, pendingRunType: options?.pendingRunType }, "Reconciliation: advancing idle issue");
|
|
827
|
+
// Reset queueLabelApplied when entering or leaving awaiting_queue so
|
|
828
|
+
// the retry loop re-applies the label on each queue cycle.
|
|
829
|
+
const resetQueueLabel = newState === "awaiting_queue" || issue.factoryState === "awaiting_queue";
|
|
826
830
|
this.db.upsertIssue({
|
|
827
831
|
projectId: issue.projectId,
|
|
828
832
|
linearIssueId: issue.linearIssueId,
|
|
@@ -833,6 +837,7 @@ export class RunOrchestrator {
|
|
|
833
837
|
pendingRunContextJson: options.pendingRunContext ? JSON.stringify(options.pendingRunContext) : null,
|
|
834
838
|
}
|
|
835
839
|
: {}),
|
|
840
|
+
...(resetQueueLabel ? { queueLabelApplied: false } : {}),
|
|
836
841
|
...(options?.clearFailureProvenance
|
|
837
842
|
? {
|
|
838
843
|
lastGitHubFailureSource: null,
|