v0.3.14-pre.011-fix.002
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
# file: Cargo.toml
|
# file: Cargo.toml
|
||||||
# version: 585
|
# version: 586
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "3"
|
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"]
|
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]
|
[workspace.package]
|
||||||
version = "0.3.14-pre.11.fix.1"
|
version = "0.3.14-pre.11.fix.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
repository = "https://git.sasedev.com/Sasedev/khadhroony-solana-project"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/src/runtime_resources.rs
|
// file: crates/ksp-worker-raw-transaction-ingest-lib/src/runtime_resources.rs
|
||||||
// version: 41
|
// version: 42
|
||||||
|
|
||||||
use sha2::Digest; // rust-rules: trait-import
|
use sha2::Digest; // rust-rules: trait-import
|
||||||
|
|
||||||
@@ -652,9 +652,8 @@ fn source_inventory_health_projection(
|
|||||||
};
|
};
|
||||||
(health.0, health.1, health.2, health.3, continuity_snapshot)
|
(health.0, health.1, health.2, health.3, continuity_snapshot)
|
||||||
};
|
};
|
||||||
let aggregate = aggregate
|
let aggregate = aggregate.with_continuity_health(continuity_frontier_slot, continuity_has_open_gaps, future_target_coverage);
|
||||||
.with_continuity_health(continuity_frontier_slot, continuity_has_open_gaps, future_target_coverage)
|
let aggregate = aggregate.with_continuity_snapshot(continuity_snapshot);
|
||||||
.with_continuity_snapshot(continuity_snapshot);
|
|
||||||
return std::result::Result::Ok(aggregate.with_failed_source_losses_reconciled(failed_source_losses_reconciled));
|
return std::result::Result::Ok(aggregate.with_failed_source_losses_reconciled(failed_source_losses_reconciled));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
102
deltas/0.3.14/pre.011-fix.002.md
Normal file
102
deltas/0.3.14/pre.011-fix.002.md
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<!-- file: deltas/0.3.14/pre.011-fix.002.md -->
|
||||||
|
<!-- version: 1 -->
|
||||||
|
|
||||||
|
# Delta `0.3.14-pre.011-fix.002` — restauration du pont textuel health/continuity
|
||||||
|
|
||||||
|
## Base requise
|
||||||
|
|
||||||
|
```text
|
||||||
|
0.3.14-pre.011.fix.1
|
||||||
|
workspace.package.version = 0.3.14-pre.11.fix.1
|
||||||
|
deltas/0.3.14/pre.011-fix.001.md présent
|
||||||
|
```
|
||||||
|
|
||||||
|
## Défaut observé au gate opérateur
|
||||||
|
|
||||||
|
Les audits, `cargo check`, Clippy et les `150` tests unitaires Worker passent après `pre.011-fix.001`, mais le test de hardening historique `v0_3_14_pre_009_health_policy_is_present_future_coverage_gated_and_source_neutral` échoue sur le canari textuel suivant :
|
||||||
|
|
||||||
|
```text
|
||||||
|
required pre.009 inventory-health bridge missing: aggregate.with_continuity_health
|
||||||
|
```
|
||||||
|
|
||||||
|
Le pont fonctionnel est toujours présent, mais `pre.011` l'a reformatté en chaîne de méthodes sur plusieurs lignes :
|
||||||
|
|
||||||
|
```rust
|
||||||
|
let aggregate = aggregate
|
||||||
|
.with_continuity_health(...)
|
||||||
|
.with_continuity_snapshot(...);
|
||||||
|
```
|
||||||
|
|
||||||
|
Le canari historique recherche volontairement la sous-chaîne continue `aggregate.with_continuity_health`.
|
||||||
|
|
||||||
|
## Correction
|
||||||
|
|
||||||
|
Le calcul est matérialisé en deux étapes strictement équivalentes :
|
||||||
|
|
||||||
|
```rust
|
||||||
|
let aggregate = aggregate.with_continuity_health(...);
|
||||||
|
let aggregate = aggregate.with_continuity_snapshot(...);
|
||||||
|
```
|
||||||
|
|
||||||
|
La sémantique runtime reste identique : la projection health/continuity est appliquée avant la projection détaillée des gaps, puis `with_failed_source_losses_reconciled(...)` reste l'étape finale.
|
||||||
|
|
||||||
|
## Périmètre
|
||||||
|
|
||||||
|
Le fix reste strictement dans la responsabilité de `pre.011` :
|
||||||
|
|
||||||
|
```text
|
||||||
|
aucune modification de la surface publique
|
||||||
|
aucune modification des compteurs de gaps
|
||||||
|
aucune modification de TargetCoverage
|
||||||
|
aucune modification de health policy
|
||||||
|
aucune modification de fairness
|
||||||
|
aucune modification de replay/reconnect ownership
|
||||||
|
aucune modification du pipeline Common RAW/Store
|
||||||
|
aucune nouvelle dépendance
|
||||||
|
```
|
||||||
|
|
||||||
|
## Fichiers ajoutés
|
||||||
|
|
||||||
|
```text
|
||||||
|
deltas/0.3.14/pre.011-fix.002.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## Fichiers modifiés
|
||||||
|
|
||||||
|
```text
|
||||||
|
Cargo.toml
|
||||||
|
crates/ksp-worker-raw-transaction-ingest-lib/src/runtime_resources.rs
|
||||||
|
```
|
||||||
|
|
||||||
|
## Fichiers supprimés
|
||||||
|
|
||||||
|
```text
|
||||||
|
aucun
|
||||||
|
```
|
||||||
|
|
||||||
|
## Version Cargo
|
||||||
|
|
||||||
|
Conformément à `VER-ID-007` et `VER-ID-010` :
|
||||||
|
|
||||||
|
```text
|
||||||
|
header Cargo.toml : 585 -> 586
|
||||||
|
workspace.package.version : 0.3.14-pre.11.fix.1 -> 0.3.14-pre.11.fix.2
|
||||||
|
```
|
||||||
|
|
||||||
|
Version du fichier Rust modifié :
|
||||||
|
|
||||||
|
```text
|
||||||
|
src/runtime_resources.rs : 41 -> 42
|
||||||
|
```
|
||||||
|
|
||||||
|
## Gate opérateur après application
|
||||||
|
|
||||||
|
```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
|
||||||
|
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
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user