Keep PBX at v0 and simplify Jenkins quality gate
Intrepid/Prometeu/Runtime/pipeline/pr-master There was a failure building this commit

This commit is contained in:
2026-10-14 14:35:44 +01:00
parent 39468740c3
commit a2275932a5
51 changed files with 155 additions and 297 deletions
@@ -1,4 +1,4 @@
//! PBX v1 publication: immutable metadata and shared payload, after bindings
//! PBX v0 publication: immutable metadata and shared payload, after bindings
//! and bounded whole-program verification. No public unchecked constructor.
use crate::string_identity_index::Identity;
use crate::{LoaderPatchError, VmInitError};
@@ -2485,7 +2485,7 @@ mod tests {
let mut vm = VirtualMachine::default();
let mut header = vec![0u8; 32];
header[0..4].copy_from_slice(&prometeu_bytecode::PBX_MAGIC);
header[4..6].copy_from_slice(&0u16.to_le_bytes()); // retired version
header[4..6].copy_from_slice(&1u16.to_le_bytes()); // unsupported version
let res = vm.initialize(header);
assert!(
@@ -2494,11 +2494,11 @@ mod tests {
}
#[test]
fn test_loader_hardening_malformed_pbx_v1() {
fn test_loader_hardening_malformed_pbx_v0() {
let mut vm = VirtualMachine::default();
let mut header = vec![0u8; 32];
header[0..4].copy_from_slice(&prometeu_bytecode::PBX_MAGIC);
header[4..6].copy_from_slice(&1u16.to_le_bytes());
header[4..6].copy_from_slice(&0u16.to_le_bytes());
header[8..12].copy_from_slice(&1u32.to_le_bytes()); // missing directory
let res = vm.initialize(header);
@@ -9,7 +9,7 @@ use prometeu_vm::{
// Independent executable oracle: 32-byte header, eight directory entries,
// payload at 128, one Bool import, one zero-slot HALT function; total 194.
fn minimal() -> Vec<u8> {
"50 42 58 00 01 00 00 00 08 00 00 00
"50 42 58 00 00 00 00 00 08 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 80 00 00 00 04 00 00 00
01 00 00 00 84 00 00 00 1e 00 00 00
@@ -46,7 +46,7 @@ impl NativeInterface for Native {
}
#[test]
fn independent_v1_bytes_load_publish_and_execute_through_the_public_sealed_boundary() {
fn independent_v0_bytes_load_publish_and_execute_through_the_public_sealed_boundary() {
let bytes = minimal();
assert_eq!(bytes.len(), 194);
let mut load = LoadBudget::new(Default::default());
@@ -64,7 +64,7 @@ fn independent_v1_bytes_load_publish_and_execute_through_the_public_sealed_bound
#[test]
fn single_violation_oracles_reject_before_image_publication_with_typed_context() {
for (offset, replacement, code, reason, pc) in [
(4, 0, LoadCode::UnsupportedFormat, LoadReason::Version, None),
(4, 1, LoadCode::UnsupportedFormat, LoadReason::Version, None),
(178, 0, LoadCode::UnsupportedFormat, LoadReason::Builtin, None),
(162, 0xff, LoadCode::InvalidCode, LoadReason::UnknownOpcode, Some(0)),
(162, 0x11, LoadCode::InvalidCode, LoadReason::StackUnderflow, Some(0)),