Skip to content

ci: run the runner-select gate on the light runner pool - #5747

Merged
QuantumExplorer merged 2 commits into
v5.1-devfrom
claude/ci-performance-analysis-0cda8c
Nov 3, 2026
Merged

QuantumExplorer merged 2 commits into
v5.1-devfrom
claude/ci-performance-analysis-0cda8c

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Basic explanation

What this does: Before the Rust tests start, a tiny job ("Select compatible runner image") picks which of our own runners should run them. That job ran on GitHub's shared runners. This PR moves it to our own light runners, so the Rust tests no longer queue at GitHub just to get started.

Value: The dashpay organization is on GitHub's Free plan, which runs at most 20 GitHub-hosted jobs at once across all our repositories, and Dash Core's CI often fills them. In the busy weeks of October the slowest tenth of these jobs waited 15 to 32 minutes for a hosted slot, for a job that runs about ten seconds, and that wait sat directly in front of the Rust test suite.

Risks: Low. The job now depends on the light pool, like check-secrets already does: if the pool is down, the Rust tests wait until it is back or until DASH_LIGHT_RUNNER is pointed at ubuntu-latest. A PR that edits .github/runner-requirements.json keeps the hosted runner, because the job then waits up to two hours for a candidate image and light jobs are capped at 60 minutes. Untrusted fork PRs are unaffected, since this job already skips them.

Issue being fixed or feature implemented

A look at 60 days of platform CI history (Sep 4 to Nov 3) found that our self-hosted runners almost never queue, while GitHub-hosted jobs do: 17% of them waited more than 10 minutes. Two sub-minute hosted jobs gate the self-hosted Rust tests, "Determine changed packages" and "Select compatible runner image". From a push to the Rust tests starting, the slowest tenth of runs took 7 to 14 minutes in September and 34 to 84 minutes in the busy October weeks.

This PR moves the second gate. Moving the first needs PyYAML and yq on the light image, so it follows in a separate PR once that image is deployed.

What was done?

  • tests-rs-workspace.yml and tests-rs-wallet.yml: a new boolean input, runner-image-changed, defaulting to true so a caller that does not set it keeps the hosted runner. select-runner runs on vars.DASH_LIGHT_RUNNER unless it is true.
  • tests.yml: the changes job reports runner-image-changed from the existing paths filter (.github/runner-requirements.json) and passes it to the Rust callers with the same fail-safe as shielded-changed: anything but an explicit 'false' means hosted. The ARM64 validation job passes false, since ARM64 selection never waits for a candidate image.

Where "Select compatible runner image" runs:

Before
  every event                                        -> ubuntu-24.04

After
  PR that does not touch runner-requirements.json    -> dash-x64-light
  PR that edits .github/runner-requirements.json     -> ubuntu-24.04 (may wait for a candidate image)
  push, schedule                                     -> dash-x64-light
  workflow_dispatch (path filters are skipped)       -> ubuntu-24.04
  ARM64 runner image validation                      -> dash-x64-light

How Has This Been Tested?

  • python3 -m unittest discover -s .github/scripts/tests: 66 tests pass locally. The other 4 need node, which this machine lacks; they run in the changes job.
  • The Swift self-hosted runner policy check passes.
  • Parsed the three workflows and checked the resulting runs-on expressions and input values.
  • This PR's own Tests run exercises the change: its "Select compatible runner image" job should run on a dash-x64-light runner and the Rust tests should start right after it.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • My Rust, FFI, WASM, Swift or Kotlin changes follow the coding conventions
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request
  • If I added or changed a system contract's document schemas, I checked the contract viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · 443e238

  • Bots — thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Reviewer requests paused — your 5 review slots are occupied; this PR is excluded from reviewers' queues. Required approvals still count without a slot.
  • Build running
  • Approvals
    • github (.github/scripts/tests/test_select_runner_routing.py, .github/workflows/tests-rs-wallet.yml, .github/workflows/tests-rs-workspace.yml and 1 more) — ktechmidas or shumkov

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

The Rust workspace and wallet tests run on self-hosted runners, but the
"Select compatible runner image" job in front of them ran on a
GitHub-hosted runner. Every dashpay repository shares the Free plan's 20
concurrent GitHub-hosted jobs, so in busy weeks this job, which runs for
about ten seconds, waited 15 to 30 minutes or more before the
self-hosted tests could start.

