Skip to content

fix(relay-load): reuse an Asia load principal set for shards past the fourth - #27403

Merged
Jinwoo-H merged 1 commit into
mainfrom
relay-load-principal-shards
Oct 11, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
relay-load-principal-shards

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​8 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5

Summary

With the load split across two hosted runners (#27402), the second runner's generators are shards 4–7. Staging auth only issues load accounts for shards 0–3, so those four refused to start ("Relay Asia load principal request is invalid", run 38119269024).

Now a shard past the fourth reuses account set shard % 4. Its simulated hosts are still distinct, because each host's id comes from its own peer index, not from the account. With 8 shards × 355 hosts, each account set carries 710 hosts, the same as the proven 4 × 710 run. Nothing changes for 4 or fewer shards.

Why this approach

The limit of four lives in the staging auth service, in another repository. Changing it there is a bigger and slower change for a test-only need. Reusing a set keeps the per-account load at the level already proven.

Test plan

  • node --test on the smoke-token and load tests (the one failure, relay-load-control-peer, is a missing tweetnacl install in my local tree and also happens on main)
  • Staging run with load-runners=2 reaches 2,840 on c4

… fourth

Staging auth mints principal sets for shards 0-3, so the second hosted runner's shards 4-7 were
refused. Their hosts stay distinct by peer index; each set carries the same host count as the
proven 4 x 710 run.
@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6c5d711d-f532-45b9-b691-1b7cbdaa8f3c

📥 Commits

Reviewing files that changed from the base of the PR and between 08c8d30 and 17d395b.


📒 Files selected for processing (2)
  • cloud/dev/scripts/github-smoke-token.mjs
  • cloud/dev/scripts/load-relay-controls.mjs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.



📝 Walkthrough

Walkthrough

The token helper exports RELAY_ASIA_LOAD_PRINCIPAL_SHARDS with a value of 4 and uses it to validate shard indices from 0 through 3. Load controls use the same constant to wrap configured shard indices with modulo before requesting Asia load tokens. The principal count remains unchanged.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 17d39

Load shards beyond the fourth now reuse one of the four staging account sets, and each simulated host keeps a distinct identity. Runs with four or fewer shards behave as before. No merge-blocking risk is identified, although the staging run at 2,840 hosts has not yet been confirmed.

Pre-merge checks | Passed 3 | Failed 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check Warning The description explains the problem, the proposed fix, and the test plan, but it omits several required template sections. It also does not provide an actual linked issue, visual-proof statement, che… Add the missing template sections. Link the actual issue with Fixes #<number>. Add ## ELI5, ## What Changed, ## Visual Proof with N/A and a reason if applicable, ## Testing with platform and verification details, ## Review, `#…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: reusing Asia load principal sets for shards beyond the fourth.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Description check

Explanation

The description explains the problem, the proposed fix, and the test plan, but it omits several required template sections. It also does not provide an actual linked issue, visual-proof statement, checklist status, or the required Testing section details.

Resolution

Add the missing template sections. Link the actual issue with Fixes #&lt;number&gt;. Add ## ELI5, ## What Changed, ## Visual Proof with N/A and a reason if applicable, ## Testing with platform and verification details, ## Review, ## Agent skill upstream boundary, ## Notes, and ## Checklist. Explain the unchecked staging test and complete the required checklist items.


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

  • 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

Comment @coderabbitai help to get the list of available commands.

@Jinwoo-H
Jinwoo-H merged commit c19e2dd into main Oct 11, 2026
22 checks passed
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