v0.3.6-pre.009

This commit is contained in:
2026-09-01 16:04:58 +02:00
parent d89aee9910
commit b861a1e3b8
16 changed files with 1846 additions and 86 deletions

View File

@@ -1,10 +1,10 @@
// file: crates/ksp-job-backfill-lib/tests/release_completeness.rs
// version: 4
// version: 7
//! Completeness canaries through the `pre.008` bounded execution/checkpoint tranche.
//! Completeness canaries through the `pre.009` concrete cancellation and latest-value runtime tranche.
#[test]
fn pre_008_production_module_inventory_is_exact() -> std::io::Result<()> {
fn pre_009_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,
@@ -34,13 +34,24 @@ fn pre_008_production_module_inventory_is_exact() -> std::io::Result<()> {
names.sort_unstable();
assert_eq!(
names,
std::vec!["checkpoint.rs", "constants.rs", "conversion.rs", "discovery.rs", "error.rs", "execution.rs", "lib.rs", "persistence.rs", "request.rs"]
std::vec![
"checkpoint.rs",
"constants.rs",
"conversion.rs",
"discovery.rs",
"error.rs",
"execution.rs",
"lib.rs",
"persistence.rs",
"request.rs",
"runtime.rs",
]
);
return std::result::Result::Ok(());
}
#[test]
fn pre_008_surface_adds_bounded_execution_and_checkpoint_without_pre_009_runtime() {
fn pre_009_surface_closes_concrete_cancellation_and_latest_value_runtime() {
let root = include_str!("../src/lib.rs");
for required in [
"BackfillCandidate",
@@ -65,11 +76,18 @@ fn pre_008_surface_adds_bounded_execution_and_checkpoint_without_pre_009_runtime
"execute_backfill_discovery",
"ERROR_CODE_BACKFILL_CHECKPOINT_INVALID",
"ERROR_CODE_BACKFILL_EXECUTION_INVALID",
"BackfillJobHandle",
"BackfillJobPhase",
"BackfillJobRuntime",
"BackfillJobSnapshot",
"BackfillSnapshotSource",
"BACKFILL_JOB_KIND_CODE",
"ERROR_CODE_BACKFILL_RUNTIME_INVALID",
] {
assert!(root.contains(required), "required pre.008 public contract missing: {required}");
assert!(root.contains(required), "required pre.009 public contract missing: {required}");
}
for forbidden in ["BackfillJobHandle", "BackfillSnapshot", "JobSnapshotSource", "tokio::", "FuturesUnordered"] {
assert!(!root.contains(forbidden), "pre.009 or runtime implementation detail leaked into public root: {forbidden}");
for forbidden in ["tokio::", "FuturesUnordered", "watch::Receiver", "watch::Sender"] {
assert!(!root.contains(forbidden), "runtime implementation detail leaked into public root: {forbidden}");
}
assert!(!root.contains("pub mod "));
return;