Skip to content

ci: accelerate Subtensor CI with R2 sccache and tiered Fireactions pools#2857

Open
UnArbosFive wants to merge 28 commits into
bittensor-core-explorationfrom
codex/fireactions-runner-density-experiment
Open

ci: accelerate Subtensor CI with R2 sccache and tiered Fireactions pools#2857
UnArbosFive wants to merge 28 commits into
bittensor-core-explorationfrom
codex/fireactions-runner-density-experiment

Conversation

@UnArbosFive

@UnArbosFive UnArbosFive commented Jul 12, 2026

Copy link
Copy Markdown

Summary

This is the unified Subtensor CI acceleration change. It supersedes #2855 and combines:

  • Cloudflare R2-backed shared sccache for Rust compilation
  • trusted-writer and fork-safe read-only cache boundaries
  • build-once/fan-out workflow consolidation
  • explicit fireactions-turbo-16 and fireactions-turbo-8 runner lanes
  • retention of the latency-sensitive try-runtime workload on the European AX102 pool

Shared compiler cache

  • configures sccache centrally through the shared Rust setup path
  • reads bucket-scoped R2 configuration from Firecracker MMDS without logging credentials
  • uses read-only credentials for ordinary and pull-request jobs
  • permits writes only for explicitly trusted branch/schedule contexts
  • keeps Cargo registry/git caching while disabling duplicate target-directory caching
  • degrades to ordinary Cargo compilation if MMDS or R2 is unavailable
  • reports sccache --show-stats for cache observability

Runner-density experiment

The ten-machine 9950X experiment is intentionally fixed at:

Pool Machines Runners per machine Total runners
fireactions-turbo-16 4 2 x 16 vCPU / 56 GiB 8
fireactions-turbo-8 6 4 x 8 vCPU / 28 GiB 24

The four PR-critical compile jobs retain 16 cores: cargo test, runtime artifact build, and the amd64/arm64 production binary builds. General Rust checks, Docker packaging, SDK/docs, and e2e build work use the 8-core pool.

Try-runtime remains on fireactions-tryruntime: historical AX102 runs were roughly twice as fast as BHS despite fewer cores, and direct endpoint probes showed materially lower archive-RPC latency. The former Finney-specific label is folded into the same interchangeable AX102 pool.

Observed capacity

On the representative PR run:

  • fireactions-turbo-16: peak 4 concurrent jobs against 8 planned runners
  • fireactions-turbo-8: peak 15 concurrent jobs against 24 planned runners
  • maximum observed initial queue delay: 2 seconds

This is sized for one full PR without runner queuing. Two perfectly aligned PRs can briefly queue up to six 8-core jobs; that contention is part of the density experiment.

Infrastructure dependency

The R2 bucket, MMDS reader configuration, writer secrets, and matching Fireactions pools must remain deployed from the infrastructure repository. Excess compatibility capacity is intentionally excluded from the designed 8/24 runner totals so it can be retired without reducing the experiment pool.

Rollout status

  • cache infrastructure and MMDS delivery are live
  • R2 read hits have been observed from both runner profiles
  • the ten-machine desired layout is inventory-tested with exact fleet-capacity assertions
  • live host changes are applied only while hosts are idle; no running jobs are intentionally interrupted

This PR remains draft until the final live host swaps drain and the combined cache + runner result receives a final review.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
subtensor Ready Ready Preview, Comment Jul 12, 2026 3:54am

Request Review

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH account-age scrutiny, mitigated by repository admin permission and matching authorship; no Gittensor association found; stacked PR targets bittensor-core-exploration.

Static review covered R2 credentials, writer-event restrictions, untrusted PR execution, production artifact publication, runner routing, and review-instruction integrity. No review-instruction files were modified.

Findings

No findings.

Prior-comment reconciliation

  • 2cbe2070: addressed — The branch-specific writer exception remains removed; writer mode permits only push, schedule, or workflow-dispatch events on refs/heads/main.

Conclusion

Writer credentials remain restricted to trusted main events. No security vulnerability or malicious behavior was found.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor association UNKNOWN; the author’s account is new but has repository admin permission, so workflow routing received direct scrutiny.

The implementation otherwise matches the substantive description, and overlapping PRs are upstream/dependent work rather than competing implementations. No runtime change or spec-version bump applies.

Description discrepancy: the body says the PR remains draft, while current metadata reports it as ready for review.

No build or test was run because the remaining issue is statically evident.

Findings

Sev File Finding
MEDIUM .github/workflows/docker.yml:43 Release production build still uses the general pool inline

Prior-comment reconciliation

  • 7f8e5436: not addressed.github/workflows/docker.yml:43 still routes the release production-binary matrix to fireactions-turbo-8.

Conclusion

Approve after applying the runner-label correction so both release production-binary builds retain the documented 16-core lane.


📜 Previous run (superseded)
Sev File Finding Status
MEDIUM .github/workflows/docker.yml:43 Release production build still uses the general pool ➡️ Carried forward to current findings
.github/workflows/docker.yml:43 still routes the release production-binary matrix to fireactions-turbo-8.

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build uses the general 8-core pool

