Skip to content

End a hung Rust test by name in CI instead of at the job limit - #539

Merged
yansfil merged 1 commit into
mainfrom
fix/flaky-535
Oct 5, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/flaky-535

Conversation

@yansfil

@yansfil yansfil commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Refs #535

Summary

CI의 Rust test가 멈추면 이름 없이 job 한도에서 취소되던 것을, 상한에서 test 이름과 함께 실패하고 한 번 재시도되어 flaky로 분류되게 바꿉니다. 기한을 늘리는 변경이 아니라 "이름 없는 멈춤"을 "이름 있는 실패"로 바꾸는 상한입니다.

  • 원인: nextest ci profile에 slow-timeout이 없어, 멈춘 test는 이름도 재시도도 flaky 보고도 없이 step이나 job 한도까지 lane을 붙잡습니다. #514의 queue run(37315789651)에서 Windows os contract의 nextest step이 30분 멈췄고, step의 10분 한도도 끝내지 못해 job 한도에서 취소되었으며 log도 남지 않았습니다.
  • 수정:
    • .config/nextest.toml: ci profile에 slow-timeout = { period = "60s", terminate-after = 2 }(120 s에 종료)를 넣었습니다. remote mailbox binary(herdr-core::remote_delivery)만 override로 240 s입니다. 근거는 설정 옆 주석과 아래 Evidence에 있습니다.
    • scripts/ci-flaky-report.py: timeout으로 끝난 시도는 JUnit flakyFailure에 본문도 message도 없고 type="test timeout"만 있어 issue가 "(no message)"로 적혔습니다. type을 마지막 대안으로 읽습니다. 단위 test 하나를 더했습니다.
    • docs/TESTING.md: Rust 재시도 항목에 이 상한과 그 뜻(hang guard, 늘리는 값이 아님)을 적었습니다.

Review

  • 판단해 주세요: 값. 기본 120 s는 remote mailbox를 뺀 모든 lane에서 가장 느린 test(21 s)의 약 5.8배이고, 재시도까지 멈춰도(10 s grace 포함 260 s) nextest를 부르는 가장 짧은 step 한도(5분, Windows의 port 귀속 step)보다 짧습니다. remote mailbox는 38-63 s로 퍼져 있어 240 s(최대 실측의 약 3.8배)로 따로 두었고, 재시도까지 멈춰도 그 step의 10분 안에서 끝납니다.
  • 조심해서 볼 파일: .config/nextest.toml - CI의 모든 Rust lane(Linux, macOS, Windows, OS contract, nightly, remote mailbox)이 읽습니다. 로컬 기본 profile은 바뀌지 않습니다.
  • 질문: 이 PR은 #535에서 멈춘 test 자체를 찾지 못합니다. 다음에 같은 멈춤이 오면 이름과 함께 flaky issue로 남습니다.

Evidence

  • 확인한 것: 2026-10-05의 green run들에서 job log의 nextest 결과 줄로 test별 시간을 모았습니다(verify 25개, 각 lane 18-21 job).
    • rust workspace(Linux): 가장 느린 test 20.7 s(worktrees::behavior_tests::idle_and_working_tree_edits_do_not_reread_but_manual_refresh_does, 21회 모두 20.6-20.7 s), 다음 15.0 s.
    • windows check: 13.4 s. os contract Windows 8.4 s, Linux 3.3 s, macOS(desktop e2e 안) 8.6 s.
    • remote mailbox(macOS e2e job): 19회 37.9-63.2 s.
    • 기존 60 s SLOW 표시는 remote mailbox 1회 말고는 어느 job에도 없었습니다.
  • 확인한 것: 고정된 nextest 0.9.143으로 작은 crate에서 확인했습니다.
    • 한 번 멈춘 뒤 통과하는 test는 상한에서 TMT로 끝나고 재시도에서 통과해 FLAKY가 되며, JUnit에 flakyFailure type="test timeout"가 남습니다.
    • 계속 멈추는 test는 이름과 함께 실패합니다.
    • binary_id(...) override는 그 binary에만 긴 상한을 줍니다(같은 3 s test가 override binary에서는 통과, 다른 binary에서는 timeout).
  • 확인한 것: python3 -m unittest discover -s scripts/tests -p 'test_*.py' 130개 통과. 새 단위 test는 type 대안을 빼면 실패합니다.
  • 확인하지 못한 것: CI 안에서 실제로 멈춘 test가 끝나는 모습(이 PR의 run은 정상 run입니다). Windows에서 nextest가 멈춘 test를 끝내는 것은 그 플랫폼의 job object 종료에 기댑니다.

