From ba574f305244bf930de4ac70c40cd6e6556ff599 Mon Sep 17 00:00:00 2001 From: SinuS Von SifriduS Date: Sun, 6 Sep 2026 22:30:27 +0200 Subject: [PATCH] v0.3.10-pre.005-fix.001 --- Cargo.toml | 4 +- .../tests/ws_raw_parity.rs | 6 +- deltas/0.3.10/pre.005-fix.001.md | 92 +++++++++++++++++++ ...031-V0_3_10_RAW_TRANSACTION_INGEST_PLAN.md | 4 +- .../027-V0_3_10_RAW_TRANSACTION_INGEST.md | 39 +++++++- 5 files changed, 138 insertions(+), 7 deletions(-) create mode 100644 deltas/0.3.10/pre.005-fix.001.md diff --git a/Cargo.toml b/Cargo.toml index 5b17edc..56ec8af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ # file: Cargo.toml -# version: 496 +# version: 497 [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"] [workspace.package] -version = "0.3.10-pre.5" +version = "0.3.10-pre.5.fix.1" edition = "2024" license = "MIT" repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project" diff --git a/crates/ksp-job-backfill-lib/tests/ws_raw_parity.rs b/crates/ksp-job-backfill-lib/tests/ws_raw_parity.rs index 9122c20..bdf7cb6 100644 --- a/crates/ksp-job-backfill-lib/tests/ws_raw_parity.rs +++ b/crates/ksp-job-backfill-lib/tests/ws_raw_parity.rs @@ -1,12 +1,12 @@ // file: crates/ksp-job-backfill-lib/tests/ws_raw_parity.rs -// version: 1 +// version: 2 //! Cross-layer parity canaries qualifying standard `blockSubscribe` and Helius `transactionSubscribe` for RAW v1 ingestion. use futures_util::SinkExt; // rust-rules: trait-import use futures_util::StreamExt; // rust-rules: trait-import -const FIXTURE_BLOCK_TIME: i64 = 1_787_072_400; +const FIXTURE_BLOCK_TIME_MILLIS: u64 = 1_787_072_400_000; const FIXTURE_SLOT: u64 = 430_000_123; const ZERO_SIGNATURE_TEXT: &str = "1111111111111111111111111111111111111111111111111111111111111111"; const ZERO_TRANSACTION_BASE64: &str = "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; @@ -420,7 +420,7 @@ async fn pre_005_helius_full_base64_without_block_time_and_version_requires_http assert_eq!(helius_raw.reference(), http_raw.reference()); assert_eq!(helius_raw.slot(), http_raw.slot()); assert!(helius_raw.block_time().is_none()); - assert_eq!(http_raw.block_time().map(|value| return value.unix_millis()), std::option::Option::Some(FIXTURE_BLOCK_TIME * 1_000)); + assert_eq!(http_raw.block_time().map(|value| return value.unix_millis()), std::option::Option::Some(FIXTURE_BLOCK_TIME_MILLIS),); assert_ne!(helius_raw.block_time(), http_raw.block_time()); assert_ne!(helius_raw.payload().bytes(), http_raw.payload().bytes()); assert_ne!(helius_raw.payload().content_hash(), http_raw.payload().content_hash()); diff --git a/deltas/0.3.10/pre.005-fix.001.md b/deltas/0.3.10/pre.005-fix.001.md new file mode 100644 index 0000000..e5ebf41 --- /dev/null +++ b/deltas/0.3.10/pre.005-fix.001.md @@ -0,0 +1,92 @@ + + + +# Delta `0.3.10-pre.005-fix.001` — correction de typage du canari WS RAW parity + +## Base requise + +```text +0.3.10-pre.005 +``` + +## Motif du fix + +Le premier rejeu opérateur de `pre.005` valide les audits statiques, `cargo check --workspace`, la common RAW, la suite Transport complète et les arbres Cargo, mais Clippy strict et la suite Backfill s’arrêtent sur une unique erreur de compilation `E0308` dans `tests/ws_raw_parity.rs`. + +Le canari comparait : + +```text +RawTransaction::block_time().unix_millis() -> u64 +FIXTURE_BLOCK_TIME * 1_000 -> i64 +``` + +L’assertion produisait donc `Option != Option` au niveau du type. + +## Correction + +La constante de fixture devient directement : + +```text +FIXTURE_BLOCK_TIME_MILLIS: u64 = 1_787_072_400_000 +``` + +L’assertion compare désormais `Option` à `Option` sans cast, conversion runtime, `unwrap`, `expect` ou modification du comportement testé. + +## Invariants inchangés + +```text +blockSubscribe standard confirmed/full/base64 legacy-v0 -> golden RAW-direct positif +Helius transactionSubscribe full/base64 -> signal + hydration HTTP +RAW v1 bytes/hash contracts +TR-C2 Worker-owned +tokio-tungstenite strictement dev-only +aucun code de production modifié +aucune dépendance ni feature modifiée +``` + +## Version technique + +```text +workspace.package.version = 0.3.10-pre.5.fix.1 +Cargo.toml header = 497 +workspace members = 20 +``` + +## Fichiers modifiés + +```text +Cargo.toml +crates/ksp-job-backfill-lib/tests/ws_raw_parity.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.005-fix.001.md +``` + +## Audits d’assemblage + +```text +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), 760 file(s)) +``` + +## Gate opérateur à 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 +``` + +Les arbres Cargo n’ont pas besoin d’être rejoués pour ce fix : ni `Cargo.toml` de crate, ni dépendance, ni feature ne change. diff --git a/docs/plans/031-V0_3_10_RAW_TRANSACTION_INGEST_PLAN.md b/docs/plans/031-V0_3_10_RAW_TRANSACTION_INGEST_PLAN.md index 50a2783..bc3bc7a 100644 --- a/docs/plans/031-V0_3_10_RAW_TRANSACTION_INGEST_PLAN.md +++ b/docs/plans/031-V0_3_10_RAW_TRANSACTION_INGEST_PLAN.md @@ -1,5 +1,5 @@ - + # Plan v0.3.10 — RAW Transaction commune + Worker d’ingestion multi-source @@ -1074,6 +1074,8 @@ Helius `transactionSubscribe` full/base64 conserve la signature, le slot, le tra `tokio-tungstenite` est ajouté uniquement en `dev-dependencies` du Backfill pour les serveurs WebSocket locaux déterministes ; un canari de dependency boundary interdit sa migration vers les dépendances de production. `TR-C2` reste Worker-owned. +Le premier rejeu opérateur de `pre.005` le 2026-09-06 valide les audits statiques, `cargo check --workspace`, la common RAW, les 387 tests Transport et les arbres normal/dev/features, mais `cargo clippy --workspace --all-targets --all-features -- -D warnings` ainsi que `cargo test -p ksp-job-backfill-lib` s’arrêtent sur une unique erreur de compilation du nouveau canari : `RawTransaction::block_time().unix_millis()` retourne `u64`, tandis que `FIXTURE_BLOCK_TIME * 1_000` était inféré en `i64`. `pre.005-fix.001` corrige uniquement cette constante de comparaison en millisecondes `u64`; aucun code de production, golden, contrat RAW/WS ni dépendance n’est modifié. + ### `pre.006` — parité Yellowstone transactions/blocks Fermer les adapters structurés Yellowstone transaction/block, Transaction V1, meta et cross-source parity. Aucune persistance directe si le gate byte-identical échoue. diff --git a/docs/validation/027-V0_3_10_RAW_TRANSACTION_INGEST.md b/docs/validation/027-V0_3_10_RAW_TRANSACTION_INGEST.md index f2156d9..efd36a5 100644 --- a/docs/validation/027-V0_3_10_RAW_TRANSACTION_INGEST.md +++ b/docs/validation/027-V0_3_10_RAW_TRANSACTION_INGEST.md @@ -1,5 +1,5 @@ - + # Validation v0.3.10 — RAW Transaction commune + Worker d’ingestion @@ -852,3 +852,40 @@ Le résultat est normatif pour le Worker : Helius `transactionSubscribe` est un La dépendance `tokio-tungstenite` nécessaire aux fixtures WS est strictement `dev-dependencies`; `tests/dependency_boundary.rs` verrouille cette frontière. Aucun edge de production Transport -> common n’est ajouté. +### 13.8 Premier rejeu opérateur de `pre.005` et fix de typage + +Le rejeu communiqué le 2026-09-06 obtient : + +```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), 759 file(s)) +cargo check --workspace : PASS +cargo clippy --workspace --all-targets --all-features -- -D warnings : FAIL sur une unique erreur E0308 du canari ws_raw_parity +cargo test -p ksp-raw-transaction-lib : PASS, 12 unit + 9 intégration, 0 échec +cargo test -p ksp-onchain-transport-lib : PASS, 387 unit + 51 public API + 43 release completeness + 4 doctests, 0 échec ; smokes live ignorés comme prévu +cargo test -p ksp-job-backfill-lib : FAIL à la compilation du même canari ws_raw_parity +cargo tree -p ksp-job-backfill-lib --edges normal : PASS, surface normale attendue +cargo tree -p ksp-job-backfill-lib --edges dev : PASS, tokio + tokio-tungstenite uniquement +cargo tree -p ksp-job-backfill-lib -e features : PASS +``` + +L’erreur est strictement locale à l’assertion de preuve Helius : + +```text +http_raw.block_time().map(...unix_millis()) -> Option +Some(FIXTURE_BLOCK_TIME * 1_000) -> Option +``` + +`pre.005-fix.001` remplace la constante de comparaison par `FIXTURE_BLOCK_TIME_MILLIS: u64 = 1_787_072_400_000` et compare directement `Option` à `Option`. Aucun cast, `unwrap`, `expect`, code de production ou changement de dépendance n’est introduit. Les goldens de qualification standard/Helius et la frontière `tokio-tungstenite` dev-only restent inchangés. + +L’assemblage local du fix obtient : + +```text +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), 760 file(s)) +```