Skip to content

Run every Rust lane under nextest's retry and keep unfiled flaky tests visible - #463

Merged
yansfil merged 2 commits into
mainfrom
ci/nextest-all-lanes
Oct 5, 2026
Merged

yansfil merged 2 commits into
mainfrom
ci/nextest-all-lanes

Conversation

@yansfil

@yansfil yansfil commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #419 (Linux Rust lane의 nextest retry와 flaky 보고), with-hide/hide-private#104

Summary

#419는 Linux Rust lane만 nextest로 옮겼습니다. 그래서 macOS의 process.rs repeated_guarded_work_releases_children_and_capture_resources(R5 기존 flake)가 #419 자신의 desktop e2e를 한 번 빨갛게 했습니다(gh run rerun --failed로 통과). 나머지 Rust lane도 같은 retry와 보고 아래로 옮깁니다.

  • Windows windows check, macOS desktop e2e, os contract(Linux, Windows), nightly의 macOS OS contract가 scripts/verify-cargo.sh nextest --profile ci를 씁니다. 한 번 재시도해서 통과하면 flaky로 issue에 남고 lane은 통과합니다.
  • scripts/install-nextest.sh가 Linux, macOS, Windows의 고정 버전 설치를 한 곳에서 합니다(버전 문자열은 이 파일에만 있고, 설치 뒤 버전을 확인합니다).
  • 인자 번역: -- --ignored → --run-ignored only, -- --nocapture → --no-capture, -- --exact name → -E 'test(=name)', --lib 뒤의 필터는 그대로 위치 인자입니다.
  • 한 lane이 nextest를 여러 번 돌리면 매번 같은 JUnit 경로를 덮어쓰므로, verify-cargo.sh가 실행마다 보고를 따로 보관하고 ci-flaky-report.py가 모두 읽습니다.
  • 보고 step이 issue를 못 만들면(GitHub 오류, 읽기 전용 토큰) 이제 경고 annotation과 job summary("Flaky tests that were not filed")에 해당 테스트가 남습니다. 만들었을 때도 summary에 issue 목록이 남습니다. lane은 여전히 막지 않습니다.

Review

  • 조심해서 볼 파일: .github/workflows/pr.yml, os-contract.yml, nightly.yml - 인자 번역이 맞는지(특히 windows check의 -E 'test(=...)' 두 줄, -p hided --lib pane_auth opener open_command workspace_cli 필터). os-contract.yml은 reusable workflow라 호출하는 쪽(pr, nightly)에 issues: write가 늘었습니다.
  • 지운 것: hide-platform의 --run-ignored only 단계(desktop job의 quarantine step 안, nightly의 macOS step)와 Rust ignore로 격리하는 안내. ignore가 0개라 0개를 도는 장치였고 정책은 retry+issue, ignore 0입니다. real_herdr, remote_delivery처럼 외부 바이너리가 필요한 opt-in ignore 단계는 그대로입니다.

Evidence

  • 확인한 것: macOS 로컬에서 hide-platform+hide-herdr-client 189개를 verify-cargo.sh nextest --profile ci로 실행(통과, 보고가 실행마다 따로 저장됨). 번역한 형태 네 가지를 실제로 실행했습니다: 필터 위치 인자(--lib listeners fs::atomic, 13개), -E 'test(=...)'(1개), --run-ignored only(real_herdr의 ignored 2개가 실행되어 Herdr 바이너리가 없어 실패, 즉 선택은 맞음). scripts/tests 114개 통과(보고 실패 시 summary 기록, 여러 JUnit 읽기 추가).
  • 확인하지 못한 것: Windows에서 install-nextest.sh(windows-tar와 cygpath 경로)와 windows check의 번역된 명령은 이 PR의 CI가 처음 실행합니다. herdr-core의 -E 두 줄은 로컬 빌드 없이 hide-platform의 같은 문법으로만 확인했습니다. verify-cargo.sh test와 test-scoped는 그대로라 release.yml과 herdr-update.yml은 cargo test입니다.
