Rudy Celekli

Upstream contribution · cursor/plugins

plugins · Selecting the current pull request in Cursor's stack orchestrator

Rudy Celekli’s engineering portfolio · AI-assisted summary

Problem

A branch can have a historical closed or merged pull request and an active replacement. Treating those rows as equivalent makes the stack orchestrator reject a branch that has one unambiguous current review.

Engineering response

The stack store selects the sole active PR when present. It retains historical anchors when no active PR exists and still rejects a genuinely ambiguous branch with multiple active PRs.

Evidence and scope

The co-authored upstream diff adds tests for an active replacement alongside both closed and merged history, plus a control with two active PRs. Additional credited commits bound polling sleeps by the deadline and distinguish fork heads during discovery.