140 lines
3.2 KiB
Markdown
140 lines
3.2 KiB
Markdown
<!-- file: deltas/0.2.8/pre.004-fix.002.md -->
|
|
<!-- version: 1 -->
|
|
|
|
# Delta `0.2.8-pre.004-fix.002` — provenance Helius Config composée
|
|
|
|
## 1. Objet
|
|
|
|
Ce second fix de `pre.004` corrige uniquement une hypothèse erronée du canari Config Helius introduit par `pre.004-fix.001`.
|
|
|
|
Le checkpoint opérateur prouve que :
|
|
|
|
```text
|
|
fmt / audit / check / clippy verts
|
|
Transport vert
|
|
Config 109/110
|
|
échec provenance.len() observé = 2, attendu = 1
|
|
```
|
|
|
|
Le runtime Config, le schema, les profils Helius mainnet/devnet et le mapping Config -> Transport sont corrects et ne sont pas modifiés.
|
|
|
|
Version workspace :
|
|
|
|
```text
|
|
0.2.8-pre.4.fix.2
|
|
```
|
|
|
|
Livraison / commit attendu :
|
|
|
|
```text
|
|
0.2.8-pre.004-fix.002
|
|
v0.2.8-pre.004-fix.002
|
|
```
|
|
|
|
Aucun tag prerelease.
|
|
|
|
## 2. Cause exacte
|
|
|
|
L'URL Helius est une chaîne composée :
|
|
|
|
```text
|
|
wss://mainnet.helius-rpc.com/?api-key=${KSP_SECRET_HELIUS_API_KEY:-...}
|
|
wss://devnet.helius-rpc.com/?api-key=${KSP_SECRET_HELIUS_API_KEY:-...}
|
|
```
|
|
|
|
Le modèle de provenance Config distingue les segments littéraux et les substitutions d'environnement.
|
|
|
|
Avec une valeur fournie par le process, la provenance correcte est donc :
|
|
|
|
```text
|
|
0 = ConfigValueProvenance::DocumentLiteral
|
|
1 = ConfigValueProvenance::EnvironmentProcess {
|
|
variable_name = KSP_SECRET_HELIUS_API_KEY
|
|
}
|
|
```
|
|
|
|
Le test de `fix.001` attendait à tort un seul segment, comme pour une valeur constituée uniquement d'un placeholder.
|
|
|
|
## 3. Correction
|
|
|
|
Le canari :
|
|
|
|
```text
|
|
helius_laserstream_mainnet_and_devnet_api_key_map_to_protocol_and_safe_redaction
|
|
```
|
|
|
|
attend désormais, pour mainnet et devnet :
|
|
|
|
```text
|
|
provenance.len() = 2
|
|
provenance[0] = DocumentLiteral
|
|
provenance[1].environment_source() = Process
|
|
provenance[1].variable_name() = KSP_SECRET_HELIUS_API_KEY
|
|
```
|
|
|
|
Les assertions déjà présentes restent inchangées :
|
|
|
|
```text
|
|
provider = helius
|
|
cluster = mainnet-beta / devnet
|
|
protocol = WsProtocolKind::HeliusLaserStream
|
|
runtime URL = vraie clé résolue
|
|
safe_value = URL avec api-key=********
|
|
Debug = aucune clé réelle
|
|
```
|
|
|
|
## 4. Invariants non modifiés
|
|
|
|
Aucune modification n'est apportée à :
|
|
|
|
```text
|
|
ConfigEnvironment
|
|
ResolvedConfigJson / provenance implementation
|
|
sensitivity / redaction
|
|
config/schemas/std.transport.schema.json
|
|
config/std.transport.json
|
|
config/examples/std.transport.example.json
|
|
fixture std.transport.json
|
|
mapping helius_laserstream -> HeliusLaserStream
|
|
profils Helius mainnet/devnet
|
|
KSP_SECRET_HELIUS_API_KEY
|
|
WsEndpointUrl
|
|
WsSession / façades / actor
|
|
transactionSubscribe
|
|
heartbeat
|
|
dependencies
|
|
```
|
|
|
|
`pre.004-fix.001.md` reste immutable.
|
|
|
|
## 5. Fichiers de la livraison
|
|
|
|
Nouveau :
|
|
|
|
```text
|
|
deltas/0.2.8/pre.004-fix.002.md
|
|
```
|
|
|
|
Modifiés :
|
|
|
|
```text
|
|
Cargo.toml
|
|
crates/ksp-config-lib/unit_tests/transport.rs
|
|
docs/plans/015-V0_2_8_HELIUS_LASERSTREAM_WEBSOCKET_PLAN.md
|
|
docs/validation/011-V0_2_8_HELIUS_LASERSTREAM_WEBSOCKET.md
|
|
```
|
|
|
|
## 6. Validation à rejouer
|
|
|
|
```bash
|
|
cargo fmt --all
|
|
python3 scripts/audit_rust_workspace_rules.py
|
|
cargo check --workspace
|
|
cargo clippy --workspace --all-targets
|
|
cargo test -p ksp-config-lib
|
|
cargo test -p ksp-onchain-transport-lib
|
|
cargo test --workspace
|
|
```
|
|
|
|
`pre.005` reste fermé jusqu'à réception de ce checkpoint intégralement vert.
|