Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#1,053 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github, typescript
Área
tooling

Línea de trabajo

Empieza en scripts/watch-pr/policy.ts: lee assessGitHubMerge en la línea 12, gateReason en la línea 167 y readyContribution en la línea 203, luego ejecuta policy.test.ts (la línea 42 codifica el comportamiento actual). Usa watch-pr/fakes.test-helper.ts para reproducir los casos BLOCKED/BEHIND/UNKNOWN/REVIEW_REQUIRED. Terminado significa que las pruebas de tabla de verdad esperan un resultado de gate o de espera para esos estados y que mergeability: "clear" ya no se devuelve para ellos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
13.9k
Forks
1.4k
Merge medio
6 h 55 min
PR fusionados (30 d)
158

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cursor/plugins

Todos los issues de cursor/plugins

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.