Skip to content

ci: accelerate runtime, clone, and TypeScript E2E checks#2880

Closed
UnArbosFive wants to merge 29 commits into
mainfrom
codex/typescript-e2e-optimization-test
Closed

ci: accelerate runtime, clone, and TypeScript E2E checks#2880
UnArbosFive wants to merge 29 commits into
mainfrom
codex/typescript-e2e-optimization-test

Conversation

@UnArbosFive

@UnArbosFive UnArbosFive commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

This consolidates the runtime/clone acceleration from #2876 with the TypeScript E2E acceleration developed in this PR.

  • publish daily, finalized and checksummed state snapshots for devnet, testnet, mainnet, and the mainnet clone
  • select snapshots independently by trusted producer workflow, default branch, immutable run/artifact ID, manifest identity, age, and checksum
  • replay cached try-runtime state on GitHub-hosted runners while retaining explicit live-state diagnostic paths
  • build try-runtime wasm and the clone node in parallel, and skip redundant MBM state loading only while MultiBlockMigrator = ()
  • replace three parallel clone initializations with one clone runner; preserve a pristine checkpoint for issuance isolation, then run the remaining regressions together on a newly restored clone
  • use single-node immediate-finality environments for state-focused TypeScript suites while retaining Shield's full six-node consensus topology
  • split Shield into two balanced environments, cap the general E2E matrix at two workers, and preserve the existing required-check name through an aggregate gate
  • harden path classification by executing the trusted base-branch classifier, checking pagination completeness, and classifying both sides of renames

Measured impact

Scope Before After Improvement
Typical PR critical path across these workflows 30m58s ~14m35s ~16m23s / 52.9%
Runtime/clone required gate 30m58s 12m21s 18m37s / 60.1%
Runtime/clone self-hosted runner time 59m43s ~12m04s ~47m39s / 79.8%
Peak clone runners 4 1 75% fewer
TypeScript E2E trigger-to-completion 25m54s 14m35s 11m19s / 43.8%
TypeScript E2E self-hosted runner time 72m05s 42m33s 29m32s / 41.0%
Peak TypeScript E2E runners 6 4 33% fewer
Aggregate self-hosted runner time 131m48s ~54m37s ~77m11s / 58.6%

The combined critical-path estimate assumes the two PR workflows start together and excludes runner queueing. Shield is now the longer of the two measured gates; the runtime/clone gate finishes in about 12 minutes.

Notable component measurements:

  • mainnet snapshot producer: 39m54s -> 21m14s
  • complete three-network snapshot refresh: ~52m -> ~33m
  • cached mainnet try-runtime: 3m45s job time / 6m36s from workflow trigger
  • EVM E2E: 17m30s -> ~6m
  • staking E2E: 17m17s -> 4m22s
  • Shield required check: 17m40s -> 9m33s after the build completes

Security and thoroughness

  • cached snapshots are accepted only from the canonical workflow on the default branch and are bound to producer SHA, network genesis, finalized block, runtime/CLI version, size, and SHA-256 checksum
  • try-runtime consumers make no live-network calls in cached mode; live scraping requires an explicit label or manual input
  • snapshots warn after 36 hours and fail closed after 72 hours; the scheduled producer refreshes them daily and retains seven days of artifacts
  • fork PRs remain barred from persistent self-hosted runners
  • all three runtime networks remain distinct and run independently
  • Shield keeps its production-like six-node topology and all six test files
  • clone issuance still runs from pristine state; the remaining clone smoke, lock, proxy, balancer, and SDK drift checks retain cross-test integration coverage on a separate restored clone
  • required branch-protection check names are preserved

Validation

Integrated verification

  • Runtime Checks passed on the exact combined commit: all three hosted try-runtime checks, release build, snapshot restore, both isolated runtime upgrades, pristine issuance invariant, all nine clone regressions, SDK drift, and the required aggregate gate succeeded. Clone-upgrade completed in 7m28s.
  • TypeScript E2E Tests passed formatting, configuration validation, both builds, both Shield shards and their aggregate gate, staking, dev, subnets, and coldkey-swap. The EVM suite remains red from nonce coordination under parallel test-file execution: the first run failed one test after 75 passes, and the failed-job rerun failed a different test after 87 passes, both with nonce too low.

@vercel

vercel Bot commented Jul 13, 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 13, 2026 11:55am

Request Review

@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 on lines -100 to -101
- variant: release
flags: ""

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] Production-profile E2E coverage is removed

This leaves the workflow building and testing only fast-runtime, whose cadence and constants differ from production. It also removes the release-backed dev and zombienet_shield jobs and replaces the coldkey-swap/subnet multi-validator jobs with single-node variants. Consequently, production-only and consensus/finality regressions can pass this required gate. Keep the benchmark variants alongside the existing matrix, or restore the original coverage before merge as promised in the PR body.

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: VULNERABLE

VERY HIGH scrutiny: 11-day-old account with no public repos; mitigated by repository-admin permission, matching author/committer identity, an internal branch targeting main, and no known Gittensor association.

The snapshot trust path binds artifacts to the canonical default-branch workflow run, producer SHA, manifest identity, and payload checksum. No trusted AI-review instruction files or dependencies are modified.

Findings

Sev File Finding
HIGH .github/workflows/typescript-e2e.yml:211 Require successful Shield prerequisites inline

Prior-comment reconciliation

  • a06c11bd: not addressed — The condition still rejects only failure and cancelled; skipped Shield prerequisites pass the required aggregate gate.

Conclusion

There is no evidence of malicious intent, but the replacement required Shield gate still accepts skipped prerequisites and can report success without running the security regression suite.


📜 Previous run (superseded)
Sev File Finding Status
HIGH .github/workflows/typescript-e2e.yml:219 Require successful Shield prerequisites ➡️ Carried forward to current findings
The condition still rejects only failure and cancelled; skipped Shield prerequisites pass the required aggregate gate.