CI 장치 크기 (main 079b6f2 기준)
079b6f2 #419 머지 후 이 PR
workflow 파일 / job / step 8 / 32 / 159 8 / 32 / 165 8 / 32 / 170
workflow 줄 1501 1576 1613
CI가 부르는 스크립트 수 / 줄 29 / 4195 30 / 4395 31 / 4449

늘어난 이유: step 5개는 nextest 설치 3(Windows, macOS, os contract)과 보고 3에서 0개를 돌리던 nightly step 1개를 뺀 값, 줄 37은 그 step과 os-contract.yml/nightly.yml 권한 선언, 스크립트 1개는 install-nextest.sh(설치 로직을 한 곳에 두고 Linux 인라인 설치 한 줄을 대체). cargo test 호출 19곳 중 CI 호출은 모두 nextest로 바뀌었습니다.

… tests visible

Windows, macOS, the OS contract and nightly now use verify-cargo.sh nextest
with the pinned install script; filters, --ignored and --exact translate to
nextest's own flags. A lane that runs nextest several times keeps one JUnit
report per run. When the flaky report cannot file an issue, the tests stay in
a warning and the job summary.
With zero ignores in hide-platform they ran no test, and the policy is retry
plus an issue, not ignore.
@yansfil
yansfil merged commit d1fb480 into main Oct 5, 2026
31 checks passed
@yansfil
yansfil deleted the ci/nextest-all-lanes branch October 5, 2026 05:39
yansfil added a commit that referenced this pull request Oct 5, 2026
Related: #419 (the report script), #463

## Summary

