poteto-mode watch-pr: PRs that are BLOCKED, BEHIND, UNKNOWN or REVIEW_REQUIRED come back as ready with mergeability "clear"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, typescript
- Domain
- tooling
Research direction
Start in scripts/watch-pr/policy.ts: read assessGitHubMerge at line 12, gateReason at line 167 and readyContribution at line 203, then run policy.test.ts (line 42 encodes current behavior). Use watch-pr/fakes.test-helper.ts to reproduce the BLOCKED/BEHIND/UNKNOWN/REVIEW_REQUIRED cases. Done means the truth-table tests expect a gate or waiting outcome for those states and mergeability: "clear" is no longer returned for them.
Written by the indexing model from the issue text.
Description
Found against pstack 0.15.34 at cursor/plugins 519d36aa98955bf680db01bcde5fdfba686dc901 (harness/pstack/claude-code/skills/poteto-mode/). Line numbers refer to that commit.
scripts/watch-pr/policy.ts decides readiness from CI and review threads, but not from GitHub's merge state or the
required review:
assessGitHubMerge(policy.ts:12): whenmergeStateStatusisBLOCKED, the only refusal is a head rollup of
ERRORorFAILURE. ASUCCESSrollup returnskind: "allowed",basis: "rollup".BEHIND,UNKNOWNand every
other state fall through toallowed,basis: "merge-state"(:26).gateReason(:167) turns onlyCHANGES_REQUESTEDinto a gate.REVIEW_REQUIREDis not a gate.readyContribution(:203) then returnskind: "ready-pr"withproof.mergeability: "clear".
GitHub documents BLOCKED as "the merge is blocked" and REVIEW_REQUIRED as "a review is required before the pull
request can be merged" (schema,
review decision). This also contradicts
playbooks/babysit.md:12, which requires the forge to agree that the PR can merge. GitHub still enforces its own rules,
but the watcher reports false readiness, so a babysit, shipping or autopilot run tells the user that a PR is mergeable
when it isn't.
Repro: call readSnapshot then classifyPr with the shipped fake reader (watch-pr/fakes.test-helper.ts), using
passing CI, rollup SUCCESS, no threads, reviewDecision: "REVIEW_REQUIRED", and each merge state:
mergeStateStatus BLOCKED -> kind: ready, mergeability: clear
mergeStateStatus BEHIND -> kind: ready, mergeability: clear
mergeStateStatus UNKNOWN -> kind: ready, mergeability: clear
The 18 existing tests in policy.test.ts pass. policy.test.ts:42 asserts the current behavior.
Suggested fix:
- Make an outstanding required review (
REVIEW_REQUIRED) and aBLOCKEDmerge state into merge gates (merge-gate
blockers with their own reasons), whatever the rollup says. - Treat
UNKNOWN(GitHub is still computing it) as waiting, not ready. TreatBEHINDas a gate, or as waiting when the
repo doesn't require branches to be up to date. - Never emit
mergeability: "clear"unlessmergeStateStatusisCLEAN(orHAS_HOOKS/UNSTABLE, if those are
deliberately accepted). - Update the truth-table tests to assert gate or waiting outcomes for each of these states.
- Dominant language
- TypeScript
- Stars
- 18.2k
- Forks
- 2k
- Avg merge
- 3h 56m
- Merged PRs (30d)
- 96
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cursor/plugins
-
pstack: interrogate asks the user, which worker.md forbids for delegates that reach itPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cursor/plugins#1272 · 1 comment ·
Maintainers usually reply within 1 day
-
poteto-mode: multi-phase-plan Merge placeholder still appends every PR to a base-branch stackPossibly taken @mangeshraut712 claimed this 15 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
typescript-best-practices: schema example uses z.string().uuid(), deprecated in Zod 4Possibly taken @mangeshraut712 claimed this 14 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
cursor/plugins#1165 · 1 comment ·
Maintainers usually reply within 1 day
-
statechart: relative-symlink launcher test fails on macOS because /var is a symlinkPossibly taken @lnuxe claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cursor/plugins#1164 · 2 comments ·
Maintainers usually reply within 1 day
-
pstack docs/harness/claude-code.md: transcript slug replaces every non-alphanumeric character, not only / and .Possibly taken @isTuhin claimed this 9 days ago. Open
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
cursor/plugins#1155 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
infra needs-triage
Difficulty 2/5 Under an hour Newbie friendliness 82/100
LucasSantana-Dev/Lucky#3331 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kOaDT/oss-oopssec-store#381 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nocobase/nocobase#11669 · 1 comment ·
Maintainers usually reply within 1 day
-
iOS: Clear Context (/clear) and model picker fallback use negative agent check instead of isClaudeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Area: API Bug Difficulty: Low Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
DouglasNeuroInformatics/OpenDataCapture#1937 ·
Maintainers usually reply within 1 day