Skip to content

bittensor-core e2es#2850

Open
UnArbosSix wants to merge 14 commits into
bittensor-core-explorationfrom
bittensor-core-e2es
Open

bittensor-core e2es#2850
UnArbosSix wants to merge 14 commits into
bittensor-core-explorationfrom
bittensor-core-e2es

Conversation

@UnArbosSix

@UnArbosSix UnArbosSix commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Provide native Rust coverage for the bittensor-core SDK and migrate the Bittensor end-to-end suite to a metadata-driven Rust harness. This validates chain reads, transaction construction, policy enforcement, submission outcomes, and higher-level SDK behavior against the repository's localnet image.

What changed

  • Added a blocking, metadata-driven chain client in sdk/bittensor-core/src/client.rs, including pinned reads, runtime API calls, storage queries, fee estimation, signed submission, receipt decoding, snapshots, block streaming, and MEV-shielded submission.
  • Added semantic transaction intents, wallet roles, policy checks, batching, planning, and execution in sdk/bittensor-core/src/transaction.rs.
  • Extended the shared and Python-facing error mapping for RPC, runtime-availability, and policy failures.
  • Added a 113-case E2E manifest, Rust E2E suite, and localnet support harness under sdk/bittensor-core/tests/.
  • Updated .github/workflows/check-bittensor-e2e-tests.yml to verify manifest completeness, compile the Rust E2E binary once, build the localnet image, and execute each manifest case independently with one retry.

Behavioral impact

The Rust SDK gains native chain access and transaction execution APIs. The E2E workflow now exercises the Rust suite rather than the prior test discovery/execution path. Runtime and pallet behavior are unchanged.

Migration and spec version

No storage migration is required. This PR does not modify runtime or pallet code, and its bittensor-core-exploration base has no network spec-version check, so no spec_version bump is required.

Testing

The workflow compiles bittensor-core-py, compiles the Rust E2E target, verifies that all 113 manifest entries exactly match compiled tests, and runs each test against the fast-runtime localnet artifact, matching the runtime configuration used by the previous Python E2E workflow.

@vercel

vercel Bot commented Jul 10, 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 1:37am

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 thread sdk/bittensor-core/src/transaction.rs Outdated
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

VERY HIGH scrutiny: 10-day-old account with 0 public repos and 11 lifetime contributions; mitigated by repository write access, matching author/committer identity, and no Gittensor association found. Branch: bittensor-core-e2es → bittensor-core-exploration.

Static analysis found no runtime changes, suspicious external dependencies, trusted AI-review instruction modifications, backdoors, or security vulnerabilities. The workflow quotes manifest-derived test names, and the only dependency addition is an existing workspace crate.

Findings

No findings.

Conclusion

No malicious behavior or security vulnerability was found in the current diff.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

UNKNOWN gittensor association; very new contributor with repository write access, so the large SDK and CI surface received heightened static scrutiny.

The prior host-feature and fast-runtime-description concerns remain resolved. No substantive duplicate PR was identified, and no spec-version bump applies to this feature-branch base.

One low-severity CI coverage gap remains: edits to the TypeScript E2E workflow no longer select that workflow’s own E2E job. No runtime confirmation was needed, and no auto-fixes were applied.

Findings

Sev File Finding
LOW .github/workflows/typescript-e2e.yml:46 Workflow edits no longer exercise this E2E job inline

Conclusion

The SDK migration and its Rust E2E coverage remain internally consistent, with only a small workflow self-testing gap to fix. Approved with the inline correction.

@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 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 sdk/bittensor-core/src/client.rs Outdated
@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.

Comment thread .github/workflows/check-bittensor-e2e-tests.yml Outdated
@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: 👍

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

Comment thread .github/workflows/check-bittensor-e2e-tests.yml
@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.

Comment thread .github/workflows/check-bittensor-e2e-tests.yml Outdated
@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.

Comment thread sdk/bittensor-core/src/lib.rs
@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: 👍

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

set -euo pipefail
files=$(gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/files" --paginate --jq '.[].filename')
pattern='^(ts-tests|common|node|pallets|precompiles|primitives|runtime|support|chain-extensions|src|vendor)/|^(Cargo\.(toml|lock)|build\.rs|rust-toolchain\.toml)$|^\.github/workflows/typescript-e2e\.yml$'
# SDK-only lockfile movement is covered by SDK checks; do not run

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.

[LOW] Workflow edits no longer exercise this E2E job

The filter dropped .github/workflows/typescript-e2e.yml itself. As a result, a PR that only changes this workflow—including this filter or the E2E steps below—reports e2e=false, so broken workflow changes can merge without exercising the job they modify. Keep SDK-only Cargo.lock changes excluded, but include the workflow file as an input.

Suggested change
# SDK-only lockfile movement is covered by SDK checks; do not run
pattern='^(ts-tests|common|node|pallets|precompiles|primitives|runtime|support|chain-extensions|src|vendor)/|^(Cargo\.toml|build\.rs|rust-toolchain\.toml)$|^\.github/workflows/typescript-e2e\.yml$'

@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