Skip to content

Commit d2890bc

Browse files
author
bourgeoa
committed
chore(release): checkpoint blocked-checks issue and fail fast on stalled PR state
1 parent 9dcd803 commit d2890bc

2 files changed

Lines changed: 45 additions & 2 deletions

File tree

RELEASE-STATUS.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,35 @@
11
# Release Orchestrator - Current Status
22

3-
**Date:** March 19, 2026
4-
**Status:** ⚠ Stable flow semantics clarified (publish-from-main objective documented)
3+
**Date:** March 20, 2026
4+
**Status:** ⚠ PR merge blocked by required-checks initialization gap on some repos
5+
6+
---
7+
8+
## Checkpoint (March 20, 2026)
9+
10+
Observed repeatedly on `SolidOS/solid-logic` release PRs (`#223`, `#224`, `#225`):
11+
12+
```
13+
state=OPEN, mergeState=BLOCKED, pendingChecks=0, failingChecks=0
14+
GraphQL: Repository rule violations found
15+
2 of 2 required status checks are expected.
16+
```
17+
18+
Interpretation:
19+
- The repo rules require checks, but those check runs are not yet materialized for the PR at the moment merge is attempted.
20+
- This is distinct from failing checks; it is an "expected checks not started/visible yet" condition.
21+
22+
Mitigation now in orchestrator:
23+
- Retry logic for auto-merge and admin-merge paths.
24+
- Transient rule-violation parsing now includes `message`, `stderr`, and `stdout`.
25+
- New fail-fast diagnostic: if PR remains `BLOCKED` with no check entries for ~2 minutes, abort with explicit guidance instead of waiting silently.
26+
27+
Tomorrow's investigation checklist:
28+
1. Inspect branch protection/ruleset in `SolidOS/solid-logic` and list exact required check names.
29+
2. Verify those workflows trigger on `pull_request` for `main` and for release branch naming pattern.
30+
3. Confirm no `paths`/`paths-ignore` filters are excluding the release PR diff.
31+
4. Verify required checks match current workflow job names exactly (renamed jobs can cause "expected" forever).
32+
5. Re-run `stable-publish` after rules/workflow alignment and confirm PR auto-merges.
533

634
---
735

scripts/release-orchestrator.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ function waitForPRMerge(repoDir, repo, headBranch, baseBranch, dryRun, options =
470470
const startTime = Date.now();
471471
let finalMergedAt = '';
472472
let sawAnyChecks = false;
473+
let blockedNoChecksCycles = 0;
474+
const blockedNoChecksLimit = 8; // ~2 minutes at 15s polling
473475

474476
const isTransientRuleViolation = (err) => {
475477
const text = [
@@ -518,6 +520,12 @@ function waitForPRMerge(repoDir, repo, headBranch, baseBranch, dryRun, options =
518520
` PR #${prNumber}: state=${state}, mergeState=${mergeStateStatus}, review=${reviewDecision}, pendingChecks=${pendingChecks}, failingChecks=${failingChecks}`
519521
);
520522

523+
if (mergeStateStatus === 'BLOCKED' && checks.length === 0 && pendingChecks === 0) {
524+
blockedNoChecksCycles += 1;
525+
} else {
526+
blockedNoChecksCycles = 0;
527+
}
528+
521529
if (mergedAt) {
522530
finalMergedAt = mergedAt;
523531
break;
@@ -531,6 +539,13 @@ function waitForPRMerge(repoDir, repo, headBranch, baseBranch, dryRun, options =
531539
throw new Error(`PR #${prNumber} has failing required checks.`);
532540
}
533541

542+
if (blockedNoChecksCycles >= blockedNoChecksLimit) {
543+
throw new Error(
544+
`PR #${prNumber} stayed BLOCKED with no status checks for ${(blockedNoChecksCycles * pollInterval) / 1000}s. ` +
545+
`This usually means required checks are configured but not running for this PR (workflow trigger/path filter/permissions mismatch).`
546+
);
547+
}
548+
534549
// Retry requesting auto-merge once checks have started appearing.
535550
if (!autoMergeRequested && (pendingChecks > 0 || sawAnyChecks)) {
536551
try {

0 commit comments

Comments
 (0)