v0.3.10-pre.006
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
// file: crates/ksp-job-backfill-lib/tests/dependency_boundary.rs
|
||||
// version: 8
|
||||
// version: 9
|
||||
|
||||
//! Dependency firewall canaries through the concrete cancellation and latest-value runtime tranche.
|
||||
|
||||
#[test]
|
||||
fn pre_003_manifest_adds_common_raw_edge_without_crossing_store_or_runtime_boundaries() {
|
||||
let manifest = include_str!("../Cargo.toml");
|
||||
let production_manifest = match manifest.split_once("[dev-dependencies]") {
|
||||
std::option::Option::Some((production, _)) => production,
|
||||
std::option::Option::None => manifest,
|
||||
};
|
||||
for required in [
|
||||
"futures-util = { workspace = true, features = [\"std\"] }",
|
||||
"ksp-core-lib = { path = \"../ksp-core-lib\" }",
|
||||
@@ -18,7 +22,7 @@ fn pre_003_manifest_adds_common_raw_edge_without_crossing_store_or_runtime_bound
|
||||
"sha2.workspace = true",
|
||||
"tokio = { workspace = true, features = [\"macros\", \"sync\"] }",
|
||||
] {
|
||||
assert!(manifest.contains(required), "required Backfill dependency missing: {required}");
|
||||
assert!(production_manifest.contains(required), "required Backfill dependency missing: {required}");
|
||||
}
|
||||
for forbidden in [
|
||||
"ksp-config-lib",
|
||||
@@ -33,7 +37,7 @@ fn pre_003_manifest_adds_common_raw_edge_without_crossing_store_or_runtime_bound
|
||||
"serde = {",
|
||||
"tonic",
|
||||
] {
|
||||
assert!(!manifest.contains(forbidden), "forbidden Backfill dependency present: {forbidden}");
|
||||
assert!(!production_manifest.contains(forbidden), "forbidden Backfill dependency present: {forbidden}");
|
||||
}
|
||||
let root = include_str!("../src/lib.rs");
|
||||
assert!(!root.contains("tokio::"), "Tokio implementation types must not leak through the public crate root");
|
||||
@@ -59,6 +63,30 @@ fn pre_005_websocket_parity_dependency_stays_test_only() {
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_006_yellowstone_parity_dependencies_stay_test_only() {
|
||||
let manifest = include_str!("../Cargo.toml");
|
||||
let parts = manifest.splitn(2, "[dev-dependencies]").collect::<std::vec::Vec<_>>();
|
||||
let (dependencies, dev_dependencies) = match parts.as_slice() {
|
||||
[dependencies, dev_dependencies] => (*dependencies, *dev_dependencies),
|
||||
_ => {
|
||||
assert_eq!(parts.len(), 2, "Backfill manifest must retain exactly one dev-dependencies section");
|
||||
return;
|
||||
},
|
||||
};
|
||||
assert!(!dependencies.contains("tonic"), "Yellowstone parity server must not become a production Backfill dependency");
|
||||
assert!(!dependencies.contains("yellowstone-grpc-proto"), "Yellowstone protobuf must not become a production Backfill dependency");
|
||||
assert!(
|
||||
dev_dependencies.contains("tonic = { workspace = true, features = [\"codegen\", \"server\"] }"),
|
||||
"Yellowstone parity server must remain an explicit test-only dependency",
|
||||
);
|
||||
assert!(
|
||||
dev_dependencies.contains("yellowstone-grpc-proto = { workspace = true, features = [\"tonic\"] }"),
|
||||
"Yellowstone protobuf must remain an explicit test-only dependency",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_009_production_sources_keep_transport_store_and_scheduler_ownership_separate() {
|
||||
let neutral_sources = [
|
||||
|
||||
Reference in New Issue
Block a user