The ci nextest profile ends a test still running at 120 s (240 s for the
remote mailbox binary), so a hang fails with its name, is retried and is
filed as flaky. The flaky report names a timeout when the failure carries
only its type.
@yansfil
yansfil added this pull request to the merge queue Oct 5, 2026
@yansfil
yansfil merged commit 5b6cff6 into main Oct 5, 2026
28 checks passed
@yansfil
yansfil deleted the fix/flaky-535 branch October 5, 2026 16:48
yansfil added a commit that referenced this pull request Oct 6, 2026
## Summary

The merge queue is off (its median from a green pull request to main was
47.6 minutes, of which 12.6 were work), so this removes the code and
text that existed only for it.
A push to main plans every lane again, as before the queue;
`merge_group` runs and their plan from `merge_group.base_sha` are gone.
Removed: the `merge_group` trigger, the push's Actions API lookup of a
queue run and its `actions: read` permission and `GH_TOKEN`, the push
base from the last passing push run, the cache key comparison
(`CACHE_KEYS`), `--queue-runs`, the `verified-by` output and the
verified-push branch of `aggregate`, and the docs and tests that
described them.
`scripts/ci-plan.py`, its test and `CONTRIBUTING.md` were changed only
by #500, #518 and #543, so they return to their state before #500;
`pr.yml`, `nightly.yml` and `docs/TESTING.md` are edited by hand to keep
#507 and #539.

## Review

- **판단해 주세요**: nightly's call of `verify` with every lane (#518) stays.
A push to main runs every lane again, but a lane it fails opens no
issue; the same failure in nightly's call opens or comments on the
nightly issue through the report job, and a lane that breaks with no
merge (a runner image, a toolchain, a service a test reaches) is found
within a day. It costs about 94 job-minutes a day, 23 of them macOS (a
full run of `verify`, median of 9 main runs). If that alert is not worth
it, the call, `workflow_call` and the concurrency group change go
together.
- **조심해서 볼 파일**: `.github/workflows/pr.yml` `concurrency.group` stays
`${{ github.workflow }}-...` for the call: `verify`'s own runs keep the
same group name as before, and nightly's call is
`nightly-refs/heads/main`, so it never takes a push run's pending place.

## Evidence

- **확인한 것**: `git grep -i 'merge
queue\|merge_group\|verified-by\|CACHE_KEYS\|queue-runs'` finds nothing
outside the local harness folder; `actions: read` remains only on
nightly's report job, which had it before.
- **확인한 것**: `scripts/ci-plan.py` and `scripts/tests/test_ci_plan.py`
equal their state at the parent of #500 except the added
`test_nightly_calls_verify_with_every_lane`, which fails when
`workflow_call` is removed from `pr.yml`; `python3 -m unittest
scripts/tests/test_ci_plan.py` 30 pass; the policy lane's commands pass
locally (`unittest discover` 129 tests, `nightly-report.test.cjs` 6, the
structural checks).
- **확인한 것**: `actionlint` is clean on every workflow.
- **확인한 것 (what the skip did while the queue was on)**: one main push
run planned no lane,
[37341893238](https://github.com/modakbul-gongbang/hide/actions/runs/37341893238):
2 jobs, 0.35 job-minutes; a full push run took 94.1 (macOS 25.3).
- **확인하지 못한 것**: this pull request changes `.github/workflows/`, so its
own run plans every lane; nightly's `verify` call has not run yet (the
first schedule after #518 is 18:00 UTC).
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