v0.2.11-pre.008-fix.001
This commit is contained in:
126
deltas/0.2.11/pre.008-fix.001.md
Normal file
126
deltas/0.2.11/pre.008-fix.001.md
Normal file
@@ -0,0 +1,126 @@
|
||||
<!-- file: deltas/0.2.11/pre.008-fix.001.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# Delta `0.2.11-pre.008-fix.001` — Clippy et canari boundary du service de refresh
|
||||
|
||||
## 1. Base requise
|
||||
|
||||
Ce correctif s'applique exclusivement après `0.2.11-pre.008`.
|
||||
|
||||
Version Cargo attendue à l'entrée :
|
||||
|
||||
```text
|
||||
0.2.11-pre.8
|
||||
```
|
||||
|
||||
Version Cargo de sortie :
|
||||
|
||||
```text
|
||||
0.2.11-pre.8.fix.1
|
||||
```
|
||||
|
||||
## 2. Motif du correctif
|
||||
|
||||
Le gate opérateur du `2026-08-26` a produit :
|
||||
|
||||
```text
|
||||
cargo fmt --all exécuté
|
||||
audit Rust workspace PASS
|
||||
audit Markdown PASS, 122 tables / 113 files
|
||||
cargo check --workspace PASS
|
||||
cargo clippy --workspace --all-targets 1 warning collapsible_if
|
||||
cargo test -p ksp-offchain-transport-lib 54 unit PASS, dependency boundary FAIL
|
||||
```
|
||||
|
||||
Le canari en échec était :
|
||||
|
||||
```text
|
||||
pre_008_refresh_service_owns_dispatch_while_registry_and_consumer_surface_stay_generic
|
||||
```
|
||||
|
||||
Il utilisait une interdiction lexicale trop large :
|
||||
|
||||
```text
|
||||
!service.contains("consensus")
|
||||
```
|
||||
|
||||
alors que `market_price_service.rs` contient légitimement une rustdoc indiquant que `refresh_many` fonctionne « without fallback or consensus ».
|
||||
|
||||
## 3. Correction Clippy
|
||||
|
||||
`MarketPriceService::update_availability` collapse les deux `if` imbriqués en une `let`-chain conforme à `clippy::collapsible_if`.
|
||||
|
||||
Le comportement ne change pas :
|
||||
|
||||
```text
|
||||
set_availability réussi + état retrouvé -> clone de l'état registry
|
||||
sinon -> projection de secours avec la même availability
|
||||
```
|
||||
|
||||
Aucune transition d'availability, classification d'erreur, cadence ou logique réseau n'est modifiée.
|
||||
|
||||
## 4. Correction du canari boundary
|
||||
|
||||
Le test ne bannit plus le mot documentaire `consensus`.
|
||||
|
||||
Il vérifie désormais l'absence de surfaces exécutables concrètes hors scope :
|
||||
|
||||
```text
|
||||
fallback_provider
|
||||
fn aggregate(
|
||||
fn consensus(
|
||||
```
|
||||
|
||||
Les rustdocs peuvent donc documenter explicitement l'absence de fallback/consensus sans faire échouer le canari, tandis qu'une implémentation réelle de ces mécanismes resterait détectée.
|
||||
|
||||
Les assertions existantes sur l'absence de `std::thread::sleep` et `tokio::time::sleep` sont conservées.
|
||||
|
||||
## 5. Scope fonctionnel inchangé
|
||||
|
||||
Ce fix ne modifie pas :
|
||||
|
||||
```text
|
||||
les huit adapters V1
|
||||
MarketPriceProviderSetup
|
||||
MarketPriceService public
|
||||
refresh / refresh_many / refresh_all
|
||||
registry et availability
|
||||
rate limits / cooldowns
|
||||
classification HTTP/provider
|
||||
Config
|
||||
scheduler périodique
|
||||
fallback
|
||||
consensus
|
||||
agrégation multi-provider
|
||||
smoke live
|
||||
```
|
||||
|
||||
## 6. Fichiers modifiés
|
||||
|
||||
```text
|
||||
Cargo.toml
|
||||
crates/ksp-offchain-transport-lib/src/market_price_service.rs
|
||||
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
|
||||
```
|
||||
|
||||
## 7. Fichier ajouté
|
||||
|
||||
```text
|
||||
deltas/0.2.11/pre.008-fix.001.md
|
||||
```
|
||||
|
||||
## 8. Gate opérateur requis
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
`pre.009` ne doit commencer qu'après ce gate propre.
|
||||
Reference in New Issue
Block a user