Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

poteto-mode watch-pr: PRs that are BLOCKED, BEHIND, UNKNOWN or REVIEW_REQUIRED come back as ready with mergeability "clear"

Đang mở Phù hợp với người mới
#1,053 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github, typescript
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu trong scripts/watch-pr/policy.ts: đọc assessGitHubMerge ở dòng 12, gateReason ở dòng 167 và readyContribution ở dòng 203, sau đó chạy policy.test.ts (dòng 42 mã hóa hành vi hiện tại). Dùng watch-pr/fakes.test-helper.ts để tái tạo các trường hợp BLOCKED/BEHIND/UNKNOWN/REVIEW_REQUIRED. Hoàn tất nghĩa là các bài kiểm thử bảng chân trị mong đợi một kết quả gate hoặc chờ cho những trạng thái đó và mergeability: "clear" không còn được trả về cho chúng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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): when mergeStateStatus is BLOCKED, the only refusal is a head rollup of
    ERROR or FAILURE. A SUCCESS rollup returns kind: "allowed", basis: "rollup". BEHIND, UNKNOWN and every
    other state fall through to allowed, basis: "merge-state" (:26).
  • gateReason (:167) turns only CHANGES_REQUESTED into a gate. REVIEW_REQUIRED is not a gate.
  • readyContribution (:203) then returns kind: "ready-pr" with proof.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 a BLOCKED merge 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. Treat BEHIND as a gate, or as waiting when the
    repo doesn't require branches to be up to date.
  • Never emit mergeability: "clear" unless mergeStateStatus is CLEAN (or HAS_HOOKS / UNSTABLE, if those are
    deliberately accepted).
  • Update the truth-table tests to assert gate or waiting outcomes for each of these states.
Ngôn ngữ chính
TypeScript
Star
13.9k
Fork
1.4k
Merge trung bình
6 giờ 55 phút
Pull request đã merge (30 ngày)
158

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cursor/plugins

Tất cả issue của cursor/plugins

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.