v0.3.11-pre.004

This commit is contained in:
2026-09-08 10:11:07 +02:00
parent ec64be340e
commit a4061ee1e1
10 changed files with 602 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/dependency_boundary.rs
// version: 2
// version: 3
//! Dependency firewall canaries for the RAW transaction ingest Worker foundation.
@@ -52,20 +52,30 @@ fn pre_002_manifest_keeps_forbidden_layers_and_live_sources_out() {
}
#[test]
fn pre_003_source_surface_opens_identity_and_settings_without_runtime_behavior() {
fn pre_004_source_surface_opens_lifecycle_without_supervisor_admission_or_live_sources() {
let root = include_str!("../src/lib.rs");
let runtime = include_str!("../src/runtime.rs");
for required in [
"mod error;",
"mod identity;",
"mod settings;",
"pub use self::error::ERROR_CODE_RAW_TRANSACTION_INGEST_SETTINGS_INVALID;",
"pub use self::identity::RAW_TRANSACTION_INGEST_WORKER_KIND_CODE;",
"pub use self::settings::RawTransactionIngestSettings;",
"mod runtime;",
"pub use self::runtime::RawTransactionIngestHandle;",
"pub use self::runtime::RawTransactionIngestTerminalFuture;",
"pub use self::runtime::RawTransactionIngestWorker;",
"pub fn start(",
"pub fn request_stop(&self) -> bool",
"pub fn wait_terminal(&self)",
] {
assert!(root.contains(required), "required pre.003 crate-root contract missing: {required}");
assert!(root.contains(required) || runtime.contains(required), "required pre.004 runtime contract missing: {required}");
}
for forbidden in ["pub mod ", "tokio::", "start(", "spawn(", "JoinHandle", "JoinSet", "mpsc::", "watch::", "ksp_onchain_transport_lib::"] {
assert!(!root.contains(forbidden), "pre.003 opened runtime behavior too early: {forbidden}");
for forbidden in [
"JoinSet",
"mpsc::",
"canonicalize_raw_transaction",
"persist_raw_transaction",
"ksp_onchain_transport_lib::",
"RawTransactionIngestSnapshot",
"WorkerSnapshotSource",
] {
assert!(!root.contains(forbidden) && !runtime.contains(forbidden), "pre.004 opened later runtime scope too early: {forbidden}");
}
return;
}