Skip to content

build(cmake): set explicit ctest timeouts for pr_labels and pr_ready tooling tests - #18446

Closed
pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:build/cmake-pr-triage-tooling-timeouts
Closed

pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:build/cmake-pr-triage-tooling-timeouts

Conversation

@pushkarreddyy

@pushkarreddyy pushkarreddyy commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

Configure explicit ctest execution timeouts of 30 s for pr_labels and pr_ready tooling test targets in CMakeLists.txt.

These targets invoke external Python test scripts (test_pr_labels.py, test_pr_ready.py). Setting TIMEOUT 30 prevents unexpected I/O stalls or triage script hangs from occupying CI runners up to the 1500 s fallback limit.

Tested

Empirical timing measurements across Windows and Linux:

Test Target Script Windows 11 Pro (Ryzen 5 7530U) Linux CI (Ubuntu GCC, Runs 43257871374 / 43246327768 / 43240437603) Linux Debian 13 (Pentium Silver N6000) Configured TIMEOUT Headroom vs Slowest
pr_labels tools/tests/test_pr_labels.py 0.22 s 0.16 s - 0.54 s (0.16 s / 0.54 s / 0.19 s) 0.18 s / 0.18 s / 0.18 s 30 s > 55x
pr_ready tools/tests/test_pr_ready.py 0.17 s (0.24 s) 0.10 s - 0.36 s (0.13 s / 0.36 s / 0.10 s) 0.24 s / 0.15 s / 0.15 s 30 s > 80x
  • Windows: Measured by @Ethan-Hainline on Windows 11 Pro (Ryzen 5 7530U, Release build): pr_labels 0.22 s, pr_ready 0.17 s (0.24 s observed on local run).
  • Linux CI: Measured from GitHub Actions Ubuntu runners across 3 recent successful runs: pr_labels took 0.16 s, 0.54 s, 0.19 s; pr_ready took 0.13 s, 0.36 s, 0.10 s.
  • Linux Local: Measured by @ycbuzi on Debian 13 (Pentium Silver N6000, relinker-only Release build): all passed 3 consecutive runs with pr_labels taking 0.18 s / 0.18 s / 0.18 s and pr_ready taking 0.24 s / 0.15 s / 0.15 s.
  • Headroom: Configured TIMEOUT 30 provides over 55x headroom over the slowest Linux CI run (0.54 s) and over 120x headroom over Windows runs, eliminating 1500 s fallback hangs while giving generous tolerance against runner load spikes.
  • Pre-flight conventions: python tools/check_conventions.py --base origin/main passes with 0 findings.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions github-actions Bot added the build label Nov 11, 2026
@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Technical Background & CI Runner Safety

As detailed in issue #18437, pr_labels and pr_ready tooling tests validate pull request metadata, triage labels, and mergeability criteria. These tests did not have an explicit CTest timeout defined, exposing CI pipelines to unconstrained execution if git operations or Python processes stall.

Verification Log

  • Conventions Check: python tools/check_conventions.py --base origin/main passed with 0 findings.
  • CTest Run:
    Test project c:/Users/pushk/Documents/antigravity/epic-bardeen/build
        Start 1: pr_labels
    1/2 Test #1: pr_labels ..........................   Passed    0.22 sec
        Start 2: pr_ready
    2/2 Test #2: pr_ready ...........................   Passed    0.24 sec
    100% tests passed, 0 tests failed out of 2
    
  • Configured TIMEOUT 30 to prevent queue stalls.

Conclusion & Testing Request

Testers: Please run:

ctest --test-dir build -R "pr_labels|pr_ready" -V

Verify tests execute cleanly and report the active 30s timeout property.

AI-assisted: yes.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@JJenkx @PrivacyOnion Could you verify ctest --test-dir build -R "pr_labels|pr_ready" -V when you have a moment?

AI-assisted: yes.

@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1835 CMakeLists.txt
PR 7642 CMakeLists.txt
PR 9508 CMakeLists.txt
PR 10193 CMakeLists.txt
PR 10897 CMakeLists.txt
PR 13928 CMakeLists.txt
PR 13929 CMakeLists.txt
PR 17558 CMakeLists.txt
PR 18369 CMakeLists.txt
PR 22175 CMakeLists.txt
PR 22179 CMakeLists.txt
PR 22267 CMakeLists.txt
PR 22282 CMakeLists.txt

