Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8e4d64e42
|
||
|
|
31ad7f9446
|
||
|
|
6d185ab97e | ||
|
|
89101d1b20
|
||
|
|
2516fae4fc | ||
|
|
e0c08c8b00
|
||
|
|
5b106af0f3 |
@@ -66,3 +66,7 @@ AGENTS.md
|
|||||||
|
|
||||||
.python-version
|
.python-version
|
||||||
.venv
|
.venv
|
||||||
|
|
||||||
|
discussion/*
|
||||||
|
!discussion/lessons/
|
||||||
|
!discussion/lessons/**
|
||||||
|
|||||||
Generated
+548
-345
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@ members = [
|
|||||||
"crates/console/prometeu-system",
|
"crates/console/prometeu-system",
|
||||||
"crates/console/prometeu-vm",
|
"crates/console/prometeu-vm",
|
||||||
"crates/host/prometeu-host-desktop-winit",
|
"crates/host/prometeu-host-desktop-winit",
|
||||||
|
"crates/host/prometeu-host-headless",
|
||||||
"crates/tools/prometeu-cli",
|
"crates/tools/prometeu-cli",
|
||||||
"crates/tools/pbxgen-dummy-boy",
|
"crates/tools/pbxgen-dummy-boy",
|
||||||
"crates/tools/pbxgen-stress",
|
"crates/tools/pbxgen-stress",
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ Current canonical domains:
|
|||||||
- `asset/bank`
|
- `asset/bank`
|
||||||
- `firmware`
|
- `firmware`
|
||||||
- `host-dependent`
|
- `host-dependent`
|
||||||
|
- `host/headless`
|
||||||
|
|
||||||
Global coverage artifacts:
|
Global coverage artifacts:
|
||||||
|
|
||||||
@@ -157,6 +158,7 @@ Domain-oriented evidence helpers:
|
|||||||
make coverage-domain-list
|
make coverage-domain-list
|
||||||
make coverage-domain-evidence DOMAIN=firmware
|
make coverage-domain-evidence DOMAIN=firmware
|
||||||
make coverage-domain-evidence DOMAIN=host-dependent
|
make coverage-domain-evidence DOMAIN=host-dependent
|
||||||
|
make coverage-domain-evidence DOMAIN=host/headless
|
||||||
```
|
```
|
||||||
|
|
||||||
Per-domain baselines currently start around `60`.
|
Per-domain baselines currently start around `60`.
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ mod program_image;
|
|||||||
mod value;
|
mod value;
|
||||||
|
|
||||||
pub use abi::{
|
pub use abi::{
|
||||||
TrapInfo, TRAP_BAD_RET_SLOTS, TRAP_DIV_ZERO, TRAP_EXPLICIT, TRAP_ILLEGAL_INSTRUCTION,
|
SourceSpan, TrapInfo, TRAP_BAD_RET_SLOTS, TRAP_DIV_ZERO, TRAP_EXPLICIT,
|
||||||
TRAP_INVALID_FUNC, TRAP_INVALID_INTRINSIC, TRAP_INVALID_LOCAL, TRAP_INVALID_SYSCALL, TRAP_OOB,
|
TRAP_ILLEGAL_INSTRUCTION, TRAP_INVALID_FUNC, TRAP_INVALID_INTRINSIC, TRAP_INVALID_LOCAL,
|
||||||
TRAP_STACK_UNDERFLOW, TRAP_TYPE,
|
TRAP_INVALID_SYSCALL, TRAP_OOB, TRAP_STACK_UNDERFLOW, TRAP_TYPE,
|
||||||
};
|
};
|
||||||
pub use assembler::{assemble, AsmError};
|
pub use assembler::{assemble, AsmError};
|
||||||
pub use decoder::{decode_next, DecodeError};
|
pub use decoder::{decode_next, DecodeError};
|
||||||
|
|||||||
@@ -579,6 +579,8 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(firmware.os.sessions().vm_session_count(), 0);
|
assert_eq!(firmware.os.sessions().vm_session_count(), 0);
|
||||||
assert_eq!(firmware.os.vm().current_cartridge_title(), "");
|
assert_eq!(firmware.os.vm().current_cartridge_title(), "");
|
||||||
|
assert_eq!(firmware.os.lifecycle().resident_game(), None);
|
||||||
|
assert_eq!(firmware.os.lifecycle().foreground_owner(), ForegroundOwner::Hub);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ pub struct ResetStep;
|
|||||||
impl ResetStep {
|
impl ResetStep {
|
||||||
pub fn on_enter(&mut self, ctx: &mut PrometeuContext) {
|
pub fn on_enter(&mut self, ctx: &mut PrometeuContext) {
|
||||||
ctx.os.log(LogLevel::Info, LogSource::Pos, 0, "Firmware Reset".to_string());
|
ctx.os.log(LogLevel::Info, LogSource::Pos, 0, "Firmware Reset".to_string());
|
||||||
|
// Reset is a cold-boot boundary. Clearing only the VM session leaves
|
||||||
|
// the lifecycle registry pointing at the old resident game, which
|
||||||
|
// rejects the next cartridge as a second resident game.
|
||||||
|
let _ = ctx.os.lifecycle().terminate_resident_game();
|
||||||
ctx.os.sessions().clear_vm_sessions();
|
ctx.os.sessions().clear_vm_sessions();
|
||||||
ctx.os.vm().reset_global_runtime_state();
|
ctx.os.vm().reset_global_runtime_state();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,6 +159,15 @@ impl<'a> VmFacade<'a> {
|
|||||||
self.os.vm_runtime.debug_step_request = true;
|
self.os.vm_runtime.debug_step_request = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn clear_debug_step_request(&mut self) {
|
||||||
|
if let Some(session) = self.active_session_mut() {
|
||||||
|
session.runtime.debug_step_request = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self.os.vm_runtime.debug_step_request = false;
|
||||||
|
}
|
||||||
|
|
||||||
pub fn debug_step_requested(&self) -> bool {
|
pub fn debug_step_requested(&self) -> bool {
|
||||||
self.active_session()
|
self.active_session()
|
||||||
.map(|session| session.runtime.debug_step_request)
|
.map(|session| session.runtime.debug_step_request)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ pub struct VirtualMachineRuntime {
|
|||||||
|
|
||||||
impl VirtualMachineRuntime {
|
impl VirtualMachineRuntime {
|
||||||
pub const CYCLES_PER_LOGICAL_FRAME: u64 = 1_500_000;
|
pub const CYCLES_PER_LOGICAL_FRAME: u64 = 1_500_000;
|
||||||
pub const SLICE_PER_TICK: u64 = 1_500_000;
|
pub const SLICE_PER_TICK: u64 = 250_000;
|
||||||
pub const MAX_LOG_LEN: usize = 256;
|
pub const MAX_LOG_LEN: usize = 256;
|
||||||
pub const MAX_LOGS_PER_FRAME: u32 = 10;
|
pub const MAX_LOGS_PER_FRAME: u32 = 10;
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,9 @@ impl VirtualMachineRuntime {
|
|||||||
vm: &mut VirtualMachine,
|
vm: &mut VirtualMachine,
|
||||||
platform: &mut dyn RuntimePlatform,
|
platform: &mut dyn RuntimePlatform,
|
||||||
) -> Option<CrashReport> {
|
) -> Option<CrashReport> {
|
||||||
|
if vm.call_stack_is_empty() {
|
||||||
|
vm.prepare_boot_call();
|
||||||
|
}
|
||||||
let step_result = {
|
let step_result = {
|
||||||
let mut ctx = HostContext::new_platform(Some(platform));
|
let mut ctx = HostContext::new_platform(Some(platform));
|
||||||
let mut fs = VirtualFS::new();
|
let mut fs = VirtualFS::new();
|
||||||
@@ -96,18 +99,28 @@ impl VirtualMachineRuntime {
|
|||||||
};
|
};
|
||||||
|
|
||||||
match step_result {
|
match step_result {
|
||||||
Ok(_) => None,
|
Ok(())
|
||||||
Err(e) => {
|
| Err(
|
||||||
let report = match e {
|
LogicalFrameEndingReason::FrameSync
|
||||||
LogicalFrameEndingReason::Trap(trap) => CrashReport::VmTrap { trap },
|
| LogicalFrameEndingReason::BudgetExhausted
|
||||||
LogicalFrameEndingReason::Panic(message) => {
|
| LogicalFrameEndingReason::Halted
|
||||||
CrashReport::VmPanic { message, pc: Some(vm.pc() as u32) }
|
| LogicalFrameEndingReason::EndOfRom
|
||||||
}
|
| LogicalFrameEndingReason::Breakpoint,
|
||||||
other => CrashReport::VmPanic {
|
) => None,
|
||||||
message: format!("Unexpected fault during step: {:?}", other),
|
Err(LogicalFrameEndingReason::Trap(trap)) => {
|
||||||
pc: Some(vm.pc() as u32),
|
let report = CrashReport::VmTrap { trap };
|
||||||
},
|
self.log(
|
||||||
};
|
log_service,
|
||||||
|
LogLevel::Error,
|
||||||
|
LogSource::Vm,
|
||||||
|
report.log_tag(),
|
||||||
|
format!("PVM Fault during Step: {}", report),
|
||||||
|
);
|
||||||
|
self.last_crash_report = Some(report.clone());
|
||||||
|
Some(report)
|
||||||
|
}
|
||||||
|
Err(LogicalFrameEndingReason::Panic(message)) => {
|
||||||
|
let report = CrashReport::VmPanic { message, pc: Some(vm.pc() as u32) };
|
||||||
self.log(
|
self.log(
|
||||||
log_service,
|
log_service,
|
||||||
LogLevel::Error,
|
LogLevel::Error,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ prometeu-system = { path = "../../console/prometeu-system" }
|
|||||||
prometeu-drivers = { path = "../../console/prometeu-drivers" }
|
prometeu-drivers = { path = "../../console/prometeu-drivers" }
|
||||||
prometeu-hal = { path= "../../console/prometeu-hal" }
|
prometeu-hal = { path= "../../console/prometeu-hal" }
|
||||||
winit = "0.30.12"
|
winit = "0.30.12"
|
||||||
pixels = "0.15.0"
|
pixels = "0.17.2"
|
||||||
cpal = "0.15.3"
|
cpal = "0.15.3"
|
||||||
ringbuf = "0.4.7"
|
ringbuf = "0.4.7"
|
||||||
serde_json = "1.0.149"
|
serde_json = "1.0.149"
|
||||||
|
|||||||
@@ -397,7 +397,7 @@ impl AudioMixer {
|
|||||||
let vol_l = vol_f * (1.0 - pan_f).sqrt();
|
let vol_l = vol_f * (1.0 - pan_f).sqrt();
|
||||||
let vol_r = vol_f * pan_f.sqrt();
|
let vol_r = vol_f * pan_f.sqrt();
|
||||||
|
|
||||||
for frame in buffer.chunks_exact_mut(2) {
|
for frame in buffer.as_chunks_mut::<2>().0 {
|
||||||
let pos_int = voice.pos as usize;
|
let pos_int = voice.pos as usize;
|
||||||
let pos_fract = voice.pos - pos_int as f64;
|
let pos_fract = voice.pos - pos_int as f64;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
[package]
|
||||||
|
name = "prometeu-host-headless"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2024"
|
||||||
|
license.workspace = true
|
||||||
|
repository.workspace = true
|
||||||
|
description = "In-process Prometeu host that boots and steps cartridges without a window, display, or audio device."
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
prometeu-bytecode = { path = "../../console/prometeu-bytecode" }
|
||||||
|
prometeu-drivers = { path = "../../console/prometeu-drivers" }
|
||||||
|
prometeu-firmware = { path = "../../console/prometeu-firmware" }
|
||||||
|
prometeu-hal = { path = "../../console/prometeu-hal" }
|
||||||
|
prometeu-system = { path = "../../console/prometeu-system" }
|
||||||
|
|
||||||
|
[[bench]]
|
||||||
|
name = "temporal"
|
||||||
|
harness = false
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
use std::fs;
|
||||||
|
use std::hint::black_box;
|
||||||
|
use std::path::{Path, PathBuf};
|
||||||
|
use std::time::{Instant, SystemTime, UNIX_EPOCH};
|
||||||
|
|
||||||
|
use prometeu_bytecode::SourceSpan;
|
||||||
|
use prometeu_bytecode::assembler::assemble;
|
||||||
|
use prometeu_bytecode::model::{BytecodeModule, DebugInfo, Export, FunctionMeta};
|
||||||
|
use prometeu_host_headless::{AdvanceFramesStop, HeadlessHost};
|
||||||
|
|
||||||
|
const SAMPLE_FRAMES: u64 = 300;
|
||||||
|
const SAMPLE_COUNT: u32 = 10;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let cartridge = benchmark_cartridge();
|
||||||
|
let mut samples = Vec::with_capacity(SAMPLE_COUNT as usize);
|
||||||
|
|
||||||
|
for _ in 0..SAMPLE_COUNT {
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(cartridge.to_string_lossy()).expect("boot benchmark cartridge");
|
||||||
|
|
||||||
|
let started = Instant::now();
|
||||||
|
let outcome =
|
||||||
|
black_box(host.advance_frames(SAMPLE_FRAMES)).expect("advance benchmark frames");
|
||||||
|
let elapsed = started.elapsed();
|
||||||
|
|
||||||
|
assert_eq!(outcome.completed, SAMPLE_FRAMES);
|
||||||
|
assert_eq!(outcome.stop, AdvanceFramesStop::Completed);
|
||||||
|
samples.push(elapsed.as_secs_f64());
|
||||||
|
}
|
||||||
|
|
||||||
|
samples.sort_by(f64::total_cmp);
|
||||||
|
let median_seconds = samples[samples.len() / 2];
|
||||||
|
let frames_per_second = SAMPLE_FRAMES as f64 / median_seconds;
|
||||||
|
println!(
|
||||||
|
"headless advance_frames: median={median_seconds:.6}s frames={SAMPLE_FRAMES} throughput={frames_per_second:.2} frames/s samples={SAMPLE_COUNT}"
|
||||||
|
);
|
||||||
|
|
||||||
|
fs::remove_dir_all(&cartridge).expect("remove benchmark cartridge");
|
||||||
|
}
|
||||||
|
|
||||||
|
fn benchmark_cartridge() -> PathBuf {
|
||||||
|
let directory = std::env::temp_dir().join(format!(
|
||||||
|
"prometeu-headless-benchmark-{}-{}",
|
||||||
|
std::process::id(),
|
||||||
|
SystemTime::now().duration_since(UNIX_EPOCH).expect("system clock").as_nanos()
|
||||||
|
));
|
||||||
|
fs::create_dir_all(&directory).expect("create benchmark cartridge");
|
||||||
|
|
||||||
|
let code = assemble("FRAME_SYNC\nRET\n").expect("assemble benchmark program");
|
||||||
|
let module = BytecodeModule {
|
||||||
|
version: 0,
|
||||||
|
const_pool: vec![],
|
||||||
|
functions: vec![FunctionMeta {
|
||||||
|
code_offset: 0,
|
||||||
|
code_len: code.len() as u32,
|
||||||
|
param_slots: 0,
|
||||||
|
local_slots: 0,
|
||||||
|
return_slots: 0,
|
||||||
|
max_stack_slots: 1,
|
||||||
|
}],
|
||||||
|
code,
|
||||||
|
debug_info: Some(DebugInfo {
|
||||||
|
pc_to_span: vec![(0, SourceSpan { file_id: 1, start: 0, end: 10 })],
|
||||||
|
function_names: vec![(0, "main".into())],
|
||||||
|
}),
|
||||||
|
exports: vec![Export { symbol: "main".into(), func_idx: 0 }],
|
||||||
|
syscalls: vec![],
|
||||||
|
}
|
||||||
|
.serialize();
|
||||||
|
|
||||||
|
fs::write(directory.join("program.pbx"), module).expect("write benchmark program");
|
||||||
|
write_manifest(&directory);
|
||||||
|
directory
|
||||||
|
}
|
||||||
|
|
||||||
|
fn write_manifest(directory: &Path) {
|
||||||
|
fs::write(
|
||||||
|
directory.join("manifest.json"),
|
||||||
|
"{\n \"magic\": \"PMTU\",\n \"cartridge_version\": 1,\n \"app_id\": 90,\n \"title\": \"Headless Temporal Benchmark\",\n \"app_version\": \"0.1.0\",\n \"app_mode\": \"Game\",\n \"capabilities\": []\n}\n",
|
||||||
|
)
|
||||||
|
.expect("write benchmark manifest");
|
||||||
|
}
|
||||||
@@ -0,0 +1,497 @@
|
|||||||
|
use std::fmt;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
use prometeu_bytecode::Value;
|
||||||
|
use prometeu_drivers::MemoryBanks;
|
||||||
|
use prometeu_drivers::hardware::Hardware;
|
||||||
|
use prometeu_firmware::firmware_state::{AppCrashesStep, ResetStep};
|
||||||
|
use prometeu_firmware::{BootTarget, Firmware, FirmwareState};
|
||||||
|
use prometeu_hal::{
|
||||||
|
AssetBridge, AudioBridge, FrameId, Game2DFrameComposer, InputPlatform, InputSignals,
|
||||||
|
OwnedRgba8888Frame, RenderBackend, RenderSubmission, RenderSubmissionSink, RenderSubmitError,
|
||||||
|
RuntimePlatform, TelemetryPlatform,
|
||||||
|
};
|
||||||
|
use prometeu_system::{CrashReport, LatestRenderFrameStore};
|
||||||
|
|
||||||
|
const BOOT_TICK_LIMIT: usize = 64;
|
||||||
|
const HOST_FRAME_ADVANCE_TICK_LIMIT: usize = 100_000;
|
||||||
|
|
||||||
|
/// One published logical frame plus the automation counter.
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
pub struct CapturedFrame {
|
||||||
|
pub logical_frame_index: u64,
|
||||||
|
pub frame: OwnedRgba8888Frame,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Debugger-shaped execution snapshot.
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct HostState {
|
||||||
|
pub pc: usize,
|
||||||
|
pub stack_top: Vec<Value>,
|
||||||
|
pub frame_index: u64,
|
||||||
|
pub tick_index: u64,
|
||||||
|
pub app_id: u32,
|
||||||
|
pub status: HostExecutionStatus,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
|
pub enum HostExecutionStatus {
|
||||||
|
Running,
|
||||||
|
Paused,
|
||||||
|
Terminated,
|
||||||
|
Faulted,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
pub enum AdvanceFrameOutcome {
|
||||||
|
FrameCompleted { logical_frame_index: u64, frame_id: FrameId },
|
||||||
|
Faulted(CrashReport),
|
||||||
|
Terminated,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
pub enum AdvanceFramesStop {
|
||||||
|
Completed,
|
||||||
|
Faulted(CrashReport),
|
||||||
|
Terminated,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
pub struct AdvanceFramesOutcome {
|
||||||
|
pub requested: u64,
|
||||||
|
pub completed: u64,
|
||||||
|
pub stop: AdvanceFramesStop,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
|
pub enum HostError {
|
||||||
|
AlreadyBooted,
|
||||||
|
BootFailed { reason: String, report: Option<CrashReport> },
|
||||||
|
InvalidState { operation: &'static str, status: HostExecutionStatus },
|
||||||
|
FrameAdvanceWatchdogExpired { host_tick_limit: usize },
|
||||||
|
FrameNotPublished { previous: Option<FrameId> },
|
||||||
|
NoFrameAvailable,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl fmt::Display for HostError {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
|
match self {
|
||||||
|
Self::AlreadyBooted => write!(f, "boot requires reset before another attempt"),
|
||||||
|
Self::BootFailed { reason, .. } => write!(f, "boot failed: {reason}"),
|
||||||
|
Self::InvalidState { operation, status } => {
|
||||||
|
write!(f, "{operation} is invalid while execution is {status:?}")
|
||||||
|
}
|
||||||
|
Self::FrameAdvanceWatchdogExpired { host_tick_limit } => {
|
||||||
|
write!(
|
||||||
|
f,
|
||||||
|
"headless host frame-advance watchdog expired after {host_tick_limit} firmware ticks"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Self::FrameNotPublished { .. } => {
|
||||||
|
write!(f, "logical frame closed without its canonical published frame")
|
||||||
|
}
|
||||||
|
Self::NoFrameAvailable => write!(f, "no completed frame is available for capture"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl std::error::Error for HostError {}
|
||||||
|
|
||||||
|
/// In-process host. The desktop winit runner is a separate crate and is not linked here.
|
||||||
|
pub struct HeadlessHost {
|
||||||
|
firmware: Firmware,
|
||||||
|
platform: HeadlessPlatform,
|
||||||
|
signals: InputSignals,
|
||||||
|
boot_attempted: bool,
|
||||||
|
last_completed_frame: Option<CompletedFrame>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy)]
|
||||||
|
struct CompletedFrame {
|
||||||
|
logical_frame_index: u64,
|
||||||
|
frame_id: FrameId,
|
||||||
|
}
|
||||||
|
|
||||||
|
struct HeadlessPlatform {
|
||||||
|
hardware: Hardware,
|
||||||
|
store: LatestRenderFrameStore,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HeadlessHost {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
let memory_banks = Arc::new(MemoryBanks::new());
|
||||||
|
let hardware = Hardware::new_with_memory_banks(Arc::clone(&memory_banks));
|
||||||
|
let store = LatestRenderFrameStore::default();
|
||||||
|
Self {
|
||||||
|
firmware: Firmware::new(None),
|
||||||
|
platform: HeadlessPlatform { hardware, store },
|
||||||
|
signals: InputSignals::default(),
|
||||||
|
boot_attempted: false,
|
||||||
|
last_completed_frame: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Load `path` and tick until the firmware is in `GameRunning`.
|
||||||
|
///
|
||||||
|
/// The transition into `GameRunning` is the last tick. The first game
|
||||||
|
/// logical frame stays available for [`Self::advance_frame`].
|
||||||
|
pub fn boot(&mut self, path: impl Into<String>) -> Result<(), HostError> {
|
||||||
|
if self.boot_attempted {
|
||||||
|
return Err(HostError::AlreadyBooted);
|
||||||
|
}
|
||||||
|
self.boot_attempted = true;
|
||||||
|
let path = path.into();
|
||||||
|
self.firmware.boot_target = BootTarget::Cartridge { path, debug: false, debug_port: 7777 };
|
||||||
|
|
||||||
|
for _ in 0..BOOT_TICK_LIMIT {
|
||||||
|
if matches!(self.firmware.state, FirmwareState::GameRunning(_)) {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
if matches!(self.firmware.state, FirmwareState::AppCrashes(_)) {
|
||||||
|
let report = self.get_fault();
|
||||||
|
let reason = report
|
||||||
|
.as_ref()
|
||||||
|
.map(CrashReport::summary)
|
||||||
|
.unwrap_or_else(|| "cartridge crashed during boot".to_string());
|
||||||
|
return Err(HostError::BootFailed { reason, report });
|
||||||
|
}
|
||||||
|
if matches!(self.firmware.state, FirmwareState::HubHome(_)) {
|
||||||
|
return Err(HostError::BootFailed {
|
||||||
|
reason: "cartridge did not load".to_string(),
|
||||||
|
report: None,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
self.tick_once();
|
||||||
|
}
|
||||||
|
|
||||||
|
if matches!(self.firmware.state, FirmwareState::GameRunning(_)) {
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
|
Err(HostError::BootFailed {
|
||||||
|
reason: "boot did not reach the game".to_string(),
|
||||||
|
report: self.get_fault(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn reset(&mut self) {
|
||||||
|
self.signals = InputSignals::default();
|
||||||
|
self.firmware.change_state(
|
||||||
|
FirmwareState::Reset(ResetStep),
|
||||||
|
&self.signals,
|
||||||
|
&mut self.platform,
|
||||||
|
);
|
||||||
|
self.platform.store = LatestRenderFrameStore::default();
|
||||||
|
self.boot_attempted = false;
|
||||||
|
self.last_completed_frame = None;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn pause(&mut self) -> Result<(), HostError> {
|
||||||
|
self.require_active("pause")?;
|
||||||
|
self.firmware.os.vm().set_paused(true);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn resume(&mut self) -> Result<(), HostError> {
|
||||||
|
self.require_active("resume")?;
|
||||||
|
self.firmware.os.vm().set_paused(false);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Execute one VM instruction. This does not close a logical frame.
|
||||||
|
pub fn step(&mut self) -> Result<Option<CrashReport>, HostError> {
|
||||||
|
self.require_active("step")?;
|
||||||
|
self.firmware.os.vm().set_paused(true);
|
||||||
|
let report = self.firmware.os.vm().debug_step_active_session(&mut self.platform);
|
||||||
|
self.platform.hardware.audio.clear_commands();
|
||||||
|
Ok(report)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn advance_frame(&mut self) -> Result<AdvanceFrameOutcome, HostError> {
|
||||||
|
if let Some(report) = self.get_fault() {
|
||||||
|
return Ok(AdvanceFrameOutcome::Faulted(report));
|
||||||
|
}
|
||||||
|
if !matches!(self.firmware.state, FirmwareState::GameRunning(_)) {
|
||||||
|
return Ok(AdvanceFrameOutcome::Terminated);
|
||||||
|
}
|
||||||
|
|
||||||
|
let start = self.firmware.os.vm().logical_frame_index();
|
||||||
|
let previous_frame_id = self.platform.store.latest_frame().map(|frame| frame.frame_id);
|
||||||
|
self.firmware.os.vm().set_paused(false);
|
||||||
|
self.firmware.os.vm().request_debug_step();
|
||||||
|
|
||||||
|
for _ in 0..HOST_FRAME_ADVANCE_TICK_LIMIT {
|
||||||
|
self.tick_once();
|
||||||
|
if let Some(report) = self.get_fault() {
|
||||||
|
self.finish_frame_advance();
|
||||||
|
return Ok(AdvanceFrameOutcome::Faulted(report));
|
||||||
|
}
|
||||||
|
if !matches!(self.firmware.state, FirmwareState::GameRunning(_)) {
|
||||||
|
self.finish_frame_advance();
|
||||||
|
return Ok(AdvanceFrameOutcome::Terminated);
|
||||||
|
}
|
||||||
|
|
||||||
|
let logical_frame_index = self.firmware.os.vm().logical_frame_index();
|
||||||
|
if logical_frame_index > start {
|
||||||
|
self.finish_frame_advance();
|
||||||
|
let frame = self
|
||||||
|
.platform
|
||||||
|
.store
|
||||||
|
.latest_frame()
|
||||||
|
.ok_or(HostError::FrameNotPublished { previous: previous_frame_id })?;
|
||||||
|
if Some(frame.frame_id) == previous_frame_id {
|
||||||
|
return Err(HostError::FrameNotPublished { previous: previous_frame_id });
|
||||||
|
}
|
||||||
|
self.last_completed_frame =
|
||||||
|
Some(CompletedFrame { logical_frame_index, frame_id: frame.frame_id });
|
||||||
|
return Ok(AdvanceFrameOutcome::FrameCompleted {
|
||||||
|
logical_frame_index,
|
||||||
|
frame_id: frame.frame_id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
self.finish_frame_advance();
|
||||||
|
Err(HostError::FrameAdvanceWatchdogExpired {
|
||||||
|
host_tick_limit: HOST_FRAME_ADVANCE_TICK_LIMIT,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn advance_frames(&mut self, count: u64) -> Result<AdvanceFramesOutcome, HostError> {
|
||||||
|
let mut completed = 0;
|
||||||
|
for _ in 0..count {
|
||||||
|
match self.advance_frame()? {
|
||||||
|
AdvanceFrameOutcome::FrameCompleted { .. } => completed += 1,
|
||||||
|
AdvanceFrameOutcome::Faulted(report) => {
|
||||||
|
return Ok(AdvanceFramesOutcome {
|
||||||
|
requested: count,
|
||||||
|
completed,
|
||||||
|
stop: AdvanceFramesStop::Faulted(report),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
AdvanceFrameOutcome::Terminated => {
|
||||||
|
return Ok(AdvanceFramesOutcome {
|
||||||
|
requested: count,
|
||||||
|
completed,
|
||||||
|
stop: AdvanceFramesStop::Terminated,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(AdvanceFramesOutcome { requested: count, completed, stop: AdvanceFramesStop::Completed })
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_input(&mut self, signals: InputSignals) {
|
||||||
|
self.signals = signals;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn clear_input(&mut self) {
|
||||||
|
self.signals = InputSignals::default();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_right(&mut self, down: bool) {
|
||||||
|
self.signals.right_signal = down;
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn capture_frame(&self) -> Result<CapturedFrame, HostError> {
|
||||||
|
let completed = self.last_completed_frame.ok_or(HostError::NoFrameAvailable)?;
|
||||||
|
let frame = self.platform.store.latest_frame().ok_or(HostError::NoFrameAvailable)?;
|
||||||
|
if frame.frame_id != completed.frame_id {
|
||||||
|
return Err(HostError::FrameNotPublished { previous: Some(completed.frame_id) });
|
||||||
|
}
|
||||||
|
Ok(CapturedFrame { logical_frame_index: completed.logical_frame_index, frame })
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_state(&mut self) -> HostState {
|
||||||
|
let status = self.execution_status();
|
||||||
|
HostState {
|
||||||
|
pc: self.firmware.os.vm().active_pc().unwrap_or(0),
|
||||||
|
stack_top: self.firmware.os.vm().active_operand_stack_top(10),
|
||||||
|
frame_index: self.firmware.os.vm().logical_frame_index(),
|
||||||
|
tick_index: self.firmware.os.vm().tick_index(),
|
||||||
|
app_id: self.firmware.os.vm().current_app_id(),
|
||||||
|
status,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_fault(&mut self) -> Option<CrashReport> {
|
||||||
|
if let Some(report) = self.firmware.os.vm().last_crash_report() {
|
||||||
|
return Some(report.clone());
|
||||||
|
}
|
||||||
|
match &self.firmware.state {
|
||||||
|
FirmwareState::AppCrashes(AppCrashesStep { report }) => Some(report.clone()),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn tick_once(&mut self) {
|
||||||
|
self.firmware.tick(&self.signals, &mut self.platform);
|
||||||
|
self.platform.hardware.audio.clear_commands();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn execution_status(&mut self) -> HostExecutionStatus {
|
||||||
|
if self.fault_is_visible() {
|
||||||
|
HostExecutionStatus::Faulted
|
||||||
|
} else if !matches!(self.firmware.state, FirmwareState::GameRunning(_)) {
|
||||||
|
HostExecutionStatus::Terminated
|
||||||
|
} else if self.firmware.os.vm().paused() {
|
||||||
|
HostExecutionStatus::Paused
|
||||||
|
} else {
|
||||||
|
HostExecutionStatus::Running
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn fault_is_visible(&mut self) -> bool {
|
||||||
|
self.firmware.os.vm().last_crash_report().is_some()
|
||||||
|
|| matches!(self.firmware.state, FirmwareState::AppCrashes(_))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn require_active(&mut self, operation: &'static str) -> Result<(), HostError> {
|
||||||
|
let status = self.execution_status();
|
||||||
|
if matches!(status, HostExecutionStatus::Running | HostExecutionStatus::Paused) {
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
|
Err(HostError::InvalidState { operation, status })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn finish_frame_advance(&mut self) {
|
||||||
|
self.firmware.os.vm().set_paused(true);
|
||||||
|
self.firmware.os.vm().clear_debug_step_request();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for HeadlessHost {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RenderSubmissionSink for HeadlessPlatform {
|
||||||
|
fn submit_render_submission(
|
||||||
|
&mut self,
|
||||||
|
submission: RenderSubmission,
|
||||||
|
) -> Result<(), RenderSubmitError> {
|
||||||
|
let frame_id = submission.frame_id;
|
||||||
|
let ownership = submission.ownership;
|
||||||
|
self.hardware.submit_render_submission(submission)?;
|
||||||
|
let (width, height) = self.hardware.gfx.size();
|
||||||
|
let pixels = self.hardware.gfx.front_buffer().to_vec();
|
||||||
|
let frame = OwnedRgba8888Frame::packed(frame_id, ownership, width, height, pixels)
|
||||||
|
.map_err(|_| RenderSubmitError::SubmissionRejected)?;
|
||||||
|
self.store.publish_frame(frame);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl RuntimePlatform for HeadlessPlatform {
|
||||||
|
fn display_size(&self) -> (usize, usize) {
|
||||||
|
(Hardware::W, Hardware::H)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn render_submission_sink(&mut self) -> &mut dyn RenderSubmissionSink {
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
fn render_backend(&mut self) -> &mut dyn RenderBackend {
|
||||||
|
&mut self.hardware
|
||||||
|
}
|
||||||
|
|
||||||
|
fn game2d_frame_composer(&mut self) -> &mut dyn Game2DFrameComposer {
|
||||||
|
&mut self.hardware
|
||||||
|
}
|
||||||
|
|
||||||
|
fn audio(&self) -> &dyn AudioBridge {
|
||||||
|
self.hardware.audio()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn audio_mut(&mut self) -> &mut dyn AudioBridge {
|
||||||
|
self.hardware.audio_mut()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn input(&self) -> &dyn InputPlatform {
|
||||||
|
self.hardware.input()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn input_mut(&mut self) -> &mut dyn InputPlatform {
|
||||||
|
self.hardware.input_mut()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn assets(&self) -> &dyn AssetBridge {
|
||||||
|
self.hardware.assets()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn assets_mut(&mut self) -> &mut dyn AssetBridge {
|
||||||
|
self.hardware.assets_mut()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn telemetry(&self) -> &dyn TelemetryPlatform {
|
||||||
|
self.hardware.telemetry()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
use prometeu_bytecode::assembler::assemble;
|
||||||
|
use prometeu_bytecode::model::{BytecodeModule, Export, FunctionMeta};
|
||||||
|
|
||||||
|
use super::{AdvanceFrameOutcome, HeadlessHost};
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn termination_during_frame_advance_clears_host_step_control() {
|
||||||
|
let cartridge = non_closing_cartridge();
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(cartridge.to_string_lossy()).expect("boot non-closing cartridge");
|
||||||
|
host.firmware.request_home_from_host();
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
host.advance_frame().expect("lifecycle termination"),
|
||||||
|
AdvanceFrameOutcome::Terminated
|
||||||
|
);
|
||||||
|
assert!(host.firmware.os.vm().paused());
|
||||||
|
assert!(!host.firmware.os.vm().debug_step_requested());
|
||||||
|
|
||||||
|
fs::remove_dir_all(cartridge).expect("remove test cartridge");
|
||||||
|
}
|
||||||
|
|
||||||
|
fn non_closing_cartridge() -> std::path::PathBuf {
|
||||||
|
let directory = std::env::temp_dir().join(format!(
|
||||||
|
"prometeu-headless-termination-cleanup-{}-{}",
|
||||||
|
std::process::id(),
|
||||||
|
std::time::SystemTime::now()
|
||||||
|
.duration_since(std::time::UNIX_EPOCH)
|
||||||
|
.expect("system clock")
|
||||||
|
.as_nanos()
|
||||||
|
));
|
||||||
|
fs::create_dir_all(&directory).expect("create test cartridge");
|
||||||
|
|
||||||
|
let code = assemble("JMP 0\n").expect("assemble non-closing program");
|
||||||
|
let module = BytecodeModule {
|
||||||
|
version: 0,
|
||||||
|
const_pool: vec![],
|
||||||
|
functions: vec![FunctionMeta {
|
||||||
|
code_offset: 0,
|
||||||
|
code_len: code.len() as u32,
|
||||||
|
param_slots: 0,
|
||||||
|
local_slots: 0,
|
||||||
|
return_slots: 0,
|
||||||
|
max_stack_slots: 1,
|
||||||
|
}],
|
||||||
|
code,
|
||||||
|
debug_info: None,
|
||||||
|
exports: vec![Export { symbol: "main".into(), func_idx: 0 }],
|
||||||
|
syscalls: vec![],
|
||||||
|
}
|
||||||
|
.serialize();
|
||||||
|
fs::write(directory.join("program.pbx"), module).expect("write test program");
|
||||||
|
fs::write(
|
||||||
|
directory.join("manifest.json"),
|
||||||
|
"{\n \"magic\": \"PMTU\",\n \"cartridge_version\": 1,\n \"app_id\": 91,\n \"title\": \"Termination Cleanup\",\n \"app_version\": \"0.1.0\",\n \"app_mode\": \"Game\",\n \"capabilities\": []\n}\n",
|
||||||
|
)
|
||||||
|
.expect("write test manifest");
|
||||||
|
|
||||||
|
directory
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
//! Headless Prometeu host.
|
||||||
|
//!
|
||||||
|
//! This crate boots a directory cartridge and steps logical frames in process.
|
||||||
|
//! It does not open a window, a display surface, or an audio device.
|
||||||
|
//!
|
||||||
|
//! The desktop host's `stepFrame` command still advances on the 60 Hz winit loop.
|
||||||
|
//! That pacing stays in `prometeu-host-desktop-winit` until a later protocol agenda.
|
||||||
|
|
||||||
|
mod host;
|
||||||
|
|
||||||
|
pub use host::{
|
||||||
|
AdvanceFrameOutcome, AdvanceFramesOutcome, AdvanceFramesStop, CapturedFrame, HeadlessHost,
|
||||||
|
HostError, HostExecutionStatus, HostState,
|
||||||
|
};
|
||||||
@@ -0,0 +1,639 @@
|
|||||||
|
use std::fs;
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
|
use prometeu_bytecode::SourceSpan;
|
||||||
|
use prometeu_bytecode::assembler::assemble;
|
||||||
|
use prometeu_bytecode::model::{BytecodeModule, DebugInfo, Export, FunctionMeta, SyscallDecl};
|
||||||
|
use prometeu_hal::InputSignals;
|
||||||
|
use prometeu_hal::app_mode::AppMode;
|
||||||
|
use prometeu_hal::color::Color;
|
||||||
|
use prometeu_host_headless::{
|
||||||
|
AdvanceFrameOutcome, AdvanceFramesStop, CapturedFrame, HeadlessHost, HostError,
|
||||||
|
HostExecutionStatus, HostState,
|
||||||
|
};
|
||||||
|
use prometeu_system::CrashReport;
|
||||||
|
|
||||||
|
const RED: u32 = Color::RED.raw();
|
||||||
|
const BLUE: u32 = Color::BLUE.raw();
|
||||||
|
const GREEN: u32 = Color::GREEN.raw();
|
||||||
|
const BLACK: u32 = Color::BLACK.raw();
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn headless_source_has_no_timing_wait_or_interactive_backend_dependency() {
|
||||||
|
let source = include_str!("../src/host.rs");
|
||||||
|
let manifest = include_str!("../Cargo.toml");
|
||||||
|
|
||||||
|
for forbidden in
|
||||||
|
["FRAME_PUBLISH_SPINS", "spin_loop", "thread::sleep", "ensure_worker", "RenderWorkerConfig"]
|
||||||
|
{
|
||||||
|
assert!(!source.contains(forbidden), "headless source contains {forbidden}");
|
||||||
|
}
|
||||||
|
for forbidden in ["winit", "pixels", "cpal"] {
|
||||||
|
assert!(!manifest.contains(forbidden), "headless manifest contains {forbidden}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn lifecycle_state_and_preconditions_are_structural() {
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Terminated);
|
||||||
|
assert_eq!(host.capture_frame(), Err(HostError::NoFrameAvailable));
|
||||||
|
assert_eq!(
|
||||||
|
host.pause(),
|
||||||
|
Err(HostError::InvalidState {
|
||||||
|
operation: "pause",
|
||||||
|
status: HostExecutionStatus::Terminated,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
let cartridge = color_cartridge();
|
||||||
|
host.boot(&cartridge).expect("boot");
|
||||||
|
let booted = host.get_state();
|
||||||
|
assert_eq!(booted.status, HostExecutionStatus::Running);
|
||||||
|
assert_eq!(booted.pc, 0, "boot must not execute the first game instruction");
|
||||||
|
assert_eq!(host.boot(&cartridge), Err(HostError::AlreadyBooted));
|
||||||
|
|
||||||
|
host.pause().expect("pause");
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Paused);
|
||||||
|
host.resume().expect("resume");
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Running);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn step_does_not_complete_a_logical_frame() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
let before = host.get_state();
|
||||||
|
assert_eq!(host.step().expect("step"), None);
|
||||||
|
let after = host.get_state();
|
||||||
|
assert_eq!(after.frame_index, before.frame_index);
|
||||||
|
assert_ne!(after.pc, before.pc);
|
||||||
|
assert_eq!(after.status, HostExecutionStatus::Paused);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn stepping_frame_sync_is_not_a_fault_or_completed_runtime_frame() {
|
||||||
|
let dir = temp_cart("step-frame-sync");
|
||||||
|
write_cartridge(&dir, 51, "Step Frame Sync", &module(asm("FRAME_SYNC\nRET\n"), vec![]), &[]);
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot frame-sync cartridge");
|
||||||
|
let before = host.get_state().frame_index;
|
||||||
|
|
||||||
|
assert_eq!(host.step().expect("step frame sync"), None);
|
||||||
|
assert_eq!(host.get_state().frame_index, before);
|
||||||
|
assert!(host.get_fault().is_none());
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Paused);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn one_logical_frame_may_span_multiple_internal_ticks() {
|
||||||
|
let dir = temp_cart("multi-tick");
|
||||||
|
write_cartridge(&dir, 47, "Multi Tick", &multi_tick_program(), &[]);
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot multi-tick cartridge");
|
||||||
|
let before = host.get_state();
|
||||||
|
|
||||||
|
completed(host.advance_frame().expect("multi-tick frame"));
|
||||||
|
|
||||||
|
let after = host.get_state();
|
||||||
|
assert_eq!(after.frame_index, before.frame_index + 1);
|
||||||
|
assert!(after.tick_index >= before.tick_index + 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn outer_frame_limit_is_a_host_error_and_finishes_paused() {
|
||||||
|
let dir = temp_cart("frame-limit");
|
||||||
|
write_cartridge(&dir, 50, "Frame Limit", &module(asm("JMP 0\n"), vec![]), &[]);
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot non-closing cartridge");
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
host.advance_frame(),
|
||||||
|
Err(HostError::FrameAdvanceWatchdogExpired { host_tick_limit: 100_000 })
|
||||||
|
);
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Paused);
|
||||||
|
assert!(host.get_fault().is_none());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn one_frame_returns_and_captures_the_exact_published_frame() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
let before = host.get_state().frame_index;
|
||||||
|
let (logical_frame_index, frame_id) = completed(host.advance_frame().expect("frame"));
|
||||||
|
let captured = host.capture_frame().expect("capture");
|
||||||
|
|
||||||
|
assert_eq!(logical_frame_index, before + 1);
|
||||||
|
assert_eq!(captured.logical_frame_index, logical_frame_index);
|
||||||
|
assert_eq!(captured.frame.frame_id, frame_id);
|
||||||
|
assert_eq!(captured.frame.ownership.app_mode, AppMode::Game);
|
||||||
|
assert_eq!(captured.frame.ownership.app_id, 41);
|
||||||
|
assert_eq!(captured.frame.stride_pixels, captured.frame.width);
|
||||||
|
assert_eq!(captured.frame.pixels.len(), 480 * 270);
|
||||||
|
assert_eq!(host.capture_frame().expect("repeat capture"), captured);
|
||||||
|
|
||||||
|
let mut mutated_clone = captured.clone();
|
||||||
|
mutated_clone.frame.pixels[0] = GREEN;
|
||||||
|
assert_ne!(host.capture_frame().expect("owned capture").frame.pixels[0], GREEN);
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Paused);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn zero_frames_is_an_explicit_noop() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
let before = host.get_state();
|
||||||
|
let outcome = host.advance_frames(0).expect("zero frames");
|
||||||
|
|
||||||
|
assert_eq!(outcome.requested, 0);
|
||||||
|
assert_eq!(outcome.completed, 0);
|
||||||
|
assert_eq!(outcome.stop, AdvanceFramesStop::Completed);
|
||||||
|
let after = host.get_state();
|
||||||
|
assert_eq!(after.frame_index, before.frame_index);
|
||||||
|
assert_eq!(after.tick_index, before.tick_index);
|
||||||
|
assert_eq!(after.status, before.status);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn clear_input_drops_right() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
host.set_right(true);
|
||||||
|
host.clear_input();
|
||||||
|
completed(host.advance_frame().expect("frame"));
|
||||||
|
assert_color(&host.capture_frame().expect("frame"), BLUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn right_hold_then_release_changes_pixels() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
let before = host.get_state().frame_index;
|
||||||
|
|
||||||
|
host.set_right(true);
|
||||||
|
assert_completed(host.advance_frames(60).expect("hold"), 60);
|
||||||
|
let held = host.capture_frame().expect("held frame");
|
||||||
|
assert_eq!(host.get_state().frame_index, before + 60);
|
||||||
|
assert_color(&held, RED);
|
||||||
|
assert!(host.get_fault().is_none());
|
||||||
|
|
||||||
|
host.set_right(false);
|
||||||
|
assert_completed(host.advance_frames(1).expect("release"), 1);
|
||||||
|
let released = host.capture_frame().expect("released frame");
|
||||||
|
assert_eq!(released.logical_frame_index, before + 61);
|
||||||
|
assert_color(&released, BLUE);
|
||||||
|
assert!(host.get_fault().is_none());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn normalized_button_press_hold_release_and_clear_are_observable() {
|
||||||
|
let mut host = boot_input_edges();
|
||||||
|
|
||||||
|
let mut signals = InputSignals { right_signal: true, ..InputSignals::default() };
|
||||||
|
host.set_input(signals);
|
||||||
|
completed(host.advance_frame().expect("press"));
|
||||||
|
assert_color(&host.capture_frame().expect("pressed"), RED);
|
||||||
|
|
||||||
|
completed(host.advance_frame().expect("hold"));
|
||||||
|
assert_color(&host.capture_frame().expect("held"), BLUE);
|
||||||
|
|
||||||
|
signals.right_signal = false;
|
||||||
|
host.set_input(signals);
|
||||||
|
completed(host.advance_frame().expect("release"));
|
||||||
|
assert_color(&host.capture_frame().expect("released"), GREEN);
|
||||||
|
|
||||||
|
host.set_input(InputSignals {
|
||||||
|
right_signal: true,
|
||||||
|
f_signal: true,
|
||||||
|
x_pos: 123,
|
||||||
|
y_pos: 45,
|
||||||
|
..InputSignals::default()
|
||||||
|
});
|
||||||
|
host.clear_input();
|
||||||
|
completed(host.advance_frame().expect("clear"));
|
||||||
|
assert_color(&host.capture_frame().expect("cleared"), BLACK);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn normalized_touch_edges_and_coordinates_use_the_same_input_surface() {
|
||||||
|
let mut host = boot_touch_edges();
|
||||||
|
let mut signals =
|
||||||
|
InputSignals { f_signal: true, x_pos: 123, y_pos: 45, ..InputSignals::default() };
|
||||||
|
|
||||||
|
host.set_input(signals);
|
||||||
|
completed(host.advance_frame().expect("touch press"));
|
||||||
|
assert_color(&host.capture_frame().expect("touch pressed"), RED);
|
||||||
|
|
||||||
|
completed(host.advance_frame().expect("touch hold"));
|
||||||
|
assert_color(&host.capture_frame().expect("touch held"), BLUE);
|
||||||
|
|
||||||
|
signals.f_signal = false;
|
||||||
|
host.set_input(signals);
|
||||||
|
completed(host.advance_frame().expect("touch release"));
|
||||||
|
assert_color(&host.capture_frame().expect("touch released"), GREEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn two_runs_match_oracle() {
|
||||||
|
let first = run_color_sequence();
|
||||||
|
let second = run_color_sequence();
|
||||||
|
assert_eq!(first.held.logical_frame_index, second.held.logical_frame_index);
|
||||||
|
assert_eq!(first.held.frame.pixels, second.held.frame.pixels);
|
||||||
|
assert_eq!(first.held.frame.frame_id, second.held.frame.frame_id);
|
||||||
|
assert_eq!(first.released.frame.pixels, second.released.frame.pixels);
|
||||||
|
assert_eq!(first.released.frame.frame_id, second.released.frame.frame_id);
|
||||||
|
assert_eq!(first.released.logical_frame_index, second.released.logical_frame_index);
|
||||||
|
assert_same_state(&first.state, &second.state);
|
||||||
|
assert_eq!(first.fault, second.fault);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn reset_matches_fresh_host() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
let _ = run_on(&mut host);
|
||||||
|
host.reset();
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Terminated);
|
||||||
|
assert_eq!(host.capture_frame(), Err(HostError::NoFrameAvailable));
|
||||||
|
host.boot(color_cartridge()).expect("reboot");
|
||||||
|
let after_reset = run_on(&mut host);
|
||||||
|
let fresh = run_color_sequence();
|
||||||
|
|
||||||
|
assert_eq!(after_reset.held.frame.pixels, fresh.held.frame.pixels);
|
||||||
|
assert_eq!(after_reset.released.frame.pixels, fresh.released.frame.pixels);
|
||||||
|
assert_eq!(after_reset.held.frame.frame_id, fresh.held.frame.frame_id);
|
||||||
|
assert_eq!(after_reset.released.frame.frame_id, fresh.released.frame.frame_id);
|
||||||
|
assert_eq!(after_reset.released.logical_frame_index, fresh.released.logical_frame_index);
|
||||||
|
assert_same_state(&after_reset.state, &fresh.state);
|
||||||
|
assert_eq!(after_reset.fault, fresh.fault);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn trap_is_structured() {
|
||||||
|
let dir = temp_cart("fault");
|
||||||
|
write_cartridge(&dir, 42, "Fault", &fault_program(), &[]);
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot fault cartridge");
|
||||||
|
let outcome = host.advance_frame().expect("faulting frame");
|
||||||
|
|
||||||
|
match outcome {
|
||||||
|
AdvanceFrameOutcome::Faulted(CrashReport::VmTrap { trap }) => {
|
||||||
|
assert_eq!(trap.code, prometeu_bytecode::TRAP_EXPLICIT);
|
||||||
|
assert_eq!(trap.opcode, prometeu_bytecode::isa::core::CoreOpCode::Trap as u16);
|
||||||
|
assert_eq!(trap.pc, 0);
|
||||||
|
assert_eq!(trap.span, Some(SourceSpan { file_id: 7, start: 11, end: 15 }));
|
||||||
|
assert!(trap.message.contains("main"));
|
||||||
|
}
|
||||||
|
other => panic!("expected VmTrap outcome, got {other:?}"),
|
||||||
|
}
|
||||||
|
assert!(matches!(host.get_fault(), Some(CrashReport::VmTrap { .. })));
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Faulted);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn instruction_step_fault_remains_structured() {
|
||||||
|
let dir = temp_cart("step-fault");
|
||||||
|
write_cartridge(&dir, 48, "Step Fault", &fault_program(), &[]);
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot fault cartridge");
|
||||||
|
|
||||||
|
let report = host.step().expect("step result").expect("structured step fault");
|
||||||
|
assert!(matches!(report, CrashReport::VmTrap { .. }));
|
||||||
|
assert_eq!(host.get_fault(), Some(report));
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Faulted);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn batch_stops_early_on_fault_and_reports_partial_progress() {
|
||||||
|
let dir = temp_cart("fault-batch");
|
||||||
|
write_cartridge(&dir, 43, "Fault Batch", &delayed_fault_program(), &gfx_syscalls());
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot fault cartridge");
|
||||||
|
|
||||||
|
let outcome = host.advance_frames(5).expect("batch outcome");
|
||||||
|
assert_eq!(outcome.requested, 5);
|
||||||
|
assert_eq!(outcome.completed, 2);
|
||||||
|
assert!(matches!(outcome.stop, AdvanceFramesStop::Faulted(CrashReport::VmTrap { .. })));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn advance_after_reset_reports_termination_without_ticking() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
host.reset();
|
||||||
|
let before = host.get_state().tick_index;
|
||||||
|
|
||||||
|
assert_eq!(host.advance_frame().expect("termination outcome"), AdvanceFrameOutcome::Terminated);
|
||||||
|
assert_eq!(host.get_state().tick_index, before);
|
||||||
|
let batch = host.advance_frames(3).expect("terminated batch");
|
||||||
|
assert_eq!(batch.completed, 0);
|
||||||
|
assert_eq!(batch.stop, AdvanceFramesStop::Terminated);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn vm_init_failure_is_returned_as_structured_boot_failure() {
|
||||||
|
let dir = temp_cart("bad-pbx");
|
||||||
|
write_cartridge(&dir, 44, "Bad PBX", b"not a pbx", &[]);
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
|
||||||
|
let error = host.boot(&dir).expect_err("invalid PBX must fail boot");
|
||||||
|
assert!(matches!(
|
||||||
|
error,
|
||||||
|
HostError::BootFailed { report: Some(CrashReport::VmInit { .. }), .. }
|
||||||
|
));
|
||||||
|
assert_eq!(host.get_state().status, HostExecutionStatus::Faulted);
|
||||||
|
assert!(matches!(host.get_fault(), Some(CrashReport::VmInit { .. })));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn end_of_rom_completes_a_logical_frame() {
|
||||||
|
let dir = temp_cart("end-of-rom");
|
||||||
|
write_cartridge(&dir, 45, "End Of Rom", &module(asm("RET\n"), vec![]), &[]);
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot end-of-rom cartridge");
|
||||||
|
|
||||||
|
let first = completed(host.advance_frame().expect("first frame"));
|
||||||
|
let second = completed(host.advance_frame().expect("second frame"));
|
||||||
|
assert_eq!(second.0, first.0 + 1);
|
||||||
|
assert_ne!(second.1, first.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn three_hundred_frames_complete_without_realtime_pacing() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
assert_completed(host.advance_frames(300).expect("fast frames"), 300);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn audio_play_does_not_need_a_device() {
|
||||||
|
let mut host = boot_color();
|
||||||
|
completed(host.advance_frame().expect("frame with audio.play"));
|
||||||
|
assert!(host.get_fault().is_none());
|
||||||
|
assert_color(&host.capture_frame().expect("frame"), BLUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ColorOracle {
|
||||||
|
held: CapturedFrame,
|
||||||
|
released: CapturedFrame,
|
||||||
|
state: HostState,
|
||||||
|
fault: Option<CrashReport>,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn boot_color() -> HeadlessHost {
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(color_cartridge()).expect("boot color cartridge");
|
||||||
|
host
|
||||||
|
}
|
||||||
|
|
||||||
|
fn boot_input_edges() -> HeadlessHost {
|
||||||
|
let dir = temp_cart("input-edges");
|
||||||
|
write_cartridge(&dir, 46, "Input Edges", &input_edge_program(), &gfx_syscalls());
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot input cartridge");
|
||||||
|
host
|
||||||
|
}
|
||||||
|
|
||||||
|
fn boot_touch_edges() -> HeadlessHost {
|
||||||
|
let dir = temp_cart("touch-edges");
|
||||||
|
write_cartridge(&dir, 49, "Touch Edges", &touch_edge_program(), &gfx_syscalls());
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(&dir).expect("boot touch cartridge");
|
||||||
|
host
|
||||||
|
}
|
||||||
|
|
||||||
|
fn color_cartridge() -> String {
|
||||||
|
let dir = temp_cart("color");
|
||||||
|
write_cartridge(&dir, 41, "Right Pixel", &color_program(), &color_syscalls());
|
||||||
|
dir
|
||||||
|
}
|
||||||
|
|
||||||
|
fn run_color_sequence() -> ColorOracle {
|
||||||
|
let mut host = boot_color();
|
||||||
|
run_on(&mut host)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn run_on(host: &mut HeadlessHost) -> ColorOracle {
|
||||||
|
host.set_right(true);
|
||||||
|
assert_completed(host.advance_frames(60).expect("hold"), 60);
|
||||||
|
let held = host.capture_frame().expect("held");
|
||||||
|
host.set_right(false);
|
||||||
|
assert_completed(host.advance_frames(1).expect("release"), 1);
|
||||||
|
let released = host.capture_frame().expect("released");
|
||||||
|
let state = host.get_state();
|
||||||
|
let fault = host.get_fault();
|
||||||
|
ColorOracle { held, released, state, fault }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn completed(outcome: AdvanceFrameOutcome) -> (u64, prometeu_hal::FrameId) {
|
||||||
|
match outcome {
|
||||||
|
AdvanceFrameOutcome::FrameCompleted { logical_frame_index, frame_id } => {
|
||||||
|
(logical_frame_index, frame_id)
|
||||||
|
}
|
||||||
|
other => panic!("expected completed frame, got {other:?}"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn assert_completed(outcome: prometeu_host_headless::AdvanceFramesOutcome, expected: u64) {
|
||||||
|
assert_eq!(outcome.requested, expected);
|
||||||
|
assert_eq!(outcome.completed, expected);
|
||||||
|
assert_eq!(outcome.stop, AdvanceFramesStop::Completed);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn assert_color(captured: &CapturedFrame, color: u32) {
|
||||||
|
assert_eq!(captured.frame.width, 480);
|
||||||
|
assert_eq!(captured.frame.height, 270);
|
||||||
|
assert!(captured.frame.pixels.iter().all(|pixel| *pixel == color));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn assert_same_state(left: &HostState, right: &HostState) {
|
||||||
|
assert_eq!(left.pc, right.pc);
|
||||||
|
assert_eq!(left.frame_index, right.frame_index);
|
||||||
|
assert_eq!(left.tick_index, right.tick_index);
|
||||||
|
assert_eq!(left.app_id, right.app_id);
|
||||||
|
assert_eq!(left.status, right.status);
|
||||||
|
assert_eq!(format!("{:?}", left.stack_top), format!("{:?}", right.stack_top));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn temp_cart(name: &str) -> String {
|
||||||
|
let dir = std::env::temp_dir().join(format!(
|
||||||
|
"prometeu-headless-{name}-{}-{}",
|
||||||
|
std::process::id(),
|
||||||
|
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos()
|
||||||
|
));
|
||||||
|
fs::create_dir_all(&dir).expect("temp cartridge dir");
|
||||||
|
dir.to_string_lossy().into_owned()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn write_cartridge(dir: &str, app_id: u32, title: &str, program: &[u8], syscalls: &[SyscallDecl]) {
|
||||||
|
let path = Path::new(dir);
|
||||||
|
fs::write(path.join("program.pbx"), program).expect("program");
|
||||||
|
fs::write(
|
||||||
|
path.join("manifest.json"),
|
||||||
|
format!(
|
||||||
|
"{{\n \"magic\": \"PMTU\",\n \"cartridge_version\": 1,\n \"app_id\": {app_id},\n \"title\": \"{title}\",\n \"app_version\": \"0.1.0\",\n \"app_mode\": \"Game\",\n \"capabilities\": [\"gfx2d\", \"audio\"]\n}}\n"
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.expect("manifest");
|
||||||
|
let _ = syscalls;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn color_program() -> Vec<u8> {
|
||||||
|
let mut rom = Vec::new();
|
||||||
|
rom.extend(asm("PUSH_I32 0\n\
|
||||||
|
PUSH_I32 0\n\
|
||||||
|
PUSH_I32 0\n\
|
||||||
|
PUSH_I32 255\n\
|
||||||
|
PUSH_I32 128\n\
|
||||||
|
PUSH_I32 1\n\
|
||||||
|
PUSH_I32 0\n\
|
||||||
|
HOSTCALL 1\n\
|
||||||
|
POP_N 1\n\
|
||||||
|
INTRINSIC 0x2000\n\
|
||||||
|
INTRINSIC 0x2013\n\
|
||||||
|
INTRINSIC 0x2032\n"));
|
||||||
|
let jump_to_blue = rom.len() + 2;
|
||||||
|
rom.extend(asm("JMP_IF_FALSE 0"));
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {RED}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
let blue_at = rom.len() as u32;
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {BLUE}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
rom[jump_to_blue..jump_to_blue + 4].copy_from_slice(&blue_at.to_le_bytes());
|
||||||
|
module(rom, color_syscalls())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn input_edge_program() -> Vec<u8> {
|
||||||
|
let mut rom = Vec::new();
|
||||||
|
let pressed_jump = emit_right_predicate(&mut rom, 0x2030);
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {RED}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
let released_at = rom.len() as u32;
|
||||||
|
rom[pressed_jump..pressed_jump + 4].copy_from_slice(&released_at.to_le_bytes());
|
||||||
|
|
||||||
|
let released_jump = emit_right_predicate(&mut rom, 0x2031);
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {GREEN}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
let down_at = rom.len() as u32;
|
||||||
|
rom[released_jump..released_jump + 4].copy_from_slice(&down_at.to_le_bytes());
|
||||||
|
|
||||||
|
let down_jump = emit_right_predicate(&mut rom, 0x2032);
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {BLUE}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
let idle_at = rom.len() as u32;
|
||||||
|
rom[down_jump..down_jump + 4].copy_from_slice(&idle_at.to_le_bytes());
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {BLACK}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
|
||||||
|
module(rom, gfx_syscalls())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn emit_right_predicate(rom: &mut Vec<u8>, predicate: u32) -> usize {
|
||||||
|
rom.extend(asm(&format!("INTRINSIC 0x2000\nINTRINSIC 0x2013\nINTRINSIC {predicate:#x}\n")));
|
||||||
|
let target = rom.len() + 2;
|
||||||
|
rom.extend(asm("JMP_IF_FALSE 0\n"));
|
||||||
|
target
|
||||||
|
}
|
||||||
|
|
||||||
|
fn touch_edge_program() -> Vec<u8> {
|
||||||
|
let mut rom = Vec::new();
|
||||||
|
let pressed_jump = emit_touch_predicate(&mut rom, 0x2030);
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {RED}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
let released_at = rom.len() as u32;
|
||||||
|
rom[pressed_jump..pressed_jump + 4].copy_from_slice(&released_at.to_le_bytes());
|
||||||
|
|
||||||
|
let released_jump = emit_touch_predicate(&mut rom, 0x2031);
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {GREEN}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
let down_at = rom.len() as u32;
|
||||||
|
rom[released_jump..released_jump + 4].copy_from_slice(&down_at.to_le_bytes());
|
||||||
|
|
||||||
|
let down_jump = emit_touch_predicate(&mut rom, 0x2032);
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {BLUE}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
let idle_at = rom.len() as u32;
|
||||||
|
rom[down_jump..down_jump + 4].copy_from_slice(&idle_at.to_le_bytes());
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {BLACK}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
|
||||||
|
module(rom, gfx_syscalls())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn emit_touch_predicate(rom: &mut Vec<u8>, predicate: u32) -> usize {
|
||||||
|
rom.extend(asm(&format!(
|
||||||
|
"INTRINSIC 0x2001\nINTRINSIC 0x2020\nINTRINSIC {predicate:#x}\n\
|
||||||
|
INTRINSIC 0x2001\nINTRINSIC 0x2021\nPUSH_I64 123\nEQ\nAND\n\
|
||||||
|
INTRINSIC 0x2001\nINTRINSIC 0x2022\nPUSH_I64 45\nEQ\nAND\n"
|
||||||
|
)));
|
||||||
|
let target = rom.len() + 2;
|
||||||
|
rom.extend(asm("JMP_IF_FALSE 0\n"));
|
||||||
|
target
|
||||||
|
}
|
||||||
|
|
||||||
|
fn fault_program() -> Vec<u8> {
|
||||||
|
// `INTRINSIC 0xDEADBEEF` is rejected by the loader as `VerificationFailed`.
|
||||||
|
// `TRAP` is a legal instruction that becomes `CrashReport::VmTrap` at runtime.
|
||||||
|
module(asm("TRAP\nFRAME_SYNC\nRET\n"), vec![])
|
||||||
|
}
|
||||||
|
|
||||||
|
fn delayed_fault_program() -> Vec<u8> {
|
||||||
|
let mut rom =
|
||||||
|
asm("GET_GLOBAL 0\nPUSH_I32 1\nADD\nSET_GLOBAL 0\nGET_GLOBAL 0\nPUSH_I32 3\nEQ\n");
|
||||||
|
let continue_jump = rom.len() + 2;
|
||||||
|
rom.extend(asm("JMP_IF_FALSE 0\nTRAP\n"));
|
||||||
|
let continue_at = rom.len() as u32;
|
||||||
|
rom[continue_jump..continue_jump + 4].copy_from_slice(&continue_at.to_le_bytes());
|
||||||
|
rom.extend(asm(&format!("PUSH_I64 {BLACK}\nHOSTCALL 0\nFRAME_SYNC\nRET\n")));
|
||||||
|
module(rom, gfx_syscalls())
|
||||||
|
}
|
||||||
|
|
||||||
|
fn multi_tick_program() -> Vec<u8> {
|
||||||
|
let mut rom = asm("PUSH_I32 30000\nSET_LOCAL 0\n");
|
||||||
|
let loop_at = rom.len() as u32;
|
||||||
|
rom.extend(asm("GET_LOCAL 0\nPUSH_I32 1\nSUB\nSET_LOCAL 0\nGET_LOCAL 0\nPUSH_I32 0\nGT\n"));
|
||||||
|
rom.extend(asm(&format!("JMP_IF_TRUE {loop_at}\nFRAME_SYNC\nRET\n")));
|
||||||
|
module_with_locals(rom, vec![], 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn color_syscalls() -> Vec<SyscallDecl> {
|
||||||
|
vec![
|
||||||
|
SyscallDecl {
|
||||||
|
module: "gfx2d".into(),
|
||||||
|
name: "clear".into(),
|
||||||
|
version: 1,
|
||||||
|
arg_slots: 1,
|
||||||
|
ret_slots: 0,
|
||||||
|
},
|
||||||
|
SyscallDecl {
|
||||||
|
module: "audio".into(),
|
||||||
|
name: "play".into(),
|
||||||
|
version: 1,
|
||||||
|
arg_slots: 7,
|
||||||
|
ret_slots: 1,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
fn gfx_syscalls() -> Vec<SyscallDecl> {
|
||||||
|
vec![SyscallDecl {
|
||||||
|
module: "gfx2d".into(),
|
||||||
|
name: "clear".into(),
|
||||||
|
version: 1,
|
||||||
|
arg_slots: 1,
|
||||||
|
ret_slots: 0,
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
fn module(code: Vec<u8>, syscalls: Vec<SyscallDecl>) -> Vec<u8> {
|
||||||
|
module_with_locals(code, syscalls, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn module_with_locals(code: Vec<u8>, syscalls: Vec<SyscallDecl>, local_slots: u16) -> Vec<u8> {
|
||||||
|
BytecodeModule {
|
||||||
|
version: 0,
|
||||||
|
const_pool: vec![],
|
||||||
|
functions: vec![FunctionMeta {
|
||||||
|
code_offset: 0,
|
||||||
|
code_len: code.len() as u32,
|
||||||
|
param_slots: 0,
|
||||||
|
local_slots,
|
||||||
|
return_slots: 0,
|
||||||
|
max_stack_slots: 8,
|
||||||
|
}],
|
||||||
|
code,
|
||||||
|
debug_info: Some(DebugInfo {
|
||||||
|
pc_to_span: vec![(0, SourceSpan { file_id: 7, start: 11, end: 15 })],
|
||||||
|
function_names: vec![(0, "main".into())],
|
||||||
|
}),
|
||||||
|
exports: vec![Export { symbol: "main".into(), func_idx: 0 }],
|
||||||
|
syscalls,
|
||||||
|
}
|
||||||
|
.serialize()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn asm(source: &str) -> Vec<u8> {
|
||||||
|
assemble(source).expect("assemble")
|
||||||
|
}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":25,"AGD":25,"DEC":13,"PLN":11,"LSN":29,"CLSN":1}}
|
|
||||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"perf-full-migration-to-atomic-telemetry","title":"Agenda - [PERF] Full Migration to Atomic Telemetry","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["perf","runtime","telemetry"],"agendas":[{"id":"AGD-0021","file":"workflow/agendas/AGD-0021-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0008","file":"workflow/decisions/DEC-0008-full-migration-to-atomic-telemetry.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0007","file":"workflow/plans/PLN-0007-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0028","file":"lessons/DSC-0023-perf-full-migration-to-atomic-telemetry/LSN-0028-converging-to-single-atomic-telemetry-source.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"jenkins-gitea-integration","title":"Jenkins Gitea Integration and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins","gitea"],"agendas":[{"id":"AGD-0018","file":"workflow/agendas/AGD-0018-jenkins-gitea-integration-and-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0003","file":"workflow/decisions/DEC-0003-jenkins-gitea-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0003","file":"workflow/plans/PLN-0003-jenkins-gitea-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0021","file":"lessons/DSC-0020-jenkins-gitea-integration/LSN-0021-jenkins-gitea-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"asset-entry-codec-enum-with-metadata","title":"Asset Entry Codec Enum Contract","created_at":"2026-04-09","updated_at":"2026-04-09","tags":["asset","runtime","codec","metadata"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"lessons/DSC-0021-asset-entry-codec-enum-contract/LSN-0024-string-on-the-wire-enum-in-runtime.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"tile-bank-vs-glyph-bank-domain-naming","title":"Glyph Bank Domain Naming Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["gfx","runtime","naming","domain-model"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"lessons/DSC-0022-glyph-bank-domain-naming/LSN-0025-rename-artifact-by-meaning-not-by-token.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"legacy-runtime-learn-import","title":"Import legacy runtime learn into discussion lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["migration","tech-debt"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0001-prometeu-learn-index.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0002","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0002-historical-asset-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0003","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0003-historical-audio-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0004","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0004-historical-cartridge-boot-protocol-and-manifest-authority.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0005","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0005-historical-game-memcard-slots-surface-and-semantics.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0006","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0006-historical-gfx-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0007","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0007-historical-retired-fault-and-input-decisions.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0008","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0008-historical-vm-core-and-assets.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0009","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0009-mental-model-asset-management.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0010","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0010-mental-model-audio.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0011","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0011-mental-model-gfx.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0012","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0012-mental-model-input.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0013","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0013-mental-model-observability-and-debugging.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0014","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0014-mental-model-portability-and-cross-platform.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0015","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0015-mental-model-save-memory-and-memcard.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0016","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0016-mental-model-status-first-and-fault-thinking.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0017","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0017-mental-model-time-and-cycles.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0018","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0018-mental-model-touch.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"runtime-edge-test-plan","title":"Agenda - Runtime Edge Test Plan","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0001","file":"workflow/agendas/AGD-0001-runtime-edge-test-plan.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0003","status":"open","ticket":"packed-cartridge-loader-pmc","title":"Agenda - Packed Cartridge Loader PMC","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0002","file":"workflow/agendas/AGD-0002-packed-cartridge-loader-pmc.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"system-run-cart","title":"Agenda - System Run Cart","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0003","file":"workflow/agendas/AGD-0003-system-run-cart.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"system-fault-semantics-and-control-surface","title":"Agenda - System Fault Semantics and Control Surface","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0004","file":"workflow/agendas/AGD-0004-system-fault-semantics-and-control-surface.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0006","status":"open","ticket":"vm-owned-random-service","title":"Agenda - VM-Owned Random Service","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0005","file":"workflow/agendas/AGD-0005-vm-owned-random-service.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0007","status":"open","ticket":"app-home-filesystem-surface-and-semantics","title":"Agenda - App Home Filesystem Surface and Semantics","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0006","file":"workflow/agendas/AGD-0006-app-home-filesystem-surface-and-semantics.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"perf-runtime-telemetry-hot-path","title":"Agenda - [PERF] Runtime Telemetry Hot Path","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[{"id":"AGD-0007","file":"workflow/agendas/AGD-0007-perf-runtime-telemetry-hot-path.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0005","file":"workflow/decisions/DEC-0005-perf-push-based-telemetry-model.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0005","file":"workflow/plans/PLN-0005-perf-push-based-telemetry-implementation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0026","file":"lessons/DSC-0008-perf-runtime-telemetry-hot-path/LSN-0026-push-based-telemetry-model.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"perf-async-background-work-lanes-for-assets-and-fs","title":"Agenda - [PERF] Async Background Work Lanes for Assets and FS","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0008","file":"workflow/agendas/AGD-0008-perf-async-background-work-lanes-for-assets-and-fs.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0010","status":"open","ticket":"perf-host-desktop-frame-pacing-and-presentation","title":"Agenda - [PERF] Host Desktop Frame Pacing and Presentation","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0009","file":"workflow/agendas/AGD-0009-perf-host-desktop-frame-pacing-and-presentation.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0011","status":"open","ticket":"perf-gfx-render-pipeline-and-dirty-regions","title":"Agenda - [PERF] GFX Render Pipeline and Dirty Regions","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0010","file":"workflow/agendas/AGD-0010-perf-gfx-render-pipeline-and-dirty-regions.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0012","status":"open","ticket":"perf-runtime-introspection-syscalls","title":"Agenda - [PERF] Runtime Introspection Syscalls","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0011","file":"workflow/agendas/AGD-0011-perf-runtime-introspection-syscalls.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0013","status":"open","ticket":"perf-host-debug-overlay-isolation","title":"Agenda - [PERF] Host Debug Overlay Isolation","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[{"id":"AGD-0012","file":"workflow/agendas/AGD-0012-perf-host-debug-overlay-isolation.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-10"},{"id":"AGD-0022","file":"AGD-0022-host-overlay-tooling-boundary-revision.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"},{"id":"AGD-0023","file":"AGD-0023-overlay-log-metric-last-frame.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0007","file":"workflow/decisions/DEC-0007-perf-host-debug-overlay-isolation.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"},{"id":"DEC-0009","file":"DEC-0009-host-overlay-tooling-boundary.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10","ref_agenda":"AGD-0022"},{"id":"DEC-0010","file":"DEC-0010-overlay-log-metric-last-frame.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10","ref_agenda":"AGD-0023"}],"plans":[{"id":"PLN-0006","file":"workflow/plans/PLN-0006-perf-host-debug-overlay-isolation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"},{"id":"PLN-0008","file":"PLN-0008-host-overlay-native-composition-alignment.md","status":"in_progress","created_at":"2026-04-10","updated_at":"2026-04-10","ref_decisions":["DEC-0007","DEC-0008","DEC-0009","DEC-0010"]}],"lessons":[{"id":"LSN-0027","file":"lessons/DSC-0013-perf-host-debug-overlay-isolation/LSN-0027-host-debug-overlay-isolation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0024","status":"open","ticket":"generic-memory-bank-slot-contract","title":"Agenda - Generic Memory Bank Slot Contract","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["runtime","asset","memory-bank","slots","host"],"agendas":[{"id":"AGD-0024","file":"AGD-0024-generic-memory-bank-slot-contract.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0012","file":"DEC-0012-asset-manager-bank-telemetry-slot-contract.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10","ref_agenda":"AGD-0024"}],"plans":[{"id":"PLN-0010","file":"PLN-0010-asset-manager-bank-telemetry-slot-contract.md","status":"in_progress","created_at":"2026-04-10","updated_at":"2026-04-10","ref_decisions":["DEC-0012"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0014","status":"open","ticket":"perf-vm-allocation-and-copy-pressure","title":"Agenda - [PERF] VM Allocation and Copy Pressure","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0013","file":"workflow/agendas/AGD-0013-perf-vm-allocation-and-copy-pressure.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0015","status":"open","ticket":"perf-cartridge-boot-and-program-ownership","title":"Agenda - [PERF] Cartridge Boot and Program Ownership","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0014","file":"workflow/agendas/AGD-0014-perf-cartridge-boot-and-program-ownership.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"tilemap-empty-cell-vs-tile-id-zero","title":"Tilemap Empty Cell vs Tile ID Zero","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0015","file":"workflow/agendas/AGD-0015-tilemap-empty-cell-vs-tile-id-zero.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0022","file":"lessons/DSC-0016-tilemap-empty-cell-semantics/LSN-0022-tilemap-empty-cell-convergence.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"asset-entry-metadata-normalization-contract","title":"Asset Entry Metadata Normalization Contract","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0016","file":"workflow/agendas/AGD-0016-asset-entry-metadata-normalization-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[{"id":"DEC-0004","file":"workflow/decisions/DEC-0004-asset-entry-metadata-normalization-contract.md","status":"accepted","created_at":"2026-04-09","updated_at":"2026-04-09"}],"plans":[],"lessons":[{"id":"LSN-0023","file":"lessons/DSC-0017-asset-metadata-normalization/LSN-0023-typed-asset-metadata-helpers.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"asset-load-asset-id-int-contract","title":"Asset Load Asset ID Int Contract","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["asset","runtime","abi"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0019","file":"lessons/DSC-0018-asset-load-asset-id-int-contract/LSN-0019-asset-load-id-abi-convergence.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"jenkinsfile-correction","title":"Jenkinsfile Correction and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins"],"agendas":[{"id":"AGD-0017","file":"workflow/agendas/AGD-0017-jenkinsfile-correction.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0002","file":"workflow/decisions/DEC-0002-jenkinsfile-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0002","file":"workflow/plans/PLN-0002-jenkinsfile-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0020","file":"lessons/DSC-0019-jenkins-ci-standardization/LSN-0020-jenkins-standard-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":26,"AGD":26,"DEC":14,"PLN":17,"LSN":31,"CLSN":1}}
|
|
||||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"perf-full-migration-to-atomic-telemetry","title":"Agenda - [PERF] Full Migration to Atomic Telemetry","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["perf","runtime","telemetry"],"agendas":[{"id":"AGD-0021","file":"workflow/agendas/AGD-0021-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0008","file":"workflow/decisions/DEC-0008-full-migration-to-atomic-telemetry.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0007","file":"workflow/plans/PLN-0007-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0028","file":"lessons/DSC-0023-perf-full-migration-to-atomic-telemetry/LSN-0028-converging-to-single-atomic-telemetry-source.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"jenkins-gitea-integration","title":"Jenkins Gitea Integration and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins","gitea"],"agendas":[{"id":"AGD-0018","file":"workflow/agendas/AGD-0018-jenkins-gitea-integration-and-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0003","file":"workflow/decisions/DEC-0003-jenkins-gitea-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0003","file":"workflow/plans/PLN-0003-jenkins-gitea-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0021","file":"lessons/DSC-0020-jenkins-gitea-integration/LSN-0021-jenkins-gitea-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"asset-entry-codec-enum-with-metadata","title":"Asset Entry Codec Enum Contract","created_at":"2026-04-09","updated_at":"2026-04-09","tags":["asset","runtime","codec","metadata"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"lessons/DSC-0021-asset-entry-codec-enum-contract/LSN-0024-string-on-the-wire-enum-in-runtime.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"tile-bank-vs-glyph-bank-domain-naming","title":"Glyph Bank Domain Naming Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["gfx","runtime","naming","domain-model"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"lessons/DSC-0022-glyph-bank-domain-naming/LSN-0025-rename-artifact-by-meaning-not-by-token.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"legacy-runtime-learn-import","title":"Import legacy runtime learn into discussion lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["migration","tech-debt"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0001-prometeu-learn-index.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0002","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0002-historical-asset-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0003","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0003-historical-audio-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0004","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0004-historical-cartridge-boot-protocol-and-manifest-authority.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0005","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0005-historical-game-memcard-slots-surface-and-semantics.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0006","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0006-historical-gfx-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0007","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0007-historical-retired-fault-and-input-decisions.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0008","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0008-historical-vm-core-and-assets.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0009","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0009-mental-model-asset-management.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0010","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0010-mental-model-audio.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0011","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0011-mental-model-gfx.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0012","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0012-mental-model-input.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0013","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0013-mental-model-observability-and-debugging.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0014","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0014-mental-model-portability-and-cross-platform.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0015","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0015-mental-model-save-memory-and-memcard.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0016","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0016-mental-model-status-first-and-fault-thinking.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0017","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0017-mental-model-time-and-cycles.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0018","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0018-mental-model-touch.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"runtime-edge-test-plan","title":"Agenda - Runtime Edge Test Plan","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0001","file":"workflow/agendas/AGD-0001-runtime-edge-test-plan.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0003","status":"open","ticket":"packed-cartridge-loader-pmc","title":"Agenda - Packed Cartridge Loader PMC","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0002","file":"workflow/agendas/AGD-0002-packed-cartridge-loader-pmc.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"system-run-cart","title":"Agenda - System Run Cart","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0003","file":"workflow/agendas/AGD-0003-system-run-cart.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"system-fault-semantics-and-control-surface","title":"Agenda - System Fault Semantics and Control Surface","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0004","file":"workflow/agendas/AGD-0004-system-fault-semantics-and-control-surface.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0006","status":"open","ticket":"vm-owned-random-service","title":"Agenda - VM-Owned Random Service","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0005","file":"workflow/agendas/AGD-0005-vm-owned-random-service.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0007","status":"open","ticket":"app-home-filesystem-surface-and-semantics","title":"Agenda - App Home Filesystem Surface and Semantics","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0006","file":"workflow/agendas/AGD-0006-app-home-filesystem-surface-and-semantics.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"perf-runtime-telemetry-hot-path","title":"Agenda - [PERF] Runtime Telemetry Hot Path","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[{"id":"AGD-0007","file":"workflow/agendas/AGD-0007-perf-runtime-telemetry-hot-path.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0005","file":"workflow/decisions/DEC-0005-perf-push-based-telemetry-model.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0005","file":"workflow/plans/PLN-0005-perf-push-based-telemetry-implementation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0026","file":"lessons/DSC-0008-perf-runtime-telemetry-hot-path/LSN-0026-push-based-telemetry-model.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"perf-async-background-work-lanes-for-assets-and-fs","title":"Agenda - [PERF] Async Background Work Lanes for Assets and FS","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0008","file":"workflow/agendas/AGD-0008-perf-async-background-work-lanes-for-assets-and-fs.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0010","status":"open","ticket":"perf-host-desktop-frame-pacing-and-presentation","title":"Agenda - [PERF] Host Desktop Frame Pacing and Presentation","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0009","file":"workflow/agendas/AGD-0009-perf-host-desktop-frame-pacing-and-presentation.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0011","status":"open","ticket":"perf-gfx-render-pipeline-and-dirty-regions","title":"Agenda - [PERF] GFX Render Pipeline and Dirty Regions","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0010","file":"workflow/agendas/AGD-0010-perf-gfx-render-pipeline-and-dirty-regions.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0012","status":"open","ticket":"perf-runtime-introspection-syscalls","title":"Agenda - [PERF] Runtime Introspection Syscalls","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0011","file":"workflow/agendas/AGD-0011-perf-runtime-introspection-syscalls.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"perf-host-debug-overlay-isolation","title":"Agenda - [PERF] Host Debug Overlay Isolation","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"lessons/DSC-0013-perf-host-debug-overlay-isolation/LSN-0027-host-debug-overlay-isolation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"generic-memory-bank-slot-contract","title":"Agenda - Generic Memory Bank Slot Contract","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["runtime","asset","memory-bank","slots","host"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"lessons/DSC-0024-generic-memory-bank-slot-contract/LSN-0029-slot-first-bank-telemetry-belongs-in-asset-manager.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"scene-bank-and-viewport-cache-refactor","title":"Scene Bank and Viewport Cache Refactor","created_at":"2026-04-11","updated_at":"2026-04-14","tags":["gfx","tilemap","runtime","render"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"lessons/DSC-0025-scene-bank-and-viewport-cache-refactor/LSN-0030-canonical-scene-cache-and-resolver-split.md","status":"done","created_at":"2026-04-14","updated_at":"2026-04-14"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0014","status":"open","ticket":"perf-vm-allocation-and-copy-pressure","title":"Agenda - [PERF] VM Allocation and Copy Pressure","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0013","file":"workflow/agendas/AGD-0013-perf-vm-allocation-and-copy-pressure.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0015","status":"open","ticket":"perf-cartridge-boot-and-program-ownership","title":"Agenda - [PERF] Cartridge Boot and Program Ownership","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0014","file":"workflow/agendas/AGD-0014-perf-cartridge-boot-and-program-ownership.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"tilemap-empty-cell-vs-tile-id-zero","title":"Tilemap Empty Cell vs Tile ID Zero","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0015","file":"workflow/agendas/AGD-0015-tilemap-empty-cell-vs-tile-id-zero.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0022","file":"lessons/DSC-0016-tilemap-empty-cell-semantics/LSN-0022-tilemap-empty-cell-convergence.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"asset-entry-metadata-normalization-contract","title":"Asset Entry Metadata Normalization Contract","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0016","file":"workflow/agendas/AGD-0016-asset-entry-metadata-normalization-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[{"id":"DEC-0004","file":"workflow/decisions/DEC-0004-asset-entry-metadata-normalization-contract.md","status":"accepted","created_at":"2026-04-09","updated_at":"2026-04-09"}],"plans":[],"lessons":[{"id":"LSN-0023","file":"lessons/DSC-0017-asset-metadata-normalization/LSN-0023-typed-asset-metadata-helpers.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"asset-load-asset-id-int-contract","title":"Asset Load Asset ID Int Contract","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["asset","runtime","abi"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0019","file":"lessons/DSC-0018-asset-load-asset-id-int-contract/LSN-0019-asset-load-id-abi-convergence.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"jenkinsfile-correction","title":"Jenkinsfile Correction and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins"],"agendas":[{"id":"AGD-0017","file":"workflow/agendas/AGD-0017-jenkinsfile-correction.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0002","file":"workflow/decisions/DEC-0002-jenkinsfile-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0002","file":"workflow/plans/PLN-0002-jenkinsfile-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0020","file":"lessons/DSC-0019-jenkins-ci-standardization/LSN-0020-jenkins-standard-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":29,"AGD":29,"DEC":17,"PLN":30,"LSN":31,"CLSN":1}}
|
|
||||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"perf-full-migration-to-atomic-telemetry","title":"Agenda - [PERF] Full Migration to Atomic Telemetry","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["perf","runtime","telemetry"],"agendas":[{"id":"AGD-0021","file":"workflow/agendas/AGD-0021-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0008","file":"workflow/decisions/DEC-0008-full-migration-to-atomic-telemetry.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0007","file":"workflow/plans/PLN-0007-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0028","file":"lessons/DSC-0023-perf-full-migration-to-atomic-telemetry/LSN-0028-converging-to-single-atomic-telemetry-source.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"jenkins-gitea-integration","title":"Jenkins Gitea Integration and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins","gitea"],"agendas":[{"id":"AGD-0018","file":"workflow/agendas/AGD-0018-jenkins-gitea-integration-and-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0003","file":"workflow/decisions/DEC-0003-jenkins-gitea-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0003","file":"workflow/plans/PLN-0003-jenkins-gitea-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0021","file":"lessons/DSC-0020-jenkins-gitea-integration/LSN-0021-jenkins-gitea-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"asset-entry-codec-enum-with-metadata","title":"Asset Entry Codec Enum Contract","created_at":"2026-04-09","updated_at":"2026-04-09","tags":["asset","runtime","codec","metadata"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"lessons/DSC-0021-asset-entry-codec-enum-contract/LSN-0024-string-on-the-wire-enum-in-runtime.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"tile-bank-vs-glyph-bank-domain-naming","title":"Glyph Bank Domain Naming Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["gfx","runtime","naming","domain-model"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"lessons/DSC-0022-glyph-bank-domain-naming/LSN-0025-rename-artifact-by-meaning-not-by-token.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"legacy-runtime-learn-import","title":"Import legacy runtime learn into discussion lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["migration","tech-debt"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0001-prometeu-learn-index.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0002","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0002-historical-asset-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0003","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0003-historical-audio-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0004","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0004-historical-cartridge-boot-protocol-and-manifest-authority.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0005","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0005-historical-game-memcard-slots-surface-and-semantics.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0006","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0006-historical-gfx-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0007","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0007-historical-retired-fault-and-input-decisions.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0008","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0008-historical-vm-core-and-assets.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0009","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0009-mental-model-asset-management.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0010","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0010-mental-model-audio.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0011","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0011-mental-model-gfx.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0012","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0012-mental-model-input.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0013","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0013-mental-model-observability-and-debugging.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0014","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0014-mental-model-portability-and-cross-platform.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0015","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0015-mental-model-save-memory-and-memcard.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0016","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0016-mental-model-status-first-and-fault-thinking.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0017","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0017-mental-model-time-and-cycles.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0018","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0018-mental-model-touch.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"runtime-edge-test-plan","title":"Agenda - Runtime Edge Test Plan","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0001","file":"workflow/agendas/AGD-0001-runtime-edge-test-plan.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0003","status":"open","ticket":"packed-cartridge-loader-pmc","title":"Agenda - Packed Cartridge Loader PMC","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0002","file":"workflow/agendas/AGD-0002-packed-cartridge-loader-pmc.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"system-run-cart","title":"Agenda - System Run Cart","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0003","file":"workflow/agendas/AGD-0003-system-run-cart.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"system-fault-semantics-and-control-surface","title":"Agenda - System Fault Semantics and Control Surface","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0004","file":"workflow/agendas/AGD-0004-system-fault-semantics-and-control-surface.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0006","status":"open","ticket":"vm-owned-random-service","title":"Agenda - VM-Owned Random Service","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0005","file":"workflow/agendas/AGD-0005-vm-owned-random-service.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0007","status":"open","ticket":"app-home-filesystem-surface-and-semantics","title":"Agenda - App Home Filesystem Surface and Semantics","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0006","file":"workflow/agendas/AGD-0006-app-home-filesystem-surface-and-semantics.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"perf-runtime-telemetry-hot-path","title":"Agenda - [PERF] Runtime Telemetry Hot Path","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[{"id":"AGD-0007","file":"workflow/agendas/AGD-0007-perf-runtime-telemetry-hot-path.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0005","file":"workflow/decisions/DEC-0005-perf-push-based-telemetry-model.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0005","file":"workflow/plans/PLN-0005-perf-push-based-telemetry-implementation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0026","file":"lessons/DSC-0008-perf-runtime-telemetry-hot-path/LSN-0026-push-based-telemetry-model.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"perf-async-background-work-lanes-for-assets-and-fs","title":"Agenda - [PERF] Async Background Work Lanes for Assets and FS","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0008","file":"workflow/agendas/AGD-0008-perf-async-background-work-lanes-for-assets-and-fs.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0010","status":"open","ticket":"perf-host-desktop-frame-pacing-and-presentation","title":"Agenda - [PERF] Host Desktop Frame Pacing and Presentation","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0009","file":"workflow/agendas/AGD-0009-perf-host-desktop-frame-pacing-and-presentation.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0011","status":"open","ticket":"perf-gfx-render-pipeline-and-dirty-regions","title":"Agenda - [PERF] GFX Render Pipeline and Dirty Regions","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0010","file":"workflow/agendas/AGD-0010-perf-gfx-render-pipeline-and-dirty-regions.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0012","status":"open","ticket":"perf-runtime-introspection-syscalls","title":"Agenda - [PERF] Runtime Introspection Syscalls","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0011","file":"workflow/agendas/AGD-0011-perf-runtime-introspection-syscalls.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"perf-host-debug-overlay-isolation","title":"Agenda - [PERF] Host Debug Overlay Isolation","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"lessons/DSC-0013-perf-host-debug-overlay-isolation/LSN-0027-host-debug-overlay-isolation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"generic-memory-bank-slot-contract","title":"Agenda - Generic Memory Bank Slot Contract","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["runtime","asset","memory-bank","slots","host"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"lessons/DSC-0024-generic-memory-bank-slot-contract/LSN-0029-slot-first-bank-telemetry-belongs-in-asset-manager.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"scene-bank-and-viewport-cache-refactor","title":"Scene Bank and Viewport Cache Refactor","created_at":"2026-04-11","updated_at":"2026-04-14","tags":["gfx","tilemap","runtime","render"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"lessons/DSC-0025-scene-bank-and-viewport-cache-refactor/LSN-0030-canonical-scene-cache-and-resolver-split.md","status":"done","created_at":"2026-04-14","updated_at":"2026-04-14"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0026","status":"open","ticket":"render-all-scene-cache-and-camera-integration","title":"Integrate render_all with Scene Cache and Camera","created_at":"2026-04-14","updated_at":"2026-04-15","tags":["gfx","runtime","render","camera","scene"],"agendas":[{"id":"AGD-0026","file":"workflow/agendas/AGD-0026-render-all-scene-cache-and-camera-integration.md","status":"accepted","created_at":"2026-04-14","updated_at":"2026-04-15"}],"decisions":[{"id":"DEC-0014","file":"workflow/decisions/DEC-0014-frame-composer-render-integration.md","status":"accepted","created_at":"2026-04-14","updated_at":"2026-04-15","ref_agenda":"AGD-0026"}],"plans":[{"id":"PLN-0017","file":"workflow/plans/PLN-0017-frame-composer-core-and-hardware-ownership.md","status":"accepted","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0014"]},{"id":"PLN-0018","file":"workflow/plans/PLN-0018-sprite-controller-and-frame-emission-model.md","status":"accepted","created_at":"2026-04-14","updated_at":"2026-04-14","ref_decisions":["DEC-0014"]},{"id":"PLN-0019","file":"workflow/plans/PLN-0019-scene-binding-camera-and-scene-status.md","status":"accepted","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0014"]},{"id":"PLN-0020","file":"workflow/plans/PLN-0020-cache-refresh-and-render-frame-path.md","status":"accepted","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0014"]},{"id":"PLN-0021","file":"workflow/plans/PLN-0021-service-retirement-callsite-migration-and-regression.md","status":"accepted","created_at":"2026-04-14","updated_at":"2026-04-15","ref_decisions":["DEC-0014"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0027","status":"open","ticket":"frame-composer-public-syscall-surface","title":"Agenda - FrameComposer Public Syscall Surface","created_at":"2026-04-17","updated_at":"2026-04-17","tags":["gfx","runtime","syscall","abi","frame-composer","scene","camera","sprites"],"agendas":[{"id":"AGD-0027","file":"workflow/agendas/AGD-0027-frame-composer-public-syscall-surface.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17"}],"decisions":[{"id":"DEC-0015","file":"workflow/decisions/DEC-0015-frame-composer-public-syscall-surface.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_agenda":"AGD-0027"}],"plans":[{"id":"PLN-0022","file":"workflow/plans/PLN-0022-composer-syscall-domain-and-spec-propagation.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_decisions":["DEC-0015"]},{"id":"PLN-0023","file":"workflow/plans/PLN-0023-composer-runtime-dispatch-and-legacy-removal.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_decisions":["DEC-0015"]},{"id":"PLN-0024","file":"workflow/plans/PLN-0024-composer-cartridge-tooling-and-regression-migration.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_decisions":["DEC-0015"]},{"id":"PLN-0025","file":"workflow/plans/PLN-0025-final-ci-validation-and-polish.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_decisions":["DEC-0015"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0028","status":"open","ticket":"deferred-overlay-and-primitive-composition","title":"Deferred Overlay and Primitive Composition over FrameComposer","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["gfx","runtime","render","frame-composer","overlay","primitives","hud"],"agendas":[{"id":"AGD-0028","file":"workflow/agendas/AGD-0028-deferred-overlay-and-primitive-composition.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18"}],"decisions":[{"id":"DEC-0016","file":"workflow/decisions/DEC-0016-deferred-gfx-overlay-outside-frame-composer.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_agenda":"AGD-0028"}],"plans":[{"id":"PLN-0026","file":"workflow/plans/PLN-0026-gfx-overlay-contract-and-spec-propagation.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_decisions":["DEC-0016"]},{"id":"PLN-0027","file":"workflow/plans/PLN-0027-deferred-gfx-overlay-subsystem.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_decisions":["DEC-0016"]},{"id":"PLN-0028","file":"workflow/plans/PLN-0028-runtime-frame-end-overlay-integration-and-parity.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_decisions":["DEC-0016"]},{"id":"PLN-0029","file":"workflow/plans/PLN-0029-final-overlay-ci-validation-and-polish.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_decisions":["DEC-0016"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0014","status":"open","ticket":"perf-vm-allocation-and-copy-pressure","title":"Agenda - [PERF] VM Allocation and Copy Pressure","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0013","file":"workflow/agendas/AGD-0013-perf-vm-allocation-and-copy-pressure.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0015","status":"open","ticket":"perf-cartridge-boot-and-program-ownership","title":"Agenda - [PERF] Cartridge Boot and Program Ownership","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0014","file":"workflow/agendas/AGD-0014-perf-cartridge-boot-and-program-ownership.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"tilemap-empty-cell-vs-tile-id-zero","title":"Tilemap Empty Cell vs Tile ID Zero","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0015","file":"workflow/agendas/AGD-0015-tilemap-empty-cell-vs-tile-id-zero.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0022","file":"lessons/DSC-0016-tilemap-empty-cell-semantics/LSN-0022-tilemap-empty-cell-convergence.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"asset-entry-metadata-normalization-contract","title":"Asset Entry Metadata Normalization Contract","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0016","file":"workflow/agendas/AGD-0016-asset-entry-metadata-normalization-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[{"id":"DEC-0004","file":"workflow/decisions/DEC-0004-asset-entry-metadata-normalization-contract.md","status":"accepted","created_at":"2026-04-09","updated_at":"2026-04-09"}],"plans":[],"lessons":[{"id":"LSN-0023","file":"lessons/DSC-0017-asset-metadata-normalization/LSN-0023-typed-asset-metadata-helpers.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"asset-load-asset-id-int-contract","title":"Asset Load Asset ID Int Contract","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["asset","runtime","abi"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0019","file":"lessons/DSC-0018-asset-load-asset-id-int-contract/LSN-0019-asset-load-id-abi-convergence.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"jenkinsfile-correction","title":"Jenkinsfile Correction and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins"],"agendas":[{"id":"AGD-0017","file":"workflow/agendas/AGD-0017-jenkinsfile-correction.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0002","file":"workflow/decisions/DEC-0002-jenkinsfile-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0002","file":"workflow/plans/PLN-0002-jenkinsfile-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0020","file":"lessons/DSC-0019-jenkins-ci-standardization/LSN-0020-jenkins-standard-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":29,"AGD":29,"DEC":17,"PLN":30,"LSN":32,"CLSN":1}}
|
|
||||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"perf-full-migration-to-atomic-telemetry","title":"Agenda - [PERF] Full Migration to Atomic Telemetry","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["perf","runtime","telemetry"],"agendas":[{"id":"AGD-0021","file":"workflow/agendas/AGD-0021-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0008","file":"workflow/decisions/DEC-0008-full-migration-to-atomic-telemetry.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0007","file":"workflow/plans/PLN-0007-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0028","file":"lessons/DSC-0023-perf-full-migration-to-atomic-telemetry/LSN-0028-converging-to-single-atomic-telemetry-source.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"jenkins-gitea-integration","title":"Jenkins Gitea Integration and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins","gitea"],"agendas":[{"id":"AGD-0018","file":"workflow/agendas/AGD-0018-jenkins-gitea-integration-and-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0003","file":"workflow/decisions/DEC-0003-jenkins-gitea-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0003","file":"workflow/plans/PLN-0003-jenkins-gitea-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0021","file":"lessons/DSC-0020-jenkins-gitea-integration/LSN-0021-jenkins-gitea-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"asset-entry-codec-enum-with-metadata","title":"Asset Entry Codec Enum Contract","created_at":"2026-04-09","updated_at":"2026-04-09","tags":["asset","runtime","codec","metadata"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"lessons/DSC-0021-asset-entry-codec-enum-contract/LSN-0024-string-on-the-wire-enum-in-runtime.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"tile-bank-vs-glyph-bank-domain-naming","title":"Glyph Bank Domain Naming Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["gfx","runtime","naming","domain-model"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"lessons/DSC-0022-glyph-bank-domain-naming/LSN-0025-rename-artifact-by-meaning-not-by-token.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"legacy-runtime-learn-import","title":"Import legacy runtime learn into discussion lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["migration","tech-debt"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0001-prometeu-learn-index.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0002","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0002-historical-asset-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0003","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0003-historical-audio-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0004","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0004-historical-cartridge-boot-protocol-and-manifest-authority.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0005","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0005-historical-game-memcard-slots-surface-and-semantics.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0006","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0006-historical-gfx-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0007","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0007-historical-retired-fault-and-input-decisions.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0008","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0008-historical-vm-core-and-assets.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0009","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0009-mental-model-asset-management.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0010","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0010-mental-model-audio.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0011","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0011-mental-model-gfx.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0012","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0012-mental-model-input.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0013","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0013-mental-model-observability-and-debugging.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0014","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0014-mental-model-portability-and-cross-platform.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0015","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0015-mental-model-save-memory-and-memcard.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0016","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0016-mental-model-status-first-and-fault-thinking.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0017","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0017-mental-model-time-and-cycles.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0018","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0018-mental-model-touch.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"runtime-edge-test-plan","title":"Agenda - Runtime Edge Test Plan","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0001","file":"workflow/agendas/AGD-0001-runtime-edge-test-plan.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0003","status":"open","ticket":"packed-cartridge-loader-pmc","title":"Agenda - Packed Cartridge Loader PMC","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0002","file":"workflow/agendas/AGD-0002-packed-cartridge-loader-pmc.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"system-run-cart","title":"Agenda - System Run Cart","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0003","file":"workflow/agendas/AGD-0003-system-run-cart.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"system-fault-semantics-and-control-surface","title":"Agenda - System Fault Semantics and Control Surface","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0004","file":"workflow/agendas/AGD-0004-system-fault-semantics-and-control-surface.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0006","status":"open","ticket":"vm-owned-random-service","title":"Agenda - VM-Owned Random Service","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0005","file":"workflow/agendas/AGD-0005-vm-owned-random-service.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0007","status":"open","ticket":"app-home-filesystem-surface-and-semantics","title":"Agenda - App Home Filesystem Surface and Semantics","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0006","file":"workflow/agendas/AGD-0006-app-home-filesystem-surface-and-semantics.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"perf-runtime-telemetry-hot-path","title":"Agenda - [PERF] Runtime Telemetry Hot Path","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[{"id":"AGD-0007","file":"workflow/agendas/AGD-0007-perf-runtime-telemetry-hot-path.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0005","file":"workflow/decisions/DEC-0005-perf-push-based-telemetry-model.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0005","file":"workflow/plans/PLN-0005-perf-push-based-telemetry-implementation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0026","file":"lessons/DSC-0008-perf-runtime-telemetry-hot-path/LSN-0026-push-based-telemetry-model.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"perf-async-background-work-lanes-for-assets-and-fs","title":"Agenda - [PERF] Async Background Work Lanes for Assets and FS","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0008","file":"workflow/agendas/AGD-0008-perf-async-background-work-lanes-for-assets-and-fs.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0010","status":"open","ticket":"perf-host-desktop-frame-pacing-and-presentation","title":"Agenda - [PERF] Host Desktop Frame Pacing and Presentation","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0009","file":"workflow/agendas/AGD-0009-perf-host-desktop-frame-pacing-and-presentation.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0011","status":"open","ticket":"perf-gfx-render-pipeline-and-dirty-regions","title":"Agenda - [PERF] GFX Render Pipeline and Dirty Regions","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0010","file":"workflow/agendas/AGD-0010-perf-gfx-render-pipeline-and-dirty-regions.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0012","status":"open","ticket":"perf-runtime-introspection-syscalls","title":"Agenda - [PERF] Runtime Introspection Syscalls","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0011","file":"workflow/agendas/AGD-0011-perf-runtime-introspection-syscalls.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"perf-host-debug-overlay-isolation","title":"Agenda - [PERF] Host Debug Overlay Isolation","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"lessons/DSC-0013-perf-host-debug-overlay-isolation/LSN-0027-host-debug-overlay-isolation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"generic-memory-bank-slot-contract","title":"Agenda - Generic Memory Bank Slot Contract","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["runtime","asset","memory-bank","slots","host"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"lessons/DSC-0024-generic-memory-bank-slot-contract/LSN-0029-slot-first-bank-telemetry-belongs-in-asset-manager.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"scene-bank-and-viewport-cache-refactor","title":"Scene Bank and Viewport Cache Refactor","created_at":"2026-04-11","updated_at":"2026-04-14","tags":["gfx","tilemap","runtime","render"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"lessons/DSC-0025-scene-bank-and-viewport-cache-refactor/LSN-0030-canonical-scene-cache-and-resolver-split.md","status":"done","created_at":"2026-04-14","updated_at":"2026-04-14"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"render-all-scene-cache-and-camera-integration","title":"Integrate render_all with Scene Cache and Camera","created_at":"2026-04-14","updated_at":"2026-04-18","tags":["gfx","runtime","render","camera","scene"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"lessons/DSC-0026-render-all-scene-cache-and-camera-integration/LSN-0031-frame-composition-belongs-above-the-render-backend.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0027","status":"open","ticket":"frame-composer-public-syscall-surface","title":"Agenda - FrameComposer Public Syscall Surface","created_at":"2026-04-17","updated_at":"2026-04-17","tags":["gfx","runtime","syscall","abi","frame-composer","scene","camera","sprites"],"agendas":[{"id":"AGD-0027","file":"workflow/agendas/AGD-0027-frame-composer-public-syscall-surface.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17"}],"decisions":[{"id":"DEC-0015","file":"workflow/decisions/DEC-0015-frame-composer-public-syscall-surface.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_agenda":"AGD-0027"}],"plans":[{"id":"PLN-0022","file":"workflow/plans/PLN-0022-composer-syscall-domain-and-spec-propagation.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_decisions":["DEC-0015"]},{"id":"PLN-0023","file":"workflow/plans/PLN-0023-composer-runtime-dispatch-and-legacy-removal.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_decisions":["DEC-0015"]},{"id":"PLN-0024","file":"workflow/plans/PLN-0024-composer-cartridge-tooling-and-regression-migration.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_decisions":["DEC-0015"]},{"id":"PLN-0025","file":"workflow/plans/PLN-0025-final-ci-validation-and-polish.md","status":"accepted","created_at":"2026-04-17","updated_at":"2026-04-17","ref_decisions":["DEC-0015"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0028","status":"open","ticket":"deferred-overlay-and-primitive-composition","title":"Deferred Overlay and Primitive Composition over FrameComposer","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["gfx","runtime","render","frame-composer","overlay","primitives","hud"],"agendas":[{"id":"AGD-0028","file":"workflow/agendas/AGD-0028-deferred-overlay-and-primitive-composition.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18"}],"decisions":[{"id":"DEC-0016","file":"workflow/decisions/DEC-0016-deferred-gfx-overlay-outside-frame-composer.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_agenda":"AGD-0028"}],"plans":[{"id":"PLN-0026","file":"workflow/plans/PLN-0026-gfx-overlay-contract-and-spec-propagation.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_decisions":["DEC-0016"]},{"id":"PLN-0027","file":"workflow/plans/PLN-0027-deferred-gfx-overlay-subsystem.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_decisions":["DEC-0016"]},{"id":"PLN-0028","file":"workflow/plans/PLN-0028-runtime-frame-end-overlay-integration-and-parity.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_decisions":["DEC-0016"]},{"id":"PLN-0029","file":"workflow/plans/PLN-0029-final-overlay-ci-validation-and-polish.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-18","ref_decisions":["DEC-0016"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0014","status":"open","ticket":"perf-vm-allocation-and-copy-pressure","title":"Agenda - [PERF] VM Allocation and Copy Pressure","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0013","file":"workflow/agendas/AGD-0013-perf-vm-allocation-and-copy-pressure.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0015","status":"open","ticket":"perf-cartridge-boot-and-program-ownership","title":"Agenda - [PERF] Cartridge Boot and Program Ownership","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0014","file":"workflow/agendas/AGD-0014-perf-cartridge-boot-and-program-ownership.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"tilemap-empty-cell-vs-tile-id-zero","title":"Tilemap Empty Cell vs Tile ID Zero","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0015","file":"workflow/agendas/AGD-0015-tilemap-empty-cell-vs-tile-id-zero.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0022","file":"lessons/DSC-0016-tilemap-empty-cell-semantics/LSN-0022-tilemap-empty-cell-convergence.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"asset-entry-metadata-normalization-contract","title":"Asset Entry Metadata Normalization Contract","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0016","file":"workflow/agendas/AGD-0016-asset-entry-metadata-normalization-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[{"id":"DEC-0004","file":"workflow/decisions/DEC-0004-asset-entry-metadata-normalization-contract.md","status":"accepted","created_at":"2026-04-09","updated_at":"2026-04-09"}],"plans":[],"lessons":[{"id":"LSN-0023","file":"lessons/DSC-0017-asset-metadata-normalization/LSN-0023-typed-asset-metadata-helpers.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"asset-load-asset-id-int-contract","title":"Asset Load Asset ID Int Contract","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["asset","runtime","abi"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0019","file":"lessons/DSC-0018-asset-load-asset-id-int-contract/LSN-0019-asset-load-id-abi-convergence.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"jenkinsfile-correction","title":"Jenkinsfile Correction and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins"],"agendas":[{"id":"AGD-0017","file":"workflow/agendas/AGD-0017-jenkinsfile-correction.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0002","file":"workflow/decisions/DEC-0002-jenkinsfile-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0002","file":"workflow/plans/PLN-0002-jenkinsfile-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0020","file":"lessons/DSC-0019-jenkins-ci-standardization/LSN-0020-jenkins-standard-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":29,"AGD":29,"DEC":18,"PLN":33,"LSN":34,"CLSN":1}}
|
|
||||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"perf-full-migration-to-atomic-telemetry","title":"Agenda - [PERF] Full Migration to Atomic Telemetry","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["perf","runtime","telemetry"],"agendas":[{"id":"AGD-0021","file":"workflow/agendas/AGD-0021-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0008","file":"workflow/decisions/DEC-0008-full-migration-to-atomic-telemetry.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0007","file":"workflow/plans/PLN-0007-full-migration-to-atomic-telemetry.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0028","file":"lessons/DSC-0023-perf-full-migration-to-atomic-telemetry/LSN-0028-converging-to-single-atomic-telemetry-source.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"jenkins-gitea-integration","title":"Jenkins Gitea Integration and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins","gitea"],"agendas":[{"id":"AGD-0018","file":"workflow/agendas/AGD-0018-jenkins-gitea-integration-and-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0003","file":"workflow/decisions/DEC-0003-jenkins-gitea-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0003","file":"workflow/plans/PLN-0003-jenkins-gitea-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0021","file":"lessons/DSC-0020-jenkins-gitea-integration/LSN-0021-jenkins-gitea-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"asset-entry-codec-enum-with-metadata","title":"Asset Entry Codec Enum Contract","created_at":"2026-04-09","updated_at":"2026-04-09","tags":["asset","runtime","codec","metadata"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"lessons/DSC-0021-asset-entry-codec-enum-contract/LSN-0024-string-on-the-wire-enum-in-runtime.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"tile-bank-vs-glyph-bank-domain-naming","title":"Glyph Bank Domain Naming Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["gfx","runtime","naming","domain-model"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"lessons/DSC-0022-glyph-bank-domain-naming/LSN-0025-rename-artifact-by-meaning-not-by-token.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"legacy-runtime-learn-import","title":"Import legacy runtime learn into discussion lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["migration","tech-debt"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0001-prometeu-learn-index.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0002","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0002-historical-asset-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0003","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0003-historical-audio-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0004","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0004-historical-cartridge-boot-protocol-and-manifest-authority.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0005","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0005-historical-game-memcard-slots-surface-and-semantics.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0006","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0006-historical-gfx-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0007","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0007-historical-retired-fault-and-input-decisions.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0008","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0008-historical-vm-core-and-assets.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0009","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0009-mental-model-asset-management.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0010","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0010-mental-model-audio.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0011","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0011-mental-model-gfx.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0012","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0012-mental-model-input.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0013","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0013-mental-model-observability-and-debugging.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0014","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0014-mental-model-portability-and-cross-platform.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0015","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0015-mental-model-save-memory-and-memcard.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0016","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0016-mental-model-status-first-and-fault-thinking.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0017","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0017-mental-model-time-and-cycles.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0018","file":"lessons/DSC-0001-runtime-learn-legacy-import/LSN-0018-mental-model-touch.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0002","status":"open","ticket":"runtime-edge-test-plan","title":"Agenda - Runtime Edge Test Plan","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0001","file":"workflow/agendas/AGD-0001-runtime-edge-test-plan.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0003","status":"open","ticket":"packed-cartridge-loader-pmc","title":"Agenda - Packed Cartridge Loader PMC","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0002","file":"workflow/agendas/AGD-0002-packed-cartridge-loader-pmc.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0004","status":"open","ticket":"system-run-cart","title":"Agenda - System Run Cart","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0003","file":"workflow/agendas/AGD-0003-system-run-cart.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"system-fault-semantics-and-control-surface","title":"Agenda - System Fault Semantics and Control Surface","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0004","file":"workflow/agendas/AGD-0004-system-fault-semantics-and-control-surface.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0006","status":"open","ticket":"vm-owned-random-service","title":"Agenda - VM-Owned Random Service","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0005","file":"workflow/agendas/AGD-0005-vm-owned-random-service.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0007","status":"open","ticket":"app-home-filesystem-surface-and-semantics","title":"Agenda - App Home Filesystem Surface and Semantics","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0006","file":"workflow/agendas/AGD-0006-app-home-filesystem-surface-and-semantics.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"perf-runtime-telemetry-hot-path","title":"Agenda - [PERF] Runtime Telemetry Hot Path","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[{"id":"AGD-0007","file":"workflow/agendas/AGD-0007-perf-runtime-telemetry-hot-path.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-10"}],"decisions":[{"id":"DEC-0005","file":"workflow/decisions/DEC-0005-perf-push-based-telemetry-model.md","status":"accepted","created_at":"2026-04-10","updated_at":"2026-04-10"}],"plans":[{"id":"PLN-0005","file":"workflow/plans/PLN-0005-perf-push-based-telemetry-implementation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}],"lessons":[{"id":"LSN-0026","file":"lessons/DSC-0008-perf-runtime-telemetry-hot-path/LSN-0026-push-based-telemetry-model.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0009","status":"open","ticket":"perf-async-background-work-lanes-for-assets-and-fs","title":"Agenda - [PERF] Async Background Work Lanes for Assets and FS","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0008","file":"workflow/agendas/AGD-0008-perf-async-background-work-lanes-for-assets-and-fs.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0010","status":"open","ticket":"perf-host-desktop-frame-pacing-and-presentation","title":"Agenda - [PERF] Host Desktop Frame Pacing and Presentation","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0009","file":"workflow/agendas/AGD-0009-perf-host-desktop-frame-pacing-and-presentation.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0011","status":"open","ticket":"perf-gfx-render-pipeline-and-dirty-regions","title":"Agenda - [PERF] GFX Render Pipeline and Dirty Regions","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0010","file":"workflow/agendas/AGD-0010-perf-gfx-render-pipeline-and-dirty-regions.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0012","status":"review","ticket":"perf-runtime-introspection-syscalls","title":"Agenda - [PERF] Runtime Introspection Syscalls","created_at":"2026-03-27","updated_at":"2026-04-19","tags":["perf","runtime","syscall","telemetry","debug","asset"],"agendas":[{"id":"AGD-0011","file":"workflow/agendas/AGD-0011-perf-runtime-introspection-syscalls.md","status":"accepted","created_at":"2026-03-27","updated_at":"2026-04-18"}],"decisions":[{"id":"DEC-0009","file":"workflow/decisions/DEC-0009-host-owned-debug-and-certification.md","status":"accepted","created_at":"2026-04-18","updated_at":"2026-04-19","ref_agenda":"AGD-0011"}],"plans":[{"id":"PLN-0030","file":"workflow/plans/PLN-0030-dec9-spec-boundary-propagation.md","status":"done","created_at":"2026-04-19","updated_at":"2026-04-19","ref_decisions":["DEC-0009"]},{"id":"PLN-0031","file":"workflow/plans/PLN-0031-dec9-runtime-bank-abi-cleanup.md","status":"done","created_at":"2026-04-19","updated_at":"2026-04-19","ref_decisions":["DEC-0009"]},{"id":"PLN-0032","file":"workflow/plans/PLN-0032-dec9-host-debugger-and-certification-alignment.md","status":"done","created_at":"2026-04-19","updated_at":"2026-04-19","ref_decisions":["DEC-0009"]}],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"perf-host-debug-overlay-isolation","title":"Agenda - [PERF] Host Debug Overlay Isolation","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"lessons/DSC-0013-perf-host-debug-overlay-isolation/LSN-0027-host-debug-overlay-isolation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"generic-memory-bank-slot-contract","title":"Agenda - Generic Memory Bank Slot Contract","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["runtime","asset","memory-bank","slots","host"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"lessons/DSC-0024-generic-memory-bank-slot-contract/LSN-0029-slot-first-bank-telemetry-belongs-in-asset-manager.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"scene-bank-and-viewport-cache-refactor","title":"Scene Bank and Viewport Cache Refactor","created_at":"2026-04-11","updated_at":"2026-04-14","tags":["gfx","tilemap","runtime","render"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"lessons/DSC-0025-scene-bank-and-viewport-cache-refactor/LSN-0030-canonical-scene-cache-and-resolver-split.md","status":"done","created_at":"2026-04-14","updated_at":"2026-04-14"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"render-all-scene-cache-and-camera-integration","title":"Integrate render_all with Scene Cache and Camera","created_at":"2026-04-14","updated_at":"2026-04-18","tags":["gfx","runtime","render","camera","scene"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"lessons/DSC-0026-render-all-scene-cache-and-camera-integration/LSN-0031-frame-composition-belongs-above-the-render-backend.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0027","status":"done","ticket":"frame-composer-public-syscall-surface","title":"Agenda - FrameComposer Public Syscall Surface","created_at":"2026-04-17","updated_at":"2026-04-18","tags":["gfx","runtime","syscall","abi","frame-composer","scene","camera","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"lessons/DSC-0027-frame-composer-public-syscall-surface/LSN-0032-public-abi-must-follow-the-canonical-service-boundary.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"deferred-overlay-and-primitive-composition","title":"Deferred Overlay and Primitive Composition over FrameComposer","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["gfx","runtime","render","frame-composer","overlay","primitives","hud"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"lessons/DSC-0028-deferred-overlay-and-primitive-composition/LSN-0033-debug-primitives-should-be-a-final-overlay-not-part-of-game-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0014","status":"open","ticket":"perf-vm-allocation-and-copy-pressure","title":"Agenda - [PERF] VM Allocation and Copy Pressure","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0013","file":"workflow/agendas/AGD-0013-perf-vm-allocation-and-copy-pressure.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0015","status":"open","ticket":"perf-cartridge-boot-and-program-ownership","title":"Agenda - [PERF] Cartridge Boot and Program Ownership","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0014","file":"workflow/agendas/AGD-0014-perf-cartridge-boot-and-program-ownership.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"tilemap-empty-cell-vs-tile-id-zero","title":"Tilemap Empty Cell vs Tile ID Zero","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0015","file":"workflow/agendas/AGD-0015-tilemap-empty-cell-vs-tile-id-zero.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0022","file":"lessons/DSC-0016-tilemap-empty-cell-semantics/LSN-0022-tilemap-empty-cell-convergence.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"asset-entry-metadata-normalization-contract","title":"Asset Entry Metadata Normalization Contract","created_at":"2026-03-27","updated_at":"2026-04-09","tags":[],"agendas":[{"id":"AGD-0016","file":"workflow/agendas/AGD-0016-asset-entry-metadata-normalization-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-04-09"}],"decisions":[{"id":"DEC-0004","file":"workflow/decisions/DEC-0004-asset-entry-metadata-normalization-contract.md","status":"accepted","created_at":"2026-04-09","updated_at":"2026-04-09"}],"plans":[],"lessons":[{"id":"LSN-0023","file":"lessons/DSC-0017-asset-metadata-normalization/LSN-0023-typed-asset-metadata-helpers.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"asset-load-asset-id-int-contract","title":"Asset Load Asset ID Int Contract","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["asset","runtime","abi"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0019","file":"lessons/DSC-0018-asset-load-asset-id-int-contract/LSN-0019-asset-load-id-abi-convergence.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"jenkinsfile-correction","title":"Jenkinsfile Correction and Relocation","created_at":"2026-04-07","updated_at":"2026-04-07","tags":["ci","jenkins"],"agendas":[{"id":"AGD-0017","file":"workflow/agendas/AGD-0017-jenkinsfile-correction.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"decisions":[{"id":"DEC-0002","file":"workflow/decisions/DEC-0002-jenkinsfile-strategy.md","status":"accepted","created_at":"2026-04-07","updated_at":"2026-04-07"}],"plans":[{"id":"PLN-0002","file":"workflow/plans/PLN-0002-jenkinsfile-execution.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}],"lessons":[{"id":"LSN-0020","file":"lessons/DSC-0019-jenkins-ci-standardization/LSN-0020-jenkins-standard-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":49,"AGD":52,"DEC":43,"PLN":174,"LSN":57,"CLSN":1}}
|
|
||||||
{"type":"discussion","id":"DSC-0044","status":"done","ticket":"hub-suspended-game-kill-affordance","title":"Hub Suspended Game Kill Affordance","created_at":"2026-07-05","updated_at":"2026-07-05","tags":["hub","lifecycle","game","ui"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0054","file":"discussion/lessons/DSC-0044-hub-suspended-game-kill-affordance/LSN-0054-manual-hub-kill-must-share-game-termination-cleanup.md","status":"done","created_at":"2026-07-05","updated_at":"2026-07-05"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0043","status":"done","ticket":"system-os-cartridge-switch-orchestrator","title":"SystemOS Cartridge Switch Orchestrator","created_at":"2026-07-03","updated_at":"2026-07-05","tags":["runtime","os","lifecycle","game","cartridge","architecture"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0053","file":"discussion/lessons/DSC-0043-system-os-cartridge-switch-orchestrator/LSN-0053-game-switching-is-lifecycle-replacement-not-loader-work.md","status":"done","created_at":"2026-07-05","updated_at":"2026-07-05"}]}
|
|
||||||
{"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":"done","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":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0052","file":"discussion/lessons/DSC-0041-foreground-stack-game-pause-shell-vm-backed/LSN-0052-foreground-ownership-and-vm-session-ownership-are-separate.md","status":"done","created_at":"2026-07-05","updated_at":"2026-07-05"}]}
|
|
||||||
{"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"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0034","status":"done","ticket":"system-os-domain-facades","title":"Agenda - SystemOS Domain Facades","created_at":"2026-05-15","updated_at":"2026-05-15","tags":["runtime","os","services","api-surface","lifecycle","fs"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0043","file":"discussion/lessons/DSC-0034-system-os-domain-facades/LSN-0043-systemos-domain-facades.md","status":"done","created_at":"2026-05-15","updated_at":"2026-05-15"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0023","status":"done","ticket":"perf-full-migration-to-atomic-telemetry","title":"Agenda - [PERF] Full Migration to Atomic Telemetry","created_at":"2026-04-10","updated_at":"2026-06-04","tags":["perf","runtime","telemetry"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0028","file":"discussion/lessons/DSC-0023-perf-full-migration-to-atomic-telemetry/LSN-0028-converging-to-single-atomic-telemetry-source.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0020","status":"done","ticket":"jenkins-gitea-integration","title":"Jenkins Gitea Integration and Relocation","created_at":"2026-04-07","updated_at":"2026-06-04","tags":["ci","jenkins","gitea"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0021","file":"discussion/lessons/DSC-0020-jenkins-gitea-integration/LSN-0021-jenkins-gitea-integration.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0021","status":"done","ticket":"asset-entry-codec-enum-with-metadata","title":"Asset Entry Codec Enum Contract","created_at":"2026-04-09","updated_at":"2026-04-09","tags":["asset","runtime","codec","metadata"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0024","file":"discussion/lessons/DSC-0021-asset-entry-codec-enum-contract/LSN-0024-string-on-the-wire-enum-in-runtime.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0022","status":"done","ticket":"tile-bank-vs-glyph-bank-domain-naming","title":"Glyph Bank Domain Naming Contract","created_at":"2026-04-09","updated_at":"2026-04-10","tags":["gfx","runtime","naming","domain-model"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0025","file":"discussion/lessons/DSC-0022-glyph-bank-domain-naming/LSN-0025-rename-artifact-by-meaning-not-by-token.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0001","status":"done","ticket":"legacy-runtime-learn-import","title":"Import legacy runtime learn into discussion lessons","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["migration","tech-debt"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0001","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0001-prometeu-learn-index.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0002","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0002-historical-asset-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0003","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0003-historical-audio-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0004","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0004-historical-cartridge-boot-protocol-and-manifest-authority.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0005","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0005-historical-game-memcard-slots-surface-and-semantics.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0006","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0006-historical-gfx-status-first-fault-and-return-contract.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0007","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0007-historical-retired-fault-and-input-decisions.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0008","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0008-historical-vm-core-and-assets.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0009","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0009-mental-model-asset-management.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0010","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0010-mental-model-audio.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0011","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0011-mental-model-gfx.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0012","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0012-mental-model-input.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0013","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0013-mental-model-observability-and-debugging.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0014","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0014-mental-model-portability-and-cross-platform.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0015","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0015-mental-model-save-memory-and-memcard.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0016","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0016-mental-model-status-first-and-fault-thinking.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0017","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0017-mental-model-time-and-cycles.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"},{"id":"LSN-0018","file":"discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0018-mental-model-touch.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0002","status":"done","ticket":"runtime-edge-test-plan","title":"Agenda - Runtime Edge Test Plan","created_at":"2026-03-27","updated_at":"2026-04-21","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0037","file":"discussion/lessons/DSC-0002-runtime-edge-test-plan/LSN-0037-domain-gates-must-be-owned-by-the-repository.md","status":"done","created_at":"2026-04-21","updated_at":"2026-04-21"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0003","status":"open","ticket":"packed-cartridge-loader-pmc","title":"Agenda - Packed Cartridge Loader PMC","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0002","file":"AGD-0002-packed-cartridge-loader-pmc.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0004","status":"done","ticket":"system-run-cart","title":"Agenda - System Run Cart","created_at":"2026-03-27","updated_at":"2026-07-03","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0051","file":"discussion/lessons/DSC-0004-system-run-cart/LSN-0051-launch-authority-belongs-to-systemos.md","status":"done","created_at":"2026-07-03","updated_at":"2026-07-03"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0005","status":"open","ticket":"system-fault-semantics-and-control-surface","title":"Agenda - System Fault Semantics and Control Surface","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0004","file":"AGD-0004-system-fault-semantics-and-control-surface.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0006","status":"open","ticket":"vm-owned-random-service","title":"Agenda - VM-Owned Random Service","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0005","file":"AGD-0005-vm-owned-random-service.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0007","status":"open","ticket":"app-home-filesystem-surface-and-semantics","title":"Agenda - App Home Filesystem Surface and Semantics","created_at":"2026-03-27","updated_at":"2026-03-27","tags":[],"agendas":[{"id":"AGD-0006","file":"AGD-0006-app-home-filesystem-surface-and-semantics.md","status":"open","created_at":"2026-03-27","updated_at":"2026-03-27"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0045","status":"open","ticket":"background-service-audio-execution","title":"Background Service and Audio Execution","created_at":"2026-07-05","updated_at":"2026-07-05","tags":["runtime","os","lifecycle","service","audio","background","architecture"],"agendas":[{"id":"AGD-0048","file":"AGD-0048-background-service-audio-execution.md","status":"open","created_at":"2026-07-05","updated_at":"2026-07-05"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0008","status":"done","ticket":"perf-runtime-telemetry-hot-path","title":"Agenda - [PERF] Runtime Telemetry Hot Path","created_at":"2026-03-27","updated_at":"2026-06-04","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0026","file":"discussion/lessons/DSC-0008-perf-runtime-telemetry-hot-path/LSN-0026-push-based-telemetry-model.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0009","status":"done","ticket":"perf-async-background-work-lanes-for-assets-and-fs","title":"Agenda - [PERF] Async Background Work Lanes for Assets and FS","created_at":"2026-03-27","updated_at":"2026-07-01","tags":["perf","asset","fs","async","scheduler","runtime"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0050","file":"discussion/lessons/DSC-0009-perf-async-background-work-lanes-for-assets-and-fs/LSN-0050-serial-async-lanes-bound-backlog-complexity.md","status":"done","created_at":"2026-07-01","updated_at":"2026-07-01"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0010","status":"done","ticket":"perf-host-desktop-frame-pacing-and-presentation","title":"Agenda - [PERF] Host Desktop Frame Pacing and Presentation","created_at":"2026-03-27","updated_at":"2026-04-20","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0036","file":"discussion/lessons/DSC-0010-perf-host-desktop-frame-pacing-and-presentation/LSN-0036-frame-publication-and-host-invalidation-must-be-separate.md","status":"done","created_at":"2026-04-20","updated_at":"2026-04-20"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0011","status":"abandoned","ticket":"perf-gfx-render-pipeline-and-dirty-regions","title":"Agenda - [PERF] GFX Render Pipeline and Dirty Regions","created_at":"2026-03-27","updated_at":"2026-06-28","tags":[],"agendas":[{"id":"AGD-0010","file":"AGD-0010-perf-gfx-render-pipeline-and-dirty-regions.md","status":"abandoned","created_at":"2026-03-27","updated_at":"2026-06-28","_override_reason":"User explicitly chose to remove this agenda because it no longer applies to the current render scenario; future optimizations can be discussed when needed."}],"decisions":[],"plans":[],"lessons":[],"_override_reason":"User explicitly chose to abandon this discussion because it no longer applies to the current render scenario; future optimizations can be discussed when needed."}
|
|
||||||
{"type":"discussion","id":"DSC-0012","status":"done","ticket":"perf-runtime-introspection-syscalls","title":"Agenda - [PERF] Runtime Introspection Syscalls","created_at":"2026-03-27","updated_at":"2026-04-19","tags":["perf","runtime","syscall","telemetry","debug","asset"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0034","file":"discussion/lessons/DSC-0012-perf-runtime-introspection-syscalls/LSN-0034-host-owned-debug-boundaries.md","status":"done","created_at":"2026-04-19","updated_at":"2026-04-19"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0013","status":"done","ticket":"perf-host-debug-overlay-isolation","title":"Agenda - [PERF] Host Debug Overlay Isolation","created_at":"2026-03-27","updated_at":"2026-04-10","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0027","file":"discussion/lessons/DSC-0013-perf-host-debug-overlay-isolation/LSN-0027-host-debug-overlay-isolation.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0024","status":"done","ticket":"generic-memory-bank-slot-contract","title":"Agenda - Generic Memory Bank Slot Contract","created_at":"2026-04-10","updated_at":"2026-04-10","tags":["runtime","asset","memory-bank","slots","host"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0029","file":"discussion/lessons/DSC-0024-generic-memory-bank-slot-contract/LSN-0029-slot-first-bank-telemetry-belongs-in-asset-manager.md","status":"done","created_at":"2026-04-10","updated_at":"2026-04-10"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0025","status":"done","ticket":"scene-bank-and-viewport-cache-refactor","title":"Scene Bank and Viewport Cache Refactor","created_at":"2026-04-11","updated_at":"2026-04-14","tags":["gfx","tilemap","runtime","render"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0030","file":"discussion/lessons/DSC-0025-scene-bank-and-viewport-cache-refactor/LSN-0030-canonical-scene-cache-and-resolver-split.md","status":"done","created_at":"2026-04-14","updated_at":"2026-04-14"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0026","status":"done","ticket":"render-all-scene-cache-and-camera-integration","title":"Integrate render_all with Scene Cache and Camera","created_at":"2026-04-14","updated_at":"2026-04-18","tags":["gfx","runtime","render","camera","scene"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0031","file":"discussion/lessons/DSC-0026-render-all-scene-cache-and-camera-integration/LSN-0031-frame-composition-belongs-above-the-render-backend.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0027","status":"done","ticket":"frame-composer-public-syscall-surface","title":"Agenda - FrameComposer Public Syscall Surface","created_at":"2026-04-17","updated_at":"2026-04-18","tags":["gfx","runtime","syscall","abi","frame-composer","scene","camera","sprites"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0032","file":"discussion/lessons/DSC-0027-frame-composer-public-syscall-surface/LSN-0032-public-abi-must-follow-the-canonical-service-boundary.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0028","status":"done","ticket":"deferred-overlay-and-primitive-composition","title":"Deferred Overlay and Primitive Composition over FrameComposer","created_at":"2026-04-18","updated_at":"2026-04-18","tags":["gfx","runtime","render","frame-composer","overlay","primitives","hud"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0033","file":"discussion/lessons/DSC-0028-deferred-overlay-and-primitive-composition/LSN-0033-debug-primitives-should-be-a-final-overlay-not-part-of-game-composition.md","status":"done","created_at":"2026-04-18","updated_at":"2026-04-18"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0029","status":"done","ticket":"scene-bank-glyph-runtime-binding-leak","title":"Scene Bank Glyph Runtime Binding Leak","created_at":"2026-04-24","updated_at":"2026-04-24","tags":["gfx","runtime","asset","scene","glyph","format","architecture"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0038","file":"discussion/lessons/DSC-0029-scene-bank-glyph-runtime-binding-leak/LSN-0038-cold-scene-dependencies-must-bind-by-asset-identity.md","status":"done","created_at":"2026-04-24","updated_at":"2026-04-24"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0014","status":"done","ticket":"perf-vm-allocation-and-copy-pressure","title":"Agenda - [PERF] VM Allocation and Copy Pressure","created_at":"2026-03-27","updated_at":"2026-04-20","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0035","file":"discussion/lessons/DSC-0014-perf-vm-allocation-and-copy-pressure/LSN-0035-first-materialization-is-not-the-same-as-hot-path-copy-pressure.md","status":"done","created_at":"2026-04-20","updated_at":"2026-04-20"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0015","status":"abandoned","ticket":"perf-cartridge-boot-and-program-ownership","title":"Agenda - [PERF] Cartridge Boot and Program Ownership","created_at":"2026-03-27","updated_at":"2026-04-20","tags":[],"agendas":[{"id":"AGD-0014","file":"AGD-0014-perf-cartridge-boot-and-program-ownership.md","status":"abandoned","created_at":"2026-03-27","updated_at":"2026-04-20","_override_reason":"User explicitly chose to close the discussion without decision because FS->memory copy for the program is already acceptable."}],"decisions":[],"plans":[],"lessons":[],"_override_reason":"User explicitly chose to abandon the discussion without creating a decision because FS->memory copy for the program is already acceptable."}
|
|
||||||
{"type":"discussion","id":"DSC-0016","status":"done","ticket":"tilemap-empty-cell-vs-tile-id-zero","title":"Tilemap Empty Cell vs Tile ID Zero","created_at":"2026-03-27","updated_at":"2026-06-04","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0022","file":"discussion/lessons/DSC-0016-tilemap-empty-cell-semantics/LSN-0022-tilemap-empty-cell-convergence.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0017","status":"done","ticket":"asset-entry-metadata-normalization-contract","title":"Asset Entry Metadata Normalization Contract","created_at":"2026-03-27","updated_at":"2026-06-04","tags":[],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0023","file":"discussion/lessons/DSC-0017-asset-metadata-normalization/LSN-0023-typed-asset-metadata-helpers.md","status":"done","created_at":"2026-04-09","updated_at":"2026-04-09"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0018","status":"done","ticket":"asset-load-asset-id-int-contract","title":"Asset Load Asset ID Int Contract","created_at":"2026-03-27","updated_at":"2026-03-27","tags":["asset","runtime","abi"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0019","file":"discussion/lessons/DSC-0018-asset-load-asset-id-int-contract/LSN-0019-asset-load-id-abi-convergence.md","status":"done","created_at":"2026-03-27","updated_at":"2026-03-27"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0019","status":"done","ticket":"jenkinsfile-correction","title":"Jenkinsfile Correction and Relocation","created_at":"2026-04-07","updated_at":"2026-06-04","tags":["ci","jenkins"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0020","file":"discussion/lessons/DSC-0019-jenkins-ci-standardization/LSN-0020-jenkins-standard-relocation.md","status":"done","created_at":"2026-04-07","updated_at":"2026-04-07"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0030","status":"done","ticket":"internal-viewport-270p","title":"Agenda - Internal Viewport 270p (480x270)","created_at":"2026-04-27","updated_at":"2026-04-28","tags":["gfx","runtime","viewport","resolution","frame-composer","host"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0039","file":"discussion/lessons/DSC-0030-internal-viewport-270p/LSN-0039-resolution-baseline-changes-are-runtime-wide-contracts.md","status":"done","created_at":"2026-04-28","updated_at":"2026-04-28"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0031","status":"done","ticket":"runtime-mode-separation-game-system","title":"Agenda - Runtime Mode Separation: Game and System","created_at":"2026-05-11","updated_at":"2026-05-14","tags":["runtime","firmware","hub","system-apps","game-mode","scheduler"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0040","file":"discussion/lessons/DSC-0031-runtime-mode-separation-game-system/LSN-0040-system-pipeline-separation.md","status":"done","created_at":"2026-05-14","updated_at":"2026-05-14"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0032","status":"done","ticket":"system-os-lifecycle-process-task-contract","title":"Agenda - SystemOS Lifecycle, Process and Task Contract","created_at":"2026-05-14","updated_at":"2026-05-15","tags":["runtime","os","lifecycle","process","task","shell","firmware"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0041","file":"discussion/lessons/DSC-0032-system-os-lifecycle-process-task-contract/LSN-0041-systemos-lifecycle-authority.md","status":"done","created_at":"2026-05-15","updated_at":"2026-05-15"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0033","status":"done","ticket":"system-os-service-ownership-and-module-layout","title":"Agenda - SystemOS Service Ownership and Module Layout","created_at":"2026-05-14","updated_at":"2026-05-15","tags":["runtime","os","services","module-layout","vm","window-manager","logging"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0042","file":"discussion/lessons/DSC-0033-system-os-service-ownership-and-module-layout/LSN-0042-systemos-service-ownership-boundary.md","status":"done","created_at":"2026-05-15","updated_at":"2026-05-15"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0036","status":"done","ticket":"prometeu-hub-ui-direction","title":"Agenda - Prometeu Hub UI Direction","created_at":"2026-05-15","updated_at":"2026-05-22","tags":["hub","ui","shell","system-apps","lifecycle","design-system"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0045","file":"discussion/lessons/DSC-0036-prometeu-hub-ui-direction/LSN-0045-hub-ui-slices-should-prove-os-boundaries.md","status":"done","created_at":"2026-05-22","updated_at":"2026-05-22"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0037","status":"done","ticket":"rgba8888-framebuffer-and-pixel-format-direction","title":"Agenda - RGBA8888 Framebuffer and Pixel Format Direction","created_at":"2026-05-22","updated_at":"2026-05-23","tags":["gfx","framebuffer","rgb565","rgba8888","renderer","assets","host","backend"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0046","file":"discussion/lessons/DSC-0037-rgba8888-framebuffer-and-pixel-format-direction/LSN-0046-pixel-format-contracts-must-move-as-one-surface.md","status":"done","created_at":"2026-05-23","updated_at":"2026-05-23"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0046","status":"done","ticket":"runtime-owned-variable-glyph-bank-palette-protocol","title":"Runtime-Owned Variable Glyph Bank Palette Protocol","created_at":"2026-07-14","updated_at":"2026-07-14","tags":["runtime","gfx","assets","glyph-bank","palette-serialization","protocol"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0055","file":"discussion/lessons/DSC-0046-runtime-owned-variable-glyph-bank-palette-protocol/LSN-0055-runtime-owned-asset-protocols-must-align-payload-residency-and-lookup.md","status":"done","created_at":"2026-07-14","updated_at":"2026-07-14"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0047","status":"open","ticket":"portable-host-backend-strategy","title":"Portable Host Backend Strategy","created_at":"2026-07-14","updated_at":"2026-07-14","tags":["host","desktop","portable","sdl","backend","rendering","input","audio","linux","android","handheld"],"agendas":[{"id":"AGD-0050","file":"AGD-0050-portable-host-backend-strategy.md","status":"open","created_at":"2026-07-14","updated_at":"2026-07-14"}],"decisions":[],"plans":[],"lessons":[]}
|
|
||||||
{"type":"discussion","id":"DSC-0048","status":"done","ticket":"corrigir-identificacao-formato-pbx","title":"Corrigir Identificacao do Formato PBX","created_at":"2026-07-15","updated_at":"2026-07-15","tags":["runtime","bytecode","pbx","loader","format","architecture"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0056","file":"discussion/lessons/DSC-0048-corrigir-identificacao-formato-pbx/LSN-0056-runtime-artifact-identity-must-not-borrow-frontend-names.md","status":"done","created_at":"2026-07-15","updated_at":"2026-07-15"}]}
|
|
||||||
+125
@@ -0,0 +1,125 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0057
|
||||||
|
ticket: headless-automation-host-and-deterministic-runtime-control
|
||||||
|
title: Deterministic Host Control Follows Logical Runtime Boundaries
|
||||||
|
created: 2026-09-22
|
||||||
|
tags: [runtime, host, headless, deterministic, testing, input, framebuffer, lifecycle]
|
||||||
|
---
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
Prometeu needed an automation host that could boot and control a real cartridge
|
||||||
|
without a window, display surface, audio device, or refresh-rate delay. The
|
||||||
|
runtime already had the necessary domain boundaries: normalized
|
||||||
|
`InputSignals`, logical-frame execution, structured `CrashReport` values, and
|
||||||
|
worker-published `OwnedRgba8888Frame` values. The missing piece was a host that
|
||||||
|
composed those boundaries without inheriting desktop presentation concerns.
|
||||||
|
|
||||||
|
The implementation introduced the in-process `prometeu-host-headless` library
|
||||||
|
under `DEC-0043`. It proved deterministic input, frame advancement, pixel
|
||||||
|
capture, faults, audio discard, and reset behavior with directory cartridges
|
||||||
|
assembled directly in Rust tests.
|
||||||
|
|
||||||
|
## Key Decisions
|
||||||
|
|
||||||
|
### Logical Frames, Not Host Ticks, Are the Automation Unit
|
||||||
|
|
||||||
|
**What:** `advance_frame` repeatedly ticks firmware until the VM closes one
|
||||||
|
logical frame or reports a fault. It temporarily releases VM pause through the
|
||||||
|
existing debug-step request and leaves the VM paused afterward.
|
||||||
|
|
||||||
|
**Why:** A firmware tick is an execution budget slice, not necessarily a guest
|
||||||
|
frame. Exposing ticks would make automation sensitive to budget configuration
|
||||||
|
and host speed. Waiting for `FrameSync`, end-of-ROM, or a fault gives callers a
|
||||||
|
guest-visible boundary.
|
||||||
|
|
||||||
|
**Trade-offs:** One automation operation may execute multiple firmware ticks.
|
||||||
|
The host must therefore drain audio after every tick and must distinguish
|
||||||
|
instruction stepping from logical-frame advancement.
|
||||||
|
|
||||||
|
### Published Worker Frames Are the Pixel Oracle
|
||||||
|
|
||||||
|
**What:** Frame capture reads the `LatestRenderFrameStore` populated by the
|
||||||
|
existing render worker and waits for a frame id newer than the one observed
|
||||||
|
before advancement.
|
||||||
|
|
||||||
|
**Why:** Reading mutable hardware buffers would create a second observation
|
||||||
|
path and could expose partially applied work. The published
|
||||||
|
`OwnedRgba8888Frame` is already the runtime's canonical completed-frame
|
||||||
|
boundary, as described by `LSN-0049`.
|
||||||
|
|
||||||
|
**Trade-offs:** Logical execution and frame publication finish on different
|
||||||
|
threads, so capture must synchronize with publication. That wait is worker
|
||||||
|
completion, not refresh pacing.
|
||||||
|
|
||||||
|
### Cold Reset Must Clear Lifecycle Ownership as Well as VM State
|
||||||
|
|
||||||
|
**What:** Entering `FirmwareState::Reset` terminates the resident game before
|
||||||
|
clearing VM sessions and global runtime cartridge state.
|
||||||
|
|
||||||
|
**Why:** Clearing only the VM session registry leaves the foreground lifecycle
|
||||||
|
stack pointing at the old resident task. The next boot then looks like a second
|
||||||
|
resident game and fails with `ResidentGameAlreadyExists`. A cold boot boundary
|
||||||
|
must clear both execution state and the ownership records that authorize it.
|
||||||
|
|
||||||
|
**Trade-offs:** Reset is destructive lifecycle replacement. It intentionally
|
||||||
|
does not preserve the previous game as resumable state; Home suspend/resume is
|
||||||
|
the separate contract for preservation.
|
||||||
|
|
||||||
|
## Patterns and Algorithms
|
||||||
|
|
||||||
|
### Deterministic Frame Advancement
|
||||||
|
|
||||||
|
1. Record the current logical-frame index and latest published frame id.
|
||||||
|
2. Unpause the active VM session and request one debug frame step.
|
||||||
|
3. Tick firmware with the retained `InputSignals`.
|
||||||
|
4. Clear pending audio commands after every tick.
|
||||||
|
5. Continue until the logical-frame index advances or a structured fault is
|
||||||
|
visible.
|
||||||
|
6. Pause the VM again.
|
||||||
|
7. Read the publication store until the worker publishes a different frame id.
|
||||||
|
|
||||||
|
This keeps the oracle independent of wall-clock refresh timing while exercising
|
||||||
|
the same firmware, VM, render worker, input, and audio paths as a real host.
|
||||||
|
|
||||||
|
### Repeatability Oracle
|
||||||
|
|
||||||
|
Compare only stable runtime outputs:
|
||||||
|
|
||||||
|
- logical-frame index;
|
||||||
|
- published RGBA8888 pixels and frame identity progression;
|
||||||
|
- debugger-shaped state (`pc`, stack top, frame index, and app id);
|
||||||
|
- structured fault data.
|
||||||
|
|
||||||
|
Do not compare host CPU time, `Instant` timestamps, or certification budgets.
|
||||||
|
Those values characterize execution conditions, not deterministic guest state.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
- One firmware tick is not guaranteed to complete one guest frame.
|
||||||
|
- Instruction `step` and logical-frame advancement have different contracts.
|
||||||
|
- Capturing the hardware front buffer bypasses the canonical worker publication
|
||||||
|
boundary.
|
||||||
|
- Sleeping for a display period makes a headless host inherit presentation
|
||||||
|
pacing and turns 300-frame tests into multi-second runs.
|
||||||
|
- Clearing VM sessions without clearing resident-game lifecycle ownership does
|
||||||
|
not produce a cold reset.
|
||||||
|
- Opening or emulating an audio device is unnecessary when the required sink
|
||||||
|
semantics are simply to consume and discard queued commands.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Decision: `DEC-0043` (Headless Host and Deterministic Frame Control)
|
||||||
|
- Related lesson: `LSN-0049` (Render Workers Publish Frames, Hosts Present Them)
|
||||||
|
- Related lesson: `LSN-0053` (Game Switching Is Lifecycle Replacement, Not Loader Work)
|
||||||
|
- Audio contract: `docs/specs/runtime/05-audio-peripheral.md`
|
||||||
|
|
||||||
|
## Takeaways
|
||||||
|
|
||||||
|
- Automation should advance guest-defined logical boundaries, not host loop
|
||||||
|
iterations.
|
||||||
|
- Deterministic input is a retained normalized value supplied to every tick.
|
||||||
|
- The render worker's publication store is the single trustworthy pixel oracle.
|
||||||
|
- Headless execution can reuse production runtime paths without linking native
|
||||||
|
presentation or audio-device libraries.
|
||||||
|
- A cold reset must clear lifecycle ownership and execution state together.
|
||||||
+134
@@ -0,0 +1,134 @@
|
|||||||
|
---
|
||||||
|
id: LSN-0058
|
||||||
|
ticket: headless-automation-host-hardening
|
||||||
|
title: Deterministic Observation Must Follow the Active Producer
|
||||||
|
created: 2026-09-23
|
||||||
|
tags: [runtime, host, headless, deterministic, rendering, testing, debugger]
|
||||||
|
---
|
||||||
|
|
||||||
|
## Context
|
||||||
|
|
||||||
|
The first headless automation host appeared to synchronize frame capture with a
|
||||||
|
render worker: it started a worker, remembered the latest published frame id,
|
||||||
|
and spun for a bounded number of iterations after logical execution. Source
|
||||||
|
revalidation showed that this story did not match the running system. A Game
|
||||||
|
cartridge executes inside an active `VmSession`, and that session selected the
|
||||||
|
existing `LocalSynchronous` render consumer. The worker started on the global
|
||||||
|
fallback runtime never consumed the active session's submissions.
|
||||||
|
|
||||||
|
The visible frame was already published synchronously through the normal
|
||||||
|
platform sink. The spin was therefore redundant in successful runs and would
|
||||||
|
still have been incorrect for a future asynchronous path because it waited for
|
||||||
|
"any different frame" rather than the specific frame requested by automation.
|
||||||
|
|
||||||
|
## Key Decisions
|
||||||
|
|
||||||
|
### The Observation Contract Follows the Active Execution Owner
|
||||||
|
|
||||||
|
**What:** The headless host intentionally uses the active session's local
|
||||||
|
synchronous consumer and removes the unused global worker and bounded spin.
|
||||||
|
|
||||||
|
**Why:** Synchronization must be defined against the component that actually
|
||||||
|
produces the observed value. Waiting on an unrelated worker creates accidental
|
||||||
|
success and makes the architecture harder to reason about.
|
||||||
|
|
||||||
|
**Trade-offs:** The deterministic headless host does not exercise worker
|
||||||
|
concurrency on every cartridge run. Worker equivalence remains a separate
|
||||||
|
runtime conformance concern rather than part of each game's oracle.
|
||||||
|
|
||||||
|
### Completion Carries Exact Identity
|
||||||
|
|
||||||
|
**What:** Successful frame advancement retains the explicit
|
||||||
|
`{logical_frame_index, FrameId}` pair and capture validates that exact published
|
||||||
|
frame before cloning its `OwnedRgba8888Frame`.
|
||||||
|
|
||||||
|
**Why:** A generation change only proves that something was published. It does
|
||||||
|
not prove which logical operation produced it. Exact identity makes stale or
|
||||||
|
mis-associated observations detectable.
|
||||||
|
|
||||||
|
**Trade-offs:** Logical frame numbers and render frame ids remain separate
|
||||||
|
domains. Callers compare the explicit pair rather than assuming equality or a
|
||||||
|
fixed offset.
|
||||||
|
|
||||||
|
### A Tick Slice Must Be Smaller Than the Logical Budget
|
||||||
|
|
||||||
|
**What:** The runtime's per-firmware-tick execution slice is smaller than the
|
||||||
|
total logical-frame cycle budget. Headless advancement loops across slices
|
||||||
|
until the frame closes or a terminal outcome occurs.
|
||||||
|
|
||||||
|
**Why:** When both limits were equal, `BudgetExhausted` left zero remaining
|
||||||
|
logical budget, so another tick could not make progress. The documented
|
||||||
|
multi-tick contract existed only nominally. Separating the limits makes a tick
|
||||||
|
an implementation slice and keeps a logical frame as the automation unit.
|
||||||
|
|
||||||
|
**Trade-offs:** A computation-heavy logical frame can span several firmware
|
||||||
|
ticks. This is observable through deterministic tick counters but does not
|
||||||
|
change guest frame semantics.
|
||||||
|
|
||||||
|
### Debug Instruction Step Must Prime the Entry Call
|
||||||
|
|
||||||
|
**What:** The shared debugger instruction-step primitive prepares the VM entry
|
||||||
|
call when the call stack is empty before executing one instruction.
|
||||||
|
|
||||||
|
**Why:** Direct boot intentionally stops before the first game instruction. A
|
||||||
|
debug step at that point previously encountered the coroutine safepoint and
|
||||||
|
reported `FrameSync` as an unexpected panic instead of executing the first
|
||||||
|
instruction.
|
||||||
|
|
||||||
|
**Trade-offs:** Entry preparation remains shared runtime behavior. No
|
||||||
|
headless-specific VM branch is introduced.
|
||||||
|
|
||||||
|
## Patterns and Algorithms
|
||||||
|
|
||||||
|
### Deterministic Frame Advance
|
||||||
|
|
||||||
|
1. Record the current logical-frame index and latest canonical frame id.
|
||||||
|
2. Release pause and request the same one-frame stop used by debugger control.
|
||||||
|
3. Tick firmware while feeding the retained normalized `InputSignals`.
|
||||||
|
4. Continue through internal cycle-slice exhaustion.
|
||||||
|
5. Stop on exactly one logical-frame increment, structured fault, lifecycle
|
||||||
|
termination, or a typed host safety-limit error.
|
||||||
|
6. Clear the frame-step request and finish paused.
|
||||||
|
7. On success, require a new canonical frame and retain its exact identity with
|
||||||
|
the completed logical index.
|
||||||
|
|
||||||
|
### Deterministic Oracle Boundary
|
||||||
|
|
||||||
|
Include observations that describe simulated execution: logical frame and
|
||||||
|
frame identity, canonical pixels and layout, guest-visible state, structured
|
||||||
|
status/faults, and deterministic machine counters.
|
||||||
|
|
||||||
|
Exclude observations of the host running the simulation: wall time, CPU time,
|
||||||
|
thread scheduling, presentation cadence, worker timing, and host-only
|
||||||
|
identities.
|
||||||
|
|
||||||
|
## Pitfalls
|
||||||
|
|
||||||
|
- A worker created by a host may not own the active session being automated.
|
||||||
|
- Bounded spinning is neither an acknowledgement nor an identity check.
|
||||||
|
- "Latest changed" is weaker than "the requested frame was published."
|
||||||
|
- Equal slice and logical budgets can make multi-tick continuation impossible
|
||||||
|
even when the control loop appears to support it.
|
||||||
|
- A debug step from a pristine boot boundary must establish the same entry-call
|
||||||
|
precondition as normal execution.
|
||||||
|
- Human-readable fault summaries are useful diagnostics but are not a stable
|
||||||
|
automation interface; retain structured `CrashReport` values.
|
||||||
|
|
||||||
|
## References
|
||||||
|
|
||||||
|
- Decision: `DEC-0044` (Deterministic Headless Automation Host Contract)
|
||||||
|
- Prior lesson: `LSN-0057` (Deterministic Host Control Follows Logical Runtime Boundaries)
|
||||||
|
- Render worker lesson: `LSN-0049` (Render Workers Publish Frames, Hosts Present Them)
|
||||||
|
- Graphics contract: `docs/specs/runtime/04-gfx-peripheral.md`
|
||||||
|
- Debug contract: `docs/specs/runtime/10-debug-inspection-and-profiling.md`
|
||||||
|
- Portability and headless contract: `docs/specs/runtime/11-portability-and-cross-platform-execution.md`
|
||||||
|
|
||||||
|
## Takeaways
|
||||||
|
|
||||||
|
- Revalidate ownership and data flow from source before hardening a wait.
|
||||||
|
- Deterministic observation requires exact completion identity, not timing luck.
|
||||||
|
- Keep logical-frame control above internal execution slices.
|
||||||
|
- Use one production runtime path for interactive debugging and headless
|
||||||
|
automation; vary host transport and pacing, not machine semantics.
|
||||||
|
- Test infrastructure boundaries with counters and structured outcomes instead
|
||||||
|
of sleeps or log parsing.
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0002
|
|
||||||
ticket: packed-cartridge-loader-pmc
|
|
||||||
title: Agenda - Packed Cartridge Loader PMC
|
|
||||||
status: open
|
|
||||||
created: 2026-03-27
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: []
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Packed Cartridge Loader PMC
|
|
||||||
|
|
||||||
## Problema
|
|
||||||
|
|
||||||
O loader reconhece a extensão `.pmc`, mas o caminho empacotado ainda nao existe de verdade.
|
|
||||||
|
|
||||||
Hoje o dispatcher aceita a intenção e delega para um loader que sempre falha com `InvalidFormat`.
|
|
||||||
|
|
||||||
## Dor
|
|
||||||
|
|
||||||
- A plataforma declara dois formatos de entrada, mas só um funciona.
|
|
||||||
- Distribuição real de cartuchos fica travada no layout de diretório.
|
|
||||||
- Host, firmware e ferramentas nao conseguem validar o caminho de distribuição final.
|
|
||||||
- O runtime continua dependente de estrutura de workspace em vez de artefato fechado.
|
|
||||||
|
|
||||||
## Alvo da Discussao
|
|
||||||
|
|
||||||
Definir o formato e o contrato do cartucho empacotado `.pmc` como artefato de distribuição do runtime.
|
|
||||||
|
|
||||||
O objetivo nao é só "descompactar um zip", e sim fixar:
|
|
||||||
|
|
||||||
- layout interno;
|
|
||||||
- regras de validação;
|
|
||||||
- limites de compatibilidade;
|
|
||||||
- superfície de erro;
|
|
||||||
- impacto em assinatura/versionamento futuro.
|
|
||||||
|
|
||||||
## O Que Precisa Ser Definido
|
|
||||||
|
|
||||||
1. Container.
|
|
||||||
O `.pmc` é zip, tar, formato próprio, ou envelope simples com header e blobs?
|
|
||||||
|
|
||||||
2. Estrutura interna.
|
|
||||||
Quais arquivos são obrigatórios e opcionais:
|
|
||||||
- `manifest.json`
|
|
||||||
- `program.pbx`
|
|
||||||
- `assets.pa`
|
|
||||||
- outros metadados
|
|
||||||
|
|
||||||
3. Regras de validação.
|
|
||||||
Ordem de parsing, integridade, presença de arquivos, tamanho máximo, duplicatas e versão suportada.
|
|
||||||
|
|
||||||
4. Política de compatibilidade.
|
|
||||||
Como o loader reage a versões futuras do container e do manifesto.
|
|
||||||
|
|
||||||
5. Segurança e determinismo.
|
|
||||||
Como impedir traversal, nomes ambíguos, arquivos extras maliciosos e dependência da ordem física do container.
|
|
||||||
|
|
||||||
6. Relação com o loader de diretório.
|
|
||||||
O comportamento validado deve ser idêntico entre diretório e `.pmc`, mudando apenas a origem dos bytes.
|
|
||||||
|
|
||||||
## O Que Necessita Para Resolver
|
|
||||||
|
|
||||||
- especificação mínima do container `.pmc`;
|
|
||||||
- decisão sobre biblioteca/abordagem de parsing;
|
|
||||||
- matriz de erros determinísticos;
|
|
||||||
- testes com cartuchos sintéticos válidos e inválidos;
|
|
||||||
- garantia de equivalência comportamental com o loader de diretório.
|
|
||||||
|
|
||||||
## Fora de Escopo
|
|
||||||
|
|
||||||
- compressão otimizada;
|
|
||||||
- assinatura criptográfica;
|
|
||||||
- distribuição incremental;
|
|
||||||
- pipeline completo do builder/packer.
|
|
||||||
|
|
||||||
## Critério de Saida Desta Agenda
|
|
||||||
|
|
||||||
Pode virar PR quando houver definição escrita de:
|
|
||||||
|
|
||||||
- formato do `.pmc`;
|
|
||||||
- arquivos obrigatórios;
|
|
||||||
- erros canônicos;
|
|
||||||
- invariantes de segurança;
|
|
||||||
- estratégia de testes de compatibilidade entre diretório e pacote.
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0004
|
|
||||||
ticket: system-fault-semantics-and-control-surface
|
|
||||||
title: Agenda - System Fault Semantics and Control Surface
|
|
||||||
status: open
|
|
||||||
created: 2026-03-27
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: []
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - System Fault Semantics and Control Surface
|
|
||||||
|
|
||||||
## Problema
|
|
||||||
|
|
||||||
O dominio `system` e pequeno, mas mistura consulta simples com superficie de controle de fluxo.
|
|
||||||
|
|
||||||
Hoje:
|
|
||||||
|
|
||||||
- `SystemHasCart` responde diretamente;
|
|
||||||
- `SystemRunCart` ainda nao tem efeito real;
|
|
||||||
- a agenda `009` resolve semantica funcional, mas nao fecha por si so a politica de fault do dominio.
|
|
||||||
|
|
||||||
## Dor
|
|
||||||
|
|
||||||
- sem uma agenda propria, `system` pode herdar fault semantics por acidente;
|
|
||||||
- `run_cart` pode acabar consolidando `Panic` ou `Trap` onde deveria existir retorno operacional;
|
|
||||||
- a fronteira entre falha do app, falha do firmware e falha do runtime fica opaca.
|
|
||||||
|
|
||||||
## Hotspots Atuais
|
|
||||||
|
|
||||||
- [dispatch.rs](/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-system/src/virtual_machine_runtime/dispatch.rs#L114)
|
|
||||||
- [system.rs](/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/crates/console/prometeu-hal/src/syscalls/domains/system.rs#L4)
|
|
||||||
- [009-system-run-cart.md](/Users/niltonconstantino/personal/workspace.personal/intrepid/prometeu/runtime/docs/runtime/agendas/009-system-run-cart.md)
|
|
||||||
|
|
||||||
## Alvo da Discussao
|
|
||||||
|
|
||||||
Fechar a politica de fault e retorno do dominio `system`.
|
|
||||||
|
|
||||||
## O Que Precisa Ser Definido
|
|
||||||
|
|
||||||
1. Queries simples.
|
|
||||||
Decidir a politica de fault para consultas como `has_cart`.
|
|
||||||
|
|
||||||
2. `run_cart`.
|
|
||||||
Decidir como falhas operacionais de transicao devem ser expostas:
|
|
||||||
- `status`;
|
|
||||||
- `Trap`;
|
|
||||||
- `Panic`.
|
|
||||||
|
|
||||||
3. Relacao com firmware.
|
|
||||||
Delimitar quando a falha pertence ao app, ao firmware ou ao runtime.
|
|
||||||
|
|
||||||
## Dependencias
|
|
||||||
|
|
||||||
- `../specs/16a-syscall-policies.md`
|
|
||||||
- `009-system-run-cart.md`
|
|
||||||
|
|
||||||
## Critério de Saida Desta Agenda
|
|
||||||
|
|
||||||
Pode virar PR quando houver decisao escrita sobre:
|
|
||||||
|
|
||||||
- matriz de `status`/`Trap`/`Panic` para `system`;
|
|
||||||
- politica de retorno/falha de `run_cart`;
|
|
||||||
- relacao com firmware e crash surface.
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0005
|
|
||||||
ticket: vm-owned-random-service
|
|
||||||
title: Agenda - VM-Owned Random Service
|
|
||||||
status: open
|
|
||||||
created: 2026-03-27
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: []
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - VM-Owned Random Service
|
|
||||||
|
|
||||||
## Problema
|
|
||||||
|
|
||||||
Precisamos de random como primeiro consumidor stateful VM-owned, mas sem fechar um contrato minimo o dominio pode nascer incoerente e nao deterministico.
|
|
||||||
|
|
||||||
## Alvo da Discussao
|
|
||||||
|
|
||||||
Fechar o perfil minimo de random VM-owned em cima do core definido na decisao `006`.
|
|
||||||
|
|
||||||
## O Que Precisa Ser Definido
|
|
||||||
|
|
||||||
1. Surface minima do servico.
|
|
||||||
Fechar operacoes como:
|
|
||||||
- `new(seed) -> rng_ref`;
|
|
||||||
- `next(rng_ref) -> int`;
|
|
||||||
- `destroy(rng_ref)`.
|
|
||||||
|
|
||||||
2. Determinismo e replay.
|
|
||||||
Definir:
|
|
||||||
- seed explicita obrigatoria;
|
|
||||||
- regra de reproducao frame a frame;
|
|
||||||
- comportamento esperado em replay.
|
|
||||||
|
|
||||||
3. Lifecycle e validade.
|
|
||||||
Definir:
|
|
||||||
- como lidar com `rng_ref` invalido/stale;
|
|
||||||
- relacao com GC;
|
|
||||||
- destruicao explicita vs cleanup por GC.
|
|
||||||
|
|
||||||
4. Fault/status do dominio.
|
|
||||||
Definir:
|
|
||||||
- quais erros sao `status`;
|
|
||||||
- quais casos viram `Trap`;
|
|
||||||
- inexistencia de `Panic` operacional.
|
|
||||||
|
|
||||||
5. Metadados e versionamento.
|
|
||||||
Definir IDs/version das operacoes de random para garantir mapeamento 1:1 FE/backend/runtime.
|
|
||||||
|
|
||||||
## Open Questions de Arquitetura
|
|
||||||
|
|
||||||
1. v1 aceita apenas modo deterministico por seed ou tambem entropy host?
|
|
||||||
2. `next` retorna apenas `int` ou precisamos variantes (`u32`, `float`) no mesmo ciclo?
|
|
||||||
3. precisamos de clone/split de gerador no MVP?
|
|
||||||
4. destruicao explicita deve ser obrigatoria para certificacao/custo ou opcional?
|
|
||||||
|
|
||||||
## Dependencias
|
|
||||||
|
|
||||||
- `../decisions/006-vm-owned-stateful-core-contract.md`
|
|
||||||
- `../virtual-machine/ISA_CORE.md`
|
|
||||||
- `../specs/16-host-abi-and-syscalls.md`
|
|
||||||
- `../specs/16a-syscall-policies.md`
|
|
||||||
|
|
||||||
## Fora de Escopo
|
|
||||||
|
|
||||||
- entropy nao deterministica como contrato base;
|
|
||||||
- PRNGs multiplos no mesmo ciclo de fechamento;
|
|
||||||
- APIs de colecoes stateful;
|
|
||||||
- window/app model.
|
|
||||||
|
|
||||||
## Criterio de Saida Desta Agenda
|
|
||||||
|
|
||||||
Pode virar PR quando houver decisao escrita sobre:
|
|
||||||
|
|
||||||
- surface minima de random VM-owned;
|
|
||||||
- contrato de determinismo/replay;
|
|
||||||
- fault/status de random;
|
|
||||||
- IDs/versionamento e validacoes de verifier para as operacoes do dominio.
|
|
||||||
@@ -1,157 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0006
|
|
||||||
ticket: app-home-filesystem-surface-and-semantics
|
|
||||||
title: Agenda - App Home Filesystem Surface and Semantics
|
|
||||||
status: open
|
|
||||||
created: 2026-03-27
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: []
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - App Home Filesystem Surface and Semantics
|
|
||||||
|
|
||||||
## Problema
|
|
||||||
|
|
||||||
Apps precisam de filesystem util para dados de usuario, cache e configuracao, mas sem acesso ao FS inteiro do host.
|
|
||||||
|
|
||||||
Sem um contrato claro de `home` por app, a API tende a crescer com semantica inconsistente entre plataformas.
|
|
||||||
|
|
||||||
## Inputs Ja Fechados
|
|
||||||
|
|
||||||
1. Todo `app` acessa somente sua `home` logica.
|
|
||||||
2. Nunca ha acesso direto ao filesystem global do host pela userland.
|
|
||||||
3. O runtime `fs` interno continua cobrindo tanto `game` quanto `app`.
|
|
||||||
4. Existe uma async IO lane compartilhavel por assets, memcard e FS. Esta
|
|
||||||
agenda deve decidir a API publica de FS considerando essa lane, mas a
|
|
||||||
existencia da lane ja esta fechada por `DEC-0034`.
|
|
||||||
|
|
||||||
## Fronteira com a Async IO Lane
|
|
||||||
|
|
||||||
`DEC-0034` fecha a existencia de uma lane serial para trabalho async de IO. FS
|
|
||||||
pode consumir essa lane internamente para escrita, configuracao, leitura ou
|
|
||||||
listagem, conforme prioridade operacional definida pelo runtime.
|
|
||||||
|
|
||||||
Esta agenda continua dona da decisao sobre API publica de FS para `app home`.
|
|
||||||
Portanto, a existencia da lane nao implica criar agora request handles, polling
|
|
||||||
publico ou novas syscalls de FS. Esses shapes permanecem em aberto aqui.
|
|
||||||
|
|
||||||
## Alvo da Discussao
|
|
||||||
|
|
||||||
Fechar a superficie e semantica funcional de `fs` para perfil `app`, com sandbox por `app_id` e transporte de bytes via decisao `003`.
|
|
||||||
|
|
||||||
## O Que Precisa Ser Definido
|
|
||||||
|
|
||||||
1. Surface minima do perfil `app`.
|
|
||||||
Operacoes candidatas:
|
|
||||||
- `read`;
|
|
||||||
- `write`;
|
|
||||||
- `exists`;
|
|
||||||
- `stat`;
|
|
||||||
- `list_dir`;
|
|
||||||
- `delete`;
|
|
||||||
- `mkdir`;
|
|
||||||
- `rename`.
|
|
||||||
|
|
||||||
2. Modelo de caminho logico.
|
|
||||||
Definir:
|
|
||||||
- raiz virtual (`home`);
|
|
||||||
- normalizacao de path;
|
|
||||||
- bloqueio de path traversal;
|
|
||||||
- limites de profundidade/tamanho.
|
|
||||||
|
|
||||||
3. Mapeamento host.
|
|
||||||
Definir:
|
|
||||||
- como `home` vira caminho fisico no host;
|
|
||||||
- isolamento entre apps por `app_id`;
|
|
||||||
- regras de portabilidade entre hosts.
|
|
||||||
|
|
||||||
4. Semantica de leitura/escrita.
|
|
||||||
Definir:
|
|
||||||
- leitura total vs parcial;
|
|
||||||
- overwrite vs append;
|
|
||||||
- truncation;
|
|
||||||
- criacao implicita;
|
|
||||||
- escrita atomica por arquivo (quando aplicavel).
|
|
||||||
|
|
||||||
5. Quotas e capacidade.
|
|
||||||
Definir:
|
|
||||||
- se v1 tem quota por app;
|
|
||||||
- comportamento para `storage full`;
|
|
||||||
- exposicao de metrica de uso livre/ocupado.
|
|
||||||
|
|
||||||
6. Metadados e listagem.
|
|
||||||
Definir:
|
|
||||||
- campos minimos de `stat`;
|
|
||||||
- shape canonico de `list_dir`;
|
|
||||||
- timestamps (sim/nao e com qual garantia).
|
|
||||||
|
|
||||||
7. Fault/status do dominio.
|
|
||||||
Fechar fronteira de:
|
|
||||||
- `status` operacional;
|
|
||||||
- `Trap` estrutural;
|
|
||||||
- `Panic` interno.
|
|
||||||
E obrigatorio fechar, por operacao, a matriz final de retorno e fault class.
|
|
||||||
|
|
||||||
## Responsabilidade Absorvida da Agenda 003
|
|
||||||
|
|
||||||
No perfil `app` (`home` sandbox), esta agenda passa a ser a fonte normativa para:
|
|
||||||
|
|
||||||
1. Catalogo de `status` de filesystem para app.
|
|
||||||
Minimo esperado:
|
|
||||||
- `OK`;
|
|
||||||
- `NOT_FOUND`;
|
|
||||||
- `PATH_INVALID`;
|
|
||||||
- `ACCESS_DENIED`;
|
|
||||||
- `NO_SPACE`;
|
|
||||||
- `ALREADY_EXISTS`;
|
|
||||||
- `UNAVAILABLE`.
|
|
||||||
|
|
||||||
2. Matriz por operacao (`read`, `write`, `exists`, `stat`, `list_dir`, `delete`, `mkdir`, `rename`).
|
|
||||||
Para cada caso, classificar explicitamente:
|
|
||||||
- `status`;
|
|
||||||
- `Trap`;
|
|
||||||
- `Panic`.
|
|
||||||
|
|
||||||
3. Shape de retorno por operacao.
|
|
||||||
Definir, no minimo:
|
|
||||||
- `status` como primeiro retorno;
|
|
||||||
- `bytes_transferred` em `read`/`write` quando aplicavel;
|
|
||||||
- payload de metadados/listagem com formato canonico.
|
|
||||||
|
|
||||||
4. Regra de escrita parcial.
|
|
||||||
`write` nao pode reportar sucesso parcial silencioso.
|
|
||||||
Quando a operacao nao puder ser concluida conforme contrato, deve retornar falha de dominio.
|
|
||||||
|
|
||||||
## Open Questions de Arquitetura
|
|
||||||
|
|
||||||
1. O v1 precisa de quota fixa por app ou apenas limites fisicos do host?
|
|
||||||
2. `rename` entra no MVP ou pode ficar para fase seguinte?
|
|
||||||
3. Qual conjunto minimo de metadados garante portabilidade real entre hosts?
|
|
||||||
4. Qual grau de atomicidade e obrigatorio para escrita de arquivo no v1?
|
|
||||||
5. Quais operacoes de FS devem consumir a async IO lane e quais permanecem
|
|
||||||
sincrono-aparentes para a userland?
|
|
||||||
|
|
||||||
## Dependencias
|
|
||||||
|
|
||||||
- `../decisions/003-vm-owned-byte-transfer-protocol.md`
|
|
||||||
- `../decisions/007-filesystem-fault-core-policy.md`
|
|
||||||
- `../specs/13-cartridge.md`
|
|
||||||
- `../specs/12-firmware-pos-and-prometeuhub.md`
|
|
||||||
- `../specs/16a-syscall-policies.md`
|
|
||||||
|
|
||||||
## Fora de Escopo
|
|
||||||
|
|
||||||
- slots de memcard para `game` (fechado na `spec 08`);
|
|
||||||
- acesso cross-app;
|
|
||||||
- sync remoto/cloud;
|
|
||||||
- DB embutido como contrato de plataforma.
|
|
||||||
|
|
||||||
## Criterio de Saida Desta Agenda
|
|
||||||
|
|
||||||
Pode virar PR quando houver decisao escrita sobre:
|
|
||||||
|
|
||||||
- surface minima de `fs` para `app` em `home`;
|
|
||||||
- sandbox e isolamento por `app_id`;
|
|
||||||
- semantica final de path/read/write/listagem;
|
|
||||||
- matriz completa de fault/status para as operacoes do perfil `app`.
|
|
||||||
@@ -1,208 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0048
|
|
||||||
ticket: background-service-audio-execution
|
|
||||||
title: Agenda - Background Service and Audio Execution
|
|
||||||
status: open
|
|
||||||
created: 2026-07-05
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [runtime, os, lifecycle, service, audio, background, architecture]
|
|
||||||
---
|
|
||||||
|
|
||||||
# Agenda - Background Service and Audio Execution
|
|
||||||
|
|
||||||
## Contexto
|
|
||||||
|
|
||||||
O runtime ja tem sinais claros de preparacao para multitarefa controlada:
|
|
||||||
|
|
||||||
- `TaskState::Background` existe como estado de tarefa;
|
|
||||||
- `VmSession` separa estado mutavel de VM por tarefa/processo;
|
|
||||||
- `SystemOS` e dono de lifecycle, task/process, VM sessions, filesystem,
|
|
||||||
memcard, windows e logging;
|
|
||||||
- a spec de eventos separa foreground ownership de execution eligibility;
|
|
||||||
- o contrato atual declara que execucao real em background fica fora do v1, mas
|
|
||||||
o modelo foi desenhado para permitir servicos ou processos de midia no futuro.
|
|
||||||
|
|
||||||
O caso motivador e:
|
|
||||||
|
|
||||||
```text
|
|
||||||
Game foreground -> Home -> music player -> escolher musica -> voltar ao Game
|
|
||||||
```
|
|
||||||
|
|
||||||
Depois disso, o Game deve voltar ao foreground enquanto o player continua
|
|
||||||
executando e produzindo audio junto com audio do Game.
|
|
||||||
|
|
||||||
## Problema
|
|
||||||
|
|
||||||
Hoje o runtime preserva sessoes, mas nao tem contrato para uma sessao continuar
|
|
||||||
executando quando nao e foreground.
|
|
||||||
|
|
||||||
Os pontos atuais que bloqueiam o caso:
|
|
||||||
|
|
||||||
- `TaskKind` so distingue `Game` e `Shell`;
|
|
||||||
- `ProcessKind` so distingue `VmGame`, `VmShell` e `NativeShell`;
|
|
||||||
- `ProcessState` nao possui estado normativo de background-running;
|
|
||||||
- `GameRunningStep` ticka apenas o Game foreground;
|
|
||||||
- `ShellRunningStep` ticka apenas o Shell foreground;
|
|
||||||
- `HubHomeStep` nao ticka sessoes VM em background;
|
|
||||||
- `Audio` e `AudioMixer` usam vozes globais sem namespace por tarefa/sessao;
|
|
||||||
- cada logical frame chama `platform.audio_mut().clear_commands()`, o que torna
|
|
||||||
perigoso tickar dois produtores de audio no mesmo frame;
|
|
||||||
- pausa de lifecycle hoje emite `MasterPause`, afetando o mixer inteiro.
|
|
||||||
|
|
||||||
Sem uma decisao, background service pode virar apenas "tickar mais uma VM", mas
|
|
||||||
isso quebraria isolamento, audio, debugger, lifecycle e previsibilidade.
|
|
||||||
|
|
||||||
## Pontos Criticos
|
|
||||||
|
|
||||||
1. **Execution eligibility nao e foreground.**
|
|
||||||
O contrato atual ja separa os conceitos, mas a implementacao ainda so ticka o
|
|
||||||
owner foreground. Precisamos introduzir uma politica explicita de quem pode
|
|
||||||
executar em background.
|
|
||||||
|
|
||||||
2. **Servico nao e Shell escondido.**
|
|
||||||
Um music player pode ter UI de Shell para escolher musica, mas a reproducao
|
|
||||||
continua como servico quando a UI deixa o foreground. Fechar isso como
|
|
||||||
`Shell` em background confundiria janela, tarefa, sessao e servico.
|
|
||||||
|
|
||||||
3. **Audio precisa de origem.**
|
|
||||||
Hoje `voice_id` e global no mixer. Se Game e player usam `voice_id = 0`, um
|
|
||||||
sobrescreve o outro. Precisamos decidir se o mixer tera namespaces por
|
|
||||||
`AudioOwner`, se servicos terao pool dedicado, ou se o player nao usara a
|
|
||||||
mesma superficie `audio.*`.
|
|
||||||
|
|
||||||
4. **Pausa de Game nao pode pausar servico de midia.**
|
|
||||||
`MasterPause` global serve para o contrato atual de pausa/debug, mas nao
|
|
||||||
expressa "pausar Game audio e manter music player". Pausa precisa virar
|
|
||||||
escopo por origem ou politica de mixer.
|
|
||||||
|
|
||||||
5. **Servico precisa de lifecycle proprio.**
|
|
||||||
Deve existir contrato para start, foreground UI, background-running, stop,
|
|
||||||
crash, terminate, recurso negado, e talvez wake/resume de UI.
|
|
||||||
|
|
||||||
6. **Budget e determinismo precisam ser fechados.**
|
|
||||||
Se servicos rodam junto com Game, precisamos decidir cota por frame, ordem de
|
|
||||||
ticks, starvation, crash isolation, e se background service participa do
|
|
||||||
mesmo tempo deterministico da maquina.
|
|
||||||
|
|
||||||
7. **Sistema de apps precisa descobrir e lancar o player.**
|
|
||||||
Hoje Home lista Game cartridges e tem Shells nativos fixos. O caso de music
|
|
||||||
player exige decidir se ele e cartridge `System`, app instalado, Shell nativo,
|
|
||||||
ou novo perfil `Service`.
|
|
||||||
|
|
||||||
## Opcoes
|
|
||||||
|
|
||||||
### Opcao A - Background Service como novo tipo de processo/sessao
|
|
||||||
|
|
||||||
Criar contrato explicito para `Service`:
|
|
||||||
|
|
||||||
- `TaskKind::Service` ou entidade equivalente;
|
|
||||||
- `ProcessKind::VmService` / `NativeService`;
|
|
||||||
- execution eligibility independente de foreground;
|
|
||||||
- UI de controle opcional via Shell task associada ao servico;
|
|
||||||
- audio com origem por service/session;
|
|
||||||
- lifecycle proprio: start, background, foreground-control, stop, crash.
|
|
||||||
|
|
||||||
**Pros:**
|
|
||||||
- modela diretamente music player e futuros servicos;
|
|
||||||
- preserva a separacao entre UI foreground e execucao;
|
|
||||||
- evita transformar Shell em "processo que tambem e daemon";
|
|
||||||
- facilita quotas, permissao e observabilidade.
|
|
||||||
|
|
||||||
**Contras:**
|
|
||||||
- maior mudanca arquitetural;
|
|
||||||
- exige novo contrato em specs, SystemOS, firmware, audio e testes;
|
|
||||||
- precisa fechar politica de recursos antes de implementar.
|
|
||||||
|
|
||||||
**Manutencao:**
|
|
||||||
- melhor base para crescer com qualidade, desde que o MVP seja pequeno.
|
|
||||||
|
|
||||||
### Opcao B - Shell em background com audio permitido
|
|
||||||
|
|
||||||
Permitir que uma VM Shell continue tickando quando sai do foreground e use audio
|
|
||||||
normalmente.
|
|
||||||
|
|
||||||
**Pros:**
|
|
||||||
- reaproveita Shell, WindowManager e VM session existentes;
|
|
||||||
- menor numero de novos tipos no curto prazo.
|
|
||||||
|
|
||||||
**Contras:**
|
|
||||||
- mistura UI e servico;
|
|
||||||
- torna `TaskState::Background` semantico antes de definir `ProcessState`;
|
|
||||||
- abre precedente para qualquer Shell continuar executando;
|
|
||||||
- nao resolve sozinho namespace de audio, pause por origem, quotas e debugging.
|
|
||||||
|
|
||||||
**Manutencao:**
|
|
||||||
- atraente como atalho, mas tende a espalhar excecoes pela firmware state
|
|
||||||
machine.
|
|
||||||
|
|
||||||
### Opcao C - Audio player como servico nativo OS-owned, sem VM background
|
|
||||||
|
|
||||||
Implementar music player como servico nativo de SystemOS, controlado por uma
|
|
||||||
Shell UI. A reproducao continua no host/OS sem tickar VM em background.
|
|
||||||
|
|
||||||
**Pros:**
|
|
||||||
- entrega o caso de musica com menor risco para scheduler VM;
|
|
||||||
- evita abrir execucao arbitraria de background agora;
|
|
||||||
- audio service pode ser projetado como recurso OS-owned e depois exposto.
|
|
||||||
|
|
||||||
**Contras:**
|
|
||||||
- nao resolve background VM services em geral;
|
|
||||||
- player deixa de ser app userland completo no primeiro ciclo;
|
|
||||||
- precisa ainda fechar origem/mixagem de audio e relacao com UI.
|
|
||||||
|
|
||||||
**Manutencao:**
|
|
||||||
- bom MVP se o objetivo imediato for media playback, mas deve ser declarado como
|
|
||||||
`media service` nativo, nao como contrato geral de background VM.
|
|
||||||
|
|
||||||
## Sugestao / Recomendacao
|
|
||||||
|
|
||||||
Recomendo fechar em duas camadas:
|
|
||||||
|
|
||||||
1. **Decisao de arquitetura:** introduzir o conceito de service/background
|
|
||||||
execution como contrato de SystemOS, separado de foreground Shell e Game.
|
|
||||||
Essa decisao deve definir execution eligibility, lifecycle, quotas, crash
|
|
||||||
policy, controle de UI e relacao com VM sessions.
|
|
||||||
|
|
||||||
2. **MVP de media:** implementar primeiro um `media/audio service` com escopo
|
|
||||||
reduzido, preferencialmente OS-owned ou `Service` bem delimitado, antes de
|
|
||||||
permitir background VM arbitrario.
|
|
||||||
|
|
||||||
Para excelente qualidade, o primeiro plano nao deve tentar "qualquer app em
|
|
||||||
background". O alvo deve ser: um unico servico de audio/midia, com origem de
|
|
||||||
audio propria, controle por Hub/Shell, execucao enquanto Game esta foreground,
|
|
||||||
e testes end-to-end de mistura e lifecycle.
|
|
||||||
|
|
||||||
## Perguntas em Aberto
|
|
||||||
|
|
||||||
- O music player deve ser um cartridge `System`, um novo `Service`, ou um
|
|
||||||
servico nativo do OS controlado por Shell?
|
|
||||||
- A UI do player e a reproducao pertencem a mesma tarefa ou a tarefas
|
|
||||||
separadas?
|
|
||||||
- Um servico pode ter janela foreground temporaria e continuar sem janela?
|
|
||||||
- Quantos servicos background podem existir no MVP: um media service ou N
|
|
||||||
servicos?
|
|
||||||
- O background service recebe ticks todo frame, tick rate reduzido, ou apenas
|
|
||||||
eventos?
|
|
||||||
- O audio mixer deve isolar vozes por `TaskId`, `ProcessId`, `VmSessionId`,
|
|
||||||
`AppId`, ou novo `AudioOwner`?
|
|
||||||
- Como pausar apenas o audio do Game durante Home/debug sem pausar musica?
|
|
||||||
- O debugger inspeciona foreground session apenas ou tambem sessoes background?
|
|
||||||
- Como crash de servico e exibido: toast/log, janela de crash, ou parada
|
|
||||||
silenciosa com diagnostico?
|
|
||||||
- Que capacidades sao necessarias para media service: `audio`, `fs`, `asset`,
|
|
||||||
talvez `background_audio`?
|
|
||||||
|
|
||||||
## Criterio para Encerrar
|
|
||||||
|
|
||||||
Esta agenda pode virar decisao quando houver resposta escrita para:
|
|
||||||
|
|
||||||
- modelo de entidade (`Service` novo vs Shell background vs native OS service);
|
|
||||||
- execution eligibility e ordem de ticks;
|
|
||||||
- lifecycle e estados de task/process;
|
|
||||||
- ownership/namespace de audio e politica de pausa por origem;
|
|
||||||
- relacao entre UI foreground do player e reproducao background;
|
|
||||||
- escopo do MVP e explicitamente o que fica fora;
|
|
||||||
- testes obrigatorios de lifecycle, audio mixing, crash isolation e regressao do
|
|
||||||
contrato Game/Home/Shell existente.
|
|
||||||
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
---
|
|
||||||
id: AGD-0050
|
|
||||||
ticket: portable-host-backend-strategy
|
|
||||||
title: Portable Host Backend Strategy
|
|
||||||
status: open
|
|
||||||
created: 2026-07-14
|
|
||||||
resolved:
|
|
||||||
decision:
|
|
||||||
tags: [host, desktop, portable, sdl, backend, rendering, input, audio, linux, android, handheld]
|
|
||||||
---
|
|
||||||
|
|
||||||
## Contexto
|
|
||||||
|
|
||||||
O runtime ja tem uma fronteira de host relativamente clara: o host desktop atual vive em `crates/host/prometeu-host-desktop-winit`, usando `winit`, `pixels` e `cpal` para janela, apresentacao de framebuffer, input e audio.
|
|
||||||
|
|
||||||
A direcao desejada nao e substituir esse host de forma disruptiva no primeiro corte. A proposta e estudar e construir um segundo host portatil para servir como runtime host em handhelds e consoles portateis, especialmente hardwares chineses que rodam Linux internamente e, em alguns casos, Android customizado. O mesmo host tambem deve servir como base para uma futura versao DIY do hardware, desde que ela rode sobre um Linux base compatível. SDL e a hipotese principal, mas a agenda tambem deve avaliar outras familias de host/backend antes de virar decisao normativa.
|
|
||||||
|
|
||||||
Esse novo host deve conviver com o host atual durante estabilizacao, mas nao e descartavel: ele e candidato a se tornar o host principal quando provar paridade e estabilidade.
|
|
||||||
|
|
||||||
A troca deve ficar isolada no dominio de host: contratos de runtime, firmware, frame, input semantico e audio semantico nao devem mudar por causa da escolha de backend. Essa separacao e justamente o objetivo arquitetural que permite que um host portatil evolua para principal sem arrastar o runtime.
|
|
||||||
|
|
||||||
## Problema
|
|
||||||
|
|
||||||
Hoje a existencia de um unico host desktop torna dificil separar problemas do runtime de problemas do adaptador de plataforma. Um novo host portatil pode ajudar em testes, portabilidade, comparacao operacional e reducao de dependencia de uma pilha unica de janela/render/audio. O alvo "mobile" desta agenda nao significa telefone/tablet como produto primario; significa hardware portatil dedicado, geralmente com controles fisicos, framebuffer/display integrado, Linux customizado e distribuicao fora do modelo desktop tradicional. O alvo tambem inclui um possivel handheld DIY futuro, em que o valor esperado e ja existir um host pronto se o dispositivo expuser um Linux base suficiente.
|
|
||||||
|
|
||||||
O risco e tratar uma tecnologia especifica como resposta antes de comparar os requisitos reais de Linux handheld e Android. A agenda precisa cravar o modelo de host paralelo em estabilizacao, com destino de host principal, e entao escolher a familia de backend que melhor atende esse objetivo.
|
|
||||||
|
|
||||||
## Pontos Criticos
|
|
||||||
|
|
||||||
- A troca de host deve ser simples e local ao host, sem exigir mudancas em runtime, firmware, asset protocol, render packet, VM ou syscalls.
|
|
||||||
- O novo host precisa consumir as mesmas saidas canonicas do runtime: frames RGBA8888, comandos semanticos de audio e eventos de input normalizados.
|
|
||||||
- A estrategia deve preservar o host `winit` enquanto o novo host ainda nao provar equivalencia operacional, mas o novo host e candidato a virar o host principal depois dessa prova.
|
|
||||||
- O alvo primario e portabilidade operacional para handhelds Linux e consoles portateis com controles fisicos; Android customizado e um alvo possivel que deve influenciar a escolha de API, packaging e input/audio.
|
|
||||||
- O host portatil deve ser viavel em um futuro hardware DIY rodando Linux base, sem exigir um runtime especial ou fork de contratos.
|
|
||||||
- Testes devem distinguir contrato comum de host de detalhes especificos de backend.
|
|
||||||
- SDL2 pode ter ecossistema Rust mais estabelecido; SDL3 pode estar mais alinhado com a direcao upstream. A escolha da versao e uma pergunta separada da decisao de criar um segundo host.
|
|
||||||
- A arquitetura deve evitar duplicar logica de runtime loop, pacing, debugger, stats e presentation policy quando essa logica for comum a qualquer host.
|
|
||||||
- Outras familias de host tambem devem ser avaliadas: evoluir `winit`, SDL2/SDL3, backend Android nativo, ou uma camada multiplataforma alternativa.
|
|
||||||
|
|
||||||
## Opcoes
|
|
||||||
|
|
||||||
### Opcao A - Manter apenas o host winit atual
|
|
||||||
|
|
||||||
- **Abordagem:** continuar evoluindo `prometeu-host-desktop-winit` como unico host desktop.
|
|
||||||
- **Pro:** menor custo imediato; evita nova dependencia nativa.
|
|
||||||
- **Con:** mantem a pilha de plataforma unica como ponto de acoplamento pratico.
|
|
||||||
- **Tradeoff:** bom para estabilidade curta, fraco para provar independencia real do host.
|
|
||||||
|
|
||||||
### Opcao B - Migrar diretamente do host winit para outro backend
|
|
||||||
|
|
||||||
- **Abordagem:** substituir o host desktop atual por um novo backend portatil assim que a escolha tecnologica for feita.
|
|
||||||
- **Pro:** reduz a manutencao para um unico host depois da migracao.
|
|
||||||
- **Con:** aumenta risco de regressao e mistura decisao de backend com mudanca operacional.
|
|
||||||
- **Tradeoff:** so faz sentido depois de prova local de superioridade e paridade, o que ainda nao existe.
|
|
||||||
|
|
||||||
### Opcao C - Criar um host SDL paralelo com destino de principal
|
|
||||||
|
|
||||||
- **Abordagem:** adicionar um novo crate/binario de host SDL que implemente os mesmos contratos externos do host atual, mantendo `winit` como referencia e rollback ate haver evidencia de equivalencia.
|
|
||||||
- **Pro:** permite teste A/B, reduz risco, valida se a fronteira de host esta realmente limpa, atende a meta de handheld Linux/Android customizado/DIY e preserva caminho para tornar SDL o host principal.
|
|
||||||
- **Con:** aumenta temporariamente manutencao e exige fatorar partes comuns se houver duplicacao.
|
|
||||||
- **Tradeoff:** melhor caminho para chegar a um host principal portatil sem reabrir runtime.
|
|
||||||
|
|
||||||
### Opcao D - Evoluir winit/pixels/cpal como host portatil
|
|
||||||
|
|
||||||
- **Abordagem:** manter a familia atual e investir em configuracao, input, fullscreen, packaging e compatibilidade de Linux handheld/Android/DIY dentro dela.
|
|
||||||
- **Pro:** reaproveita o host existente e reduz dependencias nativas novas.
|
|
||||||
- **Con:** pode nao resolver os problemas praticos de distribuicao, gamepad/device handling, fullscreen/scaling, Android customizado e ambientes handheld.
|
|
||||||
- **Tradeoff:** forte se a pilha atual suportar bem os alvos; fraco se o problema real for portabilidade operacional.
|
|
||||||
|
|
||||||
### Opcao E - Host Android nativo separado
|
|
||||||
|
|
||||||
- **Abordagem:** tratar Linux handheld e Android como hosts diferentes: SDL ou winit para Linux; Android com camada nativa/propria quando o alvo amadurecer.
|
|
||||||
- **Pro:** permite respeitar o ciclo de vida, packaging, input e audio do Android sem contaminar o host Linux.
|
|
||||||
- **Con:** duplica mais superficie e adia a promessa de um host portatil unico.
|
|
||||||
- **Tradeoff:** bom se Android tiver requisitos proprios demais; ruim se SDL conseguir cobrir Android bem o bastante.
|
|
||||||
|
|
||||||
### Opcao F - Camada multiplataforma alternativa
|
|
||||||
|
|
||||||
- **Abordagem:** avaliar alternativas como uma camada Rust-first ou game-framework-level para janela, input, audio e render.
|
|
||||||
- **Pro:** pode reduzir FFI nativa e integrar melhor com Cargo.
|
|
||||||
- **Con:** pode ser menos madura para Linux handheld/Android real, packaging e controles.
|
|
||||||
- **Tradeoff:** deve ser considerada, mas precisa provar vantagem concreta sobre SDL para justificar risco.
|
|
||||||
|
|
||||||
## Sugestao / Recomendacao
|
|
||||||
|
|
||||||
Recomendacao inicial: manter a **Opcao C** como favorita, mas ampliar a fase de agenda para comparar SDL com as demais familias de host antes da decisao. O resultado desejado continua sendo um segundo host portatil, inicialmente paralelo, com destino explicito de se tornar o host principal quando atingir paridade e estabilidade.
|
|
||||||
|
|
||||||
O caminho recomendado e:
|
|
||||||
|
|
||||||
1. Definir o contrato minimo de equivalencia entre hosts: janela, framebuffer RGBA8888, input, audio, pacing, debugger/logs e encerramento.
|
|
||||||
2. Identificar o que e comum ao host e o que e backend especifico.
|
|
||||||
3. Comparar as familias candidatas contra esse contrato: SDL2, SDL3, winit atual evoluido, Android nativo separado e alternativas Rust-first.
|
|
||||||
4. Implementar o candidato escolhido como novo crate/binario sem remover `prometeu-host-desktop-winit`.
|
|
||||||
5. Permitir troca simples por binario/comando/feature, mantendo o runtime cego para a escolha.
|
|
||||||
6. Tratar handheld Linux como alvo primario de produto para esse host; tratar Android customizado e DIY Linux como restricoes de desenho quando afetarem backend, packaging, input, audio ou boot/runtime integration.
|
|
||||||
7. Promover o novo host a principal apenas depois de evidencia de estabilidade e paridade.
|
|
||||||
|
|
||||||
## Perguntas em Aberto
|
|
||||||
|
|
||||||
- [ ] A primeira implementacao SDL deve usar SDL2 ou SDL3?
|
|
||||||
- [ ] SDL deve ser a familia escolhida, ou winit evoluido, Android nativo separado ou outra camada oferece melhor caminho?
|
|
||||||
- [ ] A selecao do host deve ser por binario separado, feature Cargo, parametro CLI, ou combinacao desses mecanismos?
|
|
||||||
- [ ] Qual e o menor conjunto de comportamento que define paridade aceitavel com o host winit?
|
|
||||||
- [ ] Quais partes do host atual devem virar modulo comum antes do SDL, e quais devem ser duplicadas primeiro para evitar abstracao prematura?
|
|
||||||
- [ ] O host SDL deve reutilizar `cpal` para audio inicialmente ou usar audio SDL desde o primeiro corte?
|
|
||||||
- [ ] Quais familias de hardware handheld Linux devem ser usadas como referencia inicial?
|
|
||||||
- [ ] Handheld Linux exige controles/gamepad, fullscreen, scaling, latency, sleep/resume, framebuffer/display mode ou packaging especificos desde o primeiro corte?
|
|
||||||
- [ ] Qual e o "Linux base" minimo que um futuro hardware DIY precisaria expor para rodar o host portatil sem fork?
|
|
||||||
- [ ] Android customizado deve ser criterio de escolha entre SDL2 e SDL3 agora, ou deve ficar como compatibilidade futura?
|
|
||||||
- [ ] Como validar input e pacing de forma automatizada sem depender de janela real em CI?
|
|
||||||
- [ ] O nome do crate deve ser `prometeu-host-desktop-sdl`, `prometeu-host-desktop-sdl2`, ou algo neutro a versao?
|
|
||||||
|
|
||||||
## Criterio para Encerrar
|
|
||||||
|
|
||||||
A agenda pode virar decision quando estiver claro:
|
|
||||||
|
|
||||||
- se o novo host sera paralelo em estabilizacao, com destino de host principal;
|
|
||||||
- qual familia de backend sera alvo inicial;
|
|
||||||
- se SDL for escolhido, qual versao SDL sera alvo inicial;
|
|
||||||
- como a selecao/troca de host deve funcionar;
|
|
||||||
- quais contratos sao comuns e proibidos de mudar;
|
|
||||||
- quais requisitos minimos de handheld Linux e possivel Android customizado entram no primeiro plano;
|
|
||||||
- qual contrato minimo de Linux base mantem aberta a opcao de hardware DIY;
|
|
||||||
- qual evidencia minima prova paridade suficiente para iniciar planos de implementacao.
|
|
||||||
|
|
||||||
## Discussion
|
|
||||||
|
|
||||||
Ponto inicial aceito pelo usuario: a intencao e ter um segundo host para testes, com troca simples e facil, aproveitando o trabalho ja feito para isolar essa troca no host sem envolver runtime ou outros dominios.
|
|
||||||
|
|
||||||
Atualizacao de escopo: o novo host nao e descartavel. O objetivo e servir como runtime host para sistemas Linux rodando em consoles portateis e hardwares handheld chineses, e possivelmente Android customizado. Assim que estiver estavel, ele deve poder virar o host principal.
|
|
||||||
|
|
||||||
Atualizacao de escopo: outras familias de host/backend tambem devem viver nesta agenda. SDL segue como hipotese forte, mas a decisao deve comparar opcoes antes de cravar a tecnologia.
|
|
||||||
|
|
||||||
Clarificacao: "mobile" nesta agenda nao se refere primariamente a telefone/tablet. O foco sao dispositivos portateis dedicados com Linux interno ou Android customizado, geralmente com controles fisicos e ambiente de distribuicao proprio.
|
|
||||||
|
|
||||||
Clarificacao: a agenda tambem deve preservar a opcao de um futuro hardware DIY. A premissa desejada e que, se esse hardware expuser um Linux base suficiente, o runtime ja tenha um host portatil pronto para rodar nele.
|
|
||||||
|
|
||||||
## Resolution
|
|
||||||
@@ -75,7 +75,9 @@ palette, host presentation, or compatibility contract.
|
|||||||
|
|
||||||
### Published owned frame
|
### Published owned frame
|
||||||
|
|
||||||
The canonical worker-published frame value is `OwnedRgba8888Frame`.
|
The canonical published frame value is `OwnedRgba8888Frame`. It is produced by
|
||||||
|
either the local synchronous consumer or the asynchronous render worker; the
|
||||||
|
consumer path does not change the frame contract.
|
||||||
|
|
||||||
`OwnedRgba8888Frame` contains:
|
`OwnedRgba8888Frame` contains:
|
||||||
|
|
||||||
@@ -184,6 +186,13 @@ producer path MUST remain non-blocking with respect to worker rasterization and
|
|||||||
host present. A slow worker can cause replacement/drop telemetry, but it MUST
|
host present. A slow worker can cause replacement/drop telemetry, but it MUST
|
||||||
NOT create an unbounded queue or stall VM logical frame production.
|
NOT create an unbounded queue or stall VM logical frame production.
|
||||||
|
|
||||||
|
A local synchronous consumer consumes the same immutable `RenderSubmission`
|
||||||
|
through the same render backend and publishes the same canonical
|
||||||
|
`OwnedRgba8888Frame` before returning. It does not use the asynchronous
|
||||||
|
single-slot handoff and therefore does not weaken or reinterpret the worker's
|
||||||
|
non-blocking producer contract. A host may select this path when an explicit
|
||||||
|
synchronous observation boundary is part of its host contract.
|
||||||
|
|
||||||
### 4.4 Frame pacing
|
### 4.4 Frame pacing
|
||||||
|
|
||||||
Game logical frames are paced by the runtime frame scheduler, not by render
|
Game logical frames are paced by the runtime frame scheduler, not by render
|
||||||
|
|||||||
@@ -81,6 +81,25 @@ When the host activates instruction-level inspection, it may observe:
|
|||||||
- operand stack
|
- operand stack
|
||||||
- call stack
|
- call stack
|
||||||
|
|
||||||
|
### 3.3 Debugger and Headless Semantic Alignment
|
||||||
|
|
||||||
|
Interactive debugging and deterministic headless automation share runtime
|
||||||
|
meanings even though their transports and pacing differ:
|
||||||
|
|
||||||
|
| Runtime meaning | Debugger command/observation | Headless operation |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Pause active VM execution | `pause` | `pause()` |
|
||||||
|
| Resume active VM execution | `resume` | `resume()` |
|
||||||
|
| Execute one VM instruction and remain paused | `step` | `step()` |
|
||||||
|
| Complete one logical frame and remain paused | `stepFrame` | `advance_frame()` |
|
||||||
|
| Read overlapping execution state | `getState` | `get_state()` |
|
||||||
|
| Observe structured current fault | event/current state | `get_fault()` |
|
||||||
|
| Inject normalized input | not defined by the debugger protocol | `set_input()` |
|
||||||
|
| Reset the machine execution | not defined by the debugger protocol | `reset()` |
|
||||||
|
| Capture the canonical published frame | not defined by the debugger protocol | `capture_frame()` |
|
||||||
|
|
||||||
|
The headless API does not define or extend an external automation protocol.
|
||||||
|
|
||||||
## 4 State Inspection Boundary
|
## 4 State Inspection Boundary
|
||||||
|
|
||||||
Detailed state inspection is a host-owned concern. The runtime may expose deterministic machine state to host tooling, but this chapter does not define a general guest ABI for introspection convenience.
|
Detailed state inspection is a host-owned concern. The runtime may expose deterministic machine state to host tooling, but this chapter does not define a general guest ABI for introspection convenience.
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ Hardware differences:
|
|||||||
The graphics system:
|
The graphics system:
|
||||||
|
|
||||||
- produces typed logical render submissions that render to RGBA8888 output
|
- produces typed logical render submissions that render to RGBA8888 output
|
||||||
- may consume Game submissions through a render worker that publishes owned
|
- consumes Game submissions through either a local synchronous consumer or a
|
||||||
`OwnedRgba8888Frame` values
|
render worker, both of which publish owned `OwnedRgba8888Frame` values
|
||||||
- uses an indexed palette
|
- uses an indexed palette
|
||||||
- does not depend on a specific GPU
|
- does not depend on a specific GPU
|
||||||
|
|
||||||
@@ -128,8 +128,8 @@ The platform layer:
|
|||||||
- exposes typed service facades for render submission, render backend
|
- exposes typed service facades for render submission, render backend
|
||||||
execution, Game 2D composition, input, audio, assets, and telemetry
|
execution, Game 2D composition, input, audio, assets, and telemetry
|
||||||
- consumes closed render submissions through a render-surface implementation
|
- consumes closed render submissions through a render-surface implementation
|
||||||
- transports published RGBA8888 output or worker-published
|
- transports published `OwnedRgba8888Frame` pixels into a host presentation
|
||||||
`OwnedRgba8888Frame` pixels into a host presentation surface without
|
surface without
|
||||||
injecting host-owned debug overlay pixels
|
injecting host-owned debug overlay pixels
|
||||||
- is the runtime-facing portability boundary; runtime and firmware code must not
|
- is the runtime-facing portability boundary; runtime and firmware code must not
|
||||||
depend on a monolithic hardware bridge or on a concrete hardware aggregate
|
depend on a monolithic hardware bridge or on a concrete hardware aggregate
|
||||||
@@ -216,3 +216,76 @@ PROMETEU promises:
|
|||||||
|
|
||||||
- **identical logical behavior**
|
- **identical logical behavior**
|
||||||
- **reproducible technical decisions**
|
- **reproducible technical decisions**
|
||||||
|
|
||||||
|
## 13 Deterministic Headless Control
|
||||||
|
|
||||||
|
The headless host is a separate, generic Prometeu host for in-process
|
||||||
|
automation. It runs the same directory cartridge, firmware, active VM session,
|
||||||
|
capability checks, normalized input, render submissions, and fault model as an
|
||||||
|
interactive host. A cartridge cannot detect or request headless execution, and
|
||||||
|
headless execution grants no additional guest capability.
|
||||||
|
|
||||||
|
The headless host requires no native window, display server, physical input,
|
||||||
|
physical audio device, or realtime frame pacing. It uses the explicit local
|
||||||
|
synchronous Game render consumer. A successful logical-frame advance returns
|
||||||
|
only after the exact canonical `OwnedRgba8888Frame` for that advance has been
|
||||||
|
published. It does not start or wait for an asynchronous render worker, and
|
||||||
|
publication correctness does not use spinning, yielding, sleeping, or a
|
||||||
|
wall-clock timeout.
|
||||||
|
|
||||||
|
### 13.1 Control contract
|
||||||
|
|
||||||
|
- `boot(path)` loads a normal directory cartridge and stops on entry to
|
||||||
|
`GameRunning`, before the first game instruction. A second boot attempt
|
||||||
|
requires `reset()` and otherwise returns `AlreadyBooted`.
|
||||||
|
- `reset()` enters the normal firmware reset boundary and clears input, active
|
||||||
|
sessions, structured faults, and headless frame correlation. Capture is
|
||||||
|
unavailable until the new run completes a frame.
|
||||||
|
- `pause()` and `resume()` control the active VM session. `step()` executes one
|
||||||
|
VM instruction and finishes paused without reporting a completed logical
|
||||||
|
frame.
|
||||||
|
- `set_input()` retains one complete `InputSignals` snapshot, including the
|
||||||
|
digital pad and touch signal/coordinates. `clear_input()` restores its
|
||||||
|
default. The normal begin-frame input sampling defined by the input
|
||||||
|
peripheral derives `pressed`, `released`, `down`, and `hold` state.
|
||||||
|
- `advance_frame()` advances internal firmware ticks until exactly one logical
|
||||||
|
frame closes through `FrameSync` or `EndOfRom`, or until a structured fault or
|
||||||
|
lifecycle termination prevents completion. Internal cycle-slice exhaustion
|
||||||
|
continues the same frame; it is not itself a frame boundary.
|
||||||
|
- `advance_frames(n)` is repeated `advance_frame()`. It reports the requested
|
||||||
|
and completed counts plus completed-all, fault, or termination. Zero is a
|
||||||
|
no-op; fault or termination preserves partial completed progress.
|
||||||
|
- A frame advance finishes paused and clears its host-owned debug-step request,
|
||||||
|
including when lifecycle termination interrupts the advance. Guest faults
|
||||||
|
are outcomes represented by `CrashReport`; host precondition and publication
|
||||||
|
failures are host errors. A deterministic headless-host watchdog also bounds
|
||||||
|
the number of firmware ticks spent advancing one logical frame. Its limit is
|
||||||
|
tooling policy, not a guest cycle budget, runtime fault, or wall-clock
|
||||||
|
performance requirement.
|
||||||
|
- `capture_frame()` returns an owned clone of the canonical frame paired with
|
||||||
|
the latest successful advance. The explicit `{logical_frame_index, FrameId}`
|
||||||
|
pair is authoritative; no numeric equality or fixed offset is implied.
|
||||||
|
- `get_state()` classifies execution as running, paused, terminated, or faulted
|
||||||
|
and exposes the overlapping debugger state. `get_fault()` returns structured
|
||||||
|
`CrashReport` data rather than requiring log or summary parsing.
|
||||||
|
- Valid audio commands pass through normal runtime semantics. The headless host
|
||||||
|
drains them into a null/discard sink; it does not synthesize PCM or require an
|
||||||
|
output device.
|
||||||
|
|
||||||
|
### 13.2 Deterministic oracle
|
||||||
|
|
||||||
|
Deterministic comparison includes the logical-frame index and paired `FrameId`,
|
||||||
|
canonical framebuffer pixels (or a stable pixel hash) and dimensions/stride,
|
||||||
|
guest-visible PC/stack/app state, structured execution status and fault data,
|
||||||
|
and deterministic counters describing simulated execution.
|
||||||
|
|
||||||
|
The oracle excludes wall-clock or boot-time timestamps, real elapsed duration,
|
||||||
|
host CPU time, thread-scheduling measurements, presentation cadence,
|
||||||
|
render-worker timing telemetry, and host-owned identities without simulated
|
||||||
|
machine meaning. The same cartridge, initial machine state, and per-frame input
|
||||||
|
timeline must produce the same included observations on independent runs and
|
||||||
|
after reset.
|
||||||
|
|
||||||
|
AI tooling may consume this generic host API from outside the machine. It does
|
||||||
|
not create an AI mode, testing mode, replay protocol, gameplay introspection
|
||||||
|
surface, or guest capability.
|
||||||
|
|||||||
@@ -50,6 +50,12 @@
|
|||||||
"paths": [
|
"paths": [
|
||||||
"crates/host/prometeu-host-desktop-winit/src/"
|
"crates/host/prometeu-host-desktop-winit/src/"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"host/headless": {
|
||||||
|
"baseline_percent": 80,
|
||||||
|
"paths": [
|
||||||
|
"crates/host/prometeu-host-headless/src/"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user