🔍 AI Review — Auditor (domain review)

VERDICT: 👎

Gittensor association UNKNOWN; repository admin with a new public profile, so review relied on implementation and CI invariants rather than profile history.

The updated PR body resolves the prior description discrepancy. The E2E configuration validator passes, git diff --check is clean, and no runtime change or spec_version bump is involved. However, the replacement required Shield check can report success when its prerequisites were skipped.

Findings

Sev File Finding
HIGH .github/workflows/typescript-e2e.yml:214 Require successful Shield prerequisites inline

Conclusion

The sharding design is coherent, but the aggregate required check must fail unless both the build and Shield shards explicitly succeeded.

@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.

matrix:
include:
- variant: release
flags: ""

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] Production-profile E2E coverage is removed

This still deletes the release-runtime build and replaces the existing release/multi-validator test matrix with fast-runtime single-node variants. Those variants do not exercise production compilation or multi-validator consensus behavior, so regressions can pass this required workflow undetected. Restore the existing coverage before making the PR mergeable; run benchmark variants alongside it or in a separate temporary workflow.

@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.

include:
- variant: release
flags: ""
- variant: fast

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] Production-profile E2E coverage is removed

The build matrix now contains only the fast-runtime binary, while the test matrix drops the release-only and original multi-validator suites. This removes coverage capable of detecting production-configuration and consensus/finality regressions before merge. Restore the release build and full E2E matrix before this draft becomes mergeable.

@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.

Comment thread .github/workflows/typescript-e2e.yml Outdated
matrix:
include:
- test: dev
- test: zombienet_evm_single

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] Production-profile E2E coverage remains removed

The replacement matrix no longer runs dev, zombienet_staking, zombienet_coldkey_swap, zombienet_subnets, or the original multi-validator zombienet_evm suite. This weakens the required CI gate for runtime, staking, subnet, and consensus-sensitive changes. Restore the production-profile matrix before this experimental PR becomes mergeable.

@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.

"type": "zombie",
"zombieSpec": {
"configPath": "./configs/zombie_node.json",
"configPath": "./configs/zombie_single_node.json",

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] Multi-validator E2E coverage remains removed

This moves the staking suite—and the same change below moves coldkey-swap, EVM, and subnet suites—from three validators to one immediately-finalized node. Those required checks therefore stop exercising validator propagation, finality lag, and topology-dependent behavior; retaining Shield alone does not cover suite-specific interactions under those conditions. Keep the multi-validator environments in the mergeable workflow, or add equivalent multi-validator jobs alongside these benchmark variants.

@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.

"type": "zombie",
"zombieSpec": {
"configPath": "./configs/zombie_node.json",
"configPath": "./configs/zombie_single_node.json",

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] Multi-validator E2E coverage remains removed

Staking, coldkey-swap, EVM, and subnet tests now run against one immediately-finalized validator instead of the prior three-validator topology. This prevents those suites from detecting regressions involving GRANDPA finality, validator propagation, or behavior that differs across nodes. Keep the optimized single-node variants as additional benchmark jobs, but retain merge-blocking multi-validator coverage for these suites.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@UnArbosFive UnArbosFive force-pushed the codex/typescript-e2e-optimization-test branch from 682dde3 to 028c451 Compare July 13, 2026 11:37
@UnArbosFive UnArbosFive force-pushed the codex/typescript-e2e-optimization-test branch from 028c451 to ff30727 Compare July 13, 2026 11:54
@UnArbosFive UnArbosFive changed the title ci: accelerate TypeScript E2E tests ci: accelerate runtime, clone, and TypeScript E2E checks Jul 13, 2026
@UnArbosFive UnArbosFive deleted the codex/typescript-e2e-optimization-test branch July 13, 2026 11:54
@UnArbosFive UnArbosFive restored the codex/typescript-e2e-optimization-test branch July 13, 2026 11:55
@UnArbosFive UnArbosFive reopened this Jul 13, 2026

@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 on lines +213 to +214
exit 1
fi

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] Require successful Shield prerequisites

This required aggregate check only rejects failure and cancelled, so build=skipped and run-shield-tests=skipped produce a successful required check even when E2E-relevant changes receive no Shield coverage—for example when the non-fork prerequisite skips. Fail closed unless both prerequisites succeeded; if docs-only skipping must pass, include the path-classification result and explicitly validate that case.

Suggested change
exit 1
fi
if [[ "$BUILD_RESULT" != "success" || "$SHIELD_RESULT" != "success" ]]; then

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@UnArbosFive UnArbosFive deleted the codex/typescript-e2e-optimization-test branch July 13, 2026 12:13
@UnArbosFive UnArbosFive restored the codex/typescript-e2e-optimization-test branch July 13, 2026 12:21
@UnArbosFive UnArbosFive reopened this Jul 13, 2026

@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 on lines +210 to +211
if [[ "$BUILD_RESULT" == "failure" || "$BUILD_RESULT" == "cancelled" || \
"$SHIELD_RESULT" == "failure" || "$SHIELD_RESULT" == "cancelled" ]]; then

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] Require successful Shield prerequisites

This rejects only failure and cancelled, so a skipped build or Shield matrix still makes the required aggregate check succeed. Fail closed unless both prerequisites are success; permit an intentional irrelevant-PR skip only by explicitly checking the trusted change-classification result.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: VULNERABLE

@UnArbosFive UnArbosFive deleted the codex/typescript-e2e-optimization-test branch July 13, 2026 12:23
@UnArbosFive

Copy link
Copy Markdown
Contributor Author

Superseded by #2882 after renaming the combined head branch to codex/accelerate-runtime-and-e2e-ci.

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