v0.3.6-pre.006

This commit is contained in:
2026-09-01 14:08:53 +02:00
parent ea5f756d17
commit 032919fa07
13 changed files with 1172 additions and 57 deletions

View File

@@ -1,10 +1,10 @@
// file: crates/ksp-job-backfill-lib/tests/release_completeness.rs
// version: 1
// version: 2
//! Completeness canaries for the `pre.005` Backfill foundation.
//! Completeness canaries for the `pre.006` Backfill RAW conversion tranche.
#[test]
fn pre_005_production_module_inventory_is_exact() -> std::io::Result<()> {
fn pre_006_production_module_inventory_is_exact() -> std::io::Result<()> {
let source_root = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("src");
let entries = match std::fs::read_dir(source_root) {
std::result::Result::Ok(value) => value,
@@ -32,12 +32,12 @@ fn pre_005_production_module_inventory_is_exact() -> std::io::Result<()> {
}
}
names.sort_unstable();
assert_eq!(names, std::vec!["constants.rs", "discovery.rs", "error.rs", "lib.rs", "request.rs"]);
assert_eq!(names, std::vec!["constants.rs", "conversion.rs", "discovery.rs", "error.rs", "lib.rs", "request.rs"]);
return std::result::Result::Ok(());
}
#[test]
fn pre_005_surface_is_discovery_only_without_raw_persistence_or_checkpoint_runtime() {
fn pre_006_surface_adds_raw_conversion_without_persistence_or_checkpoint_runtime() {
let root = include_str!("../src/lib.rs");
for required in [
"BackfillCandidate",
@@ -50,11 +50,17 @@ fn pre_005_surface_is_discovery_only_without_raw_persistence_or_checkpoint_runti
"BackfillScopeFingerprint",
"BackfillSignature",
"discover_backfill_candidates",
"BackfillRawAcquisition",
"BackfillHydrationOutcome",
"hydrate_backfill_candidate",
"RAW_TRANSACTION_FORMAT_ID",
"RAW_TRANSACTION_FORMAT_VERSION",
"ERROR_CODE_BACKFILL_RAW_CONVERSION_INVALID",
] {
assert!(root.contains(required), "required pre.005 public contract missing: {required}");
assert!(root.contains(required), "required pre.006 public contract missing: {required}");
}
for forbidden in ["RawTransactionObservation", "persist_raw_transaction_acquisition", "BackfillCheckpoint", "BackfillJobHandle", "JobSnapshotSource"] {
assert!(!root.contains(forbidden), "later Backfill tranche leaked into pre.005: {forbidden}");
for forbidden in ["persist_raw_transaction_acquisition", "BackfillCheckpoint", "BackfillJobHandle", "JobSnapshotSource"] {
assert!(!root.contains(forbidden), "later Backfill tranche leaked into pre.006: {forbidden}");
}
assert!(!root.contains("pub mod "));
return;