test fixes
Intrepid/Prometeu/Runtime/pipeline/head This commit looks good
Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good

This commit is contained in:
2026-05-15 05:07:10 +01:00
parent 446044c4e6
commit deaababb1e
8 changed files with 45 additions and 49 deletions
@@ -58,7 +58,11 @@ impl HostDebugger {
// Pre-load cartridge metadata so the Handshake message can contain
// valid information about the App being debugged.
if let Ok(cartridge) = CartridgeLoader::load(path) {
let _ = firmware.os.vm_runtime.initialize_vm(&mut firmware.vm, &cartridge);
let _ = firmware.os.vm_runtime.initialize_vm(
&mut firmware.os.log_service,
&mut firmware.vm,
&cartridge,
);
}
match TcpListener::bind(format!("127.0.0.1:{}", debug_port)) {
@@ -201,7 +205,11 @@ impl HostDebugger {
DebugCommand::Step => {
// Execute exactly one instruction and keep paused.
firmware.os.vm_runtime.paused = true;
let _ = firmware.os.vm_runtime.debug_step_instruction(&mut firmware.vm, hardware);
let _ = firmware.os.vm_runtime.debug_step_instruction(
&mut firmware.os.log_service,
&mut firmware.vm,
hardware,
);
}
DebugCommand::StepFrame => {
// Execute until the end of the current logical frame.
@@ -308,7 +316,7 @@ impl HostDebugger {
}
// 1. Process and send new log entries.
let new_events = firmware.os.vm_runtime.log_service.get_after(self.last_log_seq);
let new_events = firmware.os.log_service.get_after(self.last_log_seq);
for event in new_events {
self.last_log_seq = event.seq;
@@ -59,7 +59,7 @@ struct FrameCanvas<'a> {
pub(crate) fn capture_snapshot(stats: &HostStats, firmware: &Firmware) -> OverlaySnapshot {
let tel = firmware.os.vm_runtime.atomic_telemetry.snapshot();
let recent_logs = firmware.os.vm_runtime.log_service.get_recent(10);
let recent_logs = firmware.os.log_service.get_recent(10);
let violations_count =
recent_logs.iter().filter(|e| e.tag >= 0xCA01 && e.tag <= 0xCA07).count();
@@ -153,7 +153,7 @@ impl HostRunner {
let mut firmware = Firmware::new(cap_config);
if let Some(root) = &fs_root {
let backend = HostDirBackend::new(root);
firmware.os.vm_runtime.mount_fs(Box::new(backend));
firmware.os.mount_fs(Box::new(backend));
}
Self {
@@ -333,13 +333,11 @@ impl ApplicationHandler for HostRunner {
// 2. Maintain filesystem connection if it was lost (e.g., directory removed).
if let Some(root) = &self.fs_root {
use prometeu_system::fs::FsState;
if matches!(
self.firmware.os.vm_runtime.fs_state,
FsState::Unmounted | FsState::Error(_)
) && std::path::Path::new(root).exists()
if matches!(self.firmware.os.fs_state, FsState::Unmounted | FsState::Error(_))
&& std::path::Path::new(root).exists()
{
let backend = HostDirBackend::new(root);
self.firmware.os.vm_runtime.mount_fs(Box::new(backend));
self.firmware.os.mount_fs(Box::new(backend));
}
}
@@ -403,9 +401,9 @@ impl ApplicationHandler for HostRunner {
// Synchronize system logs to the host console.
let last_seq = self.log_sink.last_seq().unwrap_or(u64::MAX);
let new_events = if last_seq == u64::MAX {
self.firmware.os.vm_runtime.log_service.get_recent(4096)
self.firmware.os.log_service.get_recent(4096)
} else {
self.firmware.os.vm_runtime.log_service.get_after(last_seq)
self.firmware.os.log_service.get_after(last_seq)
};
self.log_sink.process_events(new_events);