Skip to content

File one issue per nightly failure and close it when its lane passes - #712

Merged
yansfil merged 8 commits into
mainfrom
ci/nightly-failure-issues
Oct 7, 2026
Merged

yansfil merged 8 commits into
mainfrom
ci/nightly-failure-issues

Conversation

@yansfil

@yansfil yansfil commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

nightly 실패는 지금까지 issue #412 한 곳에 lane 이름만 댓글로 쌓였습니다. 어떤 테스트인지 알 수 없었고, 녹색이 되어도 닫히지 않았습니다(10-07 package (macos)의 server-session-search.spec.ts:29 실패를 아무도 몰랐음).
이제 실패 하나가 nightly-failure issue 하나입니다. 재발하면 같은 issue에 댓글이 달리고, lane이 녹색이 되면 issue가 닫힙니다.

  • 각 lane의 보고 단계(ci-flaky-report.py)는 재시도까지 실패한 테스트를 job의 Failed test annotation으로 남기기만 합니다(실행 요약 화면에도 이름이 보임). flaky issue 쓰기는 그대로입니다.
  • nightly의 report job(ci-flaky-report.py --nightly)이 issue를 쓰는 유일한 곳입니다.
    • annotation이 있으면 lane의 테스트당 issue 하나, 없으면 lane과 실패한 step당 하나를 엽니다. 제목은 Nightly failure (<lane>): <테스트 또는 step>(200자 상한)이라 같은 테스트가 macOS와 Windows에서 실패하면 제목이 다른 issue 둘입니다. 준비 단계에서 실패했으면 infra label을 답니다.
    • 본문: lane의 마지막 녹색 nightly 이후 머지된 원인 후보 PR, 오류 발췌(clean), - Expires: 이틀 뒤.
    • run attempt마다 댓글 한 번, run당 10개 상한(넘치면 하나로 묶음), 예약 run에서 녹색인 lane의 issue 닫기, main이 아닌 run은 쓰지 않음.
  • 예약은 17 17 * * *(02:17 KST)로 옮겼습니다. 정각 예약은 GitHub가 늦춰, 03:00 KST 예약이 07:30~08:50 KST에 시작했습니다.
  • 지운 것: nightly-report.cjs(Nightly CI is failing #412 umbrella)와 그 테스트, policy job의 node test 단계. 원인 후보·표식·상한을 두 언어에 두지 않으려고 report 로직을 Python 한 곳으로 옮겼습니다. #412는 머지 뒤 감독이 닫습니다.

Review

  • 판단해 주세요: annotation 한도. GitHub 문서(REST check runs, "Update a check run")는 "GitHub Actions are limited to 10 warning annotations and 10 error annotations per step."라고만 적고, job·run 한도는 문서에 없습니다.
    • 보고 단계 하나는 스크립트를 한 번만 돌리고(workflow test가 확인), 실패 테스트 8개까지 annotation을 남깁니다. 넘치면 Failed tests not annotated 하나에 남은 수를 적고, runner 자신의 몫으로 하나를 비워 둡니다.
    • report job은 남은 수를 run 상한 묶음 issue에 더합니다. 실패한 job에 Failed test가 하나도 없으면 단계 실패 issue로 엽니다.
  • 판단해 주세요: package (macos)에 보고 단계를 더했지만 issues: write는 주지 않았습니다. release.yml과 pr.yml(#700의 package lane)이 package.yml을 contents: read로 부르기 때문입니다. annotation은 권한이 필요 없고, 그 job의 flaky는 job summary에 "not filed"로 남습니다.
  • 판단해 주세요: lane은 job 이름에서 shard(2/4)를 뗀 것입니다. verify / verify gate는 다른 lane 실패를 따라 실패하므로 lane에서 뺐습니다. step 실패의 원인 후보 경로는 그 lane이 거친 workflow와 그 workflow가 부르는 scripts/입니다.
  • 조심해서 볼 파일: scripts/ci-flaky-report.py Nightly(failure path). GitHub API 오류는 report job을 실패시켜 조용히 넘어가지 않습니다. nightly.yml report job 권한(actions, checks, pull-requests read)도 함께 봐 주세요.
  • 비용 검토: report job의 목록 조회는 모두 100개씩 10쪽까지 읽고, 넘으면 오류입니다. 마지막 녹색은 14 run까지 찾습니다. compare가 1000 commit을 넘으면 원인 후보를 "unknown"으로 적습니다. PR 파일 목록은 run 안에서 cache합니다.
  • 덤: nightly desktop job의 rust junit 보고 줄을 지웠습니다(그 job은 nextest를 돌리지 않음). 보고 단계 이름은 Report flaky and failed tests로 바꿨습니다.

Evidence

  • 확인한 것:
    • scripts/tests/test_ci_flaky_report.py 39개 통과(가짜 jobs·annotations·logs·issues·compare·PR 응답).
      • 첫 실패가 열고, 같은 attempt 재실행은 댓글 0, 새 attempt는 1.
      • 녹색 lane이 닫고 skipped·cancelled는 무시, 수동 run은 all일 때만 닫음.
      • annotation 없는 실패 job은 단계 실패, infra 분류, 상한 10과 묶음, main 아님은 쓰기 없음, dry-run은 쓰기 없음.
      • 원인 후보(범위 밖·다른 파일 제외, 여러 쪽 compare), annotation 형식과 8+1 한도, report 단계당 실행 한 번.
      • 같은 테스트가 두 lane에서 실패하면 제목이 다른 issue 둘, 제목 200자 상한.
    • main(Run the package workflow, macOS included, as a planned pull request lane #700 포함) merge 뒤 python3 -m unittest discover -s scripts/tests 189개 통과. policy job의 구조 검사, check-no-workstation-identity, attribution 검사 통과.
    • dry-run(아래 펼침). 테스트 목록은 그 run의 job log(Playwright list 요약)에서 재구성했습니다. 그 run들에는 Failed test annotation이 없기 때문입니다. 나머지(jobs, steps, 이전 run, compare, PR 파일)는 실제 API를 읽기만 했습니다.
  • 확인하지 못한 것:
    • 실제 report job과 annotation 생성은 Actions에서 아직 돌지 않았습니다. report job은 main의 nightly에서만 돕니다. annotation 형식은 문서와 테스트로만 확인했습니다.
    • job·run당 annotation 한도는 문서가 없어 확인하지 못했습니다.
dry-run: 10-07 run 37541045200
# package / package (macos): rebuilt 1 failed test(s) from its log
would open [nightly-failure] Nightly failure (package / package (macos)): server picker and conversation search in a background native window
    <!-- nightly-failure:package / package (macos):desktop/e2e/server-session-search.spec.ts > server picker and conversation search in a background native window -->
    Nightly CI failed in the `package / package (macos)` lane.
    - Test: `desktop/e2e/server-session-search.spec.ts:29` "server picker and conversation search in a background native window"
    - Lane: `package / package (macos)` on macos-15
    - Commit: 0f06ce6c13d5
    - Last green nightly of this lane: 9d5072f4b0bf (https://github.com/modakbul-gongbang/hide/actions/runs/37391023049)
    - Candidate pull requests (merged since then, touching `desktop/e2e/server-session-search.spec.ts`): #668
    - Expires: 2026-10-09
    TimeoutError: locator.click: Timeout 30000ms exceeded.
    - waiting for getByRole('button', { name: /^Settings \(/ })
dry-run: 10-06 run 37391023049 (제목만)
would open [nightly-failure] Nightly failure (desktop e2e (windows full)): Whole desktop suite
would open [nightly-failure] Nightly failure (desktop e2e (linux full)): Whole desktop suite
would open [nightly-failure] Nightly failure (web e2e (Windows full) / web e2e nightly-windows): a Project's Sessions: history, filters, a read-only session, failures and two windows
would open [nightly-failure] Nightly failure (web e2e (Windows full) / web e2e nightly-windows): 2000-session search progress preserves history and terminal input
would open [nightly-failure] Nightly failure (web e2e (Windows full) / web e2e nightly-windows): ⌘K Start an agent… starts an agent in the checkout in front with the chosen model and first prompt
would open [nightly-failure] Nightly failure (web e2e (Windows full) / web e2e nightly-windows): weekly usage: a loading, an available and an unavailable row, and the hints the page sends
would open [nightly-failure] Nightly failure (web e2e (Windows full) / web e2e nightly-windows): an agent slept from the pane menu keeps its row and wakes in the same pane on a visit
would open [nightly-failure] Nightly failure (web e2e (Windows full) / web e2e nightly-windows): the area layout and its divider ratio survive a hided restart
would open [nightly-failure] Nightly failure (web e2e (Windows full) / web e2e nightly-windows): rename refusal and timeout preserve text for retry
would open [nightly-failure] Nightly failure (web e2e (Windows full) / web e2e nightly-windows): the phone's start sheet starts an agent in a checkout and in Home, and keeps its text while the phone is away
would open [nightly-failure] nightly: 3 more failures in run 37391023049

…ly report job

Each lane's report step writes a test that failed its retry too as a Failed test annotation; the nightly report job, the one writer, opens an issue per failure with candidate pull requests and an expiry, comments once per attempt, caps a run at ten, and closes a lane's issues when a scheduled run passes it. The umbrella report and its test go.
…sues

# Conflicts:
#	docs/TESTING.md
#	scripts/tests/test_ci_plan.py
@yansfil
yansfil merged commit f5a9fe8 into main Oct 7, 2026
22 checks passed
@yansfil
yansfil deleted the ci/nightly-failure-issues branch October 7, 2026 08:36
yansfil added a commit that referenced this pull request Oct 8, 2026
Related: yansfil/sasu#30 (`/ship merge`가 이 검사를 매 머지마다 돌리고 출력을 보여 주게 하는
쪽)

## Summary

Hide와 GitHub은 PR과 이슈를 `Closes #N` 같은 closing keyword로만 잇는데, 10-06~07에
이슈를 끝낸 PR 7개(#607 #612 #614 #622 #631 #634 #712)가 이 줄 없이 머지됐고 이슈는 손으로 닫혀
연결이 남지 않았습니다.
이제 `scripts/premerge-check.py`가 닫는 이슈가 없는 PR에 머지 명령 바로 위에서 알림을 한 줄 찍습니다.
막지는 않습니다. 이슈 없이 시작한 PR(PRD 작업, CI·문서 변경)도 많기 때문입니다.

```
note: #454 closes no issue. If it finishes one, put `Closes #<issue>` on the body's Closes line before merging (editing the body does not rerun `verify`); with no issue, merge as it is.
#454 may merge now: gh pr merge 454 --merge --match-head-commit a1eda76...
```

## Review

- **판단해 주세요**: 알림만 하고 막지 않는 수준이 맞는지. 막으려면 "이슈 없음"을 PR 본문에 명시하는 규칙이 따로
필요합니다.

## Evidence

- **확인한 것**: 실제 PR로 실행. 이슈를 닫는 #781에는 알림 없음, 닫는 이슈가 없는 #454에는 위 알림이 찍히고
머지 가능 판정은 그대로.
- **확인한 것**: `test_premerge_check.py`에 알림 유무 테스트 1개 추가, `scripts/tests`
206개 통과, `check-no-attribution` 통과.
- **확인하지 못한 것**: PR을 만드는 순간의 알림은 없습니다. 머지 직전에만 알려서, 그때 본문을 고치는 흐름입니다.
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