implements PLN-0156
This commit is contained in:
parent
e613ab43c9
commit
c34bbaf936
@ -27,7 +27,22 @@ impl HubHomeStep {
|
||||
|
||||
match outcome.action {
|
||||
Some(SystemProfileAction::LaunchNativeShell(app)) => {
|
||||
let task_id = ctx.os.sessions().create_native_shell_task(app.app_id(), app.title());
|
||||
let task_id = match ctx
|
||||
.os
|
||||
.sessions()
|
||||
.try_create_native_shell_task(app.app_id(), app.title())
|
||||
{
|
||||
Ok(task_id) => task_id,
|
||||
Err(error) => {
|
||||
ctx.os.log(
|
||||
LogLevel::Warn,
|
||||
LogSource::Hub,
|
||||
0,
|
||||
format!("Failed to launch native shell {}: {:?}", app.title(), error),
|
||||
);
|
||||
return None;
|
||||
}
|
||||
};
|
||||
let id = ctx.os.windows().add_window(
|
||||
app.title().to_string(),
|
||||
WindowOwner::Task(task_id),
|
||||
|
||||
@ -44,7 +44,7 @@ impl LoadCartridgeStep {
|
||||
self.loaded_app_mode = Some(loaded.app_mode);
|
||||
}
|
||||
Err(report) => {
|
||||
self.init_error = Some(report);
|
||||
self.init_error = Some(report.into_crash_report("load VM cartridge into session"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ mod services;
|
||||
pub use crash_report::CrashReport;
|
||||
pub use os::{
|
||||
DEFAULT_GAME_PAUSE_BUDGET_TICKS, GameLifecycleEvent, GameLifecycleEventKind, LifecycleError,
|
||||
LifecycleOperation, SystemOS,
|
||||
LifecycleOperation, SessionError, SystemOS,
|
||||
};
|
||||
pub use programs::{NativeShellApp, PrometeuHub, SystemProfileAction, SystemProfileUpdate};
|
||||
pub use prometeu_hal::{RenderWorkerBackend, RenderWorkerFrameSink};
|
||||
|
||||
@ -6,6 +6,6 @@ mod window;
|
||||
|
||||
pub use fs::FsFacade;
|
||||
pub use lifecycle::LifecycleFacade;
|
||||
pub use sessions::SessionsFacade;
|
||||
pub use sessions::{SessionError, SessionsFacade};
|
||||
pub use vm::VmFacade;
|
||||
pub use window::WindowFacade;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
use crate::CrashReport;
|
||||
use crate::os::LifecycleError;
|
||||
use crate::os::SystemOS;
|
||||
use crate::process::ProcessId;
|
||||
use crate::task::TaskId;
|
||||
use crate::vm_session::{VmSession, VmSessionError};
|
||||
use prometeu_hal::app_mode::AppMode;
|
||||
@ -14,21 +15,55 @@ pub struct LoadedVmCartridge {
|
||||
pub reused_existing_session: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum SessionError {
|
||||
Lifecycle(LifecycleError),
|
||||
VmSession(VmSessionError),
|
||||
TaskNotFound(TaskId),
|
||||
ProcessNotFound(ProcessId),
|
||||
MissingVmSession(TaskId),
|
||||
Initialization(CrashReport),
|
||||
}
|
||||
|
||||
impl SessionError {
|
||||
pub fn into_crash_report(self, operation: &str) -> CrashReport {
|
||||
match self {
|
||||
Self::Initialization(report) => report,
|
||||
error => {
|
||||
CrashReport::VmPanic { message: format!("{operation} failed: {error:?}"), pc: None }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<LifecycleError> for SessionError {
|
||||
fn from(error: LifecycleError) -> Self {
|
||||
Self::Lifecycle(error)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<VmSessionError> for SessionError {
|
||||
fn from(error: VmSessionError) -> Self {
|
||||
Self::VmSession(error)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SessionsFacade<'a> {
|
||||
pub(in crate::os) os: &'a mut SystemOS,
|
||||
}
|
||||
|
||||
impl<'a> SessionsFacade<'a> {
|
||||
#[cfg(test)]
|
||||
pub fn create_vm_game_task(&mut self, app_id: u32, title: impl Into<String>) -> TaskId {
|
||||
self.try_create_vm_game_task(app_id, title)
|
||||
.expect("newly created game task should have an associated process")
|
||||
.expect("test/setup VM game creation should succeed")
|
||||
}
|
||||
|
||||
pub fn try_create_vm_game_task(
|
||||
&mut self,
|
||||
app_id: u32,
|
||||
title: impl Into<String>,
|
||||
) -> Result<TaskId, LifecycleError> {
|
||||
) -> Result<TaskId, SessionError> {
|
||||
if let Some(session) = self.os.vm_sessions.resident_game_for_app(app_id) {
|
||||
return Ok(session.task_id);
|
||||
}
|
||||
@ -37,42 +72,54 @@ impl<'a> SessionsFacade<'a> {
|
||||
let process_id = self.os.process_manager.spawn_vm_game(app_id, title.clone());
|
||||
let task_id = self.os.task_manager.create_game_task(process_id, app_id, title);
|
||||
self.os.lifecycle().set_game_foreground_task(task_id)?;
|
||||
self.create_vm_session_for_task(task_id)
|
||||
.expect("newly created game task should create a VM session");
|
||||
self.try_create_vm_session_for_task(task_id)?;
|
||||
|
||||
Ok(task_id)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn create_vm_shell_task(&mut self, app_id: u32, title: impl Into<String>) -> TaskId {
|
||||
self.try_create_vm_shell_task(app_id, title)
|
||||
.expect("test/setup VM shell creation should succeed")
|
||||
}
|
||||
|
||||
pub fn try_create_vm_shell_task(
|
||||
&mut self,
|
||||
app_id: u32,
|
||||
title: impl Into<String>,
|
||||
) -> Result<TaskId, SessionError> {
|
||||
let title = title.into();
|
||||
let process_id = self.os.process_manager.spawn_vm_shell(app_id, title.clone());
|
||||
let task_id = self.os.task_manager.create_shell_task(process_id, app_id, title);
|
||||
self.os
|
||||
.lifecycle()
|
||||
.set_shell_foreground_task(task_id)
|
||||
.expect("newly created shell task should have an associated process");
|
||||
self.create_vm_session_for_task(task_id)
|
||||
.expect("newly created shell task should create a VM session");
|
||||
self.os.lifecycle().set_shell_foreground_task(task_id)?;
|
||||
self.try_create_vm_session_for_task(task_id)?;
|
||||
|
||||
task_id
|
||||
Ok(task_id)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn create_native_shell_task(&mut self, app_id: u32, title: impl Into<String>) -> TaskId {
|
||||
self.try_create_native_shell_task(app_id, title)
|
||||
.expect("test/setup native shell creation should succeed")
|
||||
}
|
||||
|
||||
pub fn try_create_native_shell_task(
|
||||
&mut self,
|
||||
app_id: u32,
|
||||
title: impl Into<String>,
|
||||
) -> Result<TaskId, SessionError> {
|
||||
let title = title.into();
|
||||
let process_id = self.os.process_manager.spawn_native_shell(app_id, title.clone());
|
||||
let task_id = self.os.task_manager.create_shell_task(process_id, app_id, title);
|
||||
self.os
|
||||
.lifecycle()
|
||||
.set_shell_foreground_task(task_id)
|
||||
.expect("newly created native shell task should have an associated process");
|
||||
self.os.lifecycle().set_shell_foreground_task(task_id)?;
|
||||
|
||||
task_id
|
||||
Ok(task_id)
|
||||
}
|
||||
|
||||
pub fn load_vm_cartridge(
|
||||
&mut self,
|
||||
cartridge: &Cartridge,
|
||||
) -> Result<LoadedVmCartridge, CrashReport> {
|
||||
) -> Result<LoadedVmCartridge, SessionError> {
|
||||
let existing_game_task = if cartridge.app_mode == AppMode::Game {
|
||||
self.os
|
||||
.vm_sessions
|
||||
@ -85,19 +132,15 @@ impl<'a> SessionsFacade<'a> {
|
||||
let (task_id, reused_existing_session) = if let Some(task_id) = existing_game_task {
|
||||
(task_id, true)
|
||||
} else if cartridge.app_mode == AppMode::Shell {
|
||||
(self.create_vm_shell_task(cartridge.app_id, cartridge.title.clone()), false)
|
||||
(self.try_create_vm_shell_task(cartridge.app_id, cartridge.title.clone())?, false)
|
||||
} else {
|
||||
let task_id = self
|
||||
.try_create_vm_game_task(cartridge.app_id, cartridge.title.clone())
|
||||
.map_err(|error| CrashReport::VmPanic {
|
||||
message: format!("failed to create VM game task: {error:?}"),
|
||||
pc: None,
|
||||
})?;
|
||||
let task_id =
|
||||
self.try_create_vm_game_task(cartridge.app_id, cartridge.title.clone())?;
|
||||
(task_id, false)
|
||||
};
|
||||
|
||||
if !reused_existing_session {
|
||||
self.initialize_session_cartridge(task_id, cartridge)?;
|
||||
self.try_initialize_session_cartridge(task_id, cartridge)?;
|
||||
}
|
||||
|
||||
Ok(LoadedVmCartridge { task_id, app_mode: cartridge.app_mode, reused_existing_session })
|
||||
@ -123,13 +166,14 @@ impl<'a> SessionsFacade<'a> {
|
||||
self.os.vm_sessions.clear();
|
||||
}
|
||||
|
||||
fn create_vm_session_for_task(&mut self, task_id: TaskId) -> Result<(), VmSessionError> {
|
||||
let task = self.os.task_manager.get(task_id).expect("session task should exist").clone();
|
||||
pub fn try_create_vm_session_for_task(&mut self, task_id: TaskId) -> Result<(), SessionError> {
|
||||
let task =
|
||||
self.os.task_manager.get(task_id).ok_or(SessionError::TaskNotFound(task_id))?.clone();
|
||||
let process = self
|
||||
.os
|
||||
.process_manager
|
||||
.get(task.process_id)
|
||||
.expect("session process should exist")
|
||||
.ok_or(SessionError::ProcessNotFound(task.process_id))?
|
||||
.clone();
|
||||
|
||||
let cap_config = self.os.vm_runtime.certifier.config;
|
||||
@ -138,24 +182,28 @@ impl<'a> SessionsFacade<'a> {
|
||||
.vm_sessions
|
||||
.create_for_task(&task, &process, "", Some(cap_config), logs_count)
|
||||
.map(|_| ())
|
||||
.map_err(SessionError::from)
|
||||
}
|
||||
|
||||
fn initialize_session_cartridge(
|
||||
pub fn try_initialize_session_cartridge(
|
||||
&mut self,
|
||||
task_id: TaskId,
|
||||
cartridge: &Cartridge,
|
||||
) -> Result<(), CrashReport> {
|
||||
) -> Result<(), SessionError> {
|
||||
let session = self
|
||||
.os
|
||||
.vm_sessions
|
||||
.for_task_mut(task_id)
|
||||
.expect("loaded VM task should have a VM session");
|
||||
.ok_or(SessionError::MissingVmSession(task_id))?;
|
||||
|
||||
session.app_id = cartridge.app_id;
|
||||
session.title = cartridge.title.clone();
|
||||
session.app_version = cartridge.app_version.clone();
|
||||
session.app_mode = cartridge.app_mode;
|
||||
session.clear_cartridge_service_state();
|
||||
session.runtime.initialize_vm(&mut self.os.log_service, &mut session.vm, cartridge)
|
||||
session
|
||||
.runtime
|
||||
.initialize_vm(&mut self.os.log_service, &mut session.vm, cartridge)
|
||||
.map_err(SessionError::Initialization)
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,9 @@ mod facades;
|
||||
mod lifecycle;
|
||||
mod system_os;
|
||||
|
||||
pub use facades::{FsFacade, LifecycleFacade, SessionsFacade, VmFacade, WindowFacade};
|
||||
pub use facades::{
|
||||
FsFacade, LifecycleFacade, SessionError, SessionsFacade, VmFacade, WindowFacade,
|
||||
};
|
||||
pub use lifecycle::{
|
||||
DEFAULT_GAME_PAUSE_BUDGET_TICKS, GameLifecycleEvent, GameLifecycleEventKind, LifecycleError,
|
||||
LifecycleOperation,
|
||||
|
||||
@ -143,17 +143,33 @@ impl SystemOS {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::os::{GameLifecycleEventKind, LifecycleError, LifecycleOperation};
|
||||
use crate::process::{ProcessKind, ProcessState};
|
||||
use crate::os::{GameLifecycleEventKind, LifecycleError, LifecycleOperation, SessionError};
|
||||
use crate::process::{ProcessId, ProcessKind, ProcessState};
|
||||
use crate::services::foreground::{ForegroundOwner, ResidentGame, ResidentGameState};
|
||||
use crate::task::{TaskId, TaskState};
|
||||
use prometeu_hal::app_mode::AppMode;
|
||||
use prometeu_hal::cartridge::{AssetsPayloadSource, Cartridge};
|
||||
use prometeu_hal::syscalls::caps;
|
||||
|
||||
fn process_state_for_task(os: &SystemOS, task_id: TaskId) -> ProcessState {
|
||||
let task = os.task_manager.get(task_id).expect("task should exist");
|
||||
os.process_manager.get(task.process_id).expect("process should exist").state
|
||||
}
|
||||
|
||||
fn session_test_cartridge(app_mode: AppMode, app_id: u32, title: &str) -> Cartridge {
|
||||
Cartridge {
|
||||
app_id,
|
||||
title: title.to_string(),
|
||||
app_version: "1.0.0".to_string(),
|
||||
app_mode,
|
||||
capabilities: caps::NONE,
|
||||
program: vec![],
|
||||
assets: AssetsPayloadSource::empty(),
|
||||
asset_table: vec![],
|
||||
preload: vec![],
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn set_foreground_task_marks_task_and_process_running() {
|
||||
let mut os = SystemOS::new(None);
|
||||
@ -453,6 +469,60 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vm_shell_load_returns_typed_error_when_foreground_shell_exists() {
|
||||
let mut os = SystemOS::new(None);
|
||||
let first = os.sessions().create_vm_shell_task(7, "Settings");
|
||||
let cartridge = session_test_cartridge(AppMode::Shell, 8, "Files");
|
||||
|
||||
let error = os.sessions().load_vm_cartridge(&cartridge).expect_err("load should fail");
|
||||
|
||||
match error {
|
||||
SessionError::Lifecycle(LifecycleError::ForegroundShellAlreadyExists {
|
||||
existing,
|
||||
requested,
|
||||
}) => {
|
||||
assert_eq!(existing, first);
|
||||
assert_ne!(requested, first);
|
||||
}
|
||||
other => panic!("expected foreground shell lifecycle error, got {:?}", other),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vm_session_creation_returns_typed_error_for_missing_task() {
|
||||
let mut os = SystemOS::new(None);
|
||||
|
||||
assert_eq!(
|
||||
os.sessions().try_create_vm_session_for_task(TaskId(999)),
|
||||
Err(SessionError::TaskNotFound(TaskId(999)))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn vm_session_creation_returns_typed_error_for_missing_process() {
|
||||
let mut os = SystemOS::new(None);
|
||||
let task_id = os.task_manager.create_game_task(ProcessId(999), 42, "Broken");
|
||||
|
||||
assert_eq!(
|
||||
os.sessions().try_create_vm_session_for_task(task_id),
|
||||
Err(SessionError::ProcessNotFound(ProcessId(999)))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn session_cartridge_initialization_returns_typed_error_for_missing_session() {
|
||||
let mut os = SystemOS::new(None);
|
||||
let process_id = os.process_manager.spawn_vm_game(42, "Sector Crawl");
|
||||
let task_id = os.task_manager.create_game_task(process_id, 42, "Sector Crawl");
|
||||
let cartridge = session_test_cartridge(AppMode::Game, 42, "Sector Crawl");
|
||||
|
||||
assert_eq!(
|
||||
os.sessions().try_initialize_session_cartridge(task_id, &cartridge),
|
||||
Err(SessionError::MissingVmSession(task_id))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn closing_foreground_shell_returns_to_hub() {
|
||||
let mut os = SystemOS::new(None);
|
||||
|
||||
@ -436,7 +436,11 @@ mod tests {
|
||||
let mut debugger = HostDebugger::new();
|
||||
let mut firmware = Firmware::new(None);
|
||||
let mut platform = TestPlatform::new();
|
||||
let task_id = firmware.os.sessions().create_vm_game_task(42, "Sector Crawl");
|
||||
let task_id = firmware
|
||||
.os
|
||||
.sessions()
|
||||
.try_create_vm_game_task(42, "Sector Crawl")
|
||||
.expect("debugger test should create a game session");
|
||||
|
||||
debugger.handle_command(
|
||||
DebugCommand::SetBreakpoint { pc: 123 },
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
{"type":"discussion","id":"DSC-0043","status":"open","ticket":"system-os-cartridge-switch-orchestrator","title":"SystemOS Cartridge Switch Orchestrator","created_at":"2026-07-03","updated_at":"2026-07-03","tags":["runtime","os","lifecycle","game","cartridge","architecture"],"agendas":[{"id":"AGD-0044","file":"AGD-0044-systemos-cartridge-switch-orchestrator.md","status":"open","created_at":"2026-07-03","updated_at":"2026-07-03"}],"decisions":[],"plans":[],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0039","status":"abandoned","ticket":"render-pipeline-family-and-future-3d","title":"Render Pipeline Family and Future 3D","created_at":"2026-06-04","updated_at":"2026-06-04","tags":["gfx","renderer","runtime","architecture","pipeline"],"agendas":[{"id":"AGD-0039","file":"AGD-0039-render-pipeline-family-and-future-3d.md","status":"abandoned","created_at":"2026-06-04","updated_at":"2026-06-04","_override_reason":"User explicitly chose to close this agenda without a new decision because DSC-0038 already established enough architecture for future extension, and 3D is intentionally deferred."}],"decisions":[],"plans":[],"lessons":[],"_override_reason":"User explicitly chose to close this agenda without a new decision because DSC-0038 already established enough architecture for future extension, and 3D is intentionally deferred."}
|
||||
{"type":"discussion","id":"DSC-0040","status":"done","ticket":"vm-render-parallel-execution-boundary","title":"VM and Render Parallel Execution Boundary","created_at":"2026-06-04","updated_at":"2026-06-06","tags":["runtime","renderer","vm","concurrency","architecture","perf"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0048","file":"discussion/lessons/DSC-0040-vm-render-parallel-execution-boundary/LSN-0048-render-workers-need-a-closed-packet-contract.md","status":"done","created_at":"2026-06-06","updated_at":"2026-06-06"}]}
|
||||
{"type":"discussion","id":"DSC-0041","status":"in_progress","ticket":"foreground-stack-game-pause-shell-vm-backed","title":"Foreground Stack, Game Pause, and VM-Backed Shell Coexistence","created_at":"2026-06-05","updated_at":"2026-07-05","tags":["runtime","os","lifecycle","shell","game","vm","foreground","architecture"],"agendas":[{"id":"AGD-0041","file":"AGD-0041-foreground-stack-game-pause-shell-vm-backed.md","status":"accepted","created_at":"2026-06-05","updated_at":"2026-07-03"},{"id":"AGD-0046","file":"AGD-0046-vm-context-ownership-for-resident-game-and-vm-backed-shell.md","status":"accepted","created_at":"2026-07-04","updated_at":"2026-07-04"}],"decisions":[{"id":"DEC-0037","file":"DEC-0037-foreground-stack-and-game-pause-contract.md","status":"accepted","created_at":"2026-07-03","updated_at":"2026-07-03","ref_agenda":"AGD-0041"},{"id":"DEC-0038","file":"DEC-0038-vm-session-ownership-for-vm-backed-processes.md","status":"accepted","created_at":"2026-07-04","updated_at":"2026-07-04","ref_agenda":"AGD-0046"}],"plans":[{"id":"PLN-0136","file":"PLN-0136-route-desktop-home-key-outside-guest-input.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0137","file":"PLN-0137-implement-systemos-foreground-stack-state.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0138","file":"PLN-0138-specify-foreground-pause-and-home-contract.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0139","file":"PLN-0139-validate-game-home-shell-game-end-to-end.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0140","file":"PLN-0140-deliver-game-pause-resume-and-suspension.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0141","file":"PLN-0141-integrate-render-audio-and-input-pause-boundaries.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0142","file":"PLN-0142-deliver-game-lifecycle-events-to-vm-runtime.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0143","file":"PLN-0143-guarantee-cooperative-pause-budget-tick-before-suspension.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0144","file":"PLN-0144-suspend-resident-game-when-shell-takes-foreground.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0145","file":"PLN-0145-centralize-resident-game-resume-transition.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0146","file":"PLN-0146-consolidate-lifecycle-process-lookup-helpers.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0147","file":"PLN-0147-move-native-shell-profile-update-into-hub.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0148","file":"PLN-0148-introduce-vm-session-registry-and-identity.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0149","file":"PLN-0149-move-vm-runtime-state-into-vm-sessions.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0150","file":"PLN-0150-route-cartridge-loading-through-vm-sessions.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0151","file":"PLN-0151-schedule-foreground-vm-session-ticks.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0152","file":"PLN-0152-validate-game-and-vm-shell-session-coexistence.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0153","file":"PLN-0153-specify-vm-session-ownership-and-background-ready-scheduling.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0154","file":"PLN-0154-route-debugger-operations-through-vm-sessions.md","status":"done","created_at":"2026-07-05","updated_at":"2026-07-05","ref_decisions":["DEC-0038"]},{"id":"PLN-0155","file":"PLN-0155-retire-legacy-firmware-vm-runtime-bridge.md","status":"done","created_at":"2026-07-05","updated_at":"2026-07-05","ref_decisions":["DEC-0038"]},{"id":"PLN-0156","file":"PLN-0156-harden-vm-session-lifecycle-error-boundaries.md","status":"open","created_at":"2026-07-05","updated_at":"2026-07-05","ref_decisions":["DEC-0038"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0041","status":"in_progress","ticket":"foreground-stack-game-pause-shell-vm-backed","title":"Foreground Stack, Game Pause, and VM-Backed Shell Coexistence","created_at":"2026-06-05","updated_at":"2026-07-05","tags":["runtime","os","lifecycle","shell","game","vm","foreground","architecture"],"agendas":[{"id":"AGD-0041","file":"AGD-0041-foreground-stack-game-pause-shell-vm-backed.md","status":"accepted","created_at":"2026-06-05","updated_at":"2026-07-03"},{"id":"AGD-0046","file":"AGD-0046-vm-context-ownership-for-resident-game-and-vm-backed-shell.md","status":"accepted","created_at":"2026-07-04","updated_at":"2026-07-04"}],"decisions":[{"id":"DEC-0037","file":"DEC-0037-foreground-stack-and-game-pause-contract.md","status":"accepted","created_at":"2026-07-03","updated_at":"2026-07-03","ref_agenda":"AGD-0041"},{"id":"DEC-0038","file":"DEC-0038-vm-session-ownership-for-vm-backed-processes.md","status":"accepted","created_at":"2026-07-04","updated_at":"2026-07-04","ref_agenda":"AGD-0046"}],"plans":[{"id":"PLN-0136","file":"PLN-0136-route-desktop-home-key-outside-guest-input.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0137","file":"PLN-0137-implement-systemos-foreground-stack-state.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0138","file":"PLN-0138-specify-foreground-pause-and-home-contract.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0139","file":"PLN-0139-validate-game-home-shell-game-end-to-end.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0140","file":"PLN-0140-deliver-game-pause-resume-and-suspension.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0141","file":"PLN-0141-integrate-render-audio-and-input-pause-boundaries.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03","ref_decisions":["DEC-0037"]},{"id":"PLN-0142","file":"PLN-0142-deliver-game-lifecycle-events-to-vm-runtime.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0143","file":"PLN-0143-guarantee-cooperative-pause-budget-tick-before-suspension.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0144","file":"PLN-0144-suspend-resident-game-when-shell-takes-foreground.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0145","file":"PLN-0145-centralize-resident-game-resume-transition.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0146","file":"PLN-0146-consolidate-lifecycle-process-lookup-helpers.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0147","file":"PLN-0147-move-native-shell-profile-update-into-hub.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0037"]},{"id":"PLN-0148","file":"PLN-0148-introduce-vm-session-registry-and-identity.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0149","file":"PLN-0149-move-vm-runtime-state-into-vm-sessions.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0150","file":"PLN-0150-route-cartridge-loading-through-vm-sessions.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0151","file":"PLN-0151-schedule-foreground-vm-session-ticks.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0152","file":"PLN-0152-validate-game-and-vm-shell-session-coexistence.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0153","file":"PLN-0153-specify-vm-session-ownership-and-background-ready-scheduling.md","status":"done","created_at":"2026-07-04","updated_at":"2026-07-04","ref_decisions":["DEC-0038"]},{"id":"PLN-0154","file":"PLN-0154-route-debugger-operations-through-vm-sessions.md","status":"done","created_at":"2026-07-05","updated_at":"2026-07-05","ref_decisions":["DEC-0038"]},{"id":"PLN-0155","file":"PLN-0155-retire-legacy-firmware-vm-runtime-bridge.md","status":"done","created_at":"2026-07-05","updated_at":"2026-07-05","ref_decisions":["DEC-0038"]},{"id":"PLN-0156","file":"PLN-0156-harden-vm-session-lifecycle-error-boundaries.md","status":"done","created_at":"2026-07-05","updated_at":"2026-07-05","ref_decisions":["DEC-0038"]}],"lessons":[]}
|
||||
{"type":"discussion","id":"DSC-0042","status":"done","ticket":"real-render-worker-establishment","title":"Real Render Worker Establishment","created_at":"2026-06-06","updated_at":"2026-06-20","tags":["runtime","renderer","worker","concurrency","host","hal","architecture"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0049","file":"discussion/lessons/DSC-0042-real-render-worker-establishment/LSN-0049-render-worker-publication-boundary.md","status":"done","created_at":"2026-06-20","updated_at":"2026-06-20"}]}
|
||||
{"type":"discussion","id":"DSC-0038","status":"done","ticket":"render-frame-packet-boundary","title":"Logical Render Pipelines and Command Packets","created_at":"2026-05-25","updated_at":"2026-06-04","tags":["gfx","renderer","runtime","frame-composer","architecture","ui","pipeline"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0047","file":"discussion/lessons/DSC-0038-render-frame-packet-boundary/LSN-0047-typed-render-submissions-preserve-domain-boundaries.md","status":"done","created_at":"2026-06-04","updated_at":"2026-06-04"}]}
|
||||
{"type":"discussion","id":"DSC-0035","status":"done","ticket":"task-owned-shell-windows","title":"Agenda - Task-Owned Shell Windows","created_at":"2026-05-15","updated_at":"2026-05-15","tags":["runtime","os","task","window-manager","shell","lifecycle"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0044","file":"discussion/lessons/DSC-0035-task-owned-shell-windows/LSN-0044-task-window-liveness-belongs-to-the-task.md","status":"done","created_at":"2026-05-15","updated_at":"2026-05-15"}]}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
id: PLN-0156
|
||||
ticket: foreground-stack-game-pause-shell-vm-backed
|
||||
title: Harden VM Session Lifecycle Error Boundaries
|
||||
status: open
|
||||
status: done
|
||||
created: 2026-07-05
|
||||
ref_decisions: [DEC-0038]
|
||||
tags: [runtime, os, lifecycle, shell, game, vm, foreground, architecture]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user