The flaky report crashed on every Windows lane that had a flaky test, so
no Windows flaky test was ever filed.
`scripts/ci-flaky-report.py` read `gh api` output in the locale's
encoding, which is cp1252 on a Windows runner; an open issue with a
Korean title (#423-#428) then fails to decode, `stdout` is `None`, and
the step ends in `AttributeError`.
The step is `continue-on-error`, so the lane stayed as it was and only
the issue was lost.
The script now names UTF-8 for the `gh` child, and a test reads a UTF-8
answer under an ASCII locale.

Seen on main e38f935 (run 37266208973, `web e2e windows 1/1`, `Report
flaky tests`):

```
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 9259
AttributeError: 'NoneType' object has no attribute 'strip'
```

The two flaky tests that run lost were filed by hand with this branch's
script: #470, #471.

## Review

- **조심해서 볼 파일**: `scripts/ci-flaky-report.py` - `encoding="utf-8"` also
encodes the issue body sent on stdin as UTF-8, which is what `gh api
--input` reads.

## Evidence

- **확인한 것**: the new test fails before the fix with the same
`UnicodeDecodeError` (child Python with `LC_ALL=C`,
`PYTHONCOERCECLOCALE=0`, `-X utf8=0`) and passes after it; the script
suite passes (115 tests, macOS).
- **확인한 것**: the fixed script filed #470 and #471 from a report built
from that run's log, with the same body format CI writes.
- **확인하지 못한 것**: a Windows lane filing through this script; it runs the
next time a Windows lane has a flaky test.
yansfil added a commit that referenced this pull request Oct 5, 2026
…ult (#490)

Related: the unclassified-paths table (reviewer decision), #486
(separate branch; both touch `ci-plan.py`'s neighbours, the second to
merge resolves a small conflict in `test_ci_plan.py` and `TESTING.md`)

## Summary

`ci-plan.py` sent every path no rule claimed to every lane, so 42 of the
last 80 merged pull requests (52%) ran all ten.
This names the paths whose readers are known and leaves every other path
on "every lane": `POLICY_ONLY` (no lane reads it: `agents/`, `site/`,
`tools/`, `spikes/`, `.gitignore` files, PR template, workflows `pr.yml`
does not call, `scripts/tests/`, the policy, design, release and
measurement scripts, Markdown below an unclaimed folder) plans `policy`
alone, and `NAMED_LANES` (fixtures, Playwright, eslint and vitest
configs, `web/scripts`, `desktop/scripts`) plans the lanes that read it.
A path that is not named, including any new one, still plans every lane.

## Review

- **판단해 주세요**: `web/e2e` files that are not specs plan `web-checks`,
`web-e2e`, `web-e2e-platform`, `windows-e2e`, `desktop-checks`,
`desktop-e2e`, `windows-check` (desktop suites import them,
`desktop/e2e` unit tests run in `windows-check`); they drop `rust` and
`os-contract` only.
- **판단해 주세요**: `scripts/ci-plan.py` stays on every lane although the
table listed it as `policy`: it decides the plan for every later pull
request, and `policy` runs its tests but not what a wrong rule would
skip.
- **판단해 주세요**: lockfiles, `package.json`, `Cargo.lock`, `contracts/`,
`verify-*.sh`, `ci-flaky-report.py` and the three workflows lanes use
stay full (the table's class where full is right).
- **조심해서 볼 파일**: `scripts/ci-plan.py` (`POLICY_ONLY`, `NAMED_LANES`,
`named_lanes`) and `scripts/tests/test_ci_plan.py` (`NamedPaths`,
including a check that no `POLICY_ONLY` script is named by a lane's
workflow job or the scripts those jobs run).

## Evidence

- **확인한 것**: `scripts/tests` suite passes (27 plan tests; a case per
named path, one that every unnamed and shared path is still full, one
that a named path does not narrow a plan with another reason, and the
reader check).
- **확인한 것**: the changed plan run on the file lists of the last 80
merged pull requests (#355-#483) against main's plan:

| | before | after |
| --- | --- | --- |
| pull requests planning every lane | 42 | 19 |
| pull requests whose plan changed | | 20 |
| lane runs (sum over the 80) | 683 | 585 (-14%) |

| lane | PRs running it before -> after |
| --- | --- |
| policy | 80 -> 80 |
| rust | 76 -> 59 |
| web-checks | 63 -> 51 |
| desktop-checks | 47 -> 39 |
| os-contract | 65 -> 48 |
| windows-check | 65 -> 58 |
| windows-e2e | 71 -> 61 |
| web-e2e | 78 -> 68 |
| web-e2e-platform | 71 -> 61 |
| desktop-e2e | 67 -> 60 |

No pull request gained a lane.

- **확인한 것**: lanes that caught a failure keep it. Of the 300 most recent
`pr.yml` pull-request runs, 73 failed; 72 had a failing lane (the other
failed in `verify` only).
Each run's failing lane was checked against the new plan for that pull
request's file list (the run's own diff where the pull request is still
open, the final file list for merged ones, so earlier pushes can
differ).
The lane stays planned in 68 of 72. The four that would not run it, and
why they are not catches:
- #466 (2 runs): `windows-e2e` failed on `s2.spec.ts:55` and `less`, a
main failure (#475, #424) that the pull request, which touched four
`desktop/e2e` files, did not cause. The new plan runs `desktop-checks`,
`desktop-e2e`, `windows-check`.
- #366: `rust` and `windows-check` failed in `hided` and disk tests
before nextest retries (#463) on a pull request that changed release
scripts and docs only.
- #369: README and SECURITY only; `windows-check` failed before path
selection existed, and the current plan does not run it for those files
either.
The failures that were this pull request's own (#474 desktop-e2e, #436
windows-e2e, #439 web-e2e-platform, #385, #364) keep their lane.
- **확인하지 못한 것**: the narrowing is judged on file lists, not by
re-running CI; a pull request that changes a named file in a way that
needs a lane left out is caught by main's full run, as before.

<details><summary>CI 크기 (D3)</summary>

`ci-plan.py` +77 lines (two tables and `named_lanes`), `test_ci_plan.py`
+97, `TESTING.md` +5; no workflow changed.

</details>
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