v0.3.8-pre.004

This commit is contained in:
2026-09-03 12:32:53 +02:00
parent 009b957523
commit c4198ac656
17 changed files with 902 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-store-lib/tests/dependency_boundary.rs
// version: 8
// version: 9
#![warn(missing_docs)]
#![deny(unreachable_pub)]
@@ -60,13 +60,14 @@ fn pre_005_facade_exposes_no_physical_postgres_types_or_environment_bypass() {
}
#[test]
fn pre_008_facade_dispatches_exact_ten_raw_capabilities_without_physical_leak() {
fn v0_3_8_pre_004_facade_dispatches_eleven_raw_capabilities_without_physical_leak() {
let store = include_str!("../src/store.rs");
for required in [
"impl ksp_store_api::RawAccountObservationRead for Store",
"impl ksp_store_api::RawAccountObservationWrite for Store",
"impl ksp_store_api::RawAccountStateRead for Store",
"impl ksp_store_api::RawAccountStateWrite for Store",
"impl ksp_store_api::RawTransactionInspectionRead for Store",
"impl ksp_store_api::RawTransactionObservationRead for Store",
"impl ksp_store_api::RawTransactionObservationWrite for Store",
"impl ksp_store_api::RawTransactionRead for Store",
@@ -79,7 +80,7 @@ fn pre_008_facade_dispatches_exact_ten_raw_capabilities_without_physical_leak()
] {
assert!(store.contains(required), "missing pre.008 Store capability dispatch contract: {required}");
}
assert_eq!(store.matches("impl ksp_store_api::Raw").count(), 10);
assert_eq!(store.matches("impl ksp_store_api::Raw").count(), 11);
for forbidden in ["tokio_postgres::", "deadpool_postgres::", "CREATE TABLE", "INSERT INTO", "UPDATE ksp_", "DELETE FROM"] {
assert!(!store.contains(forbidden), "pre.008 facade leaked physical backend material: {forbidden}");
}