v0.3.4-pre.003

This commit is contained in:
2026-08-30 21:37:02 +02:00
parent dfa3723a7f
commit a704a5722e
37 changed files with 1088 additions and 75 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-store-postgres-lib/tests/dependency_boundary.rs
// version: 15
// version: 16
#![warn(missing_docs)]
#![deny(unreachable_pub)]
@@ -126,18 +126,28 @@ fn pre_003_fix_001_migration_engine_uses_split_schema_contract_and_binds_network
}
#[test]
fn pre_002_v002_is_migration_only_and_does_not_open_account_repository_or_runtime_dispatch() {
fn pre_003_v002_schema_is_complete_but_still_does_not_open_account_repository_or_runtime_dispatch() {
let crate_root = include_str!("../src/lib.rs");
let migration = include_str!("../src/migration.rs");
let schema = include_str!("../src/schema.rs");
let runtime = include_str!("../src/runtime.rs");
let states = include_str!("../migrations/v002_raw_account_state/tables/001_ksp_raw_account_states.sql");
let observations = include_str!("../migrations/v002_raw_account_state/tables/002_ksp_raw_account_observations.sql");
let slot_check = include_str!("../migrations/v002_raw_account_state/constraints/005_ck_ksp_raw_account_states_slot.sql");
let index = include_str!("../migrations/v002_raw_account_state/indexes/001_ix_ksp_raw_account_states_slot_pubkey_state_hash.sql");
assert!(migration.contains("name: \"raw_account_state\""));
assert!(migration.contains("resources: crate::V002_RESOURCES"));
assert!(migration.contains("V002_PROVISIONAL_CHECKSUM_PRE_002"));
assert!(migration.contains("HISTORY_UPDATE_CHECKSUM_SQL"));
assert!(migration.contains("reconcile_applied_history_checksums"));
assert!(schema.contains("pub(crate) const V002_RESOURCES"));
assert!(schema.contains("verify_v002_external_compatibility"));
assert!(schema.contains("ksp_raw_account_states', 'ksp_raw_account_observations"));
assert!(states.contains("ksp_raw_account_states"));
assert!(observations.contains("ksp_raw_account_observations"));
assert!(slot_check.contains("slot >= 0 AND slot <= 18446744073709551615"));
assert!(index.contains("ON ksp_raw_account_states (slot, pubkey, state_hash)"));
assert!(!index.contains("WHERE"));
assert!(!crate_root.contains("mod raw_account;"));
assert!(!runtime.contains("impl ksp_store_api::RawAccount"));
assert!(!std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("src/raw_account.rs").exists());