Skip to content

Added eco-tests for indexer + CI job to notify the indexer team#2624

Open
evgeny-s wants to merge 9 commits into
devnet-readyfrom
eco-tests-indexers
Open

Added eco-tests for indexer + CI job to notify the indexer team#2624
evgeny-s wants to merge 9 commits into
devnet-readyfrom
eco-tests-indexers

Conversation

@evgeny-s
Copy link
Copy Markdown
Collaborator

@evgeny-s evgeny-s commented Apr 29, 2026

Description

This PR adds contract-style tests for the storage maps and runtime APIs consumed by the TAO.com indexer, plus a CI workflow that pings the responsible reviewer(-s) whenever those tests change. It detects storage items, renames, retypes, key shape changes, and runtime api signature changes.

Tested here.

Related Issue(s)

  • Closes #[issue number]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run ./scripts/fix_rust.sh to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

eco-tests changed — indexer review required

This PR modifies files under eco-tests/. and may affect downstream indexing.
cc @evgeny-s — please review manually

Changed files
  • eco-tests/Cargo.toml
  • eco-tests/src/lib.rs
  • eco-tests/src/mock.rs
  • eco-tests/src/tests_taocom_indexer.rs

@evgeny-s evgeny-s added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Apr 29, 2026
Comment thread eco-tests/src/tests_taocom_indexer.rs Outdated
Comment thread eco-tests/src/tests_taocom_indexer.rs
@evgeny-s evgeny-s requested a review from gztensor April 30, 2026 13:17
Comment thread eco-tests/src/tests_taocom_indexer.rs Outdated
Comment thread eco-tests/src/tests_taocom_indexer.rs Outdated
Comment thread eco-tests/src/tests_taocom_indexer.rs Outdated
Comment thread eco-tests/src/tests_taocom_indexer.rs Outdated
Comment thread eco-tests/src/tests_taocom_indexer.rs Outdated
Comment thread eco-tests/src/tests_taocom_indexer.rs Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

BASELINE scrutiny: established write-permission contributor, no Gittensor allowlist match found; branch eco-tests-indexers -> devnet-ready.

Reviewed the new eco-tests notification workflow, test-only runtime API mocks, and eco-tests dependency additions. The workflow is pull_request-scoped, does not use pull_request_target, only writes a sticky comment / review request, and does not execute PR-controlled code beyond listing changed file names. The added dependencies are already present in the workspace or lockfile and are scoped to eco-tests. No .github/ai-review/* or .github/copilot-instructions.md changes are present.

Findings

No findings.

Conclusion

No malicious behavior or security vulnerability was found. The diff is limited to a reviewer-notification workflow and test-only indexer contract coverage.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Static review found this remains scoped to eco-test contract coverage plus a notification workflow; no runtime/pallet behavior changes or spec-version bump requirement.

I reviewed the refreshed diff, PR metadata, prior Auditor comment, author context, dependency lock state, and overlapping PR list from /tmp/ai-review-context. The added eco-tests dependencies are already present in Cargo.lock, the PR body is substantive enough to leave unchanged, and the overlapping PRs touch shared files for unrelated runtime/pallet changes rather than duplicating this indexer-test coverage.

No auto-fixes were needed on this rerun. I did not run broad build/test commands because the diff is test/workflow-only and static review did not surface a finding requiring runtime confirmation.

Findings

No findings.

Conclusion

The PR adds compile-time contract tests for indexer-facing storage/API shapes and a targeted reviewer notification workflow without changing runtime behavior. I found no domain-blocking issues.

@github-actions
Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

Comment thread eco-tests/Cargo.toml
Comment on lines +36 to +38
pallet-subtensor-swap-runtime-api = { path = "../pallets/swap/runtime-api", default-features = false, features = ["std"] }
subtensor-custom-rpc-runtime-api = { path = "../pallets/subtensor/runtime-api", default-features = false, features = ["std"] }
sp-api = { git = "https://github.com/opentensor/polkadot-sdk.git", rev = "7cc54bf2d50ae3921d718736dfeb0de9468539c7", default-features = false, features = ["std"] }
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.

I don't know why the decision was made to have a purely independent crate here but I think we should add it to the workspace so we can use { workspace = true } and centralize the dependencies in the root Cargo.toml. Much easier for upgrade too. Wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants