Files
khadhroony-solana-project/deltas/0.3.10/pre.004-fix.001.md

166 lines
4.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- file: deltas/0.3.10/pre.004-fix.001.md -->
<!-- version: 1 -->
# Delta `0.3.10-pre.004-fix.001` — correction du canari HTTP block et du gate Clippy
## Base requise
```text
livraison : 0.3.10-pre.004
workspace.package.version = 0.3.10-pre.4
```
Le delta historique `deltas/0.3.10/pre.004.md` reste inchangé. Le présent fix trace séparément le défaut révélé par la validation opérateur du 2026-09-06.
## Résultat opérateur de la base
La validation communiquée confirme :
```text
cargo fmt --all : exécuté
General Rust rule audit: clean
Rust export completeness audit: 0 candidate(s)
KSP workspace Rust rule audit: clean
Markdown table audit: clean (339 table(s), 757 file(s))
cargo check --workspace : PASS
cargo clippy --workspace --all-targets --all-features -- -D warnings : FAIL
cargo test -p ksp-raw-transaction-lib : PASS
cargo test -p ksp-onchain-transport-lib : PASS
cargo test -p ksp-job-backfill-lib --test http_block_material : PASS
```
Les tests fonctionnels communiqués confirment notamment :
```text
ksp-raw-transaction-lib : 12 unit + 9 intégration, 0 échec
ksp-onchain-transport-lib : 387 unit + 51 public API + 43 release completeness + 4 doctests, 0 échec
http_block_material : 1 test, PASS
smokes live Transport : ignorés comme prévu
```
Les arbres normaux communiqués conservent les frontières prévues : la common RAW dépend de `base64`, `ksp-core-lib`, `ksp-store-api`, `serde_json`, `sha2`, et `ksp-onchain-transport-lib` ne dépend pas de `ksp-raw-transaction-lib`.
## Motif du fix
Le gate strict :
```bash
cargo clippy --workspace --all-targets --all-features -- -D warnings
```
échoue exclusivement sur sept `clippy::expect_used` dans les deux helpers privés du nouveau test dintégration :
```text
pool_for_url(...)
serve_once(...)
```
Les usages concernés sont :
```text
parsing HttpEndpointUrl
construction HttpTransportPool
bind du listener local
lecture de local_addr
accept de la connexion fixture
read de la requête fixture
write de la réponse fixture
```
La configuration commune autorise `expect` dans les fonctions de test, mais ces helpers ne portent pas eux-mêmes lattribut `#[test]`/`#[tokio::test]` et sont donc correctement rejetés par Clippy.
## Correction
Aucun lint nest désactivé.
`pool_for_url(...)` retourne désormais explicitement :
```text
ksp_core_lib::Result<HttpTransportPool>
```
et propage les deux erreurs possibles par `match` explicite.
`serve_once(...)` retourne désormais :
```text
std::io::Result<(String, JoinHandle<std::io::Result<()>>)>
```
Le bind, `local_addr`, `accept`, `read` et `write_all` retournent leurs erreurs par contrôle de flux explicite. Les assertions/`expect()` de fixture restent uniquement dans le corps `#[tokio::test]`, conformément à `allow-expect-in-tests = true`.
## Version Cargo
Ce fix modifie du Rust de test. Le signal technique Cargo est donc synchronisé :
```text
0.3.10-pre.4 -> 0.3.10-pre.4.fix.1
```
Le header du `Cargo.toml` racine passe de `494` à `495`.
## Invariants volontairement inchangés
```text
get_block_observed : inchangé
winner provider/endpoint : inchangé
RAW_TRANSACTION_FORMAT_ID = ksp.solana.raw_transaction
RAW_TRANSACTION_FORMAT_VERSION = 1
extraction Base64/short_vec : inchangée
projection 2 transactions / index 0-1 : inchangée
TR-C2 : adapter productif toujours Worker-owned
aucun changement de code production
aucune dépendance ou feature ajoutée
aucun nouveau Worker
```
## Fichiers modifiés
```text
Cargo.toml
crates/ksp-job-backfill-lib/tests/http_block_material.rs
docs/plans/031-V0_3_10_RAW_TRANSACTION_INGEST_PLAN.md
docs/validation/027-V0_3_10_RAW_TRANSACTION_INGEST.md
```
## Fichier ajouté
```text
deltas/0.3.10/pre.004-fix.001.md
```
## Fichiers supprimés
Aucun.
## Validations exécutées dans lenvironnement dassemblage
```text
python3 scripts/audit_rust_workspace_rules.py
General Rust rule audit: clean
Rust export completeness audit: 0 candidate(s)
KSP workspace Rust rule audit: clean
python3 scripts/audit_markdown_tables.py README.md RULES.md ROADMAP.md CHANGELOG.md docs prompts crates deltas
Markdown table audit: clean (339 table(s), 758 file(s))
```
Lenvironnement dassemblage ne fournit ni `cargo`, ni `rustc`, ni `rustfmt`; aucun gate Cargo du fix nest donc déclaré PASS localement.
## Validation à rejouer
```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
cargo check --workspace
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo test -p ksp-raw-transaction-lib
cargo test -p ksp-onchain-transport-lib
cargo test -p ksp-job-backfill-lib --test http_block_material
cargo tree -p ksp-raw-transaction-lib --edges normal
cargo tree -p ksp-onchain-transport-lib --edges normal
```
`pre.005` reste bloquée tant que ce gate nest pas intégralement vert.