Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
Add structural Fn signatures, typed capture environments, indirect calls and Trait dispatch while preserving logical parameter and result groups, ownership and budgets. Remove guest coroutine execution and legacy loading. Activate bounded sealed PBX v1 with mandatory capture metadata, preserve frame continuations and root return results, and migrate producers and shipped cartridges. Publish coordinated specs, handoffs and the completed runtime lesson. Validation: 880 workspace tests passed, 9 existing tests ignored; both cartridges completed six production-host frames.
13 lines
515 B
Rust
13 lines
515 B
Rust
use prometeu_vm::{VirtualMachine, VmInitError};
|
|
|
|
#[test]
|
|
fn invalid_image_format_is_rejected_before_execution() {
|
|
// Provide bytes that are not a valid PBX image. The VM must reject it with a structured load error.
|
|
let program_bytes = b"NOT_PBX_IMAGE".to_vec();
|
|
let mut vm = VirtualMachine::default();
|
|
let result = vm.initialize(program_bytes);
|
|
assert!(
|
|
matches!(result,Err(VmInitError::RegistryLoadFailed(e)) if e.code==prometeu_bytecode::load_limits::LoadCode::InvalidFormat)
|
|
);
|
|
}
|