v0.2.7-pre.010-fix.001

This commit is contained in:
2026-08-23 00:26:17 +02:00
parent 1391858972
commit 74686892e9
4 changed files with 102 additions and 15 deletions

View File

@@ -1,12 +1,12 @@
# file: Cargo.toml
# version: 208
# version: 209
[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-onchain-transport-lib", "crates/ksp-wallet-lib"]
[workspace.package]
version = "0.2.7-pre.10"
version = "0.2.7-pre.10.fix.1"
edition = "2024"
license = "MIT"
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-onchain-transport-lib/src/lib.rs
// version: 27
// version: 28
#![warn(missing_docs)]
#![deny(unreachable_pub)]
@@ -392,7 +392,5 @@ pub(crate) use self::ws_subscription::WsNotificationDispatcher;
pub(crate) use self::ws_subscription::WsSubscriptionRegistration;
/// Crate-internal actor-owned logical subscription runtime entry.
pub(crate) use self::ws_subscription::WsSubscriptionRuntime;
/// Crate-internal constructor for bounded typed notification channels.
pub(crate) use self::ws_subscription::typed_notification_channel;
/// Crate-internal constructor for bounded typed notification channels with terminal-value classification.
pub(crate) use self::ws_subscription::typed_notification_channel_with_completion;

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-onchain-transport-lib/src/ws_subscription.rs
// version: 4
// version: 5
/// Typed handle for one logical Solana WebSocket subscription.
///
@@ -133,15 +133,6 @@ pub(crate) enum WsNotificationDispatchOutcome {
/// Type-erased actor-owned dispatcher for one heterogeneous typed notification channel.
pub(crate) type WsNotificationDispatcher = std::boxed::Box<dyn Fn(serde_json::Value) -> WsNotificationDispatchOutcome + std::marker::Send + std::marker::Sync>;
/// Creates one bounded typed notification receiver and its type-erased actor dispatcher.
pub(crate) fn typed_notification_channel<T, F>(capacity: usize, decoder: F) -> (WsNotificationDispatcher, tokio::sync::mpsc::Receiver<ksp_core_lib::Result<T>>)
where
T: std::marker::Send + 'static,
F: Fn(serde_json::Value) -> ksp_core_lib::Result<T> + std::marker::Send + std::marker::Sync + 'static,
{
return typed_notification_channel_with_completion(capacity, decoder, |_| return false);
}
/// Creates one bounded typed notification receiver whose dispatcher can mark a successfully delivered value as terminal.
pub(crate) fn typed_notification_channel_with_completion<T, F, C>(
capacity: usize,

View File

@@ -0,0 +1,98 @@
<!-- file: deltas/0.2.7/pre.010-fix.001.md -->
<!-- version: 1 -->
# Delta `0.2.7-pre.010-fix.001` — suppression du helper WebSocket interne devenu mort
## Base
Base directe publiée :
```text
0.2.7-pre.010
Cargo 0.2.7-pre.10
```
La validation opérateur de `pre.010` confirme :
- `cargo fmt --all` : vert ;
- audit Python KSP : vert ;
- `cargo check --workspace` : vert avec deux warnings Transport ;
- `cargo clippy --workspace --all-targets` : vert avec les mêmes deux warnings ;
- `cargo test -p ksp-onchain-transport-lib` : 300 tests unitaires, 34 tests d'API publique et 22 tests de release completeness verts ;
- `cargo test --workspace` : vert, avec les mêmes warnings répétés lors de la compilation de Transport.
Les deux warnings concernent exclusivement `typed_notification_channel`, helper crate-private désormais remplacé par `typed_notification_channel_with_completion` depuis l'introduction de la terminaison one-shot de `signatureSubscribe`.
## Signal technique
```text
livraison = 0.2.7-pre.010-fix.001
workspace.package.version = 0.2.7-pre.10.fix.1
commit = v0.2.7-pre.010-fix.001
```
Aucun tag Git n'est requis pour ce fix de prerelease.
## Diagnostic
`pre.010` a généralisé le constructeur de canal typed afin que le dispatcher puisse distinguer une notification normale d'une notification terminale :
```text
typed_notification_channel_with_completion(...)
```
Le helper historique :
```text
typed_notification_channel(...)
```
n'a alors plus aucun callsite. Son re-export crate-private dans `lib.rs` est lui aussi devenu inutilisé. Rust signale donc :
```text
unused import: self::ws_subscription::typed_notification_channel
function typed_notification_channel is never used
```
## Correction
Le fix supprime uniquement :
- le re-export crate-private `typed_notification_channel` depuis `lib.rs` ;
- la fonction wrapper crate-private `typed_notification_channel` depuis `ws_subscription.rs`.
`typed_notification_channel_with_completion` reste l'unique constructeur interne. Pour les subscriptions continues, `WsSession::subscribe_typed` lui fournit déjà une classification terminale constamment fausse ; pour `signatureSubscribe`, le wrapper fournit sa classification one-shot dédiée.
Aucune API publique, aucun DTO, aucun wire format, aucun comportement de reconnect/resubscribe/backpressure et aucune sémantique HTTP ou WebSocket ne changent.
## Fichiers
```text
Cargo.toml
crates/ksp-onchain-transport-lib/src/lib.rs
crates/ksp-onchain-transport-lib/src/ws_subscription.rs
deltas/0.2.7/pre.010-fix.001.md
```
`ROADMAP.md`, `CHANGELOG.md`, le plan et le document de validation restent inchangés.
## Validation attendue
```bash
cargo fmt --all
python3 scripts/audit_rust_workspace_rules.py
cargo check --workspace
cargo clippy --workspace --all-targets
cargo test -p ksp-onchain-transport-lib
cargo test --workspace
```
Comptages Transport attendus :
```text
unit tests = 300
public API tests = 34
release completeness = 22
```
Les validations Cargo doivent être exécutées par l'opérateur ; elles ne sont pas revendiquées depuis l'environnement de préparation du delta.