diff --git a/Cargo.toml b/Cargo.toml index 709e14a..ccdf6af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ # file: Cargo.toml -# version: 270 +# version: 271 [workspace] resolver = "3" members = ["crates/ksp-app-config-desk", "crates/ksp-app-wallet-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-logging-lib", "crates/ksp-offchain-transport-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-wallet-lib"] [workspace.package] -version = "0.2.11-pre.2.fix.1" +version = "0.2.11-pre.2.fix.2" edition = "2024" license = "MIT" repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project" diff --git a/crates/ksp-offchain-transport-lib/tests/dependency_boundary.rs b/crates/ksp-offchain-transport-lib/tests/dependency_boundary.rs index 0600626..ff47819 100644 --- a/crates/ksp-offchain-transport-lib/tests/dependency_boundary.rs +++ b/crates/ksp-offchain-transport-lib/tests/dependency_boundary.rs @@ -1,5 +1,5 @@ // file: crates/ksp-offchain-transport-lib/tests/dependency_boundary.rs -// version: 2 +// version: 3 #![warn(missing_docs)] #![deny(unreachable_pub)] @@ -20,7 +20,7 @@ fn pre_002_manifest_keeps_foundation_provider_and_config_independent() { assert!(!manifest.contains("jupiter")); assert!(!manifest.contains("birdeye")); assert!(!manifest.contains("dexscreener")); - assert!(!manifest.lines().any(|line| line.trim_start().starts_with("tracing ="))); + assert!(!manifest.lines().any(|line| return line.trim_start().starts_with("tracing ="))); let crate_root = include_str!("../src/lib.rs"); assert!(crate_root.contains("mod constants;")); assert!(crate_root.contains("mod market_price_decimal;")); diff --git a/deltas/0.2.11/pre.002-fix.002.md b/deltas/0.2.11/pre.002-fix.002.md new file mode 100644 index 0000000..b3cb43b --- /dev/null +++ b/deltas/0.2.11/pre.002-fix.002.md @@ -0,0 +1,93 @@ + + + +# Delta `0.2.11-pre.002-fix.002` — conformité Clippy `implicit_return` + +## 1. Base requise + +Ce delta s'applique après : + +```text +v0.2.10 ++ 0.2.11-pre.001 ++ 0.2.11-pre.001-fix.001 ++ 0.2.11-pre.002 ++ 0.2.11-pre.002-fix.001 +``` + +La version Cargo attendue avant application est : + +```text +0.2.11-pre.2.fix.1 +``` + +## 2. Motif du correctif + +La validation opérateur de `pre.002-fix.001` est propre pour `cargo fmt`, les audits Rust/Markdown et `cargo check --workspace`. Le test ciblé `cargo test -p ksp-offchain-transport-lib` passe également avec 13 tests réussis. + +Le gate : + +```bash +cargo clippy --workspace --all-targets +``` + +échoue toutefois sur un unique diagnostic dans `crates/ksp-offchain-transport-lib/tests/dependency_boundary.rs` : + +```text +clippy::implicit-return +``` + +La closure passée à `Iterator::any` doit utiliser un `return` explicite conformément à la configuration Clippy du workspace. + +## 3. Correction + +Le canari de dépendance conserve exactement la même vérification — absence d'une dépendance directe `tracing = ...` — mais adopte la forme KSP déjà utilisée dans d'autres tests : + +```rust +|line| return line.trim_start().starts_with("tracing =") +``` + +Aucune logique runtime, aucun contrat public et aucune taxonomie de module ne sont modifiés. + +## 4. Version technique + +Comme le correctif modifie un fichier Rust, `VER-ID-007` et `VER-ID-010` imposent la synchronisation du workspace sur : + +```text +0.2.11-pre.2.fix.2 +``` + +Le `Cargo.toml` racine est donc modifié dans ce delta. + +## 5. Validations opérateur demandées + +```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/0.2.11 +cargo check --workspace +cargo clippy --workspace --all-targets +cargo test -p ksp-offchain-transport-lib +cargo test --workspace +``` + +Le gate de sortie exige notamment un `cargo clippy --workspace --all-targets` sans warning ni erreur. + +## 6. Scope inchangé + +`pre.002-fix.002` ne fait pas avancer `pre.003`. Aucun client HTTP, aucun limiter actif, aucun adapter provider et aucune nouvelle dépendance réseau ne sont introduits. + +## 7. Fichiers modifiés + +```text +Cargo.toml +crates/ksp-offchain-transport-lib/tests/dependency_boundary.rs +docs/plans/018-V0_2_11_OFFCHAIN_PRICE_TRANSPORT_PLAN.md +docs/validation/014-V0_2_11_OFFCHAIN_PRICE_TRANSPORT.md +``` + +## 8. Fichier ajouté + +```text +deltas/0.2.11/pre.002-fix.002.md +``` diff --git a/docs/plans/018-V0_2_11_OFFCHAIN_PRICE_TRANSPORT_PLAN.md b/docs/plans/018-V0_2_11_OFFCHAIN_PRICE_TRANSPORT_PLAN.md index 88232bf..2ce7727 100644 --- a/docs/plans/018-V0_2_11_OFFCHAIN_PRICE_TRANSPORT_PLAN.md +++ b/docs/plans/018-V0_2_11_OFFCHAIN_PRICE_TRANSPORT_PLAN.md @@ -1,9 +1,9 @@ - + # Plan `0.2.11` — Off-chain price transport SOL/USD multi-provider -**Statut courant : `0.2.11-pre.002-fix.001` corrige la fondation de `ksp-offchain-transport-lib` avant `pre.003` : rustdocs d'intégration complètes, façade Logging KSP avec target explicite, et classement de la capacité actuelle sous la famille interne `market_price_*`. Le contrat V1 reste limité à SOL/USD et aucun client HTTP/provider n'est encore ajouté.** +**Statut courant : `0.2.11-pre.002-fix.002` ferme le dernier écart Clippy de la fondation avant `pre.003`. Les rustdocs, la façade Logging KSP et la taxonomie interne `market_price_*` restent acquises ; le contrat V1 reste limité à SOL/USD et aucun client HTTP/provider n'est encore ajouté.** ## 1. Base et autorité @@ -670,6 +670,12 @@ Création de la crate et de sa façade publique initiale : `PriceDecimal`, paire Correction des deux warnings `missing_docs` des tests d'intégration, ajout de `ksp-logging-lib` avec `src/constants.rs` et `TRACING_TARGET = "ksp-offchain-transport-lib"`, instrumentation KSP des validations/constructions comportementales, et renommage des modules actuels en `market_price_*` pour préparer les futures familles hétérogènes telles que `swap_quote_*` sans transformer la crate entière en module de prix. +#### `pre.002-fix.002` — Conformité Clippy `implicit_return` + +**Statut : réalisé.** + +Correction du canari `dependency_boundary` pour respecter `-D clippy::implicit-return`, sans changement de contrat ni de comportement runtime. La version technique workspace devient `0.2.11-pre.2.fix.2`. + ### `pre.003` — HTTP REST commun et rate limiting **Statut : planifié.** diff --git a/docs/validation/014-V0_2_11_OFFCHAIN_PRICE_TRANSPORT.md b/docs/validation/014-V0_2_11_OFFCHAIN_PRICE_TRANSPORT.md index 90b9d7d..96a92c9 100644 --- a/docs/validation/014-V0_2_11_OFFCHAIN_PRICE_TRANSPORT.md +++ b/docs/validation/014-V0_2_11_OFFCHAIN_PRICE_TRANSPORT.md @@ -1,5 +1,5 @@ - + # Validation `0.2.11` — Off-chain price transport SOL/USD @@ -77,6 +77,10 @@ Les statuts `PLANNED` restent non validés tant que la tranche correspondante n' | aucune dépendance directe à `tracing` | PASS | | crate-rustdocs présentes dans les tests d'intégration | PASS | +## 3.2 Correctif `0.2.11-pre.002-fix.002` + +Le gate `cargo clippy --workspace --all-targets` de `pre.002-fix.001` a détecté un unique écart `clippy::implicit-return` dans le canari `tests/dependency_boundary.rs`. Le correctif ajoute le `return` explicite attendu dans la closure de `Iterator::any` et synchronise `workspace.package.version` sur `0.2.11-pre.2.fix.2`. Aucun contrat public, comportement runtime ou scope provider n'est modifié. + ## 4. Matrice provider prévue | Provider | SOL/USD V1 | Gratuit V1 | Mode auth prévu | Test déterministe | Smoke live | Statut courant |