Skip to content

Sweep pre-#1669 PRs stuck with a wrongly-cancelled current-head Strix/OpenCode/Noema check #1756

Description

@seonghobae

Context

PR #1669 (67998ec, merged 2026-09-02 19:02 +09:00, doctoring:
docs/doctoring/scheduler-stale-headrefoid-cancellation.md) fixed a race in
stale_pr_run_ids() / active_review_run_refs() where a push landing between
run classification and cancellation could let the scheduler cancel a review
run that had, by the time of cancellation, become the PR's own current-head
evidence -- not a superseded one.

That fix stops the race going forward. It does not retroactively repair PRs
that were already left with a wrongly-cancelled current-head check before
the fix landed.

Concrete example found and manually repaired this session

ContextualWisdomLab/naruon#1528 (head cf472cf77fb93325858f485a22e967449d7c387a):
run 33581213829's strix job (id 100095712154) was cancelled at
2026-09-02T01:54:46Z -- well before the #1669 fix merged -- and mergeable_state
was still blocked as of 2026-09-03, 15+ hours after the fix landed, with no
later Strix attempt for that same head. noema-review was also failure for
the same head, so the PR had a second, independent reason to stay open, which
likely masked the fact that nothing was retrying Strix.

Manually re-running the job (gh api -X POST repos/ContextualWisdomLab/naruon/actions/jobs/100095712154/rerun) succeeded
immediately and requeued a fresh strix attempt -- confirming the credential
and API path both work; nothing structural blocks a rerun.

Gap

dispatch_strix_evidence() in scripts/ci/pr_review_merge_scheduler.py already
has a "job exists, rerun it" branch (matching_actions_job_id +
rerun_actions_job) that would have fixed naruon#1528 on its own during a
normal scheduler tick -- evidently it either isn't reaching every already-open
PR in a bounded amount of time, or something upstream in decide() (not yet
identified) is short-circuiting before that branch for at least this PR shape.

There is no one-time reconciliation pass that specifically targets pre-#1669
casualties: an open PR, current-head Strix/OpenCode/Noema check-run conclusion
is cancelled, no later same-head success exists, and the run predates the
#1669 merge commit's timestamp.

Ask

  1. Root-cause why naruon#1528 specifically didn't get picked up by a normal
    scheduler tick in the ~15 hours after fix(scheduler): never let a falsy headRefOid cancel every run for a PR #1669 merged (add scheduler-run
    logging/telemetry for this PR shape if existing logs don't already explain
    it -- this is also the class of "no specifics on why" telemetry gap the
    standing loop separately wants closed for hourly-review-repair timeouts).
  2. Run a bounded, rate-limit-aware one-time sweep across org repos for PRs
    matching the "cancelled current-head Strix/OpenCode/Noema evidence, no
    later success, run predates 2026-09-02T10:02:47Z UTC" shape, and rerun each
    matching job (same non-destructive jobs/{id}/rerun call used above).
  3. Decide whether this sweep should be a one-shot script (run once, then
    deleted, matching this repo's self-modifying-workflow-removal convention)
    or a permanent low-frequency reconciliation job -- leaning one-shot, since
    fix(scheduler): never let a falsy headRefOid cancel every run for a PR #1669 already prevents new occurrences.

Filed as part of the standing ContextualWisdomLab PR review/fix/merge loop
(docs/product-goal-directive.md); not itself merge authorization for any
follow-up PR.

Activity

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

    bugSomething isn't workingpriority: highHigh-priority or P1 worktype: bugDefect or incorrect behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions