Skip to content

[Hardening] Strengthen PR readiness parsing and rework edge cases #10

@Hanjo92

Description

@Hanjo92

Summary / 요약

PR readiness 판단과 request-pr-rework의 엣지 케이스 처리를 보강합니다.

Risk Or Quality Gap / 리스크 또는 품질 공백

  • collect_status_check_blockers()statusconclusion 중심으로 status check를 해석합니다. gh pr view --json statusCheckRollup의 item shape가 다르거나 state-only status context가 오면 실패/대기 상태를 놓칠 수 있습니다.
  • request-pr-rework는 발견된 PR이 0개인 경우에도 blocked 목록이 비어 있으면 “All discovered PRs look merge-ready”라고 실패합니다. 실제로는 PR URL을 찾지 못한 상황이라 메시지가 부정확합니다.

Proposed Hardening / 제안 보강

  • statusCheckRollup의 다양한 shape를 샘플링하고, state, status, conclusion, unknown item type을 보수적으로 처리합니다.
  • 실패/대기/알 수 없음 상태가 merge-ready로 오판되지 않게 합니다.
  • request-pr-rework에서 “PR 없음”과 “모든 PR이 merge-ready”를 명확히 분리합니다.
  • 관련 테스트를 추가합니다.

Verification Plan / 검증 계획

  • failing status context, pending state-only context, unknown item type 테스트를 추가합니다.
  • PR URL이 없는 session outputs에서 request-pr-rework가 정확한 오류를 내는지 테스트합니다.
  • 기존 merge-ready/merged PR 테스트가 계속 통과하는지 확인합니다.

Acceptance Criteria / 완료 기준

  • failing/pending/unknown status check shape가 merge-ready로 오판되지 않는다.
  • PR URL이 없는 세션은 request-pr-rework에서 별도 오류 메시지로 안내된다.
  • 관련 단위 테스트가 추가된다.
  • python3 -m unittest discover -s tests가 통과한다.

References / 참고 자료

  • google-jules-control/scripts/jules_api.py: collect_status_check_blockers(), is_pr_merge_ready(), request_pr_rework()
  • tests/test_jules_api.py: PR readiness 관련 테스트
  • 분석일: 2026-04-24

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiJules API helper and CLI behaviorbugSomething isn't workingenhancementNew feature or requestpriority:p0Highest priority / blocks safe operations

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions