From 63e1a866a33f89bae8e7ae773efce237cc2de87f Mon Sep 17 00:00:00 2001 From: SinuS Von SifriduS Date: Tue, 8 Sep 2026 12:51:16 +0200 Subject: [PATCH] v0.3.11-pre.008-fix.001 --- Cargo.toml | 2 +- .../src/runtime.rs | 10 +- deltas/0.3.11/pre.008-fix.001.md | 100 ++++++++++++++++++ 3 files changed, 106 insertions(+), 6 deletions(-) create mode 100644 deltas/0.3.11/pre.008-fix.001.md diff --git a/Cargo.toml b/Cargo.toml index 891550c..db30dfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "3" members = ["crates/ksp-app-backfill-desk", "crates/ksp-app-config-desk", "crates/ksp-app-solprices-desk", "crates/ksp-app-store-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-interface-lib", "crates/ksp-job-api", "crates/ksp-job-backfill-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-program-api", "crates/ksp-raw-transaction-lib", "crates/ksp-store-api", "crates/ksp-store-lib", "crates/ksp-store-postgres-lib", "crates/ksp-wallet-lib", "crates/ksp-worker-api", "crates/ksp-worker-raw-transaction-ingest-lib"] [workspace.package] -version = "0.3.11-pre.8" +version = "0.3.11-pre.8.fix.1" edition = "2024" license = "MIT" repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project" diff --git a/crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs b/crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs index 5935cea..de0e846 100644 --- a/crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs +++ b/crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs @@ -1,5 +1,5 @@ // file: crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs -// version: 5 +// version: 6 type PersistencePort = std::sync::Arc; type PersistenceTasks = tokio::task::JoinSet>; @@ -173,10 +173,10 @@ async fn drain_admission_and_persistence( if !spawned && fault.is_none() { fault = std::option::Option::Some(crate::ERROR_CODE_RAW_TRANSACTION_INGEST_RUNTIME_INVALID); } - if let std::result::Result::Err(error) = published { - if fault.is_none() { - fault = std::option::Option::Some(error.code()); - } + if let std::result::Result::Err(error) = published + && fault.is_none() + { + fault = std::option::Option::Some(error.code()); } }, std::result::Result::Ok(std::option::Option::None) => break, diff --git a/deltas/0.3.11/pre.008-fix.001.md b/deltas/0.3.11/pre.008-fix.001.md new file mode 100644 index 0000000..83c6005 --- /dev/null +++ b/deltas/0.3.11/pre.008-fix.001.md @@ -0,0 +1,100 @@ + + + +# Delta `0.3.11-pre.008-fix.001` — correction Clippy du traitement de publication snapshot + +## Base requise + +```text +0.3.11-pre.008 +workspace.package.version = 0.3.11-pre.8 +``` + +## Défaut opérateur constaté + +Le gate opérateur du 8 septembre 2026 confirme que `cargo fmt --all`, les audits Rust/Markdown, `cargo check --workspace` et tous les tests de `ksp-worker-raw-transaction-ingest-lib` passent, mais que `cargo clippy --workspace --all-targets --all-features -- -D warnings` rejette un `if` imbriqué dans `src/runtime.rs`. + +Diagnostic exact : + +```text +crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs:176:17 +clippy::collapsible_if +``` + +Le code traitait une erreur de publication snapshot puis testait séparément `fault.is_none()`. Clippy exige la forme conditionnelle fusionnée. + +## Objectif + +Corriger strictement `pre.008` sans modifier son comportement : même erreur, même priorité du premier fault, mêmes snapshots, mêmes compteurs, même lifecycle et même runtime. Aucune dépendance, feature ou surface publique n'est modifiée. + +## Version + +Le correctif touche un fichier Rust de production. Conformément aux règles de version applicables aux corrections code/build : + +```text +identifiant de livraison : 0.3.11-pre.008-fix.001 +workspace.package.version : 0.3.11-pre.8.fix.1 +``` + +## Modification + +Le traitement fautif devient la forme équivalente acceptée par Clippy : + +```rust +if let Result::Err(error) = published + && fault.is_none() +{ + fault = Option::Some(error.code()); +} +``` + +La sémantique reste identique : une erreur de publication snapshot ne remplace jamais un fault déjà fixé. + +## Fichiers ajoutés + +```text +deltas/0.3.11/pre.008-fix.001.md +``` + +## Fichiers modifiés + +```text +Cargo.toml +crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs +``` + +## Fichiers supprimés + +Aucun. + +## Validations exécutées dans l'environnement d'assemblage + +```text +python3 scripts/audit_rust_workspace_rules.py +python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas +scan statique : le nested-if signalé n'existe plus +scan statique : aucune dépendance/feature ni surface publique modifiée +``` + +L'environnement d'assemblage ne fournit ni `cargo`, ni `rustc`, ni `rustfmt`. Aucun gate Cargo du fix n'est déclaré PASS localement. + +## Gate opérateur demandé + +Aucune dépendance ni feature n'étant modifiée, aucun `cargo tree` n'est requis pour ce fix. + +```bash +cargo fmt --all +python3 scripts/audit_rust_workspace_rules.py +python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas +cargo check --workspace +cargo clippy --workspace --all-targets --all-features -- -D warnings +cargo test -p ksp-worker-raw-transaction-ingest-lib +``` + +## Décision + +`pre.009` reste bloquée jusqu'à validation opérateur verte de ce fix. Le périmètre de `pre.008` n'est pas redéfini. + +## Questions ouvertes + +Aucune.