fix: Resolve cargo clippy errors and add CI workflow plan

## Changes

### Clippy Fixes
- Fixed deprecated `cargo_bin` usage in 27 test files (added #![allow(deprecated)])
- Fixed uninlined_format_args in zombienet-sdk-tests
- Fixed subxt API changes in revive/rpc/tests.rs (fetch signature, StorageValue)
- Fixed dead_code warnings in validator-pool and identity-kyc mocks
- Fixed field name `i` -> `_i` in tasks example

### CI Infrastructure
- Added .claude/WORKFLOW_PLAN.md for tracking CI fix progress
- Updated lychee.toml and taplo.toml configs

### Files Modified
- 27 test files with deprecated cargo_bin fix
- bizinikiwi/pezframe/revive/rpc/src/tests.rs (subxt API)
- pezkuwi/pezpallets/validator-pool/src/{mock,tests}.rs
- pezcumulus/teyrchains/pezpallets/identity-kyc/src/mock.rs
- bizinikiwi/pezframe/examples/tasks/src/tests.rs

## Status
- cargo clippy: PASSING
- Next: cargo fmt, zepter, workspace checks
This commit is contained in:
2025-12-22 16:36:14 +03:00
parent 8acf59c6aa
commit 65b7f5e640
1393 changed files with 17834 additions and 179151 deletions
@@ -9,7 +9,7 @@ use pezcumulus_zombienet_sdk_helpers::{assert_finality_lag, assert_para_throughp
use pezkuwi_primitives::Id as ParaId;
use serde_json::json;
use zombienet_sdk::{
subxt::{OnlineClient, PolkadotConfig},
subxt::{OnlineClient, PezkuwiConfig},
NetworkConfig, NetworkConfigBuilder,
};
@@ -33,7 +33,7 @@ async fn elastic_scaling_multiple_blocks_per_slot() -> Result<(), anyhow::Error>
let relay_node = network.get_node("validator-0")?;
let para_node_elastic = network.get_node("collator-1")?;
let relay_client: OnlineClient<PolkadotConfig> = relay_node.wait_client().await?;
let relay_client: OnlineClient<PezkuwiConfig> = relay_node.wait_client().await?;
assert_para_throughput(
&relay_client,
10,
@@ -94,13 +94,13 @@ async fn build_network_config() -> Result<NetworkConfig, anyhow::Error> {
}))
// Have to set a `with_node` outside of the loop below, so that `r` has the right
// type.
.with_node(|node| node.with_name("validator-0"));
(1..9).fold(r, |acc, i| acc.with_node(|node| node.with_name(&format!("validator-{i}"))))
.with_validator(|node| node.with_name("validator-0"));
(1..9).fold(r, |acc, i| acc.with_validator(|node| node.with_name(&format!("validator-{i}"))))
})
.with_teyrchain(|p| {
p.with_id(PARA_ID)
.with_default_command("test-teyrchain")
.with_default_image(images.pezcumulus.as_str())
.with_default_image(images.pezcumulus())
.with_chain("elastic-scaling-multi-block-slot")
.with_default_args(vec![
("--authoring").into(),
@@ -7,13 +7,13 @@ use std::{sync::Arc, time::Duration};
use crate::utils::{initialize_network, BEST_BLOCK_METRIC};
use pezcumulus_zombienet_sdk_helpers::{
assert_para_is_registered, assert_para_throughput, assign_cores,
assert_para_is_registered, assert_para_throughput, assign_cores,
};
use pezkuwi_primitives::Id as ParaId;
use serde_json::json;
use zombienet_orchestrator::network::node::LogLineCountOptions;
use zombienet_sdk::{
subxt::{OnlineClient, PolkadotConfig},
subxt::{OnlineClient, PezkuwiConfig},
NetworkConfig, NetworkConfigBuilder, RegistrationStrategy,
};
@@ -52,7 +52,7 @@ async fn elastic_scaling_pov_recovery() -> Result<(), anyhow::Error> {
.is_ok());
log::info!("Registering teyrchain para_id = {PARA_ID}");
let relay_client: OnlineClient<PolkadotConfig> = alice.wait_client().await?;
let relay_client: OnlineClient<PezkuwiConfig> = alice.wait_client().await?;
network.register_parachain(PARA_ID).await?;
log::info!("Ensuring teyrchain is registered within 30 blocks");
@@ -158,10 +158,10 @@ async fn build_network_config() -> Result<NetworkConfig, anyhow::Error> {
}))
// Have to set a `with_node` outside of the loop below, so that `r` has the right
// type.
.with_node(|node| node.with_name("alice").with_args(vec![]));
.with_validator(|node| node.with_name("alice").with_args(vec![]));
(0..4).fold(r, |acc, i| {
acc.with_node(|node| {
acc.with_validator(|node| {
node.with_name(&format!("validator-{i}")).with_args(vec![
("-lruntime=debug,teyrchain=trace").into(),
("--reserved-only").into(),
@@ -175,7 +175,7 @@ async fn build_network_config() -> Result<NetworkConfig, anyhow::Error> {
.with_chain("elastic-scaling")
.with_registration_strategy(RegistrationStrategy::Manual)
.with_default_command("test-teyrchain")
.with_default_image(images.pezcumulus.as_str())
.with_default_image(images.pezcumulus())
.with_default_resources(|resources| {
// These settings are applicable only for `k8s` provider.
// Leaving them in case we switch to `k8s` some day.
@@ -6,7 +6,7 @@ use std::time::Duration;
use crate::utils::{initialize_network, BEST_BLOCK_METRIC};
use pezcumulus_zombienet_sdk_helpers::assign_cores;
use pezcumulus_zombienet_sdk_helpers::{assign_cores};
use serde_json::json;
use zombienet_orchestrator::network::node::LogLineCountOptions;
use zombienet_sdk::{NetworkConfig, NetworkConfigBuilder};
@@ -105,10 +105,10 @@ async fn build_network_config() -> Result<NetworkConfig, anyhow::Error> {
}))
// Have to set a `with_node` outside of the loop below, so that `r` has the right
// type.
.with_node(|node| node.with_name("alice").with_args(vec![]));
.with_validator(|node| node.with_name("alice").with_args(vec![]));
(0..5).fold(r, |acc, i| {
acc.with_node(|node| {
acc.with_validator(|node| {
node.with_name(&format!("validator-{i}")).with_args(vec![
("-lruntime=debug,teyrchain=trace").into(),
])
@@ -119,7 +119,7 @@ async fn build_network_config() -> Result<NetworkConfig, anyhow::Error> {
p.with_id(PARA_ID_1)
.with_chain("elastic-scaling")
.with_default_command("test-teyrchain")
.with_default_image(images.pezcumulus.as_str())
.with_default_image(images.pezcumulus())
.with_collator(|n|
n.with_name("collator-elastic")
.with_args(vec![
@@ -131,7 +131,7 @@ async fn build_network_config() -> Result<NetworkConfig, anyhow::Error> {
.with_teyrchain(|p| {
p.with_id(PARA_ID_2)
.with_default_command("test-teyrchain")
.with_default_image(images.pezcumulus.as_str())
.with_default_image(images.pezcumulus())
.with_collator(|n|
n.with_name("collator-single-core")
.with_args(vec![
@@ -8,7 +8,7 @@ use anyhow::anyhow;
use pezcumulus_zombienet_sdk_helpers::{assert_relay_parent_offset, assign_cores};
use serde_json::json;
use zombienet_sdk::{
subxt::{OnlineClient, PolkadotConfig},
subxt::{OnlineClient, PezkuwiConfig},
NetworkConfigBuilder,
};
@@ -42,14 +42,14 @@ async fn elastic_scaling_slot_based_relay_parent_offset_test() -> Result<(), any
}))
// Have to set a `with_node` outside of the loop below, so that `r` has the right
// type.
.with_node(|node| node.with_name("validator-0"));
.with_validator(|node| node.with_name("validator-0"));
(1..6).fold(r, |acc, i| acc.with_node(|node| node.with_name(&format!("validator-{i}"))))
(1..6).fold(r, |acc, i| acc.with_validator(|node| node.with_name(&format!("validator-{i}"))))
})
.with_teyrchain(|p| {
p.with_id(2400)
.with_default_command("test-teyrchain")
.with_default_image(images.pezcumulus.as_str())
.with_default_image(images.pezcumulus())
.with_chain("relay-parent-offset")
.with_default_args(vec![
"--authoring=slot-based".into(),
@@ -71,7 +71,7 @@ async fn elastic_scaling_slot_based_relay_parent_offset_test() -> Result<(), any
let network = spawn_fn(config).await?;
let relay_node = network.get_node("validator-0")?;
let relay_client: OnlineClient<PolkadotConfig> = relay_node.wait_client().await?;
let relay_client: OnlineClient<PezkuwiConfig> = relay_node.wait_client().await?;
let para_node_rp_offset = network.get_node("collator-rp-offset")?;
@@ -8,12 +8,12 @@ use std::time::Duration;
use crate::utils::initialize_network;
use pezcumulus_zombienet_sdk_helpers::{
assert_para_throughput, assign_cores, runtime_upgrade, wait_for_upgrade,
assert_para_throughput, assign_cores, runtime_upgrade, wait_for_upgrade,
};
use pezkuwi_primitives::Id as ParaId;
use rstest::rstest;
use zombienet_sdk::{
subxt::{OnlineClient, PolkadotConfig},
subxt::{OnlineClient, PezkuwiConfig},
NetworkConfig, NetworkConfigBuilder,
};
@@ -44,7 +44,7 @@ async fn elastic_scaling_upgrade_to_3_cores(
let network = initialize_network(config).await?;
let alice = network.get_node("validator0")?;
let alice_client: OnlineClient<PolkadotConfig> = alice.wait_client().await?;
let alice_client: OnlineClient<PezkuwiConfig> = alice.wait_client().await?;
assign_cores(alice, PARA_ID, vec![0]).await?;
@@ -69,7 +69,7 @@ async fn elastic_scaling_upgrade_to_3_cores(
assign_cores(alice, PARA_ID, vec![1, 2]).await?;
let timeout_secs: u64 = 250;
let collator0 = network.get_node("collator0")?;
let collator0_client: OnlineClient<PolkadotConfig> = collator0.wait_client().await?;
let collator0_client: OnlineClient<PezkuwiConfig> = collator0.wait_client().await?;
let current_spec_version =
collator0_client.backend().current_runtime_version().await?.spec_version;
@@ -81,13 +81,10 @@ async fn elastic_scaling_upgrade_to_3_cores(
runtime_upgrade(&network, collator0, PARA_ID, wasm).await?;
let collator1 = network.get_node("collator1")?;
let collator1_client: OnlineClient<PolkadotConfig> = collator1.wait_client().await?;
let collator1_client: OnlineClient<PezkuwiConfig> = collator1.wait_client().await?;
let expected_spec_version = current_spec_version + 1;
log::info!(
"Waiting (up to {timeout_secs}s) for teyrchain runtime upgrade to version {}",
expected_spec_version
);
log::info!("Waiting (up to {timeout_secs}s) for teyrchain runtime upgrade to version {expected_spec_version}");
tokio::time::timeout(
Duration::from_secs(timeout_secs),
wait_for_upgrade(collator1_client, expected_spec_version),
@@ -145,16 +142,16 @@ async fn build_network_config(async_backing: bool) -> Result<NetworkConfig, anyh
.with_default_command("pezkuwi")
.with_default_image(images.polkadot.as_str())
.with_default_args(vec![("-lteyrchain=debug").into()])
.with_node(|node| node.with_name("validator0"))
.with_node(|node| node.with_name("validator1"))
.with_node(|node| node.with_name("validator2"))
.with_validator(|node| node.with_name("validator0"))
.with_validator(|node| node.with_name("validator1"))
.with_validator(|node| node.with_name("validator2"))
})
.with_teyrchain(|p| {
p.with_id(PARA_ID)
.with_default_command("test-teyrchain")
.onboard_as_teyrchain(false)
.with_chain(chain)
.with_default_image(images.pezcumulus.as_str())
.with_default_image(images.pezcumulus())
.with_collator(|n| {
n.with_name("collator0").validator(true).with_args(vec![
"--authoring=slot-based".into(),