v0.3.9-pre.002-fix.001

This commit is contained in:
2026-09-04 14:23:54 +02:00
parent 7d0710a1e6
commit 156d237460
9 changed files with 210 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-worker-api/tests/dependency_boundary.rs
// version: 1
// version: 2
//! Dependency and runtime-neutrality canaries for the Worker API foundation.
@@ -59,6 +59,47 @@ fn pre_002_production_sources_forbid_job_runtime_domain_and_wire_dependencies()
return;
}
#[test]
fn pre_002_fix_001_shared_visible_items_use_crate_root_facade_inside_owner_modules() {
let identity = include_str!("../src/identity.rs");
let lifecycle = include_str!("../src/lifecycle.rs");
let snapshot = include_str!("../src/snapshot.rs");
let stop = include_str!("../src/stop.rs");
for expected in [
"impl crate::WorkerId {",
"impl std::fmt::Debug for crate::WorkerId {",
"impl crate::WorkerKindCode {",
"impl std::fmt::Debug for crate::WorkerKindCode {",
] {
assert!(identity.contains(expected), "missing crate-root Worker identity impl target: {expected}");
}
for expected in [
"impl crate::WorkerActivity {",
"impl crate::WorkerHealth {",
"impl crate::WorkerLifecycle {",
"impl crate::WorkerState {",
"impl std::fmt::Debug for crate::WorkerLifecycle {",
] {
assert!(lifecycle.contains(expected), "missing crate-root Worker lifecycle impl target: {expected}");
}
for expected in [
"impl crate::WorkerSnapshotSequence {",
"impl crate::WorkerSnapshot {",
"impl std::fmt::Debug for crate::WorkerSnapshot {",
"return crate::WorkerSnapshotSequence(u64::MAX);",
] {
assert!(snapshot.contains(expected), "missing crate-root Worker snapshot reference: {expected}");
}
for expected in [
"impl crate::WorkerStopToken {",
"impl std::default::Default for crate::WorkerStopToken {",
"impl std::fmt::Debug for crate::WorkerStopToken {",
] {
assert!(stop.contains(expected), "missing crate-root Worker stop impl target: {expected}");
}
return;
}
fn manifest_dependency_names(section: &str) -> std::vec::Vec<&str> {
let mut names = std::vec::Vec::new();
for line in section.lines() {