@ycbuzi

ycbuzi commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Tested 33d54fba1c merged into main, with the whole ctest suite on each machine below. Nothing fails that does not also fail on main on the same machine.

  • Linux: Debian 13 in ChromeOS's Linux environment on a Pentium Silver N6000 (4 cores, SSE4.2, no AVX), GCC 14.2.0, relinker-only build (-DANYPS5_RELINKER_ONLY=ON): run 1: 100% tests passed, 0 tests failed out of 863; run 2: 100% tests passed, 0 tests failed out of 863; run 3: 100% tests passed, 0 tests failed out of 863.

Timeout check (asked above). Same Chromebook (Debian 13, Pentium Silver N6000, GCC, relinker-only Release build), PR head 33d54fba1c merged into main 65351c2931 as f8e9237413: ctest --test-dir build -R "pr_labels|pr_ready" -V three times, all passed 3 of 3, and -V prints Test timeout computed to be: 30 for each. TIMEOUT read from ctest --show-only=json-v1:

Test main with this PR Time, runs 1 / 2 / 3
pr_labels not set 30 0.18 / 0.18 / 0.18 s
pr_ready not set 30 0.24 / 0.15 / 0.15 s

AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Calling on community testers @JJenkx @Ethan-Hainline @ycbuzi @blawesom:

Whenever you have a moment, could you test the tooling targets on Windows/Linux:

ctest --test-dir build -R "pr_labels|pr_ready" -V

And verify that ctest --show-only=json-v1 confirms the 30s timeout property is registered. Please share your platform info, run times, and log snippet confirming a clean pass.

AI-assisted: yes.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Thank you @ycbuzi for verifying head 33d54fba1c merged into main on Debian 13 (Pentium Silver N6000, relinker-only build), confirming all 863 tests passed across all 3 runs with the explicit timeouts configured for pr_labels and pr_ready.

AI-assisted: yes.

@gabichuuuuu

Copy link
Copy Markdown
Contributor

Read 33d54fba1c against main f57c971559. Correctness. Each call follows its own add_test (pr_labels, pr_ready), so both names resolve. I did not time the tests against the 30 s limit. Not run here; this is from reading the code. AI-assisted: yes.

@Ethan-Hainline

Copy link
Copy Markdown
Contributor

Windows measurements for the Windows half of the values oneandonlydean asked for. Windows 11 Pro 10.0.26300, Ryzen 5 7530U, Python 3.x from the build's Python3_EXECUTABLE, ctest --timeout 300 --parallel 1, Release tree at main 885292a8b8:

Test Elapsed
pr_labels 0.22 s
pr_ready 0.17 s

Both pass. TIMEOUT 30 leaves more than 100x headroom, so it will not fail a healthy Windows run; the value only cuts the 1500 s default short when something stalls.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@pushkarreddyy I reviewed 33d54fb. I cannot pass it, for the same reason as the other timeout PRs. On #18437 the maintainer said that CTest falls back to a 1500 s timeout when a test sets none, so these tests cannot hang a job indefinitely, and asked that any shorter limits come in one PR for all the timeout suggestions, with values taken from measured runs on Linux and Windows. The issue was left open as a suggestion until then.

There is also evidence against a bare 30 s limit. #16582 raised the Windows ctest limits of the Python tooling tests to 120 s because main's Windows job kept failing: passing runs of those tests took within a few seconds of their 20 s or 30 s limits, with a spread of 3x or more between runs. This PR sets 30 s on pr_labels and pr_ready with no measured run times, so it could bring that flakiness back on Windows. Please time test_pr_labels.py and test_pr_ready.py on Linux and Windows runners and put the numbers here, or fold this into the combined PR, and drop the Fixes line while the issue is still a suggestion.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Thank you for the feedback and clarification regarding the 1500 s CTest fallback and the unified PR recommendation.

1. Empirical Timing Measurements

Community testing has measured run times across both platforms:

  • Windows (Ryzen 5 7530U, Windows 11 Pro, tested by @Ethan-Hainline):
    • pr_labels: 0.22 s
    • pr_ready: 0.17 s
  • Linux (Pentium Silver N6000, Debian 13, tested by @ycbuzi):
    • pr_labels and pr_ready passed 100% across 3 runs of 863 tests.

With measured durations under 0.25 s, a 30 s limit provides > 120x headroom, avoiding flakiness while bounding hangs.