The PR promises to reserve fireactions-turbo for production-binary builds, and the equivalent PR validation build does so, but the release workflow routes this CPU-heavy binary build to fireactions-turbo-8. That contradicts the stated allocation and can lengthen the release critical path. Keep only the image validation and publishing jobs on the 8-core pool.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR says production-binary builds retain the reserved 16-core lane, and the equivalent PR build correctly uses fireactions-turbo. This release job performs the same cross-compiled production build but routes both architectures to the general 8-core pool. Keep the expensive compilation on the documented reserved lane; the image and publish jobs can remain on fireactions-turbo-8.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR says production-binary builds retain the 16-core fireactions-turbo lane, but this production binary matrix is routed to the general 8-core pool. This is the cross-compilation-heavy build the capacity policy explicitly reserves for 16 cores.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR states that production-binary builds retain the reserved 16-core lane, but this release job routes both architecture builds to the general 8-core pool. This contradicts the documented capacity policy and can lengthen release builds or contend with general workloads. Route this compilation job to fireactions-turbo-16; the image-validation and publishing jobs can remain on the 8-core pool.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo-16]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive UnArbosFive changed the title ci: trial 16-core and 8-core Fireactions pools ci: accelerate Subtensor CI with R2 sccache and tiered Fireactions pools Jul 12, 2026
@UnArbosFive UnArbosFive force-pushed the codex/fireactions-runner-density-experiment branch from c157fb5 to db0d556 Compare July 12, 2026 02:11

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR states that both amd64 and arm64 production-binary builds retain 16 cores, but this release matrix still runs them on fireactions-turbo-8. This also diverges from the equivalent PR validation job in check-docker.yml. Route this compile-heavy job to the 16-core pool.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo-16]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR states that both amd64 and arm64 production binary builds retain 16 cores, and the equivalent PR validation job uses fireactions-turbo-16. This release matrix still selects the 8-core pool, contradicting that allocation and potentially doubling latency on the release-critical builds.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo-16]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive UnArbosFive marked this pull request as ready for review July 12, 2026 02:43

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR description says the amd64 and arm64 production-binary builds retain the 16-core lane, but this release workflow routes both builds to the 8-core pool. This also differs from the equivalent PR validation build in check-docker.yml. Route this compile-heavy matrix to fireactions-turbo-16.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo-16]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

This production-binary matrix still runs on the 8-core general lane, contrary to the PR’s stated allocation of the amd64 and arm64 production builds to 16 cores. It also differs from the equivalent matrix in check-docker.yml. Route this compile-heavy release job to the 16-core pool.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo-16]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive UnArbosFive force-pushed the codex/fireactions-runner-density-experiment branch from 163e63a to c5dd58b Compare July 12, 2026 03:15

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR description explicitly assigns both amd64 and arm64 production binary builds to the 16-core lane, but this release matrix still uses fireactions-turbo-8. Route it to the dedicated compile pool to preserve the documented capacity plan and avoid making release builds the exception.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo-16]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive UnArbosFive deployed to sccache-writer July 12, 2026 03:33 — with GitHub Actions Active

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

Comment thread .github/scripts/sccache-configure.sh Outdated
local output_file="$2"

case "${GITHUB_EVENT_NAME:-}:${GITHUB_REF:-}" in
push:refs/heads/main|schedule:refs/heads/main|workflow_dispatch:refs/heads/main|workflow_dispatch:refs/heads/codex/fireactions-runner-density-experiment)

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.

[HIGH] Branch exception exposes the shared-cache writer credential

This permits a workflow dispatched from the PR branch to receive the persistent R2 writer keys. The checked-out branch controls the composite action and every subsequent build step, so approved execution can exfiltrate those keys or poison shared compiler-cache objects later consumed by trusted builds. Environment approval does not constrain what the approved branch code does, and this escape hatch remains reachable after merge. Restrict writer mode to main; benchmark this branch with reader credentials or an isolated disposable bucket.

Suggested change
push:refs/heads/main|schedule:refs/heads/main|workflow_dispatch:refs/heads/main|workflow_dispatch:refs/heads/codex/fireactions-runner-density-experiment)
push:refs/heads/main|schedule:refs/heads/main|workflow_dispatch:refs/heads/main)

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR description explicitly reserves 16 cores for both amd64 and arm64 production binary builds, but this release matrix still uses the 8-core pool. This contradicts the documented runner-density design and can double the compile load assigned to an 8-core runner.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo-16]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive UnArbosFive force-pushed the codex/fireactions-runner-density-experiment branch from a3fa449 to c5dd58b Compare July 12, 2026 04:03

@github-actions github-actions Bot 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.

AI review — see the sticky summary comment for the verdict and the inline comments below for specific findings.

binary:
name: production binary (${{ matrix.platform.arch }})
needs: setup
runs-on: [self-hosted, fireactions-turbo-8]

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.

[MEDIUM] Release production build still uses the general pool

The PR description says the amd64/arm64 production-binary builds retain 16 cores, but this release matrix routes both expensive builds to the 8-core pool. This also differs from the PR validation workflow’s production build. Route this job to fireactions-turbo-16 so the release path matches the documented capacity plan.

Suggested change
runs-on: [self-hosted, fireactions-turbo-8]
runs-on: [self-hosted, fireactions-turbo-16]

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

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