Repository navigation
ci: size test threads to the machine and run platform tests through one nextest profile - #523
Conversation
…ne nextest profile Tests use one thread per CPU; real-process tests share a two-thread group so their exit confirmation is not starved, and only the ~15 slowest tests get priority. Soak tests form a group the pull-request gate leaves out and `cargo xtask check --full` runs. The hand-picked test-exact steps become a nextest `platform` profile whose selection CI diffs against .config/platform-tests/<os>.txt; the two Windows jobs merge into one. `cargo xtask lint` requires every Windows- or macOS-only test to be listed. Adds a 14-day quarantine list with a lint, a gate exclusion and a non-blocking stress job, starting empty. The devcontainer job runs only when its inputs change or off pull requests; the minimal core profile runs as its own job.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a7c2b8b1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…p instead of doc comments
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f98959ebc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3f9ceec10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Stacked on #521, which has since merged into
main, so this PR targetsmain.Change
CI and the local gate (B1–B7 in the test audit):
test-threads = "num-cpus". A newreal-processtest group (max 2 threads) holds the tests that spawn, kill and reap real process trees:process_group,windows_job, the shell kill, timeout and yield tests, the orphan, child-exit and zombie tests, goal-check process teardown, and the daemon binaries. The priority override covers 15 named tests that run over 2.5 s on CI, down from 382 whole-module tests. The Linux CI runner keepsNEXTEST_TEST_THREADS=8, measured below..devcontainer/,Dockerfile*,rust-toolchain.tomlorCargo.lockchanged, which agit diffjob decides, or when the PR hasci:full. It still runs on every merge-queue,main, nightly (newschedule) and manual run.test-exact.shsteps are replaced by a nextestplatformprofile with one default filter per OS. That brings nextest timeouts, retries and JUnit.windows-teardownandnative-run-in-placemerge into oneplatformmatrix (Windows and macOS). Each job diffscargo nextest list --profile platformagainst.config/platform-tests/<os>.txtand fails on any difference. A newplatform-testsrule incargo xtask lintfails when a#[cfg(windows)]or#[cfg(target_os = "macos")]test is missing from its list. This replacestest-exact.shandtest-exact-test.sh. The Git 2.39 job, the smoke--onlysteps, the macOS coreutils setup and the embed example stay.cargo xtask smoke --reuse-test-buildbuildsqqas--workspace --bin qq --tests, the same feature set as the workspace test build, so it reuses that build instead of relinking with fewer features. CI uses it after the full gate and in the platform jobs. PR runs keep the plain build, because an affected-only test build doesn't share a feature set with either.core-profilesjob, which runs in parallel withchecks.soaktest group holdsgoal_driver_soak::multi_day_*andbinary_id(qq-core::soak).cargo xtask checkpasses-E 'not group(soak)'.--full, which runs in the merge queue, on main, nightly and manually, includes the group, so a local--fullruns what CI runs..config/quarantine.tomlstarts empty and holds{test, owner, issue, added, expires}entries.cargo xtask lintfails on a missing owner, issue or date, a name that matches no listed test, anexpiresmore than 14 days afteradded, or an entry that has expired.cargo xtask checkexcludes the listed tests from its test gates.cargo xtask quarantineprints the filterset.quarantinejob stress-runs the listed tests 100 times.docs/runbooks/testing.mdgets the CI job table, the nextest groups, the flake policy and the quarantine procedure.docs/runbooks/windows-ci.mdnow describes the platform job.Required checks for the merge queue:
fmt, lint, clippy, tests, smoke,minimal core profile and embedding,qq-client on wasm32,platform tests (windows-latest),platform tests (macos-latest),undo on Git 2.39 (debian:bookworm).Verification
Full workspace,
--profile ci, warm, 32 cores, two runs each:The brief's 64 s baseline predates fix(core): remove the known test flakes and give command-tree teardown a 10 s confirmation budget #520 and test(core): drive session wall time and deadlines from one clock #521.
4 vCPUs simulated with
taskset -c 0-3:NEXTEST_TEST_THREADS=8, PR gateNEXTEST_TEST_THREADS=8, fullnum-cpus(4 threads)Many tests wait on real time, processes or fsync, so oversubscription helps on small runners. That is why CI pins 8.
real-processmax-threads: 2 → 13.5 s, 3 → 11.8 s, 4 → 10.2–11.6 s on 32 cores. I kept 2 for teardown headroom on loaded runners.B3 selection, per OS, computed from the old
ci.ymlsteps against the new lists:windows_dpapi_round_trip_replaces_and_removes_oversized_secret,quoted_redirection_reaches_cmd_unchangedandab1_cmd_separators_and_native_sort_output_are_work.bash .github/scripts/platform-tests.sh macosselected exactly the 14 listed tests and ran them green. A renamed test in the filter made it fail with a diff.Removing 4 entries from
windows.txtmadecargo xtask lintreport each missing test with itsfile:line.A quarantine file with an expired entry, an ownerless entry and an unknown test made the lint report each one.
cargo xtask check --dry-runshowed the exclusion filter.B4: the CI log shows about 29 s between the end of the full gate and the start of smoke scenarios on main (run 41265348978). Locally, after a workspace test build,
--reuse-test-buildrelinks nothing, while the plain build recompiled qq-core through qq.actionlintonci.yml: clean.cargo xtask check --full: passed on 6c30fda, test gate 18.0 s with soak.cargo xtask check: passed, 3010/3010, 13.3 s.Known impact
goal_enabled_soak_measures_real_notices_across_compaction(qq-core::soak) is flaky under load before and after this change. On one loaded core it failed 4/40 on the old config and 2/30 on the new one (work_requests_with_goal0 vs 72), and once in a full run on 4 cores. It is in the soak group, so it no longer blocks PRs. It still runs in the merge queue. I did not quarantine it, because no issue exists yet and the fix is out of scope.ci:fullrun. I can't run Windows locally.