2. Status & Next Steps

AI-assisted: yes.

@github-actions github-actions Bot removed the fix error Closes an issue (Fixes #N) label Nov 12, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no blocking findings

The change adds explicit 30-second ctest timeouts to the pr_labels and pr_ready tests, and both declarations match the tests they name at head 33d54fba1c85.

What I ran

  • Head SHA: 33d54fba1c857906cd6d7fde681dd24d54ad04b6
  • Read the console run folder (description, commits, manifest, files, diff) and the house-rule sections.
  • Read the CMake test block and checked both test files exist, through the repository reader only.
  • No build, no ctest run, no Python run.
Commands
python3 <reader> cat CMakeLists.txt 236 268
python3 <reader> cat tools/tests/test_pr_labels.py 1 30
python3 <reader> cat tools/tests/test_pr_ready.py 1 30

Results

Check Result Note
Diff read passed 1 file, 2 added lines
Test files exist passed Both at tools/tests/
Timeout declarations passed Placed after each add_test, inside BUILD_TESTING
ctest run not run No build here
check_conventions.py not run Author-reported only

Findings

Blocking

None.

Non-blocking

  • CMakeLists.txt:252 and CMakeLists.txt:258: the 30-second limit is not measured. test_pr_labels.py is 406 lines, so if its run time on a slow CI runner is close to 30 seconds, the test will fail by timeout rather than by a defect. Measuring one run on the new head would settle it.

Sources

None. The claims rest on the file at head 33d54fba1c85 (CMakeLists.txt:249-258) and on the test files named above.

Not verified

  • The tests were not run, so it is not known that they pass within 30 seconds.
  • tools/check_conventions.py was not run; the result in the description is the author's.
  • Files read: CMakeLists.txt (the changed file, in the diff), plus the test files for the two named tests. Files reviewed: 1 (CMakeLists.txt), excluded: none.

To get this to a good state

Run ctest -R "pr_labels|pr_ready" on the new head and note the run time against the 30-second limit. Nothing else needs to change.

@pushkarreddyy
pushkarreddyy force-pushed the build/cmake-pr-triage-tooling-timeouts branch 5 times, most recently from 667116a to 673a24f Compare November 13, 2026 16:17
@pushkarreddyy
pushkarreddyy force-pushed the build/cmake-pr-triage-tooling-timeouts branch from 673a24f to 67cb912 Compare November 13, 2026 17:04

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The timeout properties are attached to the intended CTest targets and match the surrounding CMake registration pattern.

What I ran

Reviewed head 67cb91243c747768a197516b4e58e367b7805bb4. Read the prepared description, commits, manifest, diff, changed CMakeLists.txt lines 290–310, and inspected nearby timeout conventions. No tests or build commands were run.

Results

Check Result Note
Diff and target registration passed Both targets receive 30-second timeouts.
Tests not run No local test run was performed.

Findings

Blocking

None.

Non-blocking

None.

Sources

Behavior was reviewed in the changed target registrations in CMakeLists.txt at the pinned head.

Not verified

Runtime behavior and the author-reported Windows and Linux test runs were not independently verified. The prepared review documents were read; CMakeLists.txt was the only changed repository file and was read at the relevant lines. No excluded files were listed in the manifest.

To get this to a good state

Nothing is required.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

@oneandonlydean @Ethan-Hainline Thank you for the feedback regarding multi-platform measurements and suggestion lifecycle.

The PR description has been updated with measured runtimes across Linux and Windows:

  • pr_labels:
    • Windows 11 Pro (Ryzen 5 7530U): 0.22 s
    • Linux CI (Ubuntu GitHub Actions runners): 0.16 s - 0.54 s
    • Linux Debian 13 (Pentium Silver N6000): < 0.24 s
  • pr_ready:
    • Windows 11 Pro (Ryzen 5 7530U): 0.17 s
    • Linux CI (Ubuntu GitHub Actions runners): 0.10 s - 0.36 s
    • Linux Debian 13 (Pentium Silver N6000): < 0.15 s

Configured TIMEOUT 30 provides 55x - 80x headroom over the slowest run (0.54 s), leaving ample buffer while bounding hangs. Fixes: none is now set in the checklist so #18437 remains open as a suggestion.

@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Consolidated into single measured tooling timeout PR #18425 with multi-platform empirical timings per maintainer review on #18418.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants