v0.3.15-pre.002-fix.001
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# file: Cargo.toml
|
||||
# version: 595
|
||||
# version: 596
|
||||
|
||||
[workspace]
|
||||
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.15-pre.2"
|
||||
version = "0.3.15-pre.2.fix.1"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-onchain-transport-lib/src/ws_settings.rs
|
||||
// version: 5
|
||||
// version: 6
|
||||
|
||||
const DEFAULT_WS_CLOSE_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(5);
|
||||
const DEFAULT_WS_COMMAND_QUEUE_CAPACITY: usize = 128;
|
||||
@@ -568,7 +568,7 @@ fn validate_ws_endpoint(endpoint: &crate::WsEndpointSettings, endpoint_index: us
|
||||
if let std::result::Result::Err(error) = validate_ws_descriptor(endpoint.cluster().as_str(), cluster_field.as_str()) {
|
||||
return std::result::Result::Err(error);
|
||||
}
|
||||
if let std::result::Result::Some(capabilities) = endpoint.subscription_capabilities() {
|
||||
if let std::option::Option::Some(capabilities) = endpoint.subscription_capabilities() {
|
||||
if capabilities.is_empty() {
|
||||
return ws_invalid_settings(
|
||||
"explicit WebSocket subscription capabilities must not be empty",
|
||||
|
||||
137
deltas/0.3.15/pre.002-fix.001.md
Normal file
137
deltas/0.3.15/pre.002-fix.001.md
Normal file
@@ -0,0 +1,137 @@
|
||||
<!-- file: deltas/0.3.15/pre.002-fix.001.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# Delta `0.3.15-pre.002-fix.001` — correction du pattern `Option::Some` des capabilities WebSocket
|
||||
|
||||
## Base requise
|
||||
|
||||
```text
|
||||
0.3.15-pre.002
|
||||
workspace.package.version = 0.3.15-pre.2
|
||||
deltas/0.3.15/pre.002.md présent
|
||||
```
|
||||
|
||||
## Défaut observé au gate opérateur
|
||||
|
||||
Les audits statiques de `pre.002` passent :
|
||||
|
||||
```text
|
||||
General Rust rule audit: clean
|
||||
Rust export completeness audit: 0 candidate(s)
|
||||
KSP workspace Rust rule audit: clean
|
||||
Markdown table audit: clean (318 table(s), 186 file(s))
|
||||
```
|
||||
|
||||
`cargo check --workspace`, Clippy et la suite Transport échouent ensuite à la compilation sur une faute de qualification dans `ws_settings.rs` :
|
||||
|
||||
```text
|
||||
error[E0599]: no variant or associated item named `Some` found for enum `Result<T, E>`
|
||||
crates/ksp-onchain-transport-lib/src/ws_settings.rs
|
||||
```
|
||||
|
||||
La branche de validation des capabilities optionnelles utilisait par erreur :
|
||||
|
||||
```rust
|
||||
if let std::result::Result::Some(capabilities) = endpoint.subscription_capabilities() {
|
||||
```
|
||||
|
||||
alors que `subscription_capabilities()` retourne un `Option<&[WsSubscriptionKind]>`.
|
||||
|
||||
## Correction
|
||||
|
||||
Le pattern est corrigé en utilisant le type propriétaire exact :
|
||||
|
||||
```rust
|
||||
if let std::option::Option::Some(capabilities) = endpoint.subscription_capabilities() {
|
||||
```
|
||||
|
||||
Aucune condition de validation, capability, partition protocolaire ou sémantique fail-closed n'est modifiée.
|
||||
|
||||
Une recherche workspace confirme qu'il n'existait qu'une seule occurrence de `Result::Some` dans les sources Rust.
|
||||
|
||||
## Périmètre
|
||||
|
||||
Le fix reste strictement dans la responsabilité Transport de `pre.002` :
|
||||
|
||||
```text
|
||||
aucune modification Config/schema/composite
|
||||
aucune modification Worker
|
||||
aucune modification Store
|
||||
aucune modification Desk
|
||||
aucune nouvelle API publique
|
||||
aucune nouvelle dépendance ou feature
|
||||
aucun changement de partition SolanaStandard / HeliusLaserStream
|
||||
aucun changement de supports_subscription
|
||||
aucune inférence provider
|
||||
```
|
||||
|
||||
## Fichiers ajoutés
|
||||
|
||||
```text
|
||||
deltas/0.3.15/pre.002-fix.001.md
|
||||
```
|
||||
|
||||
## Fichiers modifiés
|
||||
|
||||
```text
|
||||
Cargo.toml
|
||||
crates/ksp-onchain-transport-lib/src/ws_settings.rs
|
||||
```
|
||||
|
||||
## Fichiers supprimés
|
||||
|
||||
```text
|
||||
aucun
|
||||
```
|
||||
|
||||
## Version Cargo
|
||||
|
||||
Le correctif modifie du code Rust de production. Conformément à `VER-ID-007` et `VER-ID-010` :
|
||||
|
||||
```text
|
||||
header Cargo.toml : 595 -> 596
|
||||
workspace.package.version : 0.3.15-pre.2 -> 0.3.15-pre.2.fix.1
|
||||
```
|
||||
|
||||
Version du fichier Rust modifié :
|
||||
|
||||
```text
|
||||
ksp-onchain-transport-lib/src/ws_settings.rs : 5 -> 6
|
||||
```
|
||||
|
||||
## Validations exécutées dans l'environnement d'assemblage
|
||||
|
||||
```text
|
||||
recherche Result::Some workspace : aucune occurrence restante
|
||||
audit Rust workspace : PASS
|
||||
audit Markdown : PASS
|
||||
archive delta : contrôle d'intégrité PASS
|
||||
```
|
||||
|
||||
## Validations non exécutées dans l'environnement d'assemblage
|
||||
|
||||
L'environnement d'assemblage ne fournit pas la toolchain Cargo/Rust. Le gate opérateur doit donc confirmer :
|
||||
|
||||
```bash
|
||||
cargo fmt --all
|
||||
cargo fmt --all -- --check
|
||||
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.3.15
|
||||
cargo check --workspace
|
||||
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
||||
cargo test -p ksp-onchain-transport-lib --all-targets --all-features
|
||||
```
|
||||
|
||||
## Décisions prises
|
||||
|
||||
```text
|
||||
le correctif reste un fix de pre.002 et n'ouvre pas pre.003
|
||||
la version Cargo porte le suffixe SemVer pre.2.fix.1 car du code production est modifié
|
||||
le delta pre.002 publié reste immuable
|
||||
```
|
||||
|
||||
## Questions ouvertes
|
||||
|
||||
```text
|
||||
aucune
|
||||
```
|
||||
Reference in New Issue
Block a user