diff --git a/Cargo.toml b/Cargo.toml index eda8209..323f5a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ # file: Cargo.toml -# version: 143 +# version: 144 [workspace] resolver = "3" members = ["crates/ksp-app-config-desk", "crates/ksp-config-lib", "crates/ksp-core-lib", "crates/ksp-logging-lib", "crates/ksp-onchain-transport-lib", "crates/ksp-wallet-lib"] [workspace.package] -version = "0.2.5-pre.2" +version = "0.2.5-pre.2.fix.1" edition = "2024" license = "MIT" repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project" diff --git a/crates/ksp-wallet-lib/src/metadata.rs b/crates/ksp-wallet-lib/src/metadata.rs index 6c7f59d..124c33d 100644 --- a/crates/ksp-wallet-lib/src/metadata.rs +++ b/crates/ksp-wallet-lib/src/metadata.rs @@ -1,5 +1,5 @@ // file: crates/ksp-wallet-lib/src/metadata.rs -// version: 1 +// version: 2 /// One protected Wallet note exposed only after VIEW or OWNER authorization. #[derive(Clone, Eq, PartialEq)] @@ -77,7 +77,7 @@ impl std::fmt::Debug for WalletInfo { .field("format_version", &self.format_version) .field("capability", &self.capability) .field("pubkey", &self.pubkey) - .field("alias", &self.alias.as_ref().map(|_| "")) + .field("alias", &self.alias.as_ref().map(|_| return "")) .field("note_count", &self.notes.len()) .finish(); } diff --git a/deltas/0.2.5/pre.002-fix.001.md b/deltas/0.2.5/pre.002-fix.001.md new file mode 100644 index 0000000..7661a4b --- /dev/null +++ b/deltas/0.2.5/pre.002-fix.001.md @@ -0,0 +1,140 @@ + + + +# Delta `0.2.5-pre.002-fix.001` — conformité Clippy `implicit_return` de la projection Wallet + +## Base requise + +```text +livraison : 0.2.5-pre.002 +workspace.package.version = "0.2.5-pre.2" +``` + +La base de ce correctif est explicitement l'archive Gitea fournie par l'opérateur après ses modifications locales : + +```text +khadhroony-solana-project-v0.2.5-pre.002-from-gitea.zip +``` + +Elle remplace comme référence de travail tout paquet d'échange `pre.002` antérieur de la session. Le delta historique `deltas/0.2.5/pre.002.md` n'est pas réécrit. + +## Motif + +La validation locale communiquée le 2026-08-19 donne : + +```text +cargo fmt --all OK +cargo check --workspace OK +cargo clippy --workspace --all-targets ECHEC +cargo test -p ksp-wallet-lib OK +``` + +Clippy rejette une unique closure dans `WalletInfo::fmt` au titre de la politique workspace : + +```text +-D clippy::implicit-return +``` + +Le code concerné est la redaction de l'alias dans `Debug` : + +```rust +.map(|_| "") +``` + +La politique KSP exige un `return` explicite également dans cette closure. + +## Correction + +La closure devient uniquement : + +```rust +.map(|_| return "") +``` + +Aucun comportement Wallet, aucune capability VIEW/OWNER, aucune projection publique, aucune redaction, aucune dépendance et aucun contrat du format `.kspwallet` ne changent. + +## Version Cargo + +Le correctif modifie une source Rust participant au build. Conformément à `VER-ID-007` et `VER-ID-010` : + +```text +0.2.5-pre.2 -> 0.2.5-pre.2.fix.1 +``` + +## Fichiers modifiés + +```text +Cargo.toml +crates/ksp-wallet-lib/src/metadata.rs +``` + +## Fichiers ajoutés + +```text +deltas/0.2.5/pre.002-fix.001.md +``` + +## Fichiers supprimés + +Aucun. + +## Fichiers volontairement inchangés + +```text +deltas/0.2.5/pre.002.md +docs/plans/012-V0_2_5_WALLET_FOUNDATION_PLAN.md +ROADMAP.md +CHANGELOG.md +crates/ksp-wallet-lib/src/capability.rs +crates/ksp-wallet-lib/src/constants.rs +crates/ksp-wallet-lib/src/error.rs +crates/ksp-wallet-lib/src/lib.rs +crates/ksp-wallet-lib/src/owner.rs +crates/ksp-wallet-lib/src/password.rs +crates/ksp-wallet-lib/src/view.rs +crates/ksp-wallet-lib/unit_tests/** +crates/ksp-wallet-lib/tests/** +``` + +Aucun delta historique n'est réécrit. + +## Validations déjà exécutées sur la base par l'opérateur + +Avant le correctif : + +- `cargo fmt --all` : OK ; +- `cargo check --workspace` : OK ; +- `cargo clippy --workspace --all-targets` : échec uniquement sur `clippy::implicit_return` dans `metadata.rs` ; +- `cargo test -p ksp-wallet-lib` : OK : + - 7 unit tests ; + - 2 dependency-boundary tests ; + - 4 public API tests ; + - 2 doctests `compile_fail`. + +## Validation attendue après application + +```bash +cargo fmt --all +cargo check --workspace +cargo clippy --workspace --all-targets +cargo test -p ksp-wallet-lib +``` + +Résultat attendu : les quatre commandes réussissent sans régression et les `15` contrôles Wallet déjà validés restent verts. + +## Décisions + +- conserver la redaction `Debug` existante ; +- respecter la règle workspace de retour explicite sans ajouter de `#[allow]` ; +- ne pas élargir le périmètre fonctionnel de `pre.002` ; +- poursuivre avec `0.2.5-pre.003` après validation du fix. + +## Questions ouvertes + +Aucune nouvelle question ouverte introduite par ce correctif. + +## Commit attendu + +```text +v0.2.5-pre.002-fix.001 +```