fix(#257): remove duplicate imports in oracles_test and add oracle quality gate to CI#346
Merged
hman38705 merged 1 commit intosolutions-plug:mainfrom Mar 28, 2026
Conversation
… add oracle quality gate to CI
Problem
-------
oracles_test.rs imported ErrorCode and OracleConfig explicitly with
use crate::errors::ErrorCode;
use crate::types::OracleConfig;
while also doing 'use super::oracles::*', which already pulls both
symbols into scope via oracles.rs's own top-level use declarations.
The redundant lines are dead imports that clippy -D warnings would
flag as errors, and they signal a hygiene gap in the module.
Additionally, the existing 'clippy' CI job ran in isolation with no
dependency from the test jobs, so a clippy regression in the oracle
module could not block a merge.
Changes
-------
contracts/predict-iq/src/modules/oracles_test.rs
- Remove 'use crate::errors::ErrorCode' (already in scope via glob).
- Remove 'use crate::types::OracleConfig' (already in scope via glob).
.github/workflows/test.yml
- Add 'oracle-quality-gate' job:
1. cargo clippy --package predict-iq --all-features -- -D warnings
with RUSTFLAGS=-D warnings so compiler warnings are also fatal.
2. cargo build --package predict-iq --all-features with the same
RUSTFLAGS, catching any warning the clippy pass might miss.
3. cargo test --package predict-iq --lib oracles to confirm the
oracle unit tests pass as part of the same gate.
- Add 'oracle-quality-gate' to the 'needs' list of 'all-tests-passed'
so the gate is required for every PR targeting main/develop.
|
@temma02 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
oracles_test.rs imported ErrorCode and OracleConfig explicitly with
use crate::errors::ErrorCode;
use crate::types::OracleConfig;
while also doing 'use super::oracles::*', which already pulls both symbols into scope via oracles.rs's own top-level use declarations. The redundant lines are dead imports that clippy -D warnings would flag as errors, and they signal a hygiene gap in the module.
Additionally, the existing 'clippy' CI job ran in isolation with no dependency from the test jobs, so a clippy regression in the oracle module could not block a merge.
Changes
contracts/predict-iq/src/modules/oracles_test.rs
.github/workflows/test.yml
closes #257