v0.3.14-pre.002-fix.002
This commit is contained in:
220
deltas/0.3.14/pre.002-fix.002.md
Normal file
220
deltas/0.3.14/pre.002-fix.002.md
Normal file
@@ -0,0 +1,220 @@
|
||||
<!-- file: deltas/0.3.14/pre.002-fix.002.md -->
|
||||
<!-- version: 1 -->
|
||||
|
||||
# Delta `0.3.14-pre.002-fix.002` — correction façade crate-root continuity
|
||||
|
||||
## Base requise
|
||||
|
||||
```text
|
||||
0.3.14-pre.002-fix.001
|
||||
workspace.package.version = 0.3.14-pre.2.fix.1
|
||||
deltas/0.3.14/pre.002-fix.001.md présent
|
||||
```
|
||||
|
||||
## Objectif
|
||||
|
||||
Corriger strictement la tranche `pre.002` après le second gate opérateur, sans étendre son périmètre fonctionnel :
|
||||
|
||||
```text
|
||||
préserver le canari historique pre.007 interdisant le vocabulaire repair dans la crate-root
|
||||
conserver les contrats continuity/gap de pre.002 entièrement privés
|
||||
ne réexporter au crate-root que les éléments pub(crate) réellement partagés entre modules
|
||||
conserver pre.002 sans repair I/O
|
||||
```
|
||||
|
||||
## Défaut observé
|
||||
|
||||
Le gate opérateur sur `0.3.14-pre.2.fix.1` a produit :
|
||||
|
||||
```text
|
||||
cargo fmt --all : PASS
|
||||
cargo fmt --all -- --check : PASS
|
||||
audit Rust workspace rules : PASS
|
||||
audit Markdown tables : PASS
|
||||
cargo check --workspace : PASS
|
||||
cargo clippy --workspace --all-targets --all-features -- -D warnings : PASS
|
||||
cargo test -p ksp-worker-raw-transaction-ingest-lib --all-targets --all-features : FAIL
|
||||
```
|
||||
|
||||
Les `114` unit tests passaient, ainsi que les suites `cross_layer_completeness`, `dependency_boundary` et `hardening` exécutées avant l'échec.
|
||||
|
||||
Échec :
|
||||
|
||||
```text
|
||||
v0_3_12_pre_007_processing_frontier_snapshot_getters_are_public_and_processing_only : FAIL
|
||||
pre.007 public root overclaims continuity/replay: repair
|
||||
```
|
||||
|
||||
Le test historique vérifie directement `src/lib.rs` et interdit les tokens suivants :
|
||||
|
||||
```text
|
||||
ReplayInfo
|
||||
from_slot
|
||||
repair
|
||||
backfill
|
||||
```
|
||||
|
||||
## Cause
|
||||
|
||||
`pre.002` avait correctement gardé ses nouveaux contrats en `pub(crate)`, mais avait réexporté au crate-root plusieurs bornes internes nommées `*_REPAIR_*` ainsi que `RawTransactionIngestRepairCapabilityDescriptor`.
|
||||
|
||||
Ces éléments n'étaient pas publics hors crate, mais leur présence textuelle dans `src/lib.rs` violait malgré tout le contrat historique `pre.007` : la façade crate-root ne doit pas revendiquer une responsabilité de replay/repair.
|
||||
|
||||
Cinq bornes étaient en outre utilisées uniquement dans `continuity.rs` et son module de unit tests ; elles n'avaient donc pas besoin d'être `pub(crate)` ni réexportées.
|
||||
|
||||
## Correction
|
||||
|
||||
### Bornes de continuity
|
||||
|
||||
Les cinq bornes restent inchangées en valeur et en sémantique, mais deviennent strictement privées au module `continuity` :
|
||||
|
||||
```text
|
||||
MAX_RAW_TRANSACTION_INGEST_OPEN_REPAIR_GAPS = 64
|
||||
MAX_RAW_TRANSACTION_INGEST_REPAIR_ACTIVE_GAPS = 1
|
||||
MAX_RAW_TRANSACTION_INGEST_REPAIR_BLOCK_FETCH_IN_FLIGHT = 4
|
||||
MAX_RAW_TRANSACTION_INGEST_REPAIR_DISCOVERY_WINDOW_SLOTS = 512
|
||||
MAX_RAW_TRANSACTION_INGEST_REPAIR_RANGE_SLOTS = 4096
|
||||
```
|
||||
|
||||
Leurs réexports `pub(crate)` sont supprimés de `src/lib.rs`.
|
||||
|
||||
Les unit tests rattachés au module parent y accèdent maintenant via `super::...`, conformément à la règle de visibilité des éléments strictement privés.
|
||||
|
||||
### Capability descriptor partagé
|
||||
|
||||
Le seul descriptor réellement partagé entre `continuity.rs` et `runtime_resources.rs` reste `pub(crate)` et réexporté au crate-root, mais sous un nom source-neutre :
|
||||
|
||||
```text
|
||||
RawTransactionIngestRepairCapabilityDescriptor
|
||||
-> RawTransactionIngestContinuityCapabilityDescriptor
|
||||
```
|
||||
|
||||
Sa structure, ses validations et ses données ne changent pas.
|
||||
|
||||
Le helper privé `repair_capability_descriptor` de `runtime_resources.rs` n'est pas une façade crate-root et conserve son rôle actuel ; aucun repair I/O n'est ajouté.
|
||||
|
||||
### Canari de non-régression
|
||||
|
||||
Le test historique `tests/public_api.rs` n'est ni modifié ni assoupli.
|
||||
|
||||
Le canari `v0_3_14_pre_002_continuity_contracts_are_private_bounded_and_io_free` est renforcé afin d'exiger lui aussi :
|
||||
|
||||
```text
|
||||
src/lib.rs ne contient pas "repair"
|
||||
```
|
||||
|
||||
## Fichiers ajoutés
|
||||
|
||||
```text
|
||||
deltas/0.3.14/pre.002-fix.002.md
|
||||
```
|
||||
|
||||
## Fichiers modifiés
|
||||
|
||||
```text
|
||||
Cargo.toml
|
||||
crates/ksp-worker-raw-transaction-ingest-lib/src/lib.rs
|
||||
crates/ksp-worker-raw-transaction-ingest-lib/src/continuity.rs
|
||||
crates/ksp-worker-raw-transaction-ingest-lib/src/runtime_resources.rs
|
||||
crates/ksp-worker-raw-transaction-ingest-lib/unit_tests/continuity.rs
|
||||
crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
|
||||
```
|
||||
|
||||
## Fichiers supprimés
|
||||
|
||||
```text
|
||||
aucun
|
||||
```
|
||||
|
||||
## Version Cargo
|
||||
|
||||
Le fix modifie du code Rust ; conformément à `VER-ID-007` et `VER-ID-010` :
|
||||
|
||||
```text
|
||||
header Cargo.toml : 568 -> 569
|
||||
workspace.package.version : 0.3.14-pre.2.fix.1 -> 0.3.14-pre.2.fix.2
|
||||
```
|
||||
|
||||
Versions de fichiers :
|
||||
|
||||
```text
|
||||
src/lib.rs : 27 -> 28
|
||||
src/continuity.rs : 2 -> 3
|
||||
src/runtime_resources.rs : 28 -> 29
|
||||
unit_tests/continuity.rs : 1 -> 2
|
||||
tests/hardening.rs : 25 -> 26
|
||||
```
|
||||
|
||||
## Frontières préservées
|
||||
|
||||
```text
|
||||
aucun repair I/O
|
||||
aucune nouvelle tâche
|
||||
aucune nouvelle socket
|
||||
aucun retry Worker
|
||||
aucune nouvelle dépendance
|
||||
aucune nouvelle feature
|
||||
aucun accès Config depuis Worker
|
||||
aucun accès Job Backfill depuis Worker
|
||||
aucun backend Store physique depuis Worker
|
||||
aucune mutation Worker de Yellowstone from_slot
|
||||
aucun nouveau symbole public
|
||||
crate-root toujours exempte de ReplayInfo/from_slot/repair/backfill
|
||||
```
|
||||
|
||||
## Validations exécutées
|
||||
|
||||
Dans le sandbox de préparation :
|
||||
|
||||
```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
|
||||
scan exact des tokens ReplayInfo/from_slot/repair/backfill dans src/lib.rs
|
||||
scan des références vers l'ancien RawTransactionIngestRepairCapabilityDescriptor
|
||||
scan des références des bornes privées de continuity
|
||||
comparaison exacte pre.002-fix.001 -> pre.002-fix.002
|
||||
contrôle contenu archive delta
|
||||
unzip -t archive delta
|
||||
```
|
||||
|
||||
## Validations non exécutées
|
||||
|
||||
Le sandbox de préparation ne fournit pas le toolchain Cargo/Rust. Les gates suivants restent à exécuter côté opérateur :
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
Le test historique `v0_3_12_pre_007_processing_frontier_snapshot_getters_are_public_and_processing_only` n'est pas modifié.
|
||||
|
||||
## Décisions prises
|
||||
|
||||
```text
|
||||
fix strict de pre.002, sans nouvelle responsabilité fonctionnelle
|
||||
les bornes non partagées restent privées à continuity.rs
|
||||
seuls les éléments réellement partagés sont pub(crate) et réexportés au crate-root
|
||||
le descriptor partagé porte une identité continuity source-neutre
|
||||
aucun contournement du canari historique n'est accepté
|
||||
```
|
||||
|
||||
## Questions ouvertes
|
||||
|
||||
```text
|
||||
aucune pour ce fix
|
||||
```
|
||||
|
||||
## 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