v0.3.12-pre.007-fix.001
This commit is contained in:
@@ -8,7 +8,19 @@ fn pre_002_manifest_dependency_surface_is_exact() {
|
||||
let manifest = include_str!("../Cargo.toml");
|
||||
let dependencies = dependency_section(manifest);
|
||||
let names = manifest_dependency_names(dependencies);
|
||||
assert_eq!(names, vec!["ksp-core-lib", "ksp-logging-lib", "ksp-onchain-transport-lib", "ksp-raw-transaction-lib", "ksp-store-lib", "ksp-worker-api", "sha2", "tokio",],);
|
||||
assert_eq!(
|
||||
names,
|
||||
vec![
|
||||
"ksp-core-lib",
|
||||
"ksp-logging-lib",
|
||||
"ksp-onchain-transport-lib",
|
||||
"ksp-raw-transaction-lib",
|
||||
"ksp-store-lib",
|
||||
"ksp-worker-api",
|
||||
"sha2",
|
||||
"tokio",
|
||||
],
|
||||
);
|
||||
for required in [
|
||||
"ksp-core-lib = { path = \"../ksp-core-lib\" }",
|
||||
"ksp-logging-lib = { path = \"../ksp-logging-lib\" }",
|
||||
@@ -81,15 +93,14 @@ fn v0_3_12_pre_003_transaction_and_status_adapters_are_private_and_transport_fac
|
||||
] {
|
||||
assert!(!resources.contains(forbidden) && !root.contains(forbidden), "pre.003 crossed a private/offline boundary: {forbidden}");
|
||||
}
|
||||
let status_impl = match resources
|
||||
.split_once("impl RawTransactionIngestYellowstoneSignalView for ksp_onchain_transport_lib::YellowstoneTransactionStatusUpdate")
|
||||
{
|
||||
std::option::Option::Some((_, tail)) => match tail.split_once("impl std::convert::From<") {
|
||||
std::option::Option::Some((value, _)) => value,
|
||||
std::option::Option::None => tail,
|
||||
},
|
||||
std::option::Option::None => "",
|
||||
};
|
||||
let status_impl =
|
||||
match resources.split_once("impl RawTransactionIngestYellowstoneSignalView for ksp_onchain_transport_lib::YellowstoneTransactionStatusUpdate") {
|
||||
std::option::Option::Some((_, tail)) => match tail.split_once("impl std::convert::From<") {
|
||||
std::option::Option::Some((value, _)) => value,
|
||||
std::option::Option::None => tail,
|
||||
},
|
||||
std::option::Option::None => "",
|
||||
};
|
||||
assert!(!status_impl.contains("::error(self)"), "TransactionStatus remote error material must not enter the private signal");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,16 @@ fn v0_3_12_pre_002_manifest_dependency_surface_opens_only_transport_and_remains_
|
||||
}
|
||||
assert_eq!(
|
||||
normal,
|
||||
std::collections::BTreeSet::from(["ksp-core-lib", "ksp-logging-lib", "ksp-onchain-transport-lib", "ksp-raw-transaction-lib", "ksp-store-lib", "ksp-worker-api", "sha2", "tokio",])
|
||||
std::collections::BTreeSet::from([
|
||||
"ksp-core-lib",
|
||||
"ksp-logging-lib",
|
||||
"ksp-onchain-transport-lib",
|
||||
"ksp-raw-transaction-lib",
|
||||
"ksp-store-lib",
|
||||
"ksp-worker-api",
|
||||
"sha2",
|
||||
"tokio",
|
||||
])
|
||||
);
|
||||
assert!(dev.is_empty());
|
||||
assert!(build.is_empty());
|
||||
@@ -323,14 +332,7 @@ fn v0_3_12_pre_004_hydration_provenance_and_remote_material_are_bounded_and_reda
|
||||
] {
|
||||
assert!(resources.contains(required), "required pre.004 bounded provenance/mismatch guard missing: {required}");
|
||||
}
|
||||
for forbidden in [
|
||||
"source_payload_hash",
|
||||
"source_payload_size_bytes",
|
||||
"HTTP-SECRET-CANARY",
|
||||
"GRPC-SECRET-CANARY",
|
||||
"TransactionStatus.error",
|
||||
".error()",
|
||||
] {
|
||||
for forbidden in ["source_payload_hash", "source_payload_size_bytes", "HTTP-SECRET-CANARY", "GRPC-SECRET-CANARY", "TransactionStatus.error", ".error()"] {
|
||||
assert!(!resources.contains(forbidden), "pre.004 retained forbidden remote/source material: {forbidden}");
|
||||
}
|
||||
return;
|
||||
@@ -383,7 +385,8 @@ fn v0_3_12_pre_005_block_and_continuity_shapes_are_bounded_redacted_and_raw_sepa
|
||||
fn v0_3_12_pre_006_runtime_resource_contract_opens_one_supervised_transport_source() {
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
let runtime = include_str!("../src/runtime.rs");
|
||||
for required in ["open_standard_subscribe", "next_update", "get_transaction_observed", "RawTransactionIngestHydrationCoordinator", "session.close().await"] {
|
||||
for required in ["open_standard_subscribe", "next_update", "get_transaction_observed", "RawTransactionIngestHydrationCoordinator", "session.close().await"]
|
||||
{
|
||||
assert!(resources.contains(required), "productive runtime-resource source behavior missing: {required}");
|
||||
}
|
||||
assert!(runtime.contains("start_with_runtime_resources"));
|
||||
|
||||
@@ -32,7 +32,10 @@ fn pre_010_production_module_inventory_is_exact() -> std::io::Result<()> {
|
||||
}
|
||||
}
|
||||
names.sort_unstable();
|
||||
assert_eq!(names, std::vec!["admission.rs", "error.rs", "identity.rs", "lib.rs", "persistence.rs", "runtime.rs", "runtime_resources.rs", "settings.rs", "snapshot.rs",]);
|
||||
assert_eq!(
|
||||
names,
|
||||
std::vec!["admission.rs", "error.rs", "identity.rs", "lib.rs", "persistence.rs", "runtime.rs", "runtime_resources.rs", "settings.rs", "snapshot.rs",]
|
||||
);
|
||||
return std::result::Result::Ok(());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user