Skip to content

ci: refuse a pull request that changes a screen and shows none of it - #1282

Merged
yansfil merged 2 commits into
mainfrom
ci/pr-screenshots-gate
Oct 16, 2026
Merged

yansfil merged 2 commits into
mainfrom
ci/pr-screenshots-gate

Conversation

@yansfil

@yansfil yansfil commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

화면을 바꾼 PR이 스크린샷 없이 열리던 문제를 막습니다. 10-16에 머지된 UI 변경 PR 20개 중 이미지가 있는 것은 7개였고, 규칙은 템플릿과 AGENTS.md에 있었지만 손으로 연 PR은 그냥 넘어갔습니다.

  • verify의 policy 검사가 PR 본문을 읽습니다. diff가 web/src, site/, design/을 건드리면(테스트와 스냅샷 제외) 리뷰어가 열 수 있는 https:// 이미지가 있거나, 스크린샷 없음: <이유> 한 줄이 있어야 통과합니다. 워크스테이션 경로, file://, raw.githubusercontent.com 링크는 이미지로 치지 않습니다.
  • 본문을 고치면(edited) 검사가 다시 돕니다. 진행 중인 런은 취소하지 않고 기다리며, 지난 초록 런이 서 있으면 policy만 돕니다.
  • AGENTS.md에 올리는 명령(prd_ship.js screenshots --no-run, sasu PR Clarify workspace navigation and surface agent and pull request status #32)과 예외 줄을 적었고, CONTRIBUTING의 CI gates 표와 PR 템플릿, TESTING.md의 lanes 절에 같은 내용을 넣었습니다.

Review

  • 판단해 주세요: 예외 줄 스크린샷 없음: <이유>를 둘지. 검사가 막는 것은 말없이 빼는 것이고, 이유가 적힌 생략은 리뷰어가 판단합니다. 이 줄이 없으면 CI 포화로 후보 빌드를 못 띄우는 날 PR 자체가 막힙니다.
  • 조심해서 볼 파일: .github/workflows/pr.yml - edited 트리거와 cancel-in-progress 조건, policy job의 fetch-depth: 2. 본문 검사는 Structural checks 블록 밖에 두어 premerge-check.py의 parity 테스트가 요구하지 않게 했습니다(머지 결과에는 본문이 없음).
  • 질문: edited는 제목 변경에도 런을 시작합니다. 지난 초록 런이 있으면 policy 한 job이라 비용은 작은데, 그래도 싫으시면 별도 워크플로로 뺄 수 있습니다(브랜치 보호에 required check 추가 필요).

Evidence

  • 확인한 것: python3 -m unittest discover -s scripts/tests 전체 통과(398개, 새 test_pr_screenshots.py 9개 포함: 이미지 없음 실패, https 이미지 통과, 로컬 경로와 raw 링크 실패, 예외 줄 통과, 이유 없는 예외 실패, 템플릿 주석 무시, 테스트 파일만 바뀐 경우 통과). 이 브랜치 자체의 diff에 검사를 돌려 "No screen changed"로 통과.
  • 확인하지 못한 것: edited 이벤트에서의 실제 런 동작(취소 안 함, policy만)은 이 PR의 본문을 고쳐 보는 것으로 확인할 수 있어서, 열린 뒤 한 번 고쳐 결과를 적겠습니다.

Of the twenty pull requests that touched the web shell on 2026-10-16,
seven carried an image; the rule stood in the template and the agent
guide, and every pull request opened by hand under load skipped it.
The policy lane now reads the body: a diff under web/src, site/ or
design/ needs an https:// image a reviewer can open, or one line
스크린샷 없음: <reason> for the reviewer to judge. A body edit reruns
the run without cancelling the lanes in progress.
@yansfil
yansfil merged commit 5e3170d into main Oct 16, 2026
15 checks passed
@yansfil
yansfil deleted the ci/pr-screenshots-gate branch October 16, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant