143 lines
3.4 KiB
Markdown
143 lines
3.4 KiB
Markdown
<!-- file: deltas/0.2.6/pre.008-fix.001.md -->
|
||
<!-- version: 1 -->
|
||
|
||
# Delta `0.2.6-pre.008-fix.001` — conformité Clippy du staging import Wallet
|
||
|
||
## Base requise
|
||
|
||
```text
|
||
0.2.6-pre.008 appliquée
|
||
workspace.package.version = 0.2.6-pre.8
|
||
```
|
||
|
||
La validation opérateur confirme :
|
||
|
||
```text
|
||
cargo fmt --all OK
|
||
python3 scripts/audit_rust_workspace_rules.py clean
|
||
cargo check --workspace OK
|
||
cargo clippy --workspace --all-targets 2 warnings
|
||
cargo test -p ksp-app-wallet-desk OK
|
||
cargo test --workspace OK
|
||
cargo tauri dev OK
|
||
import Solana CLI JSON réel OK
|
||
unlock VIEW du wallet importé OK
|
||
getBalance sur wallet importé OK
|
||
```
|
||
|
||
Les deux warnings sont strictement idiomatiques :
|
||
|
||
```text
|
||
clippy::mem_replace_option_with_some
|
||
clippy::explicit_auto_deref
|
||
```
|
||
|
||
## Type de livraison
|
||
|
||
```text
|
||
ksp-general-0.2.6-pre.008-fix.001.zip
|
||
```
|
||
|
||
Le signal technique devient :
|
||
|
||
```text
|
||
workspace.package.version = 0.2.6-pre.8.fix.1
|
||
commit = v0.2.6-pre.008-fix.001
|
||
```
|
||
|
||
`ksp-app-wallet-desk/package.json` et `tauri.conf.json` suivent `0.2.6-pre.8.fix.1`.
|
||
|
||
## Corrections
|
||
|
||
### Slot de staging import
|
||
|
||
Avant :
|
||
|
||
```rust
|
||
let previous = std::mem::replace(&mut *slot, std::option::Option::Some(staged));
|
||
```
|
||
|
||
Après :
|
||
|
||
```rust
|
||
let previous = (*slot).replace(staged);
|
||
```
|
||
|
||
La valeur précédente est toujours récupérée puis détruite explicitement juste après ; ses octets restent zeroized à la destruction via `PendingWalletImport`/`Zeroizing<Vec<u8>>`.
|
||
|
||
### Lecture dans le buffer zeroized
|
||
|
||
Avant :
|
||
|
||
```rust
|
||
let read_result = reader.read_to_end(&mut *bytes).await;
|
||
```
|
||
|
||
Après :
|
||
|
||
```rust
|
||
let read_result = reader.read_to_end(&mut bytes).await;
|
||
```
|
||
|
||
L’auto-deref fournit toujours la `Vec<u8>` mutable attendue par `AsyncReadExt::read_to_end`; la borne de lecture et le wrapper `Zeroizing` restent inchangés.
|
||
|
||
## Fichiers ajoutés
|
||
|
||
```text
|
||
deltas/0.2.6/pre.008-fix.001.md
|
||
```
|
||
|
||
## Fichiers modifiés
|
||
|
||
```text
|
||
Cargo.toml
|
||
ROADMAP.md
|
||
crates/ksp-app-wallet-desk/package.json
|
||
crates/ksp-app-wallet-desk/src/app_state.rs
|
||
crates/ksp-app-wallet-desk/src/wallet_import.rs
|
||
crates/ksp-app-wallet-desk/tauri.conf.json
|
||
docs/plans/002-FUNCTIONAL_RELEASE_SEQUENCE.md
|
||
docs/plans/013-V0_2_6_WALLET_DESK_PLAN.md
|
||
```
|
||
|
||
## Fichiers supprimés
|
||
|
||
```text
|
||
aucun
|
||
```
|
||
|
||
## Hors scope
|
||
|
||
Le fix ne modifie pas :
|
||
|
||
```text
|
||
picker natif Tauri
|
||
formats solana_cli_json / solana_keypair_base58
|
||
bornes de lecture
|
||
Zeroizing<Vec<u8>>
|
||
inspect_wallet_transfer / import_wallet_transfer_v1
|
||
no-clobber
|
||
WalletSession
|
||
VIEW / OWNER
|
||
Transport / getBalance
|
||
frontend / DTOs / capabilities
|
||
Config / Logging
|
||
```
|
||
|
||
Aucune dépendance Cargo ou npm n’est ajoutée ou modifiée.
|
||
|
||
## Validation opérateur requise
|
||
|
||
```bash
|
||
cargo fmt --all
|
||
python3 scripts/audit_rust_workspace_rules.py
|
||
cargo check --workspace
|
||
cargo clippy --workspace --all-targets
|
||
cargo test -p ksp-app-wallet-desk
|
||
cargo test --workspace
|
||
```
|
||
|
||
Le comportement runtime ayant déjà été validé sur `pre.008` et le fix étant limité à deux idiomes Rust équivalents, un nouveau `cargo tauri dev` est optionnel avant passage à `pre.009` si les gates ci-dessus restent verts.
|
||
|
||
Aucune commande npm directe n’est nécessaire. `cargo tauri build -c crates/ksp-app-wallet-desk/tauri.conf.json` reste réservé à la toute dernière validation de `0.2.6`.
|