Skip to content

Recover draft activation from one transient GitHub failure #1500

In progress

Description

@eowca

A transient failure in the draft-to-ready write ends loopzero ready --wait immediately. Checks that depend on activation may remain skipped, and the command does not distinguish an unapplied write from a lost reply after GitHub accepted it.

Reproducer

At 29a3f882, use the test_ready_wait_reports_initial_draft_blocker_once fixture in tests/test_cli.py. Keep the approved draft with its required check skipped and inject a 502 only on the first gh pr ready invocation. The audit observed exit 1 after one activation attempt, no delay, and no PR read-back. Repeat with a subprocess timeout or reset at the same boundary.

Expected and acceptance

  • After an infrastructure failure, re-read the same PR and head. If GitHub already activated it, resume the existing wait. If it is still eligible and still draft, allow one backed-off retry within the original budget.
  • A moved head, new blocker, or unknown activation state must prevent a second write. Preserve the original local receipt and report an infrastructure failure distinctly if recovery cannot finish.
  • Extend an existing parameterized draft-activation case without net new test lines or new flags.

Activity

  1. eowca commented on Nov 26, 2026

    @eowca
    ContributorAuthor
    • All three Reconcile draft activation before retrying #1777 delta blockers are real. UNKNOWN mergeability plus a skipped or missing check can pass the retry condition.
    • When the size-budget probe runs, the PR snapshot can go stale before the retry. Its Git and script timeouts can also outlast the original wait.
    • Smallest complete fix: require known mergeability, give each budget subprocess only the remaining time, and recheck the same head, draft status and eligibility after a probe before writing again.
    • Extend the existing replay for UNKNOWN plus skipped CI, a head or hold change during the probe, and expiry inside a subprocess.
    • Recommendation: park the v2 with both reviews used. A fresh replacement is worth it only if this transient failure is still recurring and the bounded fix fits the existing tests.
  2. eowca commented on Nov 26, 2026

    @eowca
    ContributorAuthor

    Lean ruling (26 Nov): #1777 closed with both review rounds spent. A fresh replacement (known mergeability, remaining-time subprocess budgets, same-head recheck after the probe) is commissioned only on new evidence that this transient failure recurs. Issue stays open.

  3. eowca commented on Nov 26, 2026

    @eowca
    ContributorAuthor

    Recurrence check (26 Nov 17:30Z, builder for the Lean owner): no recurrence since the 12:39Z ruling, so no replacement is built.

    • T3 delivery log (every IntelFlo and loop-zero agent's tool output, statev2.sqlite orchestration_events, 12:39Z to 17:14Z, about 114k events): no gh pr ready <n> ... failed: output, no markPullRequestReadyForReview error, and no ready --wait output that mentions a rate limit, HTTP 5xx or timeout. The only matches were search scripts. Control: the same log holds 12 successful marked ready; waiting for required checks outputs (first at 12:41Z) and 56 ready --wait mentions between 16:10Z and 16:59Z, so draft activations ran during the 16:20Z shared REST quota exhaustion (reset 16:43Z), and none of them failed.
    • IntelFlo #14629 (reopened 16:47Z): its "publish" is the product-feedback dispatcher on Railway publishing feedback, not PR draft activation. It does not count as evidence for this issue.
    • GitHub comments since 12:39Z on the IntelFlo and loop-zero items that mention pr ready: none reports an activation failure.

    The issue stays open under the ruling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions