From 792560191ce25807b2bca999c8c42fe75063c495 Mon Sep 17 00:00:00 2001 From: SinuS Von SifriduS Date: Sat, 12 Sep 2026 13:04:49 +0200 Subject: [PATCH] v0.3.14-pre.009-fix.002 --- Cargo.toml | 4 +- .../src/snapshot.rs | 4 +- deltas/0.3.14/pre.009-fix.002.md | 140 ++++++++++++++++++ 3 files changed, 144 insertions(+), 4 deletions(-) create mode 100644 deltas/0.3.14/pre.009-fix.002.md diff --git a/Cargo.toml b/Cargo.toml index 2cadef4..1203b10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ # file: Cargo.toml -# version: 580 +# version: 581 [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.14-pre.9.fix.1" +version = "0.3.14-pre.9.fix.2" edition = "2024" license = "MIT" repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project" diff --git a/crates/ksp-worker-raw-transaction-ingest-lib/src/snapshot.rs b/crates/ksp-worker-raw-transaction-ingest-lib/src/snapshot.rs index 1402da3..be8d404 100644 --- a/crates/ksp-worker-raw-transaction-ingest-lib/src/snapshot.rs +++ b/crates/ksp-worker-raw-transaction-ingest-lib/src/snapshot.rs @@ -1,5 +1,5 @@ // file: crates/ksp-worker-raw-transaction-ingest-lib/src/snapshot.rs -// version: 7 +// version: 8 /// Runtime-neutral boxed future resolving to one newer concrete RAW transaction ingest Worker snapshot. pub type RawTransactionIngestSnapshotFuture<'a> = @@ -873,7 +873,7 @@ fn health_for_state( { return ksp_worker_api::WorkerHealth::Unhealthy; } - if source_total > 0 && source_active == source_total { + if source_total > 0 && snapshot.source_active == snapshot.source_total { return ksp_worker_api::WorkerHealth::Healthy; } if source_total > 0 diff --git a/deltas/0.3.14/pre.009-fix.002.md b/deltas/0.3.14/pre.009-fix.002.md new file mode 100644 index 0000000..9124bb3 --- /dev/null +++ b/deltas/0.3.14/pre.009-fix.002.md @@ -0,0 +1,140 @@ + + + +# Delta `0.3.14-pre.009-fix.002` — garde Healthy explicite du snapshot + +## Base requise + +```text +0.3.14-pre.009-fix.001 +workspace.package.version = 0.3.14-pre.9.fix.1 +deltas/0.3.14/pre.009-fix.001.md présent +``` + +## Objectif + +Corriger strictement le dernier canari `pre.009` en échec après `pre.009-fix.001`, sans modifier la politique fonctionnelle de health. + +## Défaut observé + +Le gate opérateur de `0.3.14-pre.009-fix.001` valide les audits, `cargo check`, Clippy et les `143` unit tests, puis échoue sur un seul canari : + +```text +v0_3_14_pre_009_health_policy_is_present_future_coverage_gated_and_source_neutral + required pre.009 health projection guard missing: snapshot.source_active == snapshot.source_total +``` + +## Cause + +`pre.009-fix.001` a conservé exactement l'invariant mais l'a exprimé via les variables locales : + +```text +source_active == source_total +``` + +Le canari protège volontairement la forme explicite sur le snapshot : + +```text +snapshot.source_active == snapshot.source_total +``` + +## Correction + +La branche `Healthy` de `health_for_state` utilise directement la condition protégée : + +```text +snapshot.source_active == snapshot.source_total +``` + +Les variables locales `source_active`, `source_total` et `source_failed` restent utilisées par la branche `Degraded`. La condition est strictement équivalente et n'introduit aucun changement runtime. + +## Fichiers ajoutés + +```text +deltas/0.3.14/pre.009-fix.002.md +``` + +## Fichiers modifiés + +```text +Cargo.toml +crates/ksp-worker-raw-transaction-ingest-lib/src/snapshot.rs +``` + +## Fichiers supprimés + +```text +aucun +``` + +## Version Cargo + +Le correctif modifie du code Rust production ; conformément aux règles de versioning : + +```text +header Cargo.toml : 580 -> 581 +workspace.package.version : 0.3.14-pre.9.fix.1 -> 0.3.14-pre.9.fix.2 +``` + +Version de fichier : + +```text +src/snapshot.rs : 7 -> 8 +``` + +## Frontières préservées + +```text +aucune modification de TargetCoverage +aucune modification du gap ledger +aucune modification des coverage epochs +aucune modification du continuity frontier +aucune modification de la classification source-loss +aucun respawn Worker +aucun nouveau scheduler ou task +aucun changement Transport +aucune nouvelle requête HTTP +aucune nouvelle dépendance ou feature +aucun accès Config +aucun Job Backfill +aucun backend Store physique +aucune croissance de surface publique +``` + +## Validations exécutées + +```text +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 +vérification ciblée du canari snapshot.source_active == snapshot.source_total +contrôle du diff exact +contrôle d'inventaire ZIP +unzip -t +réapplication du delta sur la base pre.009-fix.001 et comparaison byte-à-byte +``` + +## Validations non exécutées + +Le toolchain Rust/Cargo n'est pas disponible dans le sandbox de préparation. Le gate opérateur reste requis : + +```text +cargo fmt --all +cargo fmt --all -- --check +cargo check --workspace +cargo clippy --workspace --all-targets --all-features -- -D warnings +cargo test -p ksp-worker-raw-transaction-ingest-lib --all-targets --all-features +``` + +## Décisions prises + +```text +corriger la forme explicite attendue plutôt que relâcher le canari +ne pas ajouter de #[allow(...)] +ne pas modifier la sémantique health validée par les unit tests pre.009 +``` + +## Questions ouvertes + +```text +aucune pour ce correctif +```