v0.5.1-pre.009
This commit is contained in:
@@ -0,0 +1,785 @@
|
||||
<!-- file: olddocs/archivekbot3/docs/plans/V0_5_1_KHADHROONY_SOLANA_NAMESPACE_AND_CONFIG_PLAN.md -->
|
||||
<!-- version: 9 -->
|
||||
|
||||
# Plan archivé `0.5.1` — namespace Khadhroony Solana et configuration sûre
|
||||
|
||||
## 1. Statut de clôture
|
||||
|
||||
Ce document a servi de plan temporaire à `0.5.1` et est archivé lors de `0.5.1-pre.009`. Les prereleases `pre.001` à `pre.004` ont fermé l’inventaire puis migré crates, identités techniques et variables d’environnement ; `pre.005` à `pre.007` ont terminé le split logging/transport/listeners/store/wallet/execution ; `pre.008` et ses correctifs ont fermé les frontières source/runtime/public/diagnostic, TS-RS et la non-divulgation. `kb-app-demo-desktop` et le workspace racine ont conservé leur nom.
|
||||
|
||||
Le 10 août 2026, après `pre.008-delta-fix-003`, l’opérateur a validé `cargo fmt`, `cargo check --workspace`, `cargo clippy --all-targets`, l’audit workspace, `cargo test --workspace` et le démarrage Tauri. Les décisions durables ont été transférées au ROADMAP, aux guides, à la politique de namespace, aux TODO et au rapport de validation `0.5.1`. Ce plan n’est plus normatif.
|
||||
|
||||
## 2. Invariant du workspace racine
|
||||
|
||||
La migration `khadhroony-solana` **ne renomme pas le workspace, le dépôt ni le répertoire racine**.
|
||||
|
||||
Pendant toute la série pré-`1.0`, sauf décision ultérieure explicite :
|
||||
|
||||
```text
|
||||
workspace / repository / root directory = khadhroony-bot3
|
||||
```
|
||||
|
||||
Les bibliothèques internes Solana utilisent `ks-*` / `ks_*` et leurs variables possédées utilisent `KS_*`; les futurs contrats réellement spécifiques au Bot utiliseront `KB_*`. Elles restent toutes membres du workspace `khadhroony-bot3`. Un éventuel renommage du workspace racine ne doit pas être entrepris avant `khadhroony-bot3` `1.0` ou une version ultérieure explicitement dédiée à cette opération.
|
||||
|
||||
## 3. Frontière des domaines
|
||||
|
||||
- `khadhroony-project` : umbrella de projets de trading et/ou crypto, pouvant aussi contenir des projets de trading non crypto comme de futurs `khadhroony-xtb` ou `khadhroony-mt5` ;
|
||||
- `khadhroony-solana` : bibliothèques généralistes dédiées à Solana et réutilisables par plusieurs applications ;
|
||||
- `khadhroony-bot3` : workspace applicatif actuel et futur robot de trading consommant les composants `khadhroony-solana` ;
|
||||
- `kb-app-demo-desktop` : application du workspace Bot, actuellement banc de validation des composants Solana mais susceptible d'accueillir plus tard des démonstrations propres au bot.
|
||||
|
||||
`ks-pipeline-demo-scenarios` appartient bien à `khadhroony-solana` : ses scénarios qualifient les composants Solana et ne dépendent pas d'une stratégie de trading Bot.
|
||||
|
||||
## 4. Inventaire des crates et ordre de migration
|
||||
|
||||
| Package actuel | Identifiant Rust actuel | Package cible | Identifiant Rust cible | Dépendances workspace directes actuelles | Ordre |
|
||||
|------------------------------|------------------------------|------------------------------|------------------------------|----------------------------------------------------------------------------------------------------|------:|
|
||||
| `kb-core` | `kb_core` | `ks-core` | `ks_core` | — | 1 |
|
||||
| `kb-program-ids` | `kb_program_ids` | `ks-program-ids` | `ks_program_ids` | — | 2 |
|
||||
| `kb-config` | `kb_config` | `ks-config` | `ks_config` | kb-core | 3 |
|
||||
| `kb-logging` | `kb_logging` | `ks-logging` | `ks_logging` | kb-core | 4 |
|
||||
| `kb-wallet` | `kb_wallet` | `ks-wallet` | `ks_wallet` | kb-core | 5 |
|
||||
| `kb-lib` | `kb_lib` | `ks-lib` | `ks_lib` | kb-core, kb-program-ids | 6 |
|
||||
| `kb-onchain-transport` | `kb_onchain_transport` | `ks-onchain-transport` | `ks_onchain_transport` | kb-config, kb-core, kb-lib | 7 |
|
||||
| `kb-store` | `kb_store` | `ks-store` | `ks_store` | kb-core, kb-lib | 8 |
|
||||
| `kb-pipeline` | `kb_pipeline` | `ks-pipeline` | `ks_pipeline` | kb-core, kb-config, kb-lib, kb-onchain-transport, kb-program-ids, kb-store | 9 |
|
||||
| `kb-pipeline-demo-scenarios` | `kb_pipeline_demo_scenarios` | `ks-pipeline-demo-scenarios` | `ks_pipeline_demo_scenarios` | kb-core, kb-config, kb-lib, kb-onchain-transport, kb-pipeline, kb-program-ids, kb-store, kb-wallet | 10 |
|
||||
|
||||
`kb-app-demo-desktop` est adapté en dernier, mais garde son package, son répertoire et ses identifiants applicatifs.
|
||||
|
||||
`kb-pipeline-demo-scenarios` possède également :
|
||||
|
||||
```text
|
||||
lib : kb_pipeline_demo_scenarios -> ks_pipeline_demo_scenarios
|
||||
bin : kb-pipeline-demo-scenarios-cli -> ks-pipeline-demo-scenarios-cli
|
||||
```
|
||||
|
||||
### 4.1 Surface textuelle mesurée avant migration
|
||||
|
||||
Les valeurs suivantes sont des métriques d'orientation sur les fichiers actifs, hors archives et artefacts générés. Elles montrent qu'un renommage massif en une seule opération serait difficile à diagnostiquer.
|
||||
|
||||
| Crate | Références package / fichiers | Références identifiant Rust / fichiers |
|
||||
|------------------------------|------------------------------:|---------------------------------------:|
|
||||
| `kb-core` | 51 / 32 | 3165 / 407 |
|
||||
| `kb-config` | 56 / 33 | 201 / 44 |
|
||||
| `kb-lib` | 3145 / 550 | 2785 / 97 |
|
||||
| `kb-logging` | 72 / 27 | 22 / 3 |
|
||||
| `kb-program-ids` | 42 / 28 | 1413 / 334 |
|
||||
| `kb-pipeline` | 287 / 112 | 436 / 38 |
|
||||
| `kb-pipeline-demo-scenarios` | 145 / 75 | 173 / 18 |
|
||||
| `kb-onchain-transport` | 125 / 56 | 530 / 50 |
|
||||
| `kb-store` | 157 / 81 | 344 / 30 |
|
||||
| `kb-wallet` | 75 / 30 | 53 / 17 |
|
||||
|
||||
Le volume `kb-lib` inclut notamment les identités techniques `kb-lib.*`; il ne doit pas être interprété comme autant d'importations Cargo.
|
||||
|
||||
### 4.2 Tests d'API externe à préserver
|
||||
|
||||
- `kb-lib/tests/external_decoder_api.rs` ;
|
||||
- `kb-lib/tests/external_executor_api.rs` ;
|
||||
- `kb-lib/tests/external_materializer_api.rs` ;
|
||||
- `kb-lib/tests/external_metaplex_token_metadata_executor_api.rs` ;
|
||||
- `kb-lib/tests/external_solana_program_metadata_account_api.rs` ;
|
||||
- `kb-lib/tests/external_solana_program_metadata_executor_api.rs` ;
|
||||
- `kb-lib/tests/external_solana_program_metadata_instruction_api.rs` ;
|
||||
- `kb-lib/tests/external_solana_program_metadata_model_api.rs` ;
|
||||
- `kb-lib/tests/operation_naming_matrix.rs` ;
|
||||
- `kb-pipeline/tests/external_metadata_metaplex_token_metadata_pipeline_api.rs` ;
|
||||
- `kb-pipeline/tests/external_metadata_solana_program_pipeline_api.rs` ;
|
||||
- `kb-pipeline/tests/external_metadata_token_2022_pipeline_api.rs` ;
|
||||
- `kb-pipeline-demo-scenarios/tests/external_metadata_solana_program_scenarios_api.rs`.
|
||||
|
||||
Les scripts d'audit contenant des références directes aux noms actuels incluent au minimum :
|
||||
|
||||
- `scripts/audit_khadhroony_workspace_rules.py` ;
|
||||
- `scripts/audit_rust_general_rules.py`.
|
||||
|
||||
Le renommage doit préserver la sémantique de ces audits, pas seulement les faire compiler.
|
||||
|
||||
## 5. Contrats qui suivent le renommage de crate
|
||||
|
||||
Le renommage physique `kb-*` -> `ks-*` couvre en `0.5.1` :
|
||||
|
||||
- répertoires des dix crates ;
|
||||
- `workspace.members` ;
|
||||
- noms `package` Cargo ;
|
||||
- noms de dépendances workspace et chemins `path` ;
|
||||
- identifiants Rust `kb_*` -> `ks_*` ;
|
||||
- nom de la lib et du CLI de `ks-pipeline-demo-scenarios` ;
|
||||
- imports, exports et tests d'API externe ;
|
||||
- scripts d'audit et commandes documentées ;
|
||||
- targets de tracing qui représentent réellement une crate `khadhroony-solana` ;
|
||||
- bindings TS-RS à la source lorsqu'ils incorporent une identité de crate. Les fichiers générés ne sont pas livrés sans nécessité explicite.
|
||||
|
||||
Ne suivent **pas** automatiquement le renommage :
|
||||
|
||||
- le workspace/repository/répertoire racine `khadhroony-bot3` ;
|
||||
- `kb-app-demo-desktop` ;
|
||||
- les tables SQL `kb_sol_*`, réservées à `0.5.3` -> `k_sol_*` ;
|
||||
- les éventuelles futures tables Bot `kb_*` ;
|
||||
- les noms sémantiques qui n'ont jamais été préfixés `kb` et ne représentent pas une identité de crate.
|
||||
|
||||
## 6. Identités runtime et persistées
|
||||
|
||||
L'inventaire actif vérifié en `pre.003` contient **255 identités uniques `kb-lib.*` à migrer** :
|
||||
|
||||
- 118 décodeurs ;
|
||||
- 112 exécuteurs ;
|
||||
- 25 matérialiseurs.
|
||||
|
||||
Le comptage de cadrage `pre.001` indiquait 256/113 exécuteurs ; le rescannage exhaustif du corpus réellement utilisé a corrigé cette dérive avant migration. Le mapping ci-dessous reste la source exhaustive des 255 identités historiques vers leurs identités `ks-lib-*`.
|
||||
|
||||
La règle de migration est :
|
||||
|
||||
```text
|
||||
kb-lib.decoder.<suffix> -> ks-lib-decoder.<suffix>
|
||||
kb-lib.executor.<suffix> -> ks-lib-executor.<suffix>
|
||||
kb-lib.materializer.<suffix> -> ks-lib-materializer.<suffix>
|
||||
```
|
||||
|
||||
Cette migration est volontaire avant `0.6.x` : les bases peuvent encore être reconstruites ou migrées, et conserver des identités `kb-lib.*` créerait une dette durable dans les replays, diagnostics et données persistées.
|
||||
|
||||
Les `processor_name` sémantiques déjà indépendants du préfixe de crate, par exemple `materializer.admin` ou `materializer.trades`, **ne doivent pas recevoir artificiellement un préfixe `ks-lib-`**. Seules les identités effectivement `kb`-namespacées migrent.
|
||||
|
||||
Les targets de tracing de crates génériques doivent également migrer vers `ks-*`. Les routes de logging doivent être mises à jour dans la même prerelease afin qu'un changement de target ne rende aucune sortie silencieuse.
|
||||
|
||||
### 6.1 Inventaire exhaustif des identités `kb-lib.*`
|
||||
|
||||
| Identité actuelle | Identité cible |
|
||||
|----------------------------------------------------------------|----------------------------------------------------------------|
|
||||
| `kb-lib.decoder.adapter.saber_decimal_wrapper` | `ks-lib-decoder.adapter.saber_decimal_wrapper` |
|
||||
| `kb-lib.decoder.adapter.spl_token_wrap` | `ks-lib-decoder.adapter.spl_token_wrap` |
|
||||
| `kb-lib.decoder.admin.jupiter_lock` | `ks-lib-decoder.admin.jupiter_lock` |
|
||||
| `kb-lib.decoder.admin.pump_fees` | `ks-lib-decoder.admin.pump_fees` |
|
||||
| `kb-lib.decoder.amm.aldrin_v1` | `ks-lib-decoder.amm.aldrin_v1` |
|
||||
| `kb-lib.decoder.amm.aldrin_v2` | `ks-lib-decoder.amm.aldrin_v2` |
|
||||
| `kb-lib.decoder.amm.alphaq` | `ks-lib-decoder.amm.alphaq` |
|
||||
| `kb-lib.decoder.amm.believe` | `ks-lib-decoder.amm.believe` |
|
||||
| `kb-lib.decoder.amm.bonk_swap` | `ks-lib-decoder.amm.bonk_swap` |
|
||||
| `kb-lib.decoder.amm.fluxbeam` | `ks-lib-decoder.amm.fluxbeam` |
|
||||
| `kb-lib.decoder.amm.goon_fi` | `ks-lib-decoder.amm.goon_fi` |
|
||||
| `kb-lib.decoder.amm.goosefx_gamma` | `ks-lib-decoder.amm.goosefx_gamma` |
|
||||
| `kb-lib.decoder.amm.goosefx_v2` | `ks-lib-decoder.amm.goosefx_v2` |
|
||||
| `kb-lib.decoder.amm.guac_swap` | `ks-lib-decoder.amm.guac_swap` |
|
||||
| `kb-lib.decoder.amm.lifinity_swap_v2` | `ks-lib-decoder.amm.lifinity_swap_v2` |
|
||||
| `kb-lib.decoder.amm.metadao_futarchy_amm` | `ks-lib-decoder.amm.metadao_futarchy_amm` |
|
||||
| `kb-lib.decoder.amm.metadao_v0_5` | `ks-lib-decoder.amm.metadao_v0_5` |
|
||||
| `kb-lib.decoder.amm.meteora_damm_v1` | `ks-lib-decoder.amm.meteora_damm_v1` |
|
||||
| `kb-lib.decoder.amm.meteora_damm_v2` | `ks-lib-decoder.amm.meteora_damm_v2` |
|
||||
| `kb-lib.decoder.amm.obric_v2` | `ks-lib-decoder.amm.obric_v2` |
|
||||
| `kb-lib.decoder.amm.one_dex` | `ks-lib-decoder.amm.one_dex` |
|
||||
| `kb-lib.decoder.amm.pump_swap` | `ks-lib-decoder.amm.pump_swap` |
|
||||
| `kb-lib.decoder.amm.raydium_lp_v4` | `ks-lib-decoder.amm.raydium_lp_v4` |
|
||||
| `kb-lib.decoder.amm.solfi` | `ks-lib-decoder.amm.solfi` |
|
||||
| `kb-lib.decoder.amm.solfi_v2` | `ks-lib-decoder.amm.solfi_v2` |
|
||||
| `kb-lib.decoder.amm.vertigo` | `ks-lib-decoder.amm.vertigo` |
|
||||
| `kb-lib.decoder.amm.virtuals` | `ks-lib-decoder.amm.virtuals` |
|
||||
| `kb-lib.decoder.amm.woofi` | `ks-lib-decoder.amm.woofi` |
|
||||
| `kb-lib.decoder.amm.zero_fi` | `ks-lib-decoder.amm.zero_fi` |
|
||||
| `kb-lib.decoder.amm.zora` | `ks-lib-decoder.amm.zora` |
|
||||
| `kb-lib.decoder.anchor` | `ks-lib-decoder.anchor` |
|
||||
| `kb-lib.decoder.api` | `ks-lib-decoder.api` |
|
||||
| `kb-lib.decoder.bridge.circle_cctp_token_messenger_minter` | `ks-lib-decoder.bridge.circle_cctp_token_messenger_minter` |
|
||||
| `kb-lib.decoder.bridge.circle_cctp_token_messenger_minter_v2` | `ks-lib-decoder.bridge.circle_cctp_token_messenger_minter_v2` |
|
||||
| `kb-lib.decoder.bridge.layer_zero_endpoint` | `ks-lib-decoder.bridge.layer_zero_endpoint` |
|
||||
| `kb-lib.decoder.bridge.layer_zero_executor` | `ks-lib-decoder.bridge.layer_zero_executor` |
|
||||
| `kb-lib.decoder.clmm.byreal` | `ks-lib-decoder.clmm.byreal` |
|
||||
| `kb-lib.decoder.clmm.fusion` | `ks-lib-decoder.clmm.fusion` |
|
||||
| `kb-lib.decoder.clmm.orca_whirlpool` | `ks-lib-decoder.clmm.orca_whirlpool` |
|
||||
| `kb-lib.decoder.clmm.pancake_swap` | `ks-lib-decoder.clmm.pancake_swap` |
|
||||
| `kb-lib.decoder.clmm.raydium` | `ks-lib-decoder.clmm.raydium` |
|
||||
| `kb-lib.decoder.clmm.stabble` | `ks-lib-decoder.clmm.stabble` |
|
||||
| `kb-lib.decoder.cpmm.raydium` | `ks-lib-decoder.cpmm.raydium` |
|
||||
| `kb-lib.decoder.dlmm.meteora` | `ks-lib-decoder.dlmm.meteora` |
|
||||
| `kb-lib.decoder.fees.bags_fee_share_v1` | `ks-lib-decoder.fees.bags_fee_share_v1` |
|
||||
| `kb-lib.decoder.fees.bags_fee_share_v2` | `ks-lib-decoder.fees.bags_fee_share_v2` |
|
||||
| `kb-lib.decoder.fees.pump_fees` | `ks-lib-decoder.fees.pump_fees` |
|
||||
| `kb-lib.decoder.governance.metadao_bid_wall` | `ks-lib-decoder.governance.metadao_bid_wall` |
|
||||
| `kb-lib.decoder.governance.metadao_futarchy` | `ks-lib-decoder.governance.metadao_futarchy` |
|
||||
| `kb-lib.decoder.governance.squads_multisig` | `ks-lib-decoder.governance.squads_multisig` |
|
||||
| `kb-lib.decoder.launchpad.boop_fun` | `ks-lib-decoder.launchpad.boop_fun` |
|
||||
| `kb-lib.decoder.launchpad.metadao_ico` | `ks-lib-decoder.launchpad.metadao_ico` |
|
||||
| `kb-lib.decoder.launchpad.meteora_dbc` | `ks-lib-decoder.launchpad.meteora_dbc` |
|
||||
| `kb-lib.decoder.launchpad.moonit` | `ks-lib-decoder.launchpad.moonit` |
|
||||
| `kb-lib.decoder.launchpad.orca_wavebreak` | `ks-lib-decoder.launchpad.orca_wavebreak` |
|
||||
| `kb-lib.decoder.launchpad.printr` | `ks-lib-decoder.launchpad.printr` |
|
||||
| `kb-lib.decoder.launchpad.pump_fun` | `ks-lib-decoder.launchpad.pump_fun` |
|
||||
| `kb-lib.decoder.launchpad.pump_pumpup_ai` | `ks-lib-decoder.launchpad.pump_pumpup_ai` |
|
||||
| `kb-lib.decoder.launchpad.raydium_launchlab` | `ks-lib-decoder.launchpad.raydium_launchlab` |
|
||||
| `kb-lib.decoder.launchpad.virtuals` | `ks-lib-decoder.launchpad.virtuals` |
|
||||
| `kb-lib.decoder.lending.clone` | `ks-lib-decoder.lending.clone` |
|
||||
| `kb-lib.decoder.lending.jupiter_lend_borrow` | `ks-lib-decoder.lending.jupiter_lend_borrow` |
|
||||
| `kb-lib.decoder.lending.jupiter_lend_earn` | `ks-lib-decoder.lending.jupiter_lend_earn` |
|
||||
| `kb-lib.decoder.lending.jupiter_lend_flash_loan` | `ks-lib-decoder.lending.jupiter_lend_flash_loan` |
|
||||
| `kb-lib.decoder.lending.jupiter_lend_liquidity` | `ks-lib-decoder.lending.jupiter_lend_liquidity` |
|
||||
| `kb-lib.decoder.lending.kamino` | `ks-lib-decoder.lending.kamino` |
|
||||
| `kb-lib.decoder.lending.marginfi_v2` | `ks-lib-decoder.lending.marginfi_v2` |
|
||||
| `kb-lib.decoder.lock.raydium_lp` | `ks-lib-decoder.lock.raydium_lp` |
|
||||
| `kb-lib.decoder.metadata.metaplex_token_metadata` | `ks-lib-decoder.metadata.metaplex_token_metadata` |
|
||||
| `kb-lib.decoder.metadata.solana_program_metadata` | `ks-lib-decoder.metadata.solana_program_metadata` |
|
||||
| `kb-lib.decoder.metadata.spl_name_service` | `ks-lib-decoder.metadata.spl_name_service` |
|
||||
| `kb-lib.decoder.nft.metaplex_bubblegum` | `ks-lib-decoder.nft.metaplex_bubblegum` |
|
||||
| `kb-lib.decoder.nft.tensor_cnft` | `ks-lib-decoder.nft.tensor_cnft` |
|
||||
| `kb-lib.decoder.orderbook.jupiter_limit_order` | `ks-lib-decoder.orderbook.jupiter_limit_order` |
|
||||
| `kb-lib.decoder.orderbook.jupiter_limit_order_v2` | `ks-lib-decoder.orderbook.jupiter_limit_order_v2` |
|
||||
| `kb-lib.decoder.orderbook.openbook_v2` | `ks-lib-decoder.orderbook.openbook_v2` |
|
||||
| `kb-lib.decoder.perpetuals.drift_v2` | `ks-lib-decoder.perpetuals.drift_v2` |
|
||||
| `kb-lib.decoder.perpetuals.jupiter` | `ks-lib-decoder.perpetuals.jupiter` |
|
||||
| `kb-lib.decoder.perpetuals.phoenix_eternal` | `ks-lib-decoder.perpetuals.phoenix_eternal` |
|
||||
| `kb-lib.decoder.perpetuals.zeta` | `ks-lib-decoder.perpetuals.zeta` |
|
||||
| `kb-lib.decoder.router.dflow_aggregator_v4` | `ks-lib-decoder.router.dflow_aggregator_v4` |
|
||||
| `kb-lib.decoder.router.jupiter_aggregator_v4` | `ks-lib-decoder.router.jupiter_aggregator_v4` |
|
||||
| `kb-lib.decoder.router.jupiter_aggregator_v6` | `ks-lib-decoder.router.jupiter_aggregator_v6` |
|
||||
| `kb-lib.decoder.router.jupiter_dca` | `ks-lib-decoder.router.jupiter_dca` |
|
||||
| `kb-lib.decoder.router.okx_labs_v1` | `ks-lib-decoder.router.okx_labs_v1` |
|
||||
| `kb-lib.decoder.router.okx_labs_v2` | `ks-lib-decoder.router.okx_labs_v2` |
|
||||
| `kb-lib.decoder.rwa.ondo_global_markets` | `ks-lib-decoder.rwa.ondo_global_markets` |
|
||||
| `kb-lib.decoder.solana.core` | `ks-lib-decoder.solana.core` |
|
||||
| `kb-lib.decoder.spl.account_compression` | `ks-lib-decoder.spl.account_compression` |
|
||||
| `kb-lib.decoder.spl.associated_token_account` | `ks-lib-decoder.spl.associated_token_account` |
|
||||
| `kb-lib.decoder.spl.elgamal_registry` | `ks-lib-decoder.spl.elgamal_registry` |
|
||||
| `kb-lib.decoder.spl.memo` | `ks-lib-decoder.spl.memo` |
|
||||
| `kb-lib.decoder.spl.noop` | `ks-lib-decoder.spl.noop` |
|
||||
| `kb-lib.decoder.spl.single_pool` | `ks-lib-decoder.spl.single_pool` |
|
||||
| `kb-lib.decoder.spl.stake_pool` | `ks-lib-decoder.spl.stake_pool` |
|
||||
| `kb-lib.decoder.spl.token` | `ks-lib-decoder.spl.token` |
|
||||
| `kb-lib.decoder.spl.token_2022` | `ks-lib-decoder.spl.token_2022` |
|
||||
| `kb-lib.decoder.stable.swap_hylo_exchange` | `ks-lib-decoder.stable.swap_hylo_exchange` |
|
||||
| `kb-lib.decoder.stable.swap_jupiter_stable` | `ks-lib-decoder.stable.swap_jupiter_stable` |
|
||||
| `kb-lib.decoder.stable.swap_numeraire` | `ks-lib-decoder.stable.swap_numeraire` |
|
||||
| `kb-lib.decoder.stable.swap_stabble` | `ks-lib-decoder.stable.swap_stabble` |
|
||||
| `kb-lib.decoder.staking.jito_tip_distribution` | `ks-lib-decoder.staking.jito_tip_distribution` |
|
||||
| `kb-lib.decoder.staking.kamino_farm` | `ks-lib-decoder.staking.kamino_farm` |
|
||||
| `kb-lib.decoder.staking.marinade_finance` | `ks-lib-decoder.staking.marinade_finance` |
|
||||
| `kb-lib.decoder.staking.solayer` | `ks-lib-decoder.staking.solayer` |
|
||||
| `kb-lib.decoder.storage.solana_record` | `ks-lib-decoder.storage.solana_record` |
|
||||
| `kb-lib.decoder.strategy.jupiter_dca` | `ks-lib-decoder.strategy.jupiter_dca` |
|
||||
| `kb-lib.decoder.treasury.helium_treasury_management` | `ks-lib-decoder.treasury.helium_treasury_management` |
|
||||
| `kb-lib.decoder.vault.carrot_defi` | `ks-lib-decoder.vault.carrot_defi` |
|
||||
| `kb-lib.decoder.vault.hylo_stability_pool` | `ks-lib-decoder.vault.hylo_stability_pool` |
|
||||
| `kb-lib.decoder.vault.kamino` | `ks-lib-decoder.vault.kamino` |
|
||||
| `kb-lib.decoder.vault.kamino_v2` | `ks-lib-decoder.vault.kamino_v2` |
|
||||
| `kb-lib.decoder.vault.kamino_yvaults` | `ks-lib-decoder.vault.kamino_yvaults` |
|
||||
| `kb-lib.decoder.vault.meteora` | `ks-lib-decoder.vault.meteora` |
|
||||
| `kb-lib.decoder.vesting.jupiter_lock` | `ks-lib-decoder.vesting.jupiter_lock` |
|
||||
| `kb-lib.decoder.vesting.streamflow` | `ks-lib-decoder.vesting.streamflow` |
|
||||
| `kb-lib.decoder.wallet.jupiter_apepro_smart_wallet` | `ks-lib-decoder.wallet.jupiter_apepro_smart_wallet` |
|
||||
| `kb-lib.decoder.weighted.swap_stabble` | `ks-lib-decoder.weighted.swap_stabble` |
|
||||
| `kb-lib.executor.adapter.saber_decimal_wrapper` | `ks-lib-executor.adapter.saber_decimal_wrapper` |
|
||||
| `kb-lib.executor.adapter.spl_token_wrap` | `ks-lib-executor.adapter.spl_token_wrap` |
|
||||
| `kb-lib.executor.amm.aldrin_v1` | `ks-lib-executor.amm.aldrin_v1` |
|
||||
| `kb-lib.executor.amm.aldrin_v2` | `ks-lib-executor.amm.aldrin_v2` |
|
||||
| `kb-lib.executor.amm.alphaq` | `ks-lib-executor.amm.alphaq` |
|
||||
| `kb-lib.executor.amm.believe` | `ks-lib-executor.amm.believe` |
|
||||
| `kb-lib.executor.amm.bonk_swap` | `ks-lib-executor.amm.bonk_swap` |
|
||||
| `kb-lib.executor.amm.fluxbeam` | `ks-lib-executor.amm.fluxbeam` |
|
||||
| `kb-lib.executor.amm.goon_fi` | `ks-lib-executor.amm.goon_fi` |
|
||||
| `kb-lib.executor.amm.goosefx_gamma` | `ks-lib-executor.amm.goosefx_gamma` |
|
||||
| `kb-lib.executor.amm.goosefx_v2` | `ks-lib-executor.amm.goosefx_v2` |
|
||||
| `kb-lib.executor.amm.guac_swap` | `ks-lib-executor.amm.guac_swap` |
|
||||
| `kb-lib.executor.amm.lifinity_swap_v2` | `ks-lib-executor.amm.lifinity_swap_v2` |
|
||||
| `kb-lib.executor.amm.metadao_v0_5` | `ks-lib-executor.amm.metadao_v0_5` |
|
||||
| `kb-lib.executor.amm.meteora_damm_v1` | `ks-lib-executor.amm.meteora_damm_v1` |
|
||||
| `kb-lib.executor.amm.meteora_damm_v2` | `ks-lib-executor.amm.meteora_damm_v2` |
|
||||
| `kb-lib.executor.amm.obric_v2` | `ks-lib-executor.amm.obric_v2` |
|
||||
| `kb-lib.executor.amm.one_dex` | `ks-lib-executor.amm.one_dex` |
|
||||
| `kb-lib.executor.amm.pump_swap` | `ks-lib-executor.amm.pump_swap` |
|
||||
| `kb-lib.executor.amm.raydium_lp_v4` | `ks-lib-executor.amm.raydium_lp_v4` |
|
||||
| `kb-lib.executor.amm.solfi` | `ks-lib-executor.amm.solfi` |
|
||||
| `kb-lib.executor.amm.solfi_v2` | `ks-lib-executor.amm.solfi_v2` |
|
||||
| `kb-lib.executor.amm.vertigo` | `ks-lib-executor.amm.vertigo` |
|
||||
| `kb-lib.executor.amm.woofi` | `ks-lib-executor.amm.woofi` |
|
||||
| `kb-lib.executor.amm.zero_fi` | `ks-lib-executor.amm.zero_fi` |
|
||||
| `kb-lib.executor.amm.zora` | `ks-lib-executor.amm.zora` |
|
||||
| `kb-lib.executor.bridge.circle_cctp_token_messenger_minter` | `ks-lib-executor.bridge.circle_cctp_token_messenger_minter` |
|
||||
| `kb-lib.executor.bridge.circle_cctp_token_messenger_minter_v2` | `ks-lib-executor.bridge.circle_cctp_token_messenger_minter_v2` |
|
||||
| `kb-lib.executor.bridge.layer_zero_endpoint` | `ks-lib-executor.bridge.layer_zero_endpoint` |
|
||||
| `kb-lib.executor.bridge.layer_zero_executor` | `ks-lib-executor.bridge.layer_zero_executor` |
|
||||
| `kb-lib.executor.clmm.byreal` | `ks-lib-executor.clmm.byreal` |
|
||||
| `kb-lib.executor.clmm.fusion` | `ks-lib-executor.clmm.fusion` |
|
||||
| `kb-lib.executor.clmm.orca_whirlpool` | `ks-lib-executor.clmm.orca_whirlpool` |
|
||||
| `kb-lib.executor.clmm.pancake_swap` | `ks-lib-executor.clmm.pancake_swap` |
|
||||
| `kb-lib.executor.clmm.raydium` | `ks-lib-executor.clmm.raydium` |
|
||||
| `kb-lib.executor.clmm.stabble` | `ks-lib-executor.clmm.stabble` |
|
||||
| `kb-lib.executor.cpmm.raydium` | `ks-lib-executor.cpmm.raydium` |
|
||||
| `kb-lib.executor.dlmm.meteora` | `ks-lib-executor.dlmm.meteora` |
|
||||
| `kb-lib.executor.fees.bags_fee_share_v1` | `ks-lib-executor.fees.bags_fee_share_v1` |
|
||||
| `kb-lib.executor.fees.bags_fee_share_v2` | `ks-lib-executor.fees.bags_fee_share_v2` |
|
||||
| `kb-lib.executor.fees.pump_fees` | `ks-lib-executor.fees.pump_fees` |
|
||||
| `kb-lib.executor.governance.metadao_bid_wall` | `ks-lib-executor.governance.metadao_bid_wall` |
|
||||
| `kb-lib.executor.governance.metadao_futarchy` | `ks-lib-executor.governance.metadao_futarchy` |
|
||||
| `kb-lib.executor.governance.squads_multisig` | `ks-lib-executor.governance.squads_multisig` |
|
||||
| `kb-lib.executor.launchpad.boop_fun` | `ks-lib-executor.launchpad.boop_fun` |
|
||||
| `kb-lib.executor.launchpad.metadao_ico` | `ks-lib-executor.launchpad.metadao_ico` |
|
||||
| `kb-lib.executor.launchpad.meteora_dbc` | `ks-lib-executor.launchpad.meteora_dbc` |
|
||||
| `kb-lib.executor.launchpad.moonit` | `ks-lib-executor.launchpad.moonit` |
|
||||
| `kb-lib.executor.launchpad.orca_wavebreak` | `ks-lib-executor.launchpad.orca_wavebreak` |
|
||||
| `kb-lib.executor.launchpad.printr` | `ks-lib-executor.launchpad.printr` |
|
||||
| `kb-lib.executor.launchpad.pump_fun` | `ks-lib-executor.launchpad.pump_fun` |
|
||||
| `kb-lib.executor.launchpad.pump_pumpup_ai` | `ks-lib-executor.launchpad.pump_pumpup_ai` |
|
||||
| `kb-lib.executor.launchpad.raydium_launchlab` | `ks-lib-executor.launchpad.raydium_launchlab` |
|
||||
| `kb-lib.executor.launchpad.virtuals` | `ks-lib-executor.launchpad.virtuals` |
|
||||
| `kb-lib.executor.lending.clone` | `ks-lib-executor.lending.clone` |
|
||||
| `kb-lib.executor.lending.jupiter_lend_borrow` | `ks-lib-executor.lending.jupiter_lend_borrow` |
|
||||
| `kb-lib.executor.lending.jupiter_lend_earn` | `ks-lib-executor.lending.jupiter_lend_earn` |
|
||||
| `kb-lib.executor.lending.jupiter_lend_flash_loan` | `ks-lib-executor.lending.jupiter_lend_flash_loan` |
|
||||
| `kb-lib.executor.lending.jupiter_lend_liquidity` | `ks-lib-executor.lending.jupiter_lend_liquidity` |
|
||||
| `kb-lib.executor.lending.kamino` | `ks-lib-executor.lending.kamino` |
|
||||
| `kb-lib.executor.lending.marginfi_v2` | `ks-lib-executor.lending.marginfi_v2` |
|
||||
| `kb-lib.executor.lock.raydium_lp` | `ks-lib-executor.lock.raydium_lp` |
|
||||
| `kb-lib.executor.metadata.metaplex_token_metadata` | `ks-lib-executor.metadata.metaplex_token_metadata` |
|
||||
| `kb-lib.executor.metadata.solana_program_metadata` | `ks-lib-executor.metadata.solana_program_metadata` |
|
||||
| `kb-lib.executor.metadata.spl_name_service` | `ks-lib-executor.metadata.spl_name_service` |
|
||||
| `kb-lib.executor.nft.metaplex_bubblegum` | `ks-lib-executor.nft.metaplex_bubblegum` |
|
||||
| `kb-lib.executor.nft.tensor_cnft` | `ks-lib-executor.nft.tensor_cnft` |
|
||||
| `kb-lib.executor.orderbook.jupiter_limit_order` | `ks-lib-executor.orderbook.jupiter_limit_order` |
|
||||
| `kb-lib.executor.orderbook.jupiter_limit_order_v2` | `ks-lib-executor.orderbook.jupiter_limit_order_v2` |
|
||||
| `kb-lib.executor.orderbook.openbook_v2` | `ks-lib-executor.orderbook.openbook_v2` |
|
||||
| `kb-lib.executor.perpetuals.drift_v2` | `ks-lib-executor.perpetuals.drift_v2` |
|
||||
| `kb-lib.executor.perpetuals.jupiter` | `ks-lib-executor.perpetuals.jupiter` |
|
||||
| `kb-lib.executor.perpetuals.phoenix_eternal` | `ks-lib-executor.perpetuals.phoenix_eternal` |
|
||||
| `kb-lib.executor.perpetuals.zeta` | `ks-lib-executor.perpetuals.zeta` |
|
||||
| `kb-lib.executor.router.dflow_aggregator_v4` | `ks-lib-executor.router.dflow_aggregator_v4` |
|
||||
| `kb-lib.executor.router.jupiter_aggregator_v4` | `ks-lib-executor.router.jupiter_aggregator_v4` |
|
||||
| `kb-lib.executor.router.jupiter_aggregator_v6` | `ks-lib-executor.router.jupiter_aggregator_v6` |
|
||||
| `kb-lib.executor.router.okx_labs_v1` | `ks-lib-executor.router.okx_labs_v1` |
|
||||
| `kb-lib.executor.router.okx_labs_v2` | `ks-lib-executor.router.okx_labs_v2` |
|
||||
| `kb-lib.executor.rwa.ondo_global_markets` | `ks-lib-executor.rwa.ondo_global_markets` |
|
||||
| `kb-lib.executor.solana.core` | `ks-lib-executor.solana.core` |
|
||||
| `kb-lib.executor.solana.transaction` | `ks-lib-executor.solana.transaction` |
|
||||
| `kb-lib.executor.spl.account_compression` | `ks-lib-executor.spl.account_compression` |
|
||||
| `kb-lib.executor.spl.associated_token_account` | `ks-lib-executor.spl.associated_token_account` |
|
||||
| `kb-lib.executor.spl.elgamal_registry` | `ks-lib-executor.spl.elgamal_registry` |
|
||||
| `kb-lib.executor.spl.memo` | `ks-lib-executor.spl.memo` |
|
||||
| `kb-lib.executor.spl.noop` | `ks-lib-executor.spl.noop` |
|
||||
| `kb-lib.executor.spl.single_pool` | `ks-lib-executor.spl.single_pool` |
|
||||
| `kb-lib.executor.spl.stake_pool` | `ks-lib-executor.spl.stake_pool` |
|
||||
| `kb-lib.executor.spl.token` | `ks-lib-executor.spl.token` |
|
||||
| `kb-lib.executor.spl.token-2022` | `ks-lib-executor.spl.token-2022` |
|
||||
| `kb-lib.executor.spl.token_2022` | `ks-lib-executor.spl.token_2022` |
|
||||
| `kb-lib.executor.stable.swap_hylo_exchange` | `ks-lib-executor.stable.swap_hylo_exchange` |
|
||||
| `kb-lib.executor.stable.swap_jupiter_stable` | `ks-lib-executor.stable.swap_jupiter_stable` |
|
||||
| `kb-lib.executor.stable.swap_numeraire` | `ks-lib-executor.stable.swap_numeraire` |
|
||||
| `kb-lib.executor.stable.swap_stabble` | `ks-lib-executor.stable.swap_stabble` |
|
||||
| `kb-lib.executor.staking.jito_tip_distribution` | `ks-lib-executor.staking.jito_tip_distribution` |
|
||||
| `kb-lib.executor.staking.kamino_farm` | `ks-lib-executor.staking.kamino_farm` |
|
||||
| `kb-lib.executor.staking.marinade_finance` | `ks-lib-executor.staking.marinade_finance` |
|
||||
| `kb-lib.executor.staking.solayer` | `ks-lib-executor.staking.solayer` |
|
||||
| `kb-lib.executor.storage.solana_record` | `ks-lib-executor.storage.solana_record` |
|
||||
| `kb-lib.executor.strategy.jupiter_dca` | `ks-lib-executor.strategy.jupiter_dca` |
|
||||
| `kb-lib.executor.treasury.helium_treasury_management` | `ks-lib-executor.treasury.helium_treasury_management` |
|
||||
| `kb-lib.executor.vault.carrot_defi` | `ks-lib-executor.vault.carrot_defi` |
|
||||
| `kb-lib.executor.vault.hylo_stability_pool` | `ks-lib-executor.vault.hylo_stability_pool` |
|
||||
| `kb-lib.executor.vault.kamino` | `ks-lib-executor.vault.kamino` |
|
||||
| `kb-lib.executor.vault.kamino_v2` | `ks-lib-executor.vault.kamino_v2` |
|
||||
| `kb-lib.executor.vault.kamino_yvaults` | `ks-lib-executor.vault.kamino_yvaults` |
|
||||
| `kb-lib.executor.vault.meteora` | `ks-lib-executor.vault.meteora` |
|
||||
| `kb-lib.executor.vesting.jupiter_lock` | `ks-lib-executor.vesting.jupiter_lock` |
|
||||
| `kb-lib.executor.vesting.streamflow` | `ks-lib-executor.vesting.streamflow` |
|
||||
| `kb-lib.executor.wallet.jupiter_apepro_smart_wallet` | `ks-lib-executor.wallet.jupiter_apepro_smart_wallet` |
|
||||
| `kb-lib.executor.weighted.swap_stabble` | `ks-lib-executor.weighted.swap_stabble` |
|
||||
| `kb-lib.materializer.admin` | `ks-lib-materializer.admin` |
|
||||
| `kb-lib.materializer.bridge` | `ks-lib-materializer.bridge` |
|
||||
| `kb-lib.materializer.compliance.audit` | `ks-lib-materializer.compliance.audit` |
|
||||
| `kb-lib.materializer.fees` | `ks-lib-materializer.fees` |
|
||||
| `kb-lib.materializer.governance` | `ks-lib-materializer.governance` |
|
||||
| `kb-lib.materializer.lending` | `ks-lib-materializer.lending` |
|
||||
| `kb-lib.materializer.lifecycle` | `ks-lib-materializer.lifecycle` |
|
||||
| `kb-lib.materializer.liquidity` | `ks-lib-materializer.liquidity` |
|
||||
| `kb-lib.materializer.metadata.metaplex_token_metadata` | `ks-lib-materializer.metadata.metaplex_token_metadata` |
|
||||
| `kb-lib.materializer.metadata.solana_program_metadata` | `ks-lib-materializer.metadata.solana_program_metadata` |
|
||||
| `kb-lib.materializer.metadata.token_2022` | `ks-lib-materializer.metadata.token_2022` |
|
||||
| `kb-lib.materializer.nft` | `ks-lib-materializer.nft` |
|
||||
| `kb-lib.materializer.oracle` | `ks-lib-materializer.oracle` |
|
||||
| `kb-lib.materializer.orderbook` | `ks-lib-materializer.orderbook` |
|
||||
| `kb-lib.materializer.perpetuals` | `ks-lib-materializer.perpetuals` |
|
||||
| `kb-lib.materializer.pool.state` | `ks-lib-materializer.pool.state` |
|
||||
| `kb-lib.materializer.rewards` | `ks-lib-materializer.rewards` |
|
||||
| `kb-lib.materializer.risk` | `ks-lib-materializer.risk` |
|
||||
| `kb-lib.materializer.routing` | `ks-lib-materializer.routing` |
|
||||
| `kb-lib.materializer.staking` | `ks-lib-materializer.staking` |
|
||||
| `kb-lib.materializer.token.accounts` | `ks-lib-materializer.token.accounts` |
|
||||
| `kb-lib.materializer.token.metadata_risk` | `ks-lib-materializer.token.metadata_risk` |
|
||||
| `kb-lib.materializer.trades` | `ks-lib-materializer.trades` |
|
||||
| `kb-lib.materializer.transaction.annotations` | `ks-lib-materializer.transaction.annotations` |
|
||||
| `kb-lib.materializer.vault` | `ks-lib-materializer.vault` |
|
||||
|
||||
## 7. Inventaire des variables d'environnement
|
||||
|
||||
L'audit distingue trois ensembles afin de ne pas transformer des exemples historiques en contrats runtime :
|
||||
|
||||
- **85 noms** actuellement utilisés/référencés par le code, les tests, `.env.example`, les fixtures ou `config/app.config.json` ;
|
||||
- **17 noms supplémentaires** présents uniquement dans le guide opérateur Devnet actif ;
|
||||
- soit **102 noms historiques actifs à migrer ou consolider**, dont plusieurs convergent volontairement vers une même cible canonique.
|
||||
|
||||
Le chiffre `84` mentionné dans un audit `0.5.0` était une estimation antérieure et ne doit plus être utilisé comme contrat.
|
||||
|
||||
`KB_DATABASE_URL`, présent uniquement dans un exemple générique de `kb-config/USAGE.md`, est considéré obsolète et doit être supprimé/corrigé plutôt que migré. `KB_LIB_NOMENCLATURE` est un faux positif documentaire et n'est pas une variable d'environnement.
|
||||
|
||||
### 7.1 Politique cible
|
||||
|
||||
```text
|
||||
Khadhroony Solana / ks-* : KS_SECRET_* / KS_PUBLIC_* / KS_*
|
||||
Khadhroony Bot / kb-* : KB_SECRET_* / KB_PUBLIC_* / KB_*
|
||||
```
|
||||
|
||||
Le namespace suit le **propriétaire fonctionnel** du contrat. `kb-app-demo-desktop` peut donc lire une variable `KS_*` lorsqu'il adapte une capacité Solana ; cela ne transforme pas cette variable en contrat Bot. À l'issue de `pre.004`, aucun besoin d'environnement actuellement propre au desktop n'a été identifié : tous les noms runtime existants appartiennent à `ks-config`, `ks-store`, `ks-pipeline` ou `ks-pipeline-demo-scenarios`.
|
||||
|
||||
Dans chaque namespace :
|
||||
|
||||
- `*_SECRET_*` : jamais exposable ;
|
||||
- `*_PUBLIC_*` : candidate explicite à une surface publique, mais seulement via un DTO/surface autorisé ;
|
||||
- autre `KS_*` / `KB_*` : interne, diagnostic explicite seulement si non sensible.
|
||||
|
||||
La migration reste fail-closed. Les URLs PostgreSQL et la clé Helius sont des secrets certains. Les fixtures Token-2022 effectivement retournées au desktop sont classées `KS_PUBLIC_*`. Les autres contrôles de scénario restent internes. La propagation de sensibilité dans les valeurs composées et le camouflage effectif sont reportés après le split config/logging afin de ne pas mélanger renommage, restructuration et politique de sortie dans une seule prerelease.
|
||||
|
||||
Secrets certains :
|
||||
|
||||
```text
|
||||
HELIUS_API_KEY -> KS_SECRET_HELIUS_API_KEY
|
||||
KB_POSTGRES_DEVNET_URL -> KS_SECRET_POSTGRES_DEVNET_URL
|
||||
KB_POSTGRES_MAINNET_URL -> KS_SECRET_POSTGRES_MAINNET_URL
|
||||
KB_POSTGRES_TEST_URL -> KS_SECRET_POSTGRES_TEST_URL
|
||||
```
|
||||
|
||||
Les anciennes fixtures `TOKEN_2022_*` et les alias opérateur déjà préfixés convergent vers **un seul vocabulaire**. Par exemple `TOKEN_2022_MINT` et `KB_DEVNET_TOKEN_2022_MINT` convergent vers `KS_PUBLIC_DEVNET_TOKEN_2022_MINT`; `TOKEN_2022_PROGRAM` et `KB_SPL_TOKEN_2022_PROGRAM_ID` convergent vers `KS_PUBLIC_SPL_TOKEN_2022_PROGRAM_ID`; `KB_DEVNET_WALLET_ADDRESS` et `KB_DEVNET_WALLET_PUBKEY` convergent vers `KS_PUBLIC_DEVNET_WALLET_ADDRESS`. Aucun alias legacy permanent n'est conservé.
|
||||
|
||||
### 7.2 Mapping code/config/tests — 85 noms
|
||||
|
||||
| Nom actuel | Nom cible | Classe |
|
||||
|------------------------------|-----------------------------------|----------------|
|
||||
| `HELIUS_API_KEY` | `KS_SECRET_HELIUS_API_KEY` | `secret` |
|
||||
| `KB_CONFIG_PATH` | `KB_APP_DEMO_DESKTOP_CONFIG_PATH` | `internal` Bot |
|
||||
| `KB_CONFIG_TEST_MISSING` | `KS_CONFIG_TEST_MISSING` | `internal` |
|
||||
| `KB_DEVNET_AIRDROP_LAMPORTS` | `KS_DEVNET_AIRDROP_LAMPORTS` | `internal` |
|
||||
| `KB_DEVNET_CONFIG_PATH` | `KS_DEVNET_CONFIG_PATH` | `internal` |
|
||||
|
||||
La cible `KB_APP_DEMO_DESKTOP_CONFIG_PATH` remplace la transition `KS_CONFIG_PATH` de `pre.004` : une composition appartient au binaire qui la charge, alors que les documents qu’elle référence restent possédés par les crates `ks-*`.
|
||||
| `KB_DEVNET_EXECUTION_TEST` | `KS_DEVNET_EXECUTION_TEST` | `internal` |
|
||||
| `KB_DEVNET_MEMO_EXECUTION_TEST` | `KS_DEVNET_MEMO_EXECUTION_TEST` | `internal` |
|
||||
| `KB_DEVNET_MEMO_SUBMIT` | `KS_DEVNET_MEMO_SUBMIT` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_COLLECTION_VERIFY_CAMPAIGN_TEST` | `KS_DEVNET_METAPLEX_COLLECTION_VERIFY_CAMPAIGN_TEST` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_CREATE_MINT_CAMPAIGN_TEST` | `KS_DEVNET_METAPLEX_CREATE_MINT_CAMPAIGN_TEST` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_CREATE_MINT_FAMILY` | `KS_DEVNET_METAPLEX_CREATE_MINT_FAMILY` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_ESCROW_CAMPAIGN_TEST` | `KS_DEVNET_METAPLEX_ESCROW_CAMPAIGN_TEST` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_EXECUTION_TEST` | `KS_DEVNET_METAPLEX_EXECUTION_TEST` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_MAINTENANCE_CAMPAIGN_TEST` | `KS_DEVNET_METAPLEX_MAINTENANCE_CAMPAIGN_TEST` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_MATERIALIZE_AFTER_CONFIRMATION` | `KS_DEVNET_METAPLEX_MATERIALIZE_AFTER_CONFIRMATION` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_OPERATION_JSON` | `KS_DEVNET_METAPLEX_OPERATION_JSON` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_OPERATOR_CONFIRMED` | `KS_DEVNET_METAPLEX_OPERATOR_CONFIRMED` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_PNFT_LIFECYCLE_CAMPAIGN_TEST` | `KS_DEVNET_METAPLEX_PNFT_LIFECYCLE_CAMPAIGN_TEST` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_POSTCONDITION_READS_JSON` | `KS_DEVNET_METAPLEX_POSTCONDITION_READS_JSON` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_PREFLIGHT_READS_JSON` | `KS_DEVNET_METAPLEX_PREFLIGHT_READS_JSON` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_PRINT_BURN_CAMPAIGN_TEST` | `KS_DEVNET_METAPLEX_PRINT_BURN_CAMPAIGN_TEST` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_SUBMIT` | `KS_DEVNET_METAPLEX_SUBMIT` | `internal` |
|
||||
| `KB_DEVNET_METAPLEX_USE_PROBE_TEST` | `KS_DEVNET_METAPLEX_USE_PROBE_TEST` | `internal` |
|
||||
| `KB_DEVNET_PROFILE` | `KS_DEVNET_PROFILE` | `internal` |
|
||||
| `KB_DEVNET_RPC_URL` | `KS_DEVNET_RPC_URL` | `internal` |
|
||||
| `KB_DEVNET_SPL_ATA_EXECUTION_TEST` | `KS_DEVNET_SPL_ATA_EXECUTION_TEST` | `internal` |
|
||||
| `KB_DEVNET_SPL_ATA_MINT` | `KS_DEVNET_SPL_ATA_MINT` | `internal` |
|
||||
| `KB_DEVNET_SPL_ATA_NESTED_MINT` | `KS_DEVNET_SPL_ATA_NESTED_MINT` | `internal` |
|
||||
| `KB_DEVNET_SPL_ATA_OPERATION` | `KS_DEVNET_SPL_ATA_OPERATION` | `internal` |
|
||||
| `KB_DEVNET_SPL_ATA_OWNER_MINT` | `KS_DEVNET_SPL_ATA_OWNER_MINT` | `internal` |
|
||||
| `KB_DEVNET_SPL_ATA_SUBMIT` | `KS_DEVNET_SPL_ATA_SUBMIT` | `internal` |
|
||||
| `KB_DEVNET_SPL_ATA_TOKEN_PROGRAM` | `KS_DEVNET_SPL_ATA_TOKEN_PROGRAM` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_AMOUNT` | `KS_DEVNET_SPL_TOKEN_AMOUNT` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_AUTHORITY` | `KS_DEVNET_SPL_TOKEN_AUTHORITY` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_DECIMALS` | `KS_DEVNET_SPL_TOKEN_DECIMALS` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_DESTINATION` | `KS_DEVNET_SPL_TOKEN_DESTINATION` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_EXECUTION_TEST` | `KS_DEVNET_SPL_TOKEN_EXECUTION_TEST` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_APPROVE_AMOUNT` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_APPROVE_AMOUNT` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_AUTHORITY` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_AUTHORITY` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_DECIMALS` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_DECIMALS` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_DELEGATE` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_DELEGATE` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_DESTINATION` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_DESTINATION` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_FIRST_STEP_INDEX` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_FIRST_STEP_INDEX` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_INTER_STEP_DELAY_MS` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_INTER_STEP_DELAY_MS` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_MINT` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_MINT` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_MINT_AMOUNT` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_MINT_AMOUNT` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_PREPARATION_SETTLE_DELAY_MS` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_PREPARATION_SETTLE_DELAY_MS` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_PREPARE` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_PREPARE` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_RESUME_PREDECESSOR_SIGNATURE` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_RESUME_PREDECESSOR_SIGNATURE` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_SOURCE` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_SOURCE` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_SUBMIT` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_SUBMIT` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_TEST` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_TEST` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_LIFECYCLE_TRANSFER_AMOUNT` | `KS_DEVNET_SPL_TOKEN_LIFECYCLE_TRANSFER_AMOUNT` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_MINT` | `KS_DEVNET_SPL_TOKEN_MINT` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_NATIVE_ACCOUNT` | `KS_DEVNET_SPL_TOKEN_NATIVE_ACCOUNT` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_PREFLIGHT_TEST` | `KS_DEVNET_SPL_TOKEN_PREFLIGHT_TEST` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_RECENT_PROBE_TEST` | `KS_DEVNET_SPL_TOKEN_RECENT_PROBE_TEST` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_SOURCE` | `KS_DEVNET_SPL_TOKEN_SOURCE` | `internal` |
|
||||
| `KB_DEVNET_SPL_TOKEN_SUBMIT` | `KS_DEVNET_SPL_TOKEN_SUBMIT` | `internal` |
|
||||
| `KB_DEVNET_TOKEN_2022_METADATA_CAMPAIGN_TEST` | `KS_DEVNET_TOKEN_2022_METADATA_CAMPAIGN_TEST` | `internal` |
|
||||
| `KB_DEVNET_TOKEN_2022_METADATA_OPERATOR_CONFIRMED` | `KS_DEVNET_TOKEN_2022_METADATA_OPERATOR_CONFIRMED` | `internal` |
|
||||
| `KB_DEVNET_TRANSFER_LAMPORTS` | `KS_DEVNET_TRANSFER_LAMPORTS` | `internal` |
|
||||
| `KB_DEVNET_WALLET` | `KS_DEVNET_WALLET` | `internal` |
|
||||
| `KB_DEVNET_WALLET_ADDRESS` | `KS_PUBLIC_DEVNET_WALLET_ADDRESS` | `public` |
|
||||
| `KB_DEVNET_WALLET_DIR` | `KS_DEVNET_WALLET_DIR` | `internal` |
|
||||
| `KB_ENV_FILE` | `KS_ENV_FILE` | `internal` |
|
||||
| `KB_POSTGRES_DEVNET_URL` | `KS_SECRET_POSTGRES_DEVNET_URL` | `secret` |
|
||||
| `KB_POSTGRES_MAINNET_URL` | `KS_SECRET_POSTGRES_MAINNET_URL` | `secret` |
|
||||
| `KB_POSTGRES_TEST_URL` | `KS_SECRET_POSTGRES_TEST_URL` | `secret` |
|
||||
| `TOKEN_2022_APPROVE_AMOUNT_RAW` | `KS_PUBLIC_DEVNET_TOKEN_2022_APPROVE_AMOUNT_RAW` | `public` |
|
||||
| `TOKEN_2022_AUTHORITY` | `KS_PUBLIC_DEVNET_TOKEN_2022_AUTHORITY` | `public` |
|
||||
| `TOKEN_2022_BURN_AMOUNT_RAW` | `KS_PUBLIC_DEVNET_TOKEN_2022_BURN_AMOUNT_RAW` | `public` |
|
||||
| `TOKEN_2022_CLOSE_ACCOUNT` | `KS_PUBLIC_DEVNET_TOKEN_2022_CLOSE_ACCOUNT` | `public` |
|
||||
| `TOKEN_2022_DECIMALS` | `KS_PUBLIC_DEVNET_TOKEN_2022_DECIMALS` | `public` |
|
||||
| `TOKEN_2022_DELEGATE` | `KS_PUBLIC_DEVNET_TOKEN_2022_DELEGATE` | `public` |
|
||||
| `TOKEN_2022_DESTINATION` | `KS_PUBLIC_DEVNET_TOKEN_2022_DESTINATION` | `public` |
|
||||
| `TOKEN_2022_FREEZE_AUTHORITY` | `KS_PUBLIC_DEVNET_TOKEN_2022_FREEZE_AUTHORITY` | `public` |
|
||||
| `TOKEN_2022_MINT` | `KS_PUBLIC_DEVNET_TOKEN_2022_MINT` | `public` |
|
||||
| `TOKEN_2022_MINT_AMOUNT_RAW` | `KS_PUBLIC_DEVNET_TOKEN_2022_MINT_AMOUNT_RAW` | `public` |
|
||||
| `TOKEN_2022_PROGRAM` | `KS_PUBLIC_SPL_TOKEN_2022_PROGRAM_ID` | `public` |
|
||||
| `TOKEN_2022_SOURCE` | `KS_PUBLIC_DEVNET_TOKEN_2022_SOURCE` | `public` |
|
||||
| `TOKEN_2022_TRANSFER_AMOUNT_RAW` | `KS_PUBLIC_DEVNET_TOKEN_2022_TRANSFER_AMOUNT_RAW` | `public` |
|
||||
| `ELGAMAL_REGISTRY_ADDRESS` | `KS_PUBLIC_DEVNET_ELGAMAL_REGISTRY_ADDRESS` | `public` |
|
||||
| `ELGAMAL_PUBKEY_BASE64` | `KS_PUBLIC_DEVNET_ELGAMAL_PUBKEY_BASE64` | `public` |
|
||||
| `PUBKEY_VALIDITY_PROOF_CONTEXT` | `KS_PUBLIC_DEVNET_PUBKEY_VALIDITY_PROOF_CONTEXT` | `public` |
|
||||
|
||||
### 7.3 Mapping guide opérateur Devnet — 17 noms
|
||||
|
||||
| Nom actuel | Nom cible | Classe |
|
||||
|---------------------------------------|---------------------------------------|------------|
|
||||
| `KB_CONFIRM_DEVNET_DATABASE_RESET` | `KS_CONFIRM_DEVNET_DATABASE_RESET` | `internal` |
|
||||
| `KB_DEVNET_CLASSIC_DESTINATION_ATA` | `KS_DEVNET_CLASSIC_DESTINATION_ATA` | `internal` |
|
||||
| `KB_DEVNET_CLASSIC_MINT` | `KS_DEVNET_CLASSIC_MINT` | `internal` |
|
||||
| `KB_DEVNET_CLASSIC_MINT_KEYPAIR` | `KS_DEVNET_CLASSIC_MINT_KEYPAIR` | `internal` |
|
||||
| `KB_DEVNET_CLASSIC_RECIPIENT` | `KS_DEVNET_CLASSIC_RECIPIENT` | `internal` |
|
||||
| `KB_DEVNET_CLASSIC_RECIPIENT_KEYPAIR` | `KS_DEVNET_CLASSIC_RECIPIENT_KEYPAIR` | `internal` |
|
||||
| `KB_DEVNET_CLASSIC_SOURCE_ATA` | `KS_DEVNET_CLASSIC_SOURCE_ATA` | `internal` |
|
||||
| `KB_DEVNET_RECIPIENT` | `KS_DEVNET_RECIPIENT` | `internal` |
|
||||
| `KB_DEVNET_SCENARIO` | `KS_DEVNET_SCENARIO` | `internal` |
|
||||
| `KB_DEVNET_SIGNATURE` | `KS_DEVNET_SIGNATURE` | `internal` |
|
||||
| `KB_DEVNET_TOKEN_2022_FIXTURE` | `KS_DEVNET_TOKEN_2022_FIXTURE` | `internal` |
|
||||
| `KB_DEVNET_TOKEN_2022_MINT` | `KS_PUBLIC_DEVNET_TOKEN_2022_MINT` | `public` |
|
||||
| `KB_DEVNET_TOKEN_2022_MINT_KEYPAIR` | `KS_DEVNET_TOKEN_2022_MINT_KEYPAIR` | `internal` |
|
||||
| `KB_DEVNET_VALIDATION_DIR` | `KS_DEVNET_VALIDATION_DIR` | `internal` |
|
||||
| `KB_DEVNET_WALLET_PUBKEY` | `KS_PUBLIC_DEVNET_WALLET_ADDRESS` | `public` |
|
||||
| `KB_SPL_TOKEN_2022_PROGRAM_ID` | `KS_PUBLIC_SPL_TOKEN_2022_PROGRAM_ID` | `public` |
|
||||
| `KB_SPL_TOKEN_PROGRAM_ID` | `KS_PUBLIC_SPL_TOKEN_PROGRAM_ID` | `public` |
|
||||
|
||||
## 8. Décomposition des documents de configuration
|
||||
|
||||
Le split est désormais fondé sur deux niveaux complémentaires :
|
||||
|
||||
1. chaque document spécialisé est autonome, possède ses valeurs globales et un `default_profile` ;
|
||||
2. une composition `<binary>.default.config.json` n'existe que lorsqu'un binaire doit remplacer des fichiers/profils ou porter des paramètres propres à l'application.
|
||||
|
||||
Les documents partagés à l'issue de `pre.007` sont :
|
||||
|
||||
```text
|
||||
config/logging.config.json
|
||||
config/transport.config.json
|
||||
config/listeners.config.json
|
||||
config/store.config.json
|
||||
config/wallet.config.json
|
||||
config/execution.config.json
|
||||
```
|
||||
|
||||
Le desktop conserve :
|
||||
|
||||
```text
|
||||
config/kb-app-demo-desktop.default.config.json
|
||||
```
|
||||
|
||||
`ks-pipeline-demo-scenarios` n'a plus de composition dédiée par défaut. En absence de `KS_DEVNET_CONFIG_PATH`, il compose directement les `default_profile` indépendants des documents partagés. Un override explicite reste possible pour un besoin opérateur particulier.
|
||||
|
||||
Les valeurs non dépendantes d'un profil sont sorties des profils :
|
||||
|
||||
- `logging.logs_directory = ${KS_LOGS_DIRECTORY:-logs}` ;
|
||||
- `wallet.wallets_directory = ${KS_WALLETS_DIRECTORY:-wallets}`.
|
||||
|
||||
Les chemins relatifs de logs et de wallets sont résolus sous ces racines. Les autorisations `*_send_enabled` appartiennent désormais à `execution.config.json`, pas à `wallet.config.json`.
|
||||
|
||||
Le transport possède des classes WebSocket de defaults nommées. Chaque endpoint choisit une classe et peut fournir ses propres `overrides`; `auto_reconnect` appartient donc au transport et non à `AppSectionConfig`. Les classes actuelles couvrent uniquement les surfaces réellement présentes : RPC WS standard et RPC WS à capacité supérieure. Une future surface Helius avancée aura sa propre classe/contrat lorsqu'elle sera implémentée.
|
||||
|
||||
Lorsqu'une composition référence un profil, `ks-config` doit prouver son existence avant de construire le runtime. Lorsqu'aucune composition n'est fournie, les noms des `default_profile` n'ont pas besoin d'être identiques : chaque document est résolu indépendamment. La composition ne devient pas une seconde surface de paramètres : les overrides de champ restent dans le contrat spécialisé qui les possède, et les globals explicitement configurables utilisent leurs variables d'environnement dédiées.
|
||||
|
||||
`AppConfig/ProfileConfig` demeure provisoirement un **contrat runtime résolu backend-only** pour préserver les consommateurs pendant la migration. Depuis `pre.008`, il ne contient plus les champs propres au desktop, ne dérive plus `serde::Serialize`/`Debug` et ne traverse plus Tauri. La section `application` de la composition est opaque à `ks-config`; le desktop la valide avec son propre schéma sans réintroduire un document généraliste monolithique.
|
||||
|
||||
## 9. Source, runtime, public et diagnostic
|
||||
|
||||
La configuration doit distinguer explicitement :
|
||||
|
||||
1. **source** : valeurs du fichier, références `${KS_*}`, informations nécessaires à la validation ;
|
||||
2. **runtime** : valeurs résolues utilisées par le backend, éventuellement secrètes ;
|
||||
3. **public** : DTO explicitement construit et strictement borné pour Tauri/TS-RS/UI ;
|
||||
4. **diagnostic** : surface explicitement demandée, pouvant montrer des valeurs `KS_*` internes non sensibles mais jamais une valeur `KS_SECRET_*`.
|
||||
|
||||
### 9.1 Frontière appliquée en `pre.008`
|
||||
|
||||
`kb-app-demo-desktop/src/demo_config.rs` ne transporte plus `AppConfig` ni `ProfileConfig`. Il construit explicitement :
|
||||
|
||||
```text
|
||||
runtime backend-only
|
||||
-> DemoConfigPublicPayload
|
||||
-> DemoConfigDiagnosticPayload
|
||||
```
|
||||
|
||||
La projection publique exclut URLs, DSN, chemins de stockage/wallet et politiques internes non destinées à l'UI. Le diagnostic borné ne transmet pour les valeurs sensibles que des états tels que `configured`/`missing`, plus les métadonnées internes explicitement autorisées.
|
||||
|
||||
La correction interdit le modèle :
|
||||
|
||||
```text
|
||||
serialize(runtime_config) -> supprimer quelques champs -> exposer
|
||||
```
|
||||
|
||||
Les contrats source/runtime de `ks-config` susceptibles de contenir des secrets résolus ne dérivent ni `serde::Serialize` ni `Debug`, et les sérialiseurs publics historiques de `AppConfig` sont supprimés. La sensibilité des placeholders est classée selon `Secret > Internal > Public`; une chaîne composée contenant un placeholder `KS_SECRET_*`/`KB_SECRET_*` hérite de `Secret`.
|
||||
|
||||
TS-RS est désormais une frontière applicative : `ks-config` et `ks-lib` ne dépendent plus de `ts-rs` et ne génèrent plus de bindings. `kb-app-demo-desktop` possède les DTO TS-RS nécessaires à ses commandes Tauri.
|
||||
|
||||
## 10. Tests de caractérisation avant et pendant migration
|
||||
|
||||
Avant chaque changement structurel correspondant, conserver ou ajouter des tests qui vérifient :
|
||||
|
||||
- la topologie des dix crates et leurs dépendances attendues ;
|
||||
- les 14 tests d'API externe et leurs imports par crate root ;
|
||||
- l'inventaire exact des identités runtime ;
|
||||
- l'absence de `kb-*` / `kb_*` résiduel dans les dix crates après leur prerelease de renommage, hors exceptions explicitement listées ;
|
||||
- le maintien de `khadhroony-bot3` comme nom racine ;
|
||||
- la cohérence entre targets de tracing et routes de logging ;
|
||||
- la résolution des anciennes fixtures/env pendant la phase de migration uniquement, puis leur suppression ;
|
||||
- l'interdiction des variables de configuration possédées par le workspace hors namespace d'ownership `KS_*` ou `KB_*` ;
|
||||
- la propagation de sensibilité depuis `KS_SECRET_*` vers les valeurs composées ;
|
||||
- l'impossibilité pour une sentinelle secrète d'apparaître dans `Debug`, logs, erreurs, payloads Tauri, sérialisation publique ou diagnostic ;
|
||||
- la validation indépendante des schémas source de composition, logging, transport, listeners, store, wallet et execution sous `config/schemas/` ;
|
||||
- la résolution indépendante des `default_profile` sans supposer des noms identiques ;
|
||||
- le refus des références de profils inexistants dans une composition ;
|
||||
- le maintien de `logs_directory` et `wallets_directory` hors profils ;
|
||||
- la résolution des classes de defaults WebSocket avant les overrides propres aux endpoints ;
|
||||
- la validation du schéma `resolved.app.config.schema.json` uniquement comme contrat runtime transitoire ;
|
||||
- l'indépendance des profils généralistes et logging ;
|
||||
- l'absence de duplication structurelle des types logging entre `ks-config` et `ks-logging` ;
|
||||
- le maintien des contrats publics réellement nécessaires après remplacement des types de configuration exposés.
|
||||
|
||||
Les tests ne doivent pas figer comme comportement légitime la fuite actuelle de configuration résolue.
|
||||
|
||||
## 11. Découpage borné des prereleases `0.5.1`
|
||||
|
||||
### `0.5.1-pre.001` — plan et inventaire
|
||||
|
||||
- présent document ;
|
||||
- version d'ouverture ;
|
||||
- aucune migration physique de crate ;
|
||||
- validation du mapping avant renommage massif.
|
||||
|
||||
### `0.5.1-pre.002` — packages et identifiants Rust `ks-*` / `ks_*`
|
||||
|
||||
- renommer physiquement les dix crates selon l'ordre de dépendance ;
|
||||
- migrer packages, paths, imports, exports, tests externes, scripts et CLI ;
|
||||
- adapter `kb-app-demo-desktop` sans le renommer ;
|
||||
- migrer les targets de tracing **racine** dont le contrat est couplé au nom Cargo (`ks-logging`, `ks-pipeline`, `ks-pipeline-demo-scenarios`, `ks-onchain-transport`, `ks-store`, `ks-wallet`) et réaligner les routes de logging qui utilisent les noms de crates ;
|
||||
- régénérer localement les bindings TS-RS de `ks-config` plutôt que livrer des bindings générés à la main ;
|
||||
- conserver encore les variables d'environnement, les identités `kb-lib.*` et les tables `kb_sol_*` hors de ce delta.
|
||||
|
||||
### `0.5.1-pre.003` — identités techniques et tracing hiérarchique `ks-lib-*`
|
||||
|
||||
- migrer les 255 identités `kb-lib.*` réellement présentes vers `ks-lib-*` ;
|
||||
- migrer les subtargets et identités de composants hiérarchiques qui ne pouvaient pas être changés par le simple renommage Cargo ;
|
||||
- synchroniser routes de logging, matrices, diagnostics, tests et provenance/replay ;
|
||||
- ne pas renommer encore les tables SQL `kb_sol_*`.
|
||||
|
||||
### `0.5.1-pre.004` — namespaces d’environnement et classification
|
||||
|
||||
- migrer code, tests, `.env.example`, configuration et guides vers le namespace d’ownership `KS_*` ou `KB_*` ;
|
||||
- consolider les aliases historiques Token-2022 ;
|
||||
- matérialiser la classification secret/public/internal dans les noms et fermer les alias legacy ;
|
||||
- reporter la propagation de sensibilité et le camouflage effectif après le split config/logging ;
|
||||
- supprimer les anciens noms une fois la migration vérifiée ;
|
||||
- étendre l’audit workspace pour refuser la réintroduction de variables applicatives hors `KS_*` / `KB_*` dans le code, `.env.example`, la configuration exemple et le guide opérateur ;
|
||||
- ne pas encore modifier les DTO publics ni implémenter le camouflage, qui appartiennent désormais à `pre.008` après la fin du split des documents.
|
||||
|
||||
### `0.5.1-pre.005` — split config/logging
|
||||
|
||||
- **implémenté** : extraction initiale du logging hors de l’ancien document applicatif monolithique ;
|
||||
- **implémenté** : centralisation des schémas sous `config/schemas/` ;
|
||||
- **implémenté** : profils logging indépendants ;
|
||||
- **implémenté** : `ks-logging` devient propriétaire unique du contrat logging et de sa validation ;
|
||||
- **implémenté** : suppression de la conversion `ks_config::LoggingConfig` -> `ks_logging::LoggingConfig`.
|
||||
|
||||
### `0.5.1-pre.006` — composition binaire + transport + listeners
|
||||
|
||||
- **implémenté** : remplacement du rôle de `app.config.json` par des compositions `<binary>.default.config.json` ;
|
||||
- **implémenté** : création de `kb-app-demo-desktop.default.config.json` et première composition transitoire propre à `ks-pipeline-demo-scenarios`, ensuite supprimée en `pre.007` au profit des defaults partagés ;
|
||||
- **implémenté** : extraction des endpoints HTTP/WebSocket vers `transport.config.json` avec schéma et exemple dédiés ;
|
||||
- **implémenté** : extraction des listeners vers `listeners.config.json` avec schéma et exemple dédiés ;
|
||||
- **implémenté** : sélection explicite des profils logging/transport/listeners par chaque composition ;
|
||||
- **implémenté** : maintien temporaire de `AppConfig/ProfileConfig` comme contrat runtime résolu afin de ne pas casser tous les consommateurs pendant la migration ;
|
||||
- **implémenté** : consommation directe de `TransportProfileConfig` par `ks-onchain-transport` ;
|
||||
- **implémenté** : suppression des anciens fichiers source `app.config.json`, `example.app.config.json` et de leur schéma source historique ;
|
||||
- ne pas encore modifier les DTO publics ni la politique de camouflage.
|
||||
|
||||
### `0.5.1-pre.007` — defaults partagés + store + wallet + execution
|
||||
|
||||
- **implémenté** : extraction de `database` vers `store.config.json` ;
|
||||
- **implémenté** : suppression de `DataConfig`, avec `logs_directory` global dans logging et `wallets_directory` global dans wallet ;
|
||||
- **implémenté** : extraction du stockage/alias/persistance wallet vers `wallet.config.json` avec chemins relatifs à la racine globale ;
|
||||
- **implémenté** : déplacement de `localnet_send_enabled`, `devnet_send_enabled`, `testnet_send_enabled` et `mainnet_send_enabled` vers `execution.config.json` ;
|
||||
- **implémenté** : extraction complète des politiques d'exécution vers `execution.config.json` ;
|
||||
- **implémenté** : déplacement de `auto_reconnect` vers des classes de defaults WebSocket nommées, avec overrides par endpoint ;
|
||||
- **implémenté** : remplacement des `active_profile` des documents partagés par des `default_profile` autonomes ;
|
||||
- **implémenté** : suppression de la composition par défaut de `ks-pipeline-demo-scenarios`; les scénarios utilisent les defaults partagés sauf override explicite `KS_DEVNET_CONFIG_PATH` ;
|
||||
- **implémenté** : validation par `ks-config` de l'existence des profils référencés par une composition ;
|
||||
- **audit TS-RS** : 17 exports `export_to` restent dans `ks-config`, 100 dans `ks-lib` et 89 dans `kb-app-demo-desktop`; le frontend desktop n'importe directement que ses bindings `kb_app_demo_desktop`, aucun binding `ks-config`/`ks-lib`.
|
||||
|
||||
Le split partagé est considéré terminé après cette prerelease. Les champs applicatifs transitoires de la composition desktop seront traités avec la frontière publique/application de `pre.008`, et non par la création d'un nouveau document généraliste.
|
||||
|
||||
### `0.5.1-pre.008` — surfaces publiques sûres, TS-RS et camouflage
|
||||
|
||||
- **implémenté** : `AppConfig/ProfileConfig` et les documents source/runtime sensibles restent backend-only, sans `serde::Serialize` ni `Debug` ;
|
||||
- **implémenté** : le fragment `application` devient opaque pour `ks-config` et est validé par le schéma possédé par `kb-app-demo-desktop` ;
|
||||
- **implémenté** : `DemoConfigPayload` remplace la configuration résolue complète par des DTO public/diagnostic construits champ par champ ;
|
||||
- **implémenté** : URLs RPC/WS, DSN PostgreSQL et chemins sensibles ne traversent pas le payload configuration ; les diagnostics n'exposent que des états bornés ;
|
||||
- **implémenté** : classification `Secret > Internal > Public` des variables et chaînes composées, avec canaris de non-divulgation et erreurs de validation qui n'échoent plus les valeurs rejetées ;
|
||||
- **implémenté** : suppression de `ts-rs` de `ks-config` et `ks-lib`, suppression de leurs dérivations/export et de leurs bindings générés historiques ;
|
||||
- **implémenté** : audit workspace empêchant la réintroduction de TS-RS dans `ks-*` et de `Serialize`/`Debug` sur les contrats de configuration sensibles sans décision explicite ;
|
||||
- **implémenté** : test d'API externe de la classification/camouflage et canaris desktop empêchant la fuite de secrets dans les projections Tauri.
|
||||
|
||||
### `0.5.1-pre.009` — clôture
|
||||
|
||||
- réconciliation complète des namespaces, compositions, schémas et docs ;
|
||||
- audits finaux ;
|
||||
- suppression des TODO terminés ;
|
||||
- archivage de ce plan et du prompt `030` ;
|
||||
- préparation du prompt `0.5.2` pour `ks-wallet` ;
|
||||
- aucune nouvelle fonctionnalité structurelle majeure.
|
||||
|
||||
Un correctif `fix-XXX` n'avance jamais cette séquence ; sa numérotation repart à `fix-001` pour chaque prerelease.
|
||||
|
||||
## 12. Hors périmètre de `0.5.1`
|
||||
|
||||
- renommage du workspace/repository/répertoire racine `khadhroony-bot3` ;
|
||||
- restructuration fonctionnelle profonde de `ks-wallet` (`0.5.2`) ;
|
||||
- renommage des tables `kb_sol_*` -> `k_sol_*` et refonte temporelle/store (`0.5.3`) ;
|
||||
- centralisation finale des scénarios et audit de complétude exécuteurs (`0.5.4`) ;
|
||||
- programmes Anchor/DEX (`0.6.x+`) ;
|
||||
- nouvelle tentative de qualification réseau ElGamal sans nouvelle possibilité technique.
|
||||
|
||||
## 13. Contrôles de référence
|
||||
|
||||
À chaque delta Rust ou contractuel :
|
||||
|
||||
```bash
|
||||
cargo fmt --all
|
||||
cargo check --workspace
|
||||
cargo clippy --all-targets
|
||||
python3 scripts/audit_rust_workspace_rules.py
|
||||
cargo test --workspace
|
||||
```
|
||||
|
||||
Le desktop n'est lancé avec `cargo tauri dev` que lorsqu'une frontière runtime/UI qu'il couvre change. Les scripts npm de build/dev ne sont jamais lancés directement.
|
||||
|
||||
## 14. Critères de sortie de `0.5.1`
|
||||
|
||||
`0.5.1` n'est clôturable que lorsque :
|
||||
|
||||
- les dix bibliothèques Solana utilisent `ks-*` / `ks_*` ;
|
||||
- le workspace racine s'appelle toujours `khadhroony-bot3` ;
|
||||
- les variables Solana ont migré vers `KS_*` avec classification nominale sûre et `KB_*` reste réservé aux futurs contrats Bot ;
|
||||
- les identités techniques `kb-lib.*` ciblées ont disparu au profit de `ks-lib-*` ;
|
||||
- les binaires utilisent leurs compositions dédiées et les documents logging/transport/listeners sont séparés, partageables et validés indépendamment ;
|
||||
- database, les répertoires logging/wallet, wallet, execution et les réglages propres au desktop ont quitté la composition avant la construction des surfaces publiques ;
|
||||
- aucune configuration runtime résolue complète ne traverse Tauri ;
|
||||
- aucun secret canari n'apparaît dans les surfaces publiques ou diagnostiques ;
|
||||
- les tests d'API externe, audits et tests workspace sont propres ;
|
||||
- les décisions durables ont quitté ce plan temporaire pour les documents normatifs avant archivage.
|
||||
Reference in New Issue
Block a user