v0.1.0-pre.030

This commit is contained in:
2026-07-25 10:35:16 +02:00
parent 685b5dd283
commit 7e97530f50
10 changed files with 2298 additions and 14 deletions

View File

@@ -1,3 +1,10 @@
## 0.1.0-pre.030
- Migration du replay contextuel de décodage dans `kb-pipeline`.
- Conservation de la sélection bornée, du dispatch déterministe, du ledger, du force replay et de la matérialisation optionnelle.
- Adaptation aux façades consolidées `kb-lib` et `kb-store`.
- Conservation des 19 tests de lancienne implémentation bot2.
<!-- file: CHANGELOG.md -->
<!-- version: 6 -->

View File

@@ -94,3 +94,7 @@ Les modules de matérialisation sont privés. Tous les contrats, types concrets
### Migration pipeline
La tranche `0.1.0-pre.029` migre la planification et lextraction core de `kb-pipeline`.
### Pipeline migré
`kb-pipeline` contient désormais lextraction core et le replay contextuel de décodage avec matérialisation optionnelle.

View File

@@ -284,3 +284,5 @@
- [x] Extraction canonique vers les tables core.
- [ ] Backfill et replay de décodage.
- [ ] Orchestrations Solana stateful et exécution.
- [x] Migrer `decode_replay` dans `kb-pipeline`.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder.rs
// version: 9
// version: 10
//! Consolidated decoder modules.
@@ -126,7 +126,7 @@ pub use self::api::DcApiInstructionDecoder;
/// Exposes the common protocol decoder trait.
pub use self::api::DcApiProtocolDecoder;
/// Computes the deterministic contextual input hash.
pub use self::api::decoder_api_decoder_api_contextual_input_hash;
pub use self::api::decoder_api_contextual_input_hash;
/// Returns true when a decoder declares the exact program id.
pub use self::api::decoder_api_decoder_handles_program_id;
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/api.rs
// version: 4
// version: 5
//! Decoder contracts consolidated from `kb_decoder_api`.
@@ -33,7 +33,7 @@ pub use self::contracts::DcApiDecoderSurface;
/// Contextual instruction decoder contract.
pub use self::contracts::DcApiInstructionDecoder;
/// Computes the deterministic contextual input hash.
pub use self::contracts::decoder_api_decoder_api_contextual_input_hash;
pub use self::contracts::decoder_api_contextual_input_hash;
/// Returns true when a decoder declares the exact program id.
pub use self::contracts::decoder_api_decoder_handles_program_id;
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/decoder/api/contracts.rs
// version: 7
// version: 8
//! Backend-neutral contextual instruction decoder contracts.
@@ -383,7 +383,7 @@ pub fn decoder_api_decoder_handles_program_id(
}
/// Computes a deterministic lowercase SHA-256 hash for one contextual input.
pub fn decoder_api_decoder_api_contextual_input_hash(
pub fn decoder_api_contextual_input_hash(
input: &crate::MdCoreInstructionReplayInput,
) -> kb_core::Result<std::string::String> {
let serialization_result = serde_json::to_value(input);
@@ -501,8 +501,8 @@ mod tests {
#[test]
fn contextual_input_hash_is_stable() {
let first = crate::decoder_api_decoder_api_contextual_input_hash(&replay_input());
let second = crate::decoder_api_decoder_api_contextual_input_hash(&replay_input());
let first = crate::decoder_api_contextual_input_hash(&replay_input());
let second = crate::decoder_api_contextual_input_hash(&replay_input());
assert!(first.is_ok());
assert_eq!(first, second);
}
@@ -518,8 +518,8 @@ mod tests {
"payloadJson": {"dataBase64": "CAcGBQQDAgE="},
"payloadHash": "different-payload-hash"
}]);
let first_hash = crate::decoder_api_decoder_api_contextual_input_hash(&first);
let second_hash = crate::decoder_api_decoder_api_contextual_input_hash(&second);
let first_hash = crate::decoder_api_contextual_input_hash(&first);
let second_hash = crate::decoder_api_contextual_input_hash(&second);
assert!(first_hash.is_ok());
assert!(second_hash.is_ok());
assert_ne!(first_hash, second_hash);

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/lib.rs
// version: 23
// version: 24
//! Consolidated decoder, executor, materializer and shared model library.
#![warn(missing_docs)]
@@ -312,7 +312,7 @@ pub use self::decoder::DcWalletJupiterApeproSmartWalletDecoder;
/// Reserved `kb_decoder_weighted_swap_stabble` decoder.
pub use self::decoder::DcWeightedSwapStabbleDecoder;
/// Computes the deterministic contextual input hash.
pub use self::decoder::decoder_api_decoder_api_contextual_input_hash;
pub use self::decoder::decoder_api_contextual_input_hash;
/// Returns true when a decoder declares the exact program id.
pub use self::decoder::decoder_api_decoder_handles_program_id;
/// Computes a deterministic lowercase SHA-256 hash for one JSON value.

View File

@@ -1,5 +1,5 @@
# file: kb-pipeline/Cargo.toml
# version: 4
# version: 5
[package]
name = "kb-pipeline"
@@ -15,6 +15,7 @@ futures-util.workspace = true
kb-core = { path = "../kb-core" }
kb-lib = { path = "../kb-lib" }
kb-onchain-transport = { path = "../kb-onchain-transport" }
kb-program-ids = { path = "../kb-program-ids" }
kb-store = { path = "../kb-store" }
kb-wallet = { path = "../kb-wallet" }
serde_json.workspace = true

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
// file: kb-pipeline/src/lib.rs
// version: 3
// version: 4
#![forbid(unsafe_code)]
#![deny(unreachable_pub)]
@@ -9,6 +9,7 @@
mod constants;
mod core_extraction;
mod decode_replay;
mod plan;
/// Canonical tracing target for pipeline orchestration.
@@ -35,6 +36,30 @@ pub use self::core_extraction::CoreExtractionSummary;
pub use self::core_extraction::execute_core_extraction;
/// Extracts one canonical raw transaction into normalized core rows.
pub use self::core_extraction::extract_raw_transaction_to_core;
/// Current common decode pipeline orchestration version.
pub use self::decode_replay::DECODE_PIPELINE_VERSION;
/// Deterministic decoder dispatch policy.
pub use self::decode_replay::DecodeDispatchPolicy;
/// Per-decoder terminal counters.
pub use self::decode_replay::DecodeProcessorSummary;
/// Decode replay observer contract.
pub use self::decode_replay::DecodeReplayObserver;
/// Decode replay progress event.
pub use self::decode_replay::DecodeReplayProgressEvent;
/// Decode replay progress severity.
pub use self::decode_replay::DecodeReplayProgressLevel;
/// Bounded contextual decode replay request.
pub use self::decode_replay::DecodeReplayRequest;
/// Final contextual decode replay summary.
pub use self::decode_replay::DecodeReplaySummary;
/// Stable materialization processing stage.
pub use self::decode_replay::EVENT_MATERIALIZATION_STAGE;
/// Stable instruction decode processing stage.
pub use self::decode_replay::INSTRUCTION_DECODE_STAGE;
/// Executes one contextual decode replay campaign.
pub use self::decode_replay::execute_decode_replay;
/// Creates one stable process-local decode campaign identifier.
pub use self::decode_replay::new_decode_campaign_id;
/// Pipeline stage identifier.
pub use self::plan::PipelineStage;
/// Replay selection scope.