Run it on vars.DASH_LIGHT_RUNNER. A pull request that edits
.github/runner-requirements.json keeps it on a GitHub-hosted runner,
because it then waits for a candidate image for longer than a light job
may run. The new runner-image-changed input defaults to true, so a
caller that does not set it keeps the hosted runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 52daf21 and 443e238.

Files selected for processing: 4
  • .github/scripts/tests/test_select_runner_routing.py
  • .github/workflows/tests-rs-wallet.yml
  • .github/workflows/tests-rs-workspace.yml
  • .github/workflows/tests.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@github-actions github-actions Bot added this to the v5.1.0 milestone Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 3, 2026
@thepastaclaw

thepastaclaw commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 443e238) · triage: low

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Phase 1 + Phase 2

The runner-routing change preserves hosted execution for potential AMD64 candidate-image waits, retains the existing trust guards, and safely handles omitted inputs and unset runner variables. At head 65a25bf, CI confirms that the selector passed on dash-x64-light in 32 seconds and the Rust workspace tests passed; Swift and some Docker builds remain pending. No blocking defects were found; one non-blocking suggestion would add automated coverage for the new routing safeguards.

🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — The change is a small, contained CI routing adjustment across three workflows with explicit fail-safe defaults and no application behavior changes.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 98% left, weekly 81% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `.github/workflows/tests-rs-workspace.yml`:
- [SUGGESTION] .github/workflows/tests-rs-workspace.yml:18-20: Add structural coverage for the runner-routing safeguards
  The existing runner-image tests exercise candidate selection, but none checks the new workflow input defaults or caller wiring. This PR's successful CI run demonstrates the ordinary light-pool path, not the hosted fallback needed for a candidate wait of up to 7200 seconds. Add structural assertions covering both reusable workflows' default true and hosted fallback, plus tests.yml's AMD64 manifest filter and fail-safe input propagation. That would protect the new guarantee that potentially long candidate waits stay off the time-limited light pool.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 3, 2026
runner-image.py select can wait up to two hours for a PR's candidate
image, longer than a dash-x64-light job may run. The new structural test
fails if any selector job reaches the light pool without the
runner-image-changed guard, if the guard input stops defaulting to true,
if the changes job stops flagging the exact manifest the selector waits
on, or if an AMD64 caller passes anything less safe than the fail-safe
expression. It reads the workflows as text, so it needs no PyYAML.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed labels Nov 3, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-review — Final validation — Phase 1 + Phase 2

Verified the complete diff at 443e238 and found no actionable issues. The routing conservatively keeps potential candidate-image waits on hosted runners, and the new structural tests address the prior coverage finding. Current-head runner-contract-tests passed in CI; Determine changed packages and select-runner remain pending, so end-to-end routing execution is not yet confirmed.

🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, contained CI routing change with conservative hosted-runner fallbacks and focused regression tests, whose correctness is straightforward to confirm.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 91% left, weekly 80% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.

No unresolved findings remain from the prior review on this head.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 3, 2026
@QuantumExplorer
QuantumExplorer merged commit 33d78e7 into v5.1-dev Nov 3, 2026
21 of 22 checks passed
@QuantumExplorer
QuantumExplorer deleted the claude/ci-performance-analysis-0cda8c branch November 3, 2026 18:28
shumkov added a commit that referenced this pull request Nov 4, 2026
Brings #5636, #5681, #5715, #5718, #5747 and #5748.

Conflicts:
- book/src/sdk/protocol-version-gate.md: #5636 rewrote the page and moved
  the decision rules to protocol-versions.md. The merge takes #5636's
  page and keeps #5615's getIdentityByNonUniquePublicKeyHash row, whose
  declaration in rs-dapi-client is still there. #5615's paragraph about
  other protocol 14 additions goes: #5636's getDocuments row now lists
  the document features nodes at 13 refuse.
- rs-dapi-client/tests/request_inventory.rs: #5636 makes document
  requests declare nothing and #5615 adds the V1 non-unique lookup's
  Gate(14). The spelled-out test keeps both: it is now
  should_need_protocol_14_only_for_token_pool_and_non_unique_v1_requests.
- rs-sdk/src/sdk/protocol_gate_tests.rs: imports. Both sides' imports are
  kept, without SdkInstance and MockDapiClient, which #5755 replaced with
  Sdk::mock_dapi.

Semantic: #5755 removed the file's dapi() helper, and two tests #5636
added call it (fetch_fee_pots_together and
should_let_waiting_calls_ask_when_the_asking_call_is_dropped). They now
use sdk.mock_dapi().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shumkov shumkov mentioned this pull request Nov 4, 2026
13 of 22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants