Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01fab56cc6 | ||
|
|
4f10f6e584
|
||
|
|
e8e4d64e42
|
||
|
|
31ad7f9446
|
||
|
|
6d185ab97e |
@@ -66,3 +66,7 @@ AGENTS.md
|
|||||||
|
|
||||||
.python-version
|
.python-version
|
||||||
.venv
|
.venv
|
||||||
|
|
||||||
|
discussion/*
|
||||||
|
!discussion/lessons/
|
||||||
|
!discussion/lessons/**
|
||||||
|
|||||||
Generated
+1122
-348
File diff suppressed because it is too large
Load Diff
@@ -19,8 +19,8 @@ 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"
|
||||||
clap = { version = "4.5", features = ["derive"] }
|
clap = { version = "4.5", features = ["derive"] }
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -12,3 +12,13 @@ prometeu-drivers = { path = "../../console/prometeu-drivers" }
|
|||||||
prometeu-firmware = { path = "../../console/prometeu-firmware" }
|
prometeu-firmware = { path = "../../console/prometeu-firmware" }
|
||||||
prometeu-hal = { path = "../../console/prometeu-hal" }
|
prometeu-hal = { path = "../../console/prometeu-hal" }
|
||||||
prometeu-system = { path = "../../console/prometeu-system" }
|
prometeu-system = { path = "../../console/prometeu-system" }
|
||||||
|
prometeu-vm = { path = "../../console/prometeu-vm" }
|
||||||
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
serde_json = "1"
|
||||||
|
base64 = "0.22"
|
||||||
|
png = "0.17"
|
||||||
|
getrandom = "0.3"
|
||||||
|
|
||||||
|
[[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,406 @@
|
|||||||
|
//! Versioned external tooling boundary; the host API itself remains synchronous.
|
||||||
|
mod wire;
|
||||||
|
pub use wire::Limits;
|
||||||
|
|
||||||
|
use crate::{AdvanceFrameOutcome, HeadlessHost};
|
||||||
|
use serde_json::{Value, json};
|
||||||
|
use std::io::{self, BufRead, Write};
|
||||||
|
use std::sync::{Arc, Mutex, mpsc};
|
||||||
|
use wire::{CAPABILITIES, Command, Request, WireError};
|
||||||
|
|
||||||
|
#[derive(Default)]
|
||||||
|
struct Control {
|
||||||
|
active: Option<String>,
|
||||||
|
advancing: bool,
|
||||||
|
canceled: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Job {
|
||||||
|
Work(String, Command),
|
||||||
|
Stop(Option<String>),
|
||||||
|
ReadError(io::Error),
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Output<W> {
|
||||||
|
writer: Mutex<W>,
|
||||||
|
session: String,
|
||||||
|
limit: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<W: Write> Output<W> {
|
||||||
|
fn send(&self, value: Value) -> io::Result<()> {
|
||||||
|
let mut bytes = serde_json::to_vec(&value)?;
|
||||||
|
if bytes.len() > self.limit {
|
||||||
|
bytes = serde_json::to_vec(&json!({"type":"response","sessionId":self.session,
|
||||||
|
"requestId":value.get("requestId"),"error":{"code":"response_too_large",
|
||||||
|
"message":"response exceeds configured limit","details":{"maxResponseBytes":self.limit}}}))?;
|
||||||
|
}
|
||||||
|
if bytes.len() > self.limit {
|
||||||
|
return Err(io::Error::other("response limit cannot contain error"));
|
||||||
|
}
|
||||||
|
let mut writer = self.writer.lock().map_err(|_| io::Error::other("output poisoned"))?;
|
||||||
|
writer.write_all(&bytes)?;
|
||||||
|
writer.write_all(b"\n")?;
|
||||||
|
writer.flush()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn reply(&self, id: Option<&str>, result: Result<Value, WireError>) -> io::Result<()> {
|
||||||
|
let mut value = json!({"type":"response","sessionId":self.session,"requestId":id});
|
||||||
|
match result {
|
||||||
|
Ok(r) => value["result"] = r,
|
||||||
|
Err(e) => value["error"] = serde_json::to_value(e)?,
|
||||||
|
}
|
||||||
|
self.send(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum Line {
|
||||||
|
Data(Vec<u8>),
|
||||||
|
Oversized,
|
||||||
|
Truncated,
|
||||||
|
Eof,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Consume at most one line without ever accumulating more than the configured bound.
|
||||||
|
fn read_line(reader: &mut impl BufRead, limit: usize) -> io::Result<Line> {
|
||||||
|
let mut bytes = Vec::new();
|
||||||
|
let mut oversized = false;
|
||||||
|
loop {
|
||||||
|
let chunk = reader.fill_buf()?;
|
||||||
|
if chunk.is_empty() {
|
||||||
|
return Ok(if oversized {
|
||||||
|
Line::Oversized
|
||||||
|
} else if bytes.is_empty() {
|
||||||
|
Line::Eof
|
||||||
|
} else {
|
||||||
|
Line::Truncated
|
||||||
|
});
|
||||||
|
}
|
||||||
|
let newline = chunk.iter().position(|b| *b == b'\n');
|
||||||
|
let length = newline.unwrap_or(chunk.len());
|
||||||
|
if !oversized {
|
||||||
|
if length > limit.saturating_sub(bytes.len()) {
|
||||||
|
oversized = true;
|
||||||
|
bytes.clear();
|
||||||
|
} else {
|
||||||
|
bytes.extend_from_slice(&chunk[..length]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reader.consume(length + usize::from(newline.is_some()));
|
||||||
|
if newline.is_some() {
|
||||||
|
if bytes.last() == Some(&b'\r') {
|
||||||
|
bytes.pop();
|
||||||
|
}
|
||||||
|
return Ok(if oversized { Line::Oversized } else { Line::Data(bytes) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn read_commands<R: BufRead, W: Write>(
|
||||||
|
mut input: R,
|
||||||
|
output: &Output<W>,
|
||||||
|
control: &Mutex<Control>,
|
||||||
|
sender: &mpsc::Sender<Job>,
|
||||||
|
limits: &Limits,
|
||||||
|
) -> io::Result<()> {
|
||||||
|
let mut initialized = false;
|
||||||
|
loop {
|
||||||
|
let bytes = match read_line(&mut input, limits.max_command_bytes)? {
|
||||||
|
Line::Eof => break,
|
||||||
|
Line::Truncated => {
|
||||||
|
output.reply(None, Err(WireError::new("invalid_request", "EOF before LF")))?;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Line::Oversized => {
|
||||||
|
output.reply(
|
||||||
|
None,
|
||||||
|
Err(WireError::new("request_too_large", "command exceeds configured limit")),
|
||||||
|
)?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Line::Data(bytes) => bytes,
|
||||||
|
};
|
||||||
|
let raw: Value = match serde_json::from_slice(&bytes) {
|
||||||
|
Ok(value) => value,
|
||||||
|
Err(error) => {
|
||||||
|
output.reply(None, Err(WireError::new("invalid_request", error.to_string())))?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let id = raw
|
||||||
|
.get("requestId")
|
||||||
|
.and_then(Value::as_str)
|
||||||
|
.filter(|id| wire::valid_id(id))
|
||||||
|
.map(str::to_owned);
|
||||||
|
let request = serde_json::from_value::<Request>(raw)
|
||||||
|
.map_err(|e| WireError::new("invalid_request", e.to_string()))
|
||||||
|
.and_then(wire::parse);
|
||||||
|
let (id, command) = match request {
|
||||||
|
Ok(value) => value,
|
||||||
|
Err(error) => {
|
||||||
|
output.reply(id.as_deref(), Err(error))?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if let Command::Shutdown = command {
|
||||||
|
let mut c = control.lock().unwrap();
|
||||||
|
c.canceled = true;
|
||||||
|
sender.send(Job::Stop(Some(id))).map_err(|_| io::Error::other("execution stopped"))?;
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
if let Command::Initialize(params) = command {
|
||||||
|
let result = if initialized {
|
||||||
|
Err(WireError::new("already_initialized", "session already initialized"))
|
||||||
|
} else if params.protocol_version.major != 1 {
|
||||||
|
Err(WireError::new("incompatible_version", "protocol major must be 1"))
|
||||||
|
} else if params
|
||||||
|
.required_capabilities
|
||||||
|
.iter()
|
||||||
|
.any(|c| !CAPABILITIES.contains(&c.as_str()))
|
||||||
|
{
|
||||||
|
Err(WireError::new("unsupported_capability", "required capability unavailable"))
|
||||||
|
} else {
|
||||||
|
initialized = true;
|
||||||
|
Ok(json!({"protocolVersion":{"major":1,"minor":0},"capabilities":CAPABILITIES}))
|
||||||
|
};
|
||||||
|
output.reply(Some(&id), result)?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if !initialized {
|
||||||
|
output.reply(Some(&id), Err(WireError::new("not_initialized", "initialize first")))?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
let mut c = control.lock().unwrap();
|
||||||
|
if let Command::Cancel(params) = command {
|
||||||
|
let result = if c.advancing && c.active.as_deref() == Some(¶ms.target_request_id) {
|
||||||
|
c.canceled = true;
|
||||||
|
Ok(json!({"targetRequestId":params.target_request_id,"requested":true}))
|
||||||
|
} else {
|
||||||
|
Err(WireError::new("not_cancelable", "no matching active advance"))
|
||||||
|
};
|
||||||
|
output.reply(Some(&id), result)?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if c.active.is_some() {
|
||||||
|
output.reply(Some(&id), Err(WireError::new("busy", "a host operation is active")))?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if let Command::Advance(params) = &command
|
||||||
|
&& params.frames > limits.max_frames
|
||||||
|
{
|
||||||
|
output.reply(
|
||||||
|
Some(&id),
|
||||||
|
Err(WireError::new("limit_exceeded", "frames exceeds maxFrames")),
|
||||||
|
)?;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
c.active = Some(id.clone());
|
||||||
|
c.advancing = matches!(command, Command::Advance(_));
|
||||||
|
c.canceled = false;
|
||||||
|
sender.send(Job::Work(id, command)).map_err(|_| io::Error::other("execution stopped"))?;
|
||||||
|
}
|
||||||
|
let mut c = control.lock().unwrap();
|
||||||
|
c.canceled = true;
|
||||||
|
sender.send(Job::Stop(None)).map_err(|_| io::Error::other("execution stopped"))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn execute<W: Write>(
|
||||||
|
host: &mut HeadlessHost,
|
||||||
|
command: Command,
|
||||||
|
id: &str,
|
||||||
|
output: &Output<W>,
|
||||||
|
control: &Mutex<Control>,
|
||||||
|
) -> io::Result<Result<Value, WireError>> {
|
||||||
|
Ok(match command {
|
||||||
|
Command::Boot(p) => {
|
||||||
|
host.boot(p.path).map(|()| wire::state(host.get_state())).map_err(wire::host_error)
|
||||||
|
}
|
||||||
|
Command::Reset => {
|
||||||
|
host.reset();
|
||||||
|
Ok(wire::state(host.get_state()))
|
||||||
|
}
|
||||||
|
Command::SetInput(p) => {
|
||||||
|
host.set_input(p.into());
|
||||||
|
Ok(json!({}))
|
||||||
|
}
|
||||||
|
Command::ClearInput => {
|
||||||
|
host.clear_input();
|
||||||
|
Ok(json!({}))
|
||||||
|
}
|
||||||
|
Command::GetState => Ok(wire::state(host.get_state())),
|
||||||
|
Command::GetFault => Ok(host.get_fault().as_ref().map(wire::fault).unwrap_or(Value::Null)),
|
||||||
|
Command::Capture => host.capture_frame().map_err(wire::host_error).and_then(wire::capture),
|
||||||
|
Command::Advance(p) => {
|
||||||
|
let mut result = json!({"requested":p.frames,"completed":0,"stop":"completed"});
|
||||||
|
for completed in 0..p.frames {
|
||||||
|
if control.lock().unwrap().canceled {
|
||||||
|
result["stop"] = json!("canceled");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
match host.advance_frame() {
|
||||||
|
Ok(AdvanceFrameOutcome::FrameCompleted { .. }) => {
|
||||||
|
result["completed"] = json!(completed + 1);
|
||||||
|
output.send(
|
||||||
|
json!({"type":"progress","sessionId":output.session,"requestId":id,
|
||||||
|
"requested":p.frames,"completed":completed + 1}),
|
||||||
|
)?;
|
||||||
|
}
|
||||||
|
Ok(AdvanceFrameOutcome::Faulted(report)) => {
|
||||||
|
result["stop"] = json!("faulted");
|
||||||
|
result["fault"] = wire::fault(&report);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Ok(AdvanceFrameOutcome::Terminated) => {
|
||||||
|
result["stop"] = json!("terminated");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Err(error) => {
|
||||||
|
result["stop"] = json!("host_error");
|
||||||
|
result["error"] = serde_json::to_value(wire::host_error(error))?;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(result)
|
||||||
|
}
|
||||||
|
_ => unreachable!("reader handles control commands"),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Serve one process session. The input reader stays responsive while the owner
|
||||||
|
/// executes a frame. On fatal output failure the process caller must exit; a
|
||||||
|
/// blocking OS stdin reader cannot be joined until that input is closed.
|
||||||
|
pub fn serve<R: BufRead + Send + 'static, W: Write + Send + 'static>(
|
||||||
|
input: R,
|
||||||
|
writer: W,
|
||||||
|
limits: Limits,
|
||||||
|
runtime_version: &str,
|
||||||
|
) -> io::Result<()> {
|
||||||
|
limits.validate()?;
|
||||||
|
let mut random = [0u8; 16];
|
||||||
|
getrandom::fill(&mut random).map_err(|e| io::Error::other(e.to_string()))?;
|
||||||
|
let session: String = random.iter().map(|v| format!("{v:02x}")).collect();
|
||||||
|
let output =
|
||||||
|
Arc::new(Output { writer: Mutex::new(writer), session, limit: limits.max_response_bytes });
|
||||||
|
output.send(
|
||||||
|
json!({"type":"hello","sessionId":output.session,"protocolVersion":{"major":1,"minor":0},
|
||||||
|
"runtimeVersion":runtime_version,"capabilities":CAPABILITIES,"limits":limits}),
|
||||||
|
)?;
|
||||||
|
let control = Arc::new(Mutex::new(Control::default()));
|
||||||
|
let (sender, receiver) = mpsc::channel();
|
||||||
|
let reader_output = output.clone();
|
||||||
|
let reader_control = control.clone();
|
||||||
|
let reader = std::thread::spawn(move || {
|
||||||
|
if let Err(error) = read_commands(input, &reader_output, &reader_control, &sender, &limits)
|
||||||
|
{
|
||||||
|
reader_control.lock().unwrap().canceled = true;
|
||||||
|
let _ = sender.send(Job::ReadError(error));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
while let Ok(job) = receiver.recv() {
|
||||||
|
match job {
|
||||||
|
Job::Work(id, command) => {
|
||||||
|
let result = execute(&mut host, command, &id, &output, &control)?;
|
||||||
|
// Release authority under the same lock as response publication:
|
||||||
|
// a client reacting to this reply cannot race a stale busy flag.
|
||||||
|
let mut c = control.lock().unwrap();
|
||||||
|
output.reply(Some(&id), result)?;
|
||||||
|
c.active = None;
|
||||||
|
c.advancing = false;
|
||||||
|
}
|
||||||
|
Job::Stop(id) => {
|
||||||
|
drop(host);
|
||||||
|
if let Some(id) = id {
|
||||||
|
output.reply(Some(&id), Ok(json!({"closed":true})))?;
|
||||||
|
}
|
||||||
|
reader.join().map_err(|_| io::Error::other("input reader panicked"))?;
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
Job::ReadError(error) => return Err(error),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
reader.join().map_err(|_| io::Error::other("input reader panicked"))?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
use std::io::{BufReader, Cursor};
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn bounded_lines_accept_fragmentation_and_recover_after_oversize() {
|
||||||
|
let mut reader = BufReader::with_capacity(2, Cursor::new(b"12345\n123456\nok\r\n"));
|
||||||
|
assert!(matches!(read_line(&mut reader, 5).unwrap(), Line::Data(v) if v == b"12345"));
|
||||||
|
assert!(matches!(read_line(&mut reader, 5).unwrap(), Line::Oversized));
|
||||||
|
assert!(matches!(read_line(&mut reader, 5).unwrap(), Line::Data(v) if v == b"ok"));
|
||||||
|
assert!(matches!(read_line(&mut reader, 5).unwrap(), Line::Eof));
|
||||||
|
assert!(matches!(read_line(&mut Cursor::new(b"no LF"), 10).unwrap(), Line::Truncated));
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn input_snapshot_is_replacement_and_rejects_unknown_fields() {
|
||||||
|
let input: wire::Input = serde_json::from_value(json!({"right":true})).unwrap();
|
||||||
|
let signals: prometeu_hal::InputSignals = input.into();
|
||||||
|
assert!(signals.right_signal);
|
||||||
|
assert!(!signals.left_signal);
|
||||||
|
assert_eq!(signals.x_pos, 0);
|
||||||
|
assert!(serde_json::from_value::<wire::Input>(json!({"rigth":true})).is_err());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn response_limit_counts_the_complete_envelope_and_keeps_correlation() {
|
||||||
|
let output =
|
||||||
|
Output { writer: Mutex::new(Vec::new()), session: "session".into(), limit: 4096 };
|
||||||
|
output.reply(Some("capture"), Ok(json!({"data":"x".repeat(4096)}))).unwrap();
|
||||||
|
let bytes = output.writer.into_inner().unwrap();
|
||||||
|
assert!(bytes.len() <= 4097);
|
||||||
|
let result: Value = serde_json::from_slice(&bytes).unwrap();
|
||||||
|
assert_eq!(result["requestId"], "capture");
|
||||||
|
assert_eq!(result["sessionId"], "session");
|
||||||
|
assert_eq!(result["error"]["code"], "response_too_large");
|
||||||
|
assert!(result.get("result").is_none());
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn distributed_request_fixtures_are_accepted_by_the_actual_parser() {
|
||||||
|
let requests: Vec<Value> = serde_json::from_str(include_str!(
|
||||||
|
"../../../../../devtools/headless-protocol/requests.json"
|
||||||
|
))
|
||||||
|
.unwrap();
|
||||||
|
assert_eq!(requests.len(), 11);
|
||||||
|
for request in requests {
|
||||||
|
wire::parse(serde_json::from_value(request).unwrap()).unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn capture_preserves_independent_ids_and_excludes_padding_without_channel_loss() {
|
||||||
|
use base64::Engine as _;
|
||||||
|
use prometeu_hal::app_mode::AppMode;
|
||||||
|
use prometeu_hal::{FrameId, OwnedRgba8888Frame, RenderOwnership};
|
||||||
|
let frame = OwnedRgba8888Frame::new(
|
||||||
|
FrameId::new(91),
|
||||||
|
RenderOwnership::new(1, AppMode::Game, 41),
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
2,
|
||||||
|
vec![0x12345678, 0xffffffff, 0xabcdef01, 0xffffffff],
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
let capture =
|
||||||
|
wire::capture(crate::CapturedFrame { logical_frame_index: 7, frame }).unwrap();
|
||||||
|
assert_eq!(capture["logicalFrameIndex"], 7);
|
||||||
|
assert_eq!(capture["frameId"], 91);
|
||||||
|
assert_eq!(capture["stridePixels"], 2);
|
||||||
|
let png = base64::engine::general_purpose::STANDARD
|
||||||
|
.decode(capture["data"].as_str().unwrap())
|
||||||
|
.unwrap();
|
||||||
|
let mut reader = png::Decoder::new(Cursor::new(png)).read_info().unwrap();
|
||||||
|
let mut bytes = vec![0; reader.output_buffer_size()];
|
||||||
|
let info = reader.next_frame(&mut bytes).unwrap();
|
||||||
|
assert_eq!((info.width, info.height), (1, 2));
|
||||||
|
assert_eq!(&bytes[..info.buffer_size()], &[0x12, 0x34, 0x56, 0x78, 0xab, 0xcd, 0xef, 0x01]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,330 @@
|
|||||||
|
use base64::{Engine as _, engine::general_purpose::STANDARD};
|
||||||
|
use prometeu_bytecode::Value as VmValue;
|
||||||
|
use prometeu_hal::InputSignals;
|
||||||
|
use prometeu_system::CrashReport;
|
||||||
|
use prometeu_vm::VmInitError;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
use serde_json::{Value, json};
|
||||||
|
use std::io;
|
||||||
|
|
||||||
|
use crate::{CapturedFrame, HostError, HostExecutionStatus, HostState};
|
||||||
|
|
||||||
|
pub const CAPABILITIES: &[&str] = &[
|
||||||
|
"boot",
|
||||||
|
"reset",
|
||||||
|
"set_input",
|
||||||
|
"clear_input",
|
||||||
|
"advance",
|
||||||
|
"capture",
|
||||||
|
"get_state",
|
||||||
|
"get_fault",
|
||||||
|
"cancel",
|
||||||
|
"shutdown",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Limits {
|
||||||
|
pub max_frames: u64,
|
||||||
|
pub max_command_bytes: usize,
|
||||||
|
pub max_response_bytes: usize,
|
||||||
|
pub handshake_timeout_ms: u64,
|
||||||
|
pub call_timeout_ms: u64,
|
||||||
|
pub shutdown_timeout_ms: u64,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Limits {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
max_frames: 600,
|
||||||
|
max_command_bytes: 64 * 1024,
|
||||||
|
max_response_bytes: 32 * 1024 * 1024,
|
||||||
|
handshake_timeout_ms: 5_000,
|
||||||
|
call_timeout_ms: 60_000,
|
||||||
|
shutdown_timeout_ms: 5_000,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Limits {
|
||||||
|
pub fn validate(&self) -> io::Result<()> {
|
||||||
|
if self.max_frames == 0
|
||||||
|
|| self.max_command_bytes < 4096
|
||||||
|
|| self.max_response_bytes < 4096
|
||||||
|
|| self.handshake_timeout_ms == 0
|
||||||
|
|| self.call_timeout_ms == 0
|
||||||
|
|| self.shutdown_timeout_ms == 0
|
||||||
|
{
|
||||||
|
return Err(io::Error::new(
|
||||||
|
io::ErrorKind::InvalidInput,
|
||||||
|
"limits must be positive and message bounds at least 4096 bytes",
|
||||||
|
));
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields, rename_all = "camelCase")]
|
||||||
|
pub(super) struct Request {
|
||||||
|
pub request_id: String,
|
||||||
|
pub command: String,
|
||||||
|
pub params: Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(super) fn valid_id(id: &str) -> bool {
|
||||||
|
!id.is_empty() && id.len() <= 128
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub(super) struct Version {
|
||||||
|
pub major: u32,
|
||||||
|
pub minor: u32,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields, rename_all = "camelCase")]
|
||||||
|
pub(super) struct Initialize {
|
||||||
|
pub protocol_version: Version,
|
||||||
|
pub required_capabilities: Vec<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub(super) struct Boot {
|
||||||
|
pub path: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub(super) struct Advance {
|
||||||
|
pub frames: u64,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields, rename_all = "camelCase")]
|
||||||
|
pub(super) struct Cancel {
|
||||||
|
pub target_request_id: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Default, Deserialize)]
|
||||||
|
#[serde(default, deny_unknown_fields, rename_all = "camelCase")]
|
||||||
|
pub(super) struct Input {
|
||||||
|
up: bool,
|
||||||
|
down: bool,
|
||||||
|
left: bool,
|
||||||
|
right: bool,
|
||||||
|
a: bool,
|
||||||
|
b: bool,
|
||||||
|
x: bool,
|
||||||
|
y: bool,
|
||||||
|
l: bool,
|
||||||
|
r: bool,
|
||||||
|
start: bool,
|
||||||
|
select: bool,
|
||||||
|
touch: bool,
|
||||||
|
touch_x: i32,
|
||||||
|
touch_y: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<Input> for InputSignals {
|
||||||
|
fn from(s: Input) -> Self {
|
||||||
|
Self {
|
||||||
|
up_signal: s.up,
|
||||||
|
down_signal: s.down,
|
||||||
|
left_signal: s.left,
|
||||||
|
right_signal: s.right,
|
||||||
|
a_signal: s.a,
|
||||||
|
b_signal: s.b,
|
||||||
|
x_signal: s.x,
|
||||||
|
y_signal: s.y,
|
||||||
|
l_signal: s.l,
|
||||||
|
r_signal: s.r,
|
||||||
|
start_signal: s.start,
|
||||||
|
select_signal: s.select,
|
||||||
|
f_signal: s.touch,
|
||||||
|
x_pos: s.touch_x,
|
||||||
|
y_pos: s.touch_y,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub(super) enum Command {
|
||||||
|
Initialize(Initialize),
|
||||||
|
Boot(Boot),
|
||||||
|
Reset,
|
||||||
|
SetInput(Input),
|
||||||
|
ClearInput,
|
||||||
|
Advance(Advance),
|
||||||
|
Capture,
|
||||||
|
GetState,
|
||||||
|
GetFault,
|
||||||
|
Cancel(Cancel),
|
||||||
|
Shutdown,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn params<T: serde::de::DeserializeOwned>(value: Value) -> Result<T, WireError> {
|
||||||
|
serde_json::from_value(value).map_err(|e| WireError::new("invalid_params", e.to_string()))
|
||||||
|
}
|
||||||
|
|
||||||
|
fn empty(value: &Value) -> Result<(), WireError> {
|
||||||
|
if value.as_object().is_some_and(|v| v.is_empty()) {
|
||||||
|
Ok(())
|
||||||
|
} else {
|
||||||
|
Err(WireError::new("invalid_params", "expected an empty params object"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(super) fn parse(req: Request) -> Result<(String, Command), WireError> {
|
||||||
|
if !valid_id(&req.request_id) {
|
||||||
|
return Err(WireError::new("invalid_request", "requestId must contain 1..128 UTF-8 bytes"));
|
||||||
|
}
|
||||||
|
let command = match req.command.as_str() {
|
||||||
|
"initialize" => Command::Initialize(params(req.params)?),
|
||||||
|
"boot" => {
|
||||||
|
let p: Boot = params(req.params)?;
|
||||||
|
if p.path.trim().is_empty() {
|
||||||
|
return Err(WireError::new("invalid_params", "path is empty"));
|
||||||
|
}
|
||||||
|
Command::Boot(p)
|
||||||
|
}
|
||||||
|
"advance" => Command::Advance(params(req.params)?),
|
||||||
|
"set_input" => Command::SetInput(params(req.params)?),
|
||||||
|
"cancel" => {
|
||||||
|
let p: Cancel = params(req.params)?;
|
||||||
|
if !valid_id(&p.target_request_id) {
|
||||||
|
return Err(WireError::new("invalid_params", "invalid targetRequestId"));
|
||||||
|
}
|
||||||
|
Command::Cancel(p)
|
||||||
|
}
|
||||||
|
"reset" | "clear_input" | "capture" | "get_state" | "get_fault" | "shutdown" => {
|
||||||
|
empty(&req.params)?;
|
||||||
|
match req.command.as_str() {
|
||||||
|
"reset" => Command::Reset,
|
||||||
|
"clear_input" => Command::ClearInput,
|
||||||
|
"capture" => Command::Capture,
|
||||||
|
"get_state" => Command::GetState,
|
||||||
|
"get_fault" => Command::GetFault,
|
||||||
|
_ => Command::Shutdown,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => return Err(WireError::new("unknown_command", "unknown command")),
|
||||||
|
};
|
||||||
|
Ok((req.request_id, command))
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Serialize)]
|
||||||
|
pub(super) struct WireError {
|
||||||
|
pub code: &'static str,
|
||||||
|
pub message: String,
|
||||||
|
pub details: Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl WireError {
|
||||||
|
pub fn new(code: &'static str, message: impl Into<String>) -> Self {
|
||||||
|
Self { code, message: message.into(), details: json!({}) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(super) fn host_error(error: HostError) -> WireError {
|
||||||
|
let (code, details) = match &error {
|
||||||
|
HostError::AlreadyBooted => ("already_booted", json!({})),
|
||||||
|
HostError::BootFailed { reason, report } => {
|
||||||
|
("boot_failed", json!({"reason":reason,"fault":report.as_ref().map(fault)}))
|
||||||
|
}
|
||||||
|
HostError::InvalidState { operation, status } => {
|
||||||
|
("invalid_state", json!({"operation":operation,"status":status_name(*status)}))
|
||||||
|
}
|
||||||
|
HostError::FrameAdvanceWatchdogExpired { host_tick_limit } => {
|
||||||
|
("watchdog_expired", json!({"hostTickLimit":host_tick_limit}))
|
||||||
|
}
|
||||||
|
HostError::FrameNotPublished { previous } => {
|
||||||
|
("frame_not_published", json!({"previousFrameId":previous.map(|id| id.get())}))
|
||||||
|
}
|
||||||
|
HostError::NoFrameAvailable => ("no_frame_available", json!({})),
|
||||||
|
};
|
||||||
|
WireError { code, message: error.to_string(), details }
|
||||||
|
}
|
||||||
|
|
||||||
|
fn status_name(status: HostExecutionStatus) -> &'static str {
|
||||||
|
match status {
|
||||||
|
HostExecutionStatus::Running => "running",
|
||||||
|
HostExecutionStatus::Paused => "paused",
|
||||||
|
HostExecutionStatus::Terminated => "terminated",
|
||||||
|
HostExecutionStatus::Faulted => "faulted",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn stack_value(value: &VmValue) -> Value {
|
||||||
|
match value {
|
||||||
|
VmValue::Int32(v) => json!({"kind":"int32","value":v}),
|
||||||
|
VmValue::Int64(v) => json!({"kind":"int64","value":v.to_string()}),
|
||||||
|
VmValue::Float(v) => json!({"kind":"float64","value":v.to_string()}),
|
||||||
|
VmValue::Boolean(v) => json!({"kind":"boolean","value":v}),
|
||||||
|
VmValue::String(v) => json!({"kind":"string","value":v.as_ref()}),
|
||||||
|
VmValue::HeapRef(v) => json!({"kind":"heap_ref","value":v.0}),
|
||||||
|
VmValue::Null => json!({"kind":"null","value":null}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(super) fn state(s: HostState) -> Value {
|
||||||
|
json!({"pc":s.pc,"stackTop":s.stack_top.iter().map(stack_value).collect::<Vec<_>>(),
|
||||||
|
"logicalFrameIndex":s.frame_index,"tickIndex":s.tick_index,"appId":s.app_id,
|
||||||
|
"status":status_name(s.status)})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(super) fn fault(report: &CrashReport) -> Value {
|
||||||
|
let mut result = json!({"kind":report.kind(),"pc":report.pc(),"summary":report.summary()});
|
||||||
|
match report {
|
||||||
|
CrashReport::VmTrap { trap } => {
|
||||||
|
result["trap"] = json!({"code":trap.code,"opcode":trap.opcode,
|
||||||
|
"message":trap.message,"pc":trap.pc,"span":trap.span});
|
||||||
|
}
|
||||||
|
CrashReport::VmPanic { message, .. } => {
|
||||||
|
result["message"] = json!(message);
|
||||||
|
}
|
||||||
|
CrashReport::VmInit { error } => {
|
||||||
|
let code = match error {
|
||||||
|
VmInitError::InvalidFormat => "invalid_format",
|
||||||
|
VmInitError::UnsupportedFormat => "unsupported_format",
|
||||||
|
VmInitError::ImageLoadFailed(_) => "image_load_failed",
|
||||||
|
VmInitError::LoaderPatchFailed(_) => "loader_patch_failed",
|
||||||
|
VmInitError::EntrypointNotFound => "entrypoint_not_found",
|
||||||
|
VmInitError::VerificationFailed(_) => "verification_failed",
|
||||||
|
};
|
||||||
|
result["initError"] = json!({"code":code,"message":format!("{error:?}")});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result
|
||||||
|
}
|
||||||
|
|
||||||
|
pub(super) fn capture(c: CapturedFrame) -> Result<Value, WireError> {
|
||||||
|
let frame = c.frame;
|
||||||
|
let width = u32::try_from(frame.width)
|
||||||
|
.map_err(|_| WireError::new("capture_failed", "width exceeds PNG limit"))?;
|
||||||
|
let height = u32::try_from(frame.height)
|
||||||
|
.map_err(|_| WireError::new("capture_failed", "height exceeds PNG limit"))?;
|
||||||
|
let mut rgba = Vec::new();
|
||||||
|
for y in 0..frame.height {
|
||||||
|
for pixel in frame.row(y).ok_or_else(|| WireError::new("capture_failed", "invalid row"))? {
|
||||||
|
rgba.extend_from_slice(&pixel.to_be_bytes());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let mut bytes = Vec::new();
|
||||||
|
{
|
||||||
|
let mut encoder = png::Encoder::new(&mut bytes, width, height);
|
||||||
|
encoder.set_color(png::ColorType::Rgba);
|
||||||
|
encoder.set_depth(png::BitDepth::Eight);
|
||||||
|
let mut writer =
|
||||||
|
encoder.write_header().map_err(|e| WireError::new("capture_failed", e.to_string()))?;
|
||||||
|
writer
|
||||||
|
.write_image_data(&rgba)
|
||||||
|
.map_err(|e| WireError::new("capture_failed", e.to_string()))?;
|
||||||
|
writer.finish().map_err(|e| WireError::new("capture_failed", e.to_string()))?;
|
||||||
|
}
|
||||||
|
Ok(json!({"mimeType":"image/png","encoding":"base64","data":STANDARD.encode(bytes),
|
||||||
|
"width":width,"height":height,"stridePixels":frame.stride_pixels,"pixelFormat":"RGBA8888",
|
||||||
|
"logicalFrameIndex":c.logical_frame_index,"frameId":frame.frame_id.get()}))
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ use prometeu_hal::{
|
|||||||
use prometeu_system::{CrashReport, LatestRenderFrameStore};
|
use prometeu_system::{CrashReport, LatestRenderFrameStore};
|
||||||
|
|
||||||
const BOOT_TICK_LIMIT: usize = 64;
|
const BOOT_TICK_LIMIT: usize = 64;
|
||||||
const LOGICAL_FRAME_TICK_LIMIT: usize = 100_000;
|
const HOST_FRAME_ADVANCE_TICK_LIMIT: usize = 100_000;
|
||||||
|
|
||||||
/// One published logical frame plus the automation counter.
|
/// One published logical frame plus the automation counter.
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
@@ -68,7 +68,7 @@ pub enum HostError {
|
|||||||
AlreadyBooted,
|
AlreadyBooted,
|
||||||
BootFailed { reason: String, report: Option<CrashReport> },
|
BootFailed { reason: String, report: Option<CrashReport> },
|
||||||
InvalidState { operation: &'static str, status: HostExecutionStatus },
|
InvalidState { operation: &'static str, status: HostExecutionStatus },
|
||||||
LogicalFrameDidNotClose,
|
FrameAdvanceWatchdogExpired { host_tick_limit: usize },
|
||||||
FrameNotPublished { previous: Option<FrameId> },
|
FrameNotPublished { previous: Option<FrameId> },
|
||||||
NoFrameAvailable,
|
NoFrameAvailable,
|
||||||
}
|
}
|
||||||
@@ -81,8 +81,11 @@ impl fmt::Display for HostError {
|
|||||||
Self::InvalidState { operation, status } => {
|
Self::InvalidState { operation, status } => {
|
||||||
write!(f, "{operation} is invalid while execution is {status:?}")
|
write!(f, "{operation} is invalid while execution is {status:?}")
|
||||||
}
|
}
|
||||||
Self::LogicalFrameDidNotClose => {
|
Self::FrameAdvanceWatchdogExpired { host_tick_limit } => {
|
||||||
write!(f, "logical frame did not reach FrameSync, end of ROM, or a fault")
|
write!(
|
||||||
|
f,
|
||||||
|
"headless host frame-advance watchdog expired after {host_tick_limit} firmware ticks"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
Self::FrameNotPublished { .. } => {
|
Self::FrameNotPublished { .. } => {
|
||||||
write!(f, "logical frame closed without its canonical published frame")
|
write!(f, "logical frame closed without its canonical published frame")
|
||||||
@@ -217,19 +220,20 @@ impl HeadlessHost {
|
|||||||
self.firmware.os.vm().set_paused(false);
|
self.firmware.os.vm().set_paused(false);
|
||||||
self.firmware.os.vm().request_debug_step();
|
self.firmware.os.vm().request_debug_step();
|
||||||
|
|
||||||
for _ in 0..LOGICAL_FRAME_TICK_LIMIT {
|
for _ in 0..HOST_FRAME_ADVANCE_TICK_LIMIT {
|
||||||
self.tick_once();
|
self.tick_once();
|
||||||
if let Some(report) = self.get_fault() {
|
if let Some(report) = self.get_fault() {
|
||||||
self.finish_frame_step();
|
self.finish_frame_advance();
|
||||||
return Ok(AdvanceFrameOutcome::Faulted(report));
|
return Ok(AdvanceFrameOutcome::Faulted(report));
|
||||||
}
|
}
|
||||||
if !matches!(self.firmware.state, FirmwareState::GameRunning(_)) {
|
if !matches!(self.firmware.state, FirmwareState::GameRunning(_)) {
|
||||||
|
self.finish_frame_advance();
|
||||||
return Ok(AdvanceFrameOutcome::Terminated);
|
return Ok(AdvanceFrameOutcome::Terminated);
|
||||||
}
|
}
|
||||||
|
|
||||||
let logical_frame_index = self.firmware.os.vm().logical_frame_index();
|
let logical_frame_index = self.firmware.os.vm().logical_frame_index();
|
||||||
if logical_frame_index > start {
|
if logical_frame_index > start {
|
||||||
self.finish_frame_step();
|
self.finish_frame_advance();
|
||||||
let frame = self
|
let frame = self
|
||||||
.platform
|
.platform
|
||||||
.store
|
.store
|
||||||
@@ -247,8 +251,10 @@ impl HeadlessHost {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.finish_frame_step();
|
self.finish_frame_advance();
|
||||||
Err(HostError::LogicalFrameDidNotClose)
|
Err(HostError::FrameAdvanceWatchdogExpired {
|
||||||
|
host_tick_limit: HOST_FRAME_ADVANCE_TICK_LIMIT,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn advance_frames(&mut self, count: u64) -> Result<AdvanceFramesOutcome, HostError> {
|
pub fn advance_frames(&mut self, count: u64) -> Result<AdvanceFramesOutcome, HostError> {
|
||||||
@@ -349,7 +355,7 @@ impl HeadlessHost {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn finish_frame_step(&mut self) {
|
fn finish_frame_advance(&mut self) {
|
||||||
self.firmware.os.vm().set_paused(true);
|
self.firmware.os.vm().set_paused(true);
|
||||||
self.firmware.os.vm().clear_debug_step_request();
|
self.firmware.os.vm().clear_debug_step_request();
|
||||||
}
|
}
|
||||||
@@ -423,3 +429,69 @@ impl RuntimePlatform for HeadlessPlatform {
|
|||||||
self.hardware.telemetry()
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
//! The desktop host's `stepFrame` command still advances on the 60 Hz winit loop.
|
//! 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.
|
//! That pacing stays in `prometeu-host-desktop-winit` until a later protocol agenda.
|
||||||
|
|
||||||
|
pub mod automation;
|
||||||
mod host;
|
mod host;
|
||||||
|
|
||||||
pub use host::{
|
pub use host::{
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::time::{Duration, Instant};
|
|
||||||
|
|
||||||
use prometeu_bytecode::SourceSpan;
|
use prometeu_bytecode::SourceSpan;
|
||||||
use prometeu_bytecode::assembler::assemble;
|
use prometeu_bytecode::assembler::assemble;
|
||||||
@@ -107,7 +106,10 @@ fn outer_frame_limit_is_a_host_error_and_finishes_paused() {
|
|||||||
let mut host = HeadlessHost::new();
|
let mut host = HeadlessHost::new();
|
||||||
host.boot(&dir).expect("boot non-closing cartridge");
|
host.boot(&dir).expect("boot non-closing cartridge");
|
||||||
|
|
||||||
assert_eq!(host.advance_frame(), Err(HostError::LogicalFrameDidNotClose));
|
assert_eq!(
|
||||||
|
host.advance_frame(),
|
||||||
|
Err(HostError::FrameAdvanceWatchdogExpired { host_tick_limit: 100_000 })
|
||||||
|
);
|
||||||
assert_eq!(host.get_state().status, HostExecutionStatus::Paused);
|
assert_eq!(host.get_state().status, HostExecutionStatus::Paused);
|
||||||
assert!(host.get_fault().is_none());
|
assert!(host.get_fault().is_none());
|
||||||
}
|
}
|
||||||
@@ -350,11 +352,9 @@ fn end_of_rom_completes_a_logical_frame() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn three_hundred_frames_finish_without_refresh_sleep() {
|
fn three_hundred_frames_complete_without_realtime_pacing() {
|
||||||
let mut host = boot_color();
|
let mut host = boot_color();
|
||||||
let started = Instant::now();
|
|
||||||
assert_completed(host.advance_frames(300).expect("fast frames"), 300);
|
assert_completed(host.advance_frames(300).expect("fast frames"), 300);
|
||||||
assert!(started.elapsed() < Duration::from_secs(2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -13,11 +13,26 @@ path = "src/main.rs"
|
|||||||
name = "prometeu-runtime"
|
name = "prometeu-runtime"
|
||||||
path = "src/bin/prometeu-runtime.rs"
|
path = "src/bin/prometeu-runtime.rs"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "prometeu-headless"
|
||||||
|
path = "src/bin/prometeu-headless.rs"
|
||||||
|
|
||||||
[package.metadata.dist]
|
[package.metadata.dist]
|
||||||
dist = true
|
dist = true
|
||||||
include = [
|
include = [
|
||||||
|
"../../../devtools/headless-protocol",
|
||||||
|
"../../../docs/specs/runtime/11a-headless-automation-protocol.md",
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4.5", features = ["derive"] }
|
clap = { version = "4.5", features = ["derive"] }
|
||||||
prometeu-host-desktop-winit = { path = "../../host/prometeu-host-desktop-winit" }
|
prometeu-host-desktop-winit = { path = "../../host/prometeu-host-desktop-winit" }
|
||||||
|
prometeu-host-headless = { path = "../../host/prometeu-host-headless" }
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
jsonschema = { version = "0.33", default-features = false }
|
||||||
|
serde_json = "1"
|
||||||
|
prometeu-bytecode = { path = "../../console/prometeu-bytecode" }
|
||||||
|
prometeu-hal = { path = "../../console/prometeu-hal" }
|
||||||
|
base64 = "0.22"
|
||||||
|
png = "0.17"
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
use clap::Parser;
|
||||||
|
use prometeu_cli::{HeadlessArgs, run_headless};
|
||||||
|
|
||||||
|
#[derive(Parser)]
|
||||||
|
#[command(
|
||||||
|
name = "prometeu-headless",
|
||||||
|
version,
|
||||||
|
about = "Deterministic headless JSONL automation host"
|
||||||
|
)]
|
||||||
|
struct Cli {
|
||||||
|
#[command(flatten)]
|
||||||
|
options: HeadlessArgs,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() -> std::io::Result<()> {
|
||||||
|
run_headless(Cli::parse().options)
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
//! Shared CLI options for the dispatcher and its headless executable.
|
||||||
|
use clap::Args;
|
||||||
|
use prometeu_host_headless::automation::Limits;
|
||||||
|
|
||||||
|
#[derive(Args, Debug)]
|
||||||
|
pub struct HeadlessArgs {
|
||||||
|
/// Use the versioned JSONL stdin/stdout protocol (required).
|
||||||
|
#[arg(long, required = true)]
|
||||||
|
pub stdio: bool,
|
||||||
|
#[arg(long, default_value_t = 600)]
|
||||||
|
pub max_frames: u64,
|
||||||
|
#[arg(long, default_value_t = 65536)]
|
||||||
|
pub max_command_bytes: usize,
|
||||||
|
#[arg(long, default_value_t = 33554432)]
|
||||||
|
pub max_response_bytes: usize,
|
||||||
|
#[arg(long, default_value_t = 5000)]
|
||||||
|
pub handshake_timeout_ms: u64,
|
||||||
|
#[arg(long, default_value_t = 60000)]
|
||||||
|
pub call_timeout_ms: u64,
|
||||||
|
#[arg(long, default_value_t = 5000)]
|
||||||
|
pub shutdown_timeout_ms: u64,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl HeadlessArgs {
|
||||||
|
pub fn limits(&self) -> Limits {
|
||||||
|
Limits {
|
||||||
|
max_frames: self.max_frames,
|
||||||
|
max_command_bytes: self.max_command_bytes,
|
||||||
|
max_response_bytes: self.max_response_bytes,
|
||||||
|
handshake_timeout_ms: self.handshake_timeout_ms,
|
||||||
|
call_timeout_ms: self.call_timeout_ms,
|
||||||
|
shutdown_timeout_ms: self.shutdown_timeout_ms,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn forwarded_args(&self) -> Vec<String> {
|
||||||
|
vec![
|
||||||
|
"--stdio".into(),
|
||||||
|
"--max-frames".into(),
|
||||||
|
self.max_frames.to_string(),
|
||||||
|
"--max-command-bytes".into(),
|
||||||
|
self.max_command_bytes.to_string(),
|
||||||
|
"--max-response-bytes".into(),
|
||||||
|
self.max_response_bytes.to_string(),
|
||||||
|
"--handshake-timeout-ms".into(),
|
||||||
|
self.handshake_timeout_ms.to_string(),
|
||||||
|
"--call-timeout-ms".into(),
|
||||||
|
self.call_timeout_ms.to_string(),
|
||||||
|
"--shutdown-timeout-ms".into(),
|
||||||
|
self.shutdown_timeout_ms.to_string(),
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn run_headless(args: HeadlessArgs) -> std::io::Result<()> {
|
||||||
|
prometeu_host_headless::automation::serve(
|
||||||
|
std::io::BufReader::new(std::io::stdin()),
|
||||||
|
std::io::stdout(),
|
||||||
|
args.limits(),
|
||||||
|
env!("CARGO_PKG_VERSION"),
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -19,6 +19,8 @@ struct Cli {
|
|||||||
|
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
enum Commands {
|
enum Commands {
|
||||||
|
/// Starts the versioned headless automation process (no native window).
|
||||||
|
Headless(prometeu_cli::HeadlessArgs),
|
||||||
/// Executes a cartridge using the available runtime.
|
/// Executes a cartridge using the available runtime.
|
||||||
Run {
|
Run {
|
||||||
/// Path to the cartridge (directory or .pmc file).
|
/// Path to the cartridge (directory or .pmc file).
|
||||||
@@ -65,6 +67,11 @@ fn main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
match cli.command {
|
match cli.command {
|
||||||
|
Some(Commands::Headless(options)) => {
|
||||||
|
let args = options.forwarded_args();
|
||||||
|
let borrowed: Vec<&str> = args.iter().map(String::as_str).collect();
|
||||||
|
dispatch(&exe_dir, "prometeu-headless", &borrowed);
|
||||||
|
}
|
||||||
Some(Commands::Run { cart }) => {
|
Some(Commands::Run { cart }) => {
|
||||||
dispatch(&exe_dir, "prometeu-runtime", &["--run", &cart]);
|
dispatch(&exe_dir, "prometeu-runtime", &["--run", &cart]);
|
||||||
}
|
}
|
||||||
@@ -99,6 +106,7 @@ fn dispatch(exe_dir: &Path, bin_name: &str, args: &[&str]) {
|
|||||||
"prometeu: command '{}' is not yet available in this distribution on {}",
|
"prometeu: command '{}' is not yet available in this distribution on {}",
|
||||||
match bin_name {
|
match bin_name {
|
||||||
"prometeu-runtime" => "run/debug",
|
"prometeu-runtime" => "run/debug",
|
||||||
|
"prometeu-headless" => "headless",
|
||||||
"prometeuc" => "build/verify c",
|
"prometeuc" => "build/verify c",
|
||||||
"prometeup" => "pack/verify p",
|
"prometeup" => "pack/verify p",
|
||||||
_ => bin_name,
|
_ => bin_name,
|
||||||
|
|||||||
@@ -0,0 +1,615 @@
|
|||||||
|
use base64::{Engine as _, engine::general_purpose::STANDARD};
|
||||||
|
use prometeu_bytecode::SourceSpan;
|
||||||
|
use prometeu_bytecode::assembler::assemble;
|
||||||
|
use prometeu_bytecode::model::{BytecodeModule, DebugInfo, Export, FunctionMeta, SyscallDecl};
|
||||||
|
use prometeu_host_headless::{AdvanceFramesStop, HeadlessHost};
|
||||||
|
use serde_json::{Value, json};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
use std::fs;
|
||||||
|
use std::io::{BufRead, BufReader, Write};
|
||||||
|
use std::path::{Path, PathBuf};
|
||||||
|
use std::process::{Child, ChildStdin, Command, Stdio};
|
||||||
|
use std::sync::{
|
||||||
|
atomic::{AtomicU64, Ordering},
|
||||||
|
mpsc,
|
||||||
|
};
|
||||||
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
|
struct TempDir(PathBuf);
|
||||||
|
impl TempDir {
|
||||||
|
fn new() -> Self {
|
||||||
|
static COUNTER: AtomicU64 = AtomicU64::new(0);
|
||||||
|
let path = std::env::temp_dir().join(format!(
|
||||||
|
"prometeu-protocol-test-{}-{}-{}",
|
||||||
|
std::process::id(),
|
||||||
|
std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos(),
|
||||||
|
COUNTER.fetch_add(1, Ordering::Relaxed)
|
||||||
|
));
|
||||||
|
fs::create_dir(&path).unwrap();
|
||||||
|
Self(path)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl Drop for TempDir {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
let _ = fs::remove_dir_all(&self.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Client {
|
||||||
|
child: Child,
|
||||||
|
input: Option<ChildStdin>,
|
||||||
|
messages: mpsc::Receiver<Result<Value, String>>,
|
||||||
|
pending: HashMap<String, Value>,
|
||||||
|
next: u64,
|
||||||
|
hello: Value,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Client {
|
||||||
|
fn new(args: &[&str]) -> Self {
|
||||||
|
Self::spawn(Path::new(env!("CARGO_BIN_EXE_prometeu-headless")), args, None)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn spawn(binary: &Path, args: &[&str], cwd: Option<&Path>) -> Self {
|
||||||
|
let mut command = Command::new(binary);
|
||||||
|
command.args(args).stdin(Stdio::piped()).stdout(Stdio::piped()).stderr(Stdio::inherit());
|
||||||
|
if let Some(cwd) = cwd {
|
||||||
|
command.current_dir(cwd);
|
||||||
|
}
|
||||||
|
let mut child = command.spawn().unwrap();
|
||||||
|
let input = child.stdin.take();
|
||||||
|
let stdout = child.stdout.take().unwrap();
|
||||||
|
let (sender, messages) = mpsc::channel();
|
||||||
|
std::thread::spawn(move || {
|
||||||
|
for line in BufReader::new(stdout).lines() {
|
||||||
|
let value = line.map_err(|e| e.to_string()).and_then(|line| {
|
||||||
|
serde_json::from_str(&line)
|
||||||
|
.map_err(|e| format!("non-protocol stdout: {e}: {line}"))
|
||||||
|
});
|
||||||
|
if sender.send(value).is_err() {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let mut client =
|
||||||
|
Self { child, input, messages, pending: HashMap::new(), next: 0, hello: Value::Null };
|
||||||
|
client.hello = client.event();
|
||||||
|
assert_eq!(client.hello["type"], "hello");
|
||||||
|
client
|
||||||
|
}
|
||||||
|
|
||||||
|
fn event(&self) -> Value {
|
||||||
|
let message = self
|
||||||
|
.messages
|
||||||
|
.recv_timeout(Duration::from_secs(15))
|
||||||
|
.expect("protocol reply deadline")
|
||||||
|
.unwrap();
|
||||||
|
static SCHEMA: std::sync::OnceLock<jsonschema::Validator> = std::sync::OnceLock::new();
|
||||||
|
let schema = SCHEMA.get_or_init(|| {
|
||||||
|
let value: Value = serde_json::from_str(include_str!(
|
||||||
|
"../../../../devtools/headless-protocol/response.schema.json"
|
||||||
|
))
|
||||||
|
.unwrap();
|
||||||
|
jsonschema::validator_for(&value).unwrap()
|
||||||
|
});
|
||||||
|
if let Err(error) = schema.validate(&message) {
|
||||||
|
panic!("server message violates published schema: {error}: {message}");
|
||||||
|
}
|
||||||
|
message
|
||||||
|
}
|
||||||
|
|
||||||
|
fn raw(&mut self, bytes: &[u8]) {
|
||||||
|
self.input.as_mut().unwrap().write_all(bytes).unwrap();
|
||||||
|
self.input.as_mut().unwrap().flush().unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
fn send(&mut self, command: &str, params: Value) -> String {
|
||||||
|
self.next += 1;
|
||||||
|
let id = format!("q{}", self.next);
|
||||||
|
let mut bytes =
|
||||||
|
serde_json::to_vec(&json!({"requestId":id,"command":command,"params":params})).unwrap();
|
||||||
|
bytes.push(b'\n');
|
||||||
|
self.raw(&bytes);
|
||||||
|
id
|
||||||
|
}
|
||||||
|
|
||||||
|
fn response(&mut self, id: &str) -> Value {
|
||||||
|
if let Some(value) = self.pending.remove(id) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
loop {
|
||||||
|
let message = self.event();
|
||||||
|
if message["type"] == "progress" {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
let message_id = message["requestId"].as_str().unwrap().to_owned();
|
||||||
|
if message_id == id {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
self.pending.insert(message_id, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn call(&mut self, command: &str, params: Value) -> Value {
|
||||||
|
let id = self.send(command, params);
|
||||||
|
self.response(&id)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn ok(&mut self, command: &str, params: Value) -> Value {
|
||||||
|
let response = self.call(command, params);
|
||||||
|
assert!(response.get("error").is_none(), "{response}");
|
||||||
|
response["result"].clone()
|
||||||
|
}
|
||||||
|
|
||||||
|
fn initialize(&mut self) {
|
||||||
|
self.ok("initialize", json!({"protocolVersion":{"major":1,"minor":0},"requiredCapabilities":["advance","capture","cancel"]}));
|
||||||
|
}
|
||||||
|
|
||||||
|
fn wait_exit(&mut self) {
|
||||||
|
let deadline = Instant::now() + Duration::from_secs(5);
|
||||||
|
loop {
|
||||||
|
if let Some(status) = self.child.try_wait().unwrap() {
|
||||||
|
assert!(status.success(), "{status}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
assert!(Instant::now() < deadline, "process did not exit");
|
||||||
|
std::thread::sleep(Duration::from_millis(5));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn close(&mut self) {
|
||||||
|
self.ok("shutdown", json!({}));
|
||||||
|
self.input.take();
|
||||||
|
self.wait_exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl Drop for Client {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
let _ = self.child.kill();
|
||||||
|
let _ = self.child.wait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn cartridge(code: &str, gfx: bool) -> TempDir {
|
||||||
|
cartridge_bytes(assemble(code).unwrap(), gfx)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn cartridge_bytes(code: Vec<u8>, gfx: bool) -> TempDir {
|
||||||
|
let dir = TempDir::new();
|
||||||
|
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: 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: if gfx {
|
||||||
|
vec![SyscallDecl {
|
||||||
|
module: "gfx2d".into(),
|
||||||
|
name: "clear".into(),
|
||||||
|
version: 1,
|
||||||
|
arg_slots: 1,
|
||||||
|
ret_slots: 0,
|
||||||
|
}]
|
||||||
|
} else {
|
||||||
|
vec![]
|
||||||
|
},
|
||||||
|
};
|
||||||
|
fs::write(dir.0.join("program.pbx"), module.serialize()).unwrap();
|
||||||
|
fs::write(
|
||||||
|
dir.0.join("manifest.json"),
|
||||||
|
serde_json::to_vec(&json!({"magic":"PMTU","cartridge_version":1,"app_id":41,
|
||||||
|
"title":"Protocol test","app_version":"0.1.0","app_mode":"Game","capabilities":["gfx2d"]}))
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
dir
|
||||||
|
}
|
||||||
|
|
||||||
|
fn colored_cart() -> TempDir {
|
||||||
|
cartridge("PUSH_I64 4278190335\nHOSTCALL 0\nFRAME_SYNC\nRET\n", true)
|
||||||
|
}
|
||||||
|
fn boot(client: &mut Client, dir: &TempDir) {
|
||||||
|
client.ok("boot", json!({"path":dir.0}));
|
||||||
|
}
|
||||||
|
fn png_bytes(capture: &Value) -> Vec<u8> {
|
||||||
|
let bytes = STANDARD.decode(capture["data"].as_str().unwrap()).unwrap();
|
||||||
|
let decoder = png::Decoder::new(std::io::Cursor::new(bytes));
|
||||||
|
let mut reader = decoder.read_info().unwrap();
|
||||||
|
let mut output = vec![0; reader.output_buffer_size()];
|
||||||
|
let info = reader.next_frame(&mut output).unwrap();
|
||||||
|
assert_eq!(info.color_type, png::ColorType::Rgba);
|
||||||
|
assert_eq!(info.width as u64, capture["width"].as_u64().unwrap());
|
||||||
|
assert_eq!(info.height as u64, capture["height"].as_u64().unwrap());
|
||||||
|
output.truncate(info.buffer_size());
|
||||||
|
output
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn handshake_versions_capabilities_and_limits_are_explicit() {
|
||||||
|
let mut c = Client::new(&["--stdio"]);
|
||||||
|
assert_eq!(c.hello["runtimeVersion"], env!("CARGO_PKG_VERSION"));
|
||||||
|
assert_eq!(c.hello["protocolVersion"], json!({"major":1,"minor":0}));
|
||||||
|
assert_eq!(
|
||||||
|
c.hello["limits"],
|
||||||
|
json!({"maxFrames":600,"maxCommandBytes":65536,"maxResponseBytes":33554432,
|
||||||
|
"handshakeTimeoutMs":5000,"callTimeoutMs":60000,"shutdownTimeoutMs":5000})
|
||||||
|
);
|
||||||
|
assert_eq!(c.call("get_state", json!({}))["error"]["code"], "not_initialized");
|
||||||
|
assert_eq!(
|
||||||
|
c.call(
|
||||||
|
"initialize",
|
||||||
|
json!({"protocolVersion":{"major":2,"minor":0},"requiredCapabilities":[]})
|
||||||
|
)["error"]["code"],
|
||||||
|
"incompatible_version"
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
c.call(
|
||||||
|
"initialize",
|
||||||
|
json!({"protocolVersion":{"major":1,"minor":0},"requiredCapabilities":["telepathy"]})
|
||||||
|
)["error"]["code"],
|
||||||
|
"unsupported_capability"
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
c.ok(
|
||||||
|
"initialize",
|
||||||
|
json!({"protocolVersion":{"major":1,"minor":42},"requiredCapabilities":[]})
|
||||||
|
)["protocolVersion"]["minor"],
|
||||||
|
0
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
c.call(
|
||||||
|
"initialize",
|
||||||
|
json!({"protocolVersion":{"major":1,"minor":0},"requiredCapabilities":[]})
|
||||||
|
)["error"]["code"],
|
||||||
|
"already_initialized"
|
||||||
|
);
|
||||||
|
c.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn malformed_fragmented_and_oversized_commands_do_not_desynchronize() {
|
||||||
|
let mut c = Client::new(&["--stdio", "--max-command-bytes", "4096"]);
|
||||||
|
c.initialize();
|
||||||
|
c.raw(b"not json\n");
|
||||||
|
assert_eq!(c.event()["error"]["code"], "invalid_request");
|
||||||
|
c.raw(&[0xff, b'\n']);
|
||||||
|
assert_eq!(c.event()["error"]["code"], "invalid_request");
|
||||||
|
let mut huge = vec![b' '; 5000];
|
||||||
|
huge.push(b'\n');
|
||||||
|
c.raw(&huge);
|
||||||
|
assert_eq!(c.event()["error"]["code"], "request_too_large");
|
||||||
|
c.raw(b"{\"requestId\":\"fragment\",\"command\":\"get_");
|
||||||
|
assert!(c.messages.try_recv().is_err());
|
||||||
|
c.raw(b"state\",\"params\":{}}\r\n");
|
||||||
|
assert_eq!(c.response("fragment")["result"]["status"], "terminated");
|
||||||
|
assert_eq!(c.call("get_state", json!({"typo":1}))["error"]["code"], "invalid_params");
|
||||||
|
assert_eq!(c.call("advance", json!({"frames":-1}))["error"]["code"], "invalid_params");
|
||||||
|
assert_eq!(c.call("advance", json!({"frames":601}))["error"]["code"], "limit_exceeded");
|
||||||
|
assert_eq!(c.call("missing", json!({}))["error"]["code"], "unknown_command");
|
||||||
|
c.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn lifecycle_and_capture_match_the_in_process_canonical_oracle() {
|
||||||
|
let dir = colored_cart();
|
||||||
|
let mut c = Client::new(&["--stdio"]);
|
||||||
|
c.initialize();
|
||||||
|
assert_eq!(c.call("capture", json!({}))["error"]["code"], "no_frame_available");
|
||||||
|
boot(&mut c, &dir);
|
||||||
|
assert_eq!(c.call("boot", json!({"path":dir.0}))["error"]["code"], "already_booted");
|
||||||
|
let initial = c.ok("get_state", json!({}));
|
||||||
|
assert_eq!(initial, c.ok("get_state", json!({})), "no background ticks");
|
||||||
|
assert_eq!(
|
||||||
|
c.ok("advance", json!({"frames":0})),
|
||||||
|
json!({"requested":0,"completed":0,"stop":"completed"})
|
||||||
|
);
|
||||||
|
c.ok("set_input", json!({"right":true,"touch":true,"touchX":123,"touchY":45}));
|
||||||
|
c.ok("clear_input", json!({}));
|
||||||
|
let outcome = c.ok("advance", json!({"frames":3}));
|
||||||
|
assert_eq!(outcome["completed"], 3);
|
||||||
|
let capture = c.ok("capture", json!({}));
|
||||||
|
let mut host = HeadlessHost::new();
|
||||||
|
host.boot(dir.0.to_string_lossy()).unwrap();
|
||||||
|
assert_eq!(host.advance_frames(3).unwrap().stop, AdvanceFramesStop::Completed);
|
||||||
|
let expected = host.capture_frame().unwrap();
|
||||||
|
let pixels: Vec<u8> = expected.frame.pixels.iter().flat_map(|v| v.to_be_bytes()).collect();
|
||||||
|
assert_eq!(png_bytes(&capture), pixels);
|
||||||
|
assert_eq!(capture["logicalFrameIndex"], expected.logical_frame_index);
|
||||||
|
assert_eq!(capture["frameId"], expected.frame.frame_id.get());
|
||||||
|
assert_eq!(capture["stridePixels"], expected.frame.stride_pixels);
|
||||||
|
assert_eq!(c.ok("get_fault", json!({})), Value::Null);
|
||||||
|
c.ok("reset", json!({}));
|
||||||
|
assert_eq!(c.call("capture", json!({}))["error"]["code"], "no_frame_available");
|
||||||
|
assert_eq!(c.ok("advance", json!({"frames":1}))["stop"], "terminated");
|
||||||
|
boot(&mut c, &dir);
|
||||||
|
c.ok("advance", json!({"frames":3}));
|
||||||
|
assert_eq!(c.ok("capture", json!({})), capture);
|
||||||
|
c.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn independent_processes_match_pixels_ids_state_and_fault() {
|
||||||
|
// Color is selected by the real normalized RIGHT-down intrinsic.
|
||||||
|
let mut code = assemble("INTRINSIC 0x2000\nINTRINSIC 0x2013\nINTRINSIC 0x2032\n").unwrap();
|
||||||
|
let jump = code.len() + 2;
|
||||||
|
code.extend(
|
||||||
|
assemble("JMP_IF_FALSE 0\nPUSH_I64 4278190335\nHOSTCALL 0\nFRAME_SYNC\nRET\n").unwrap(),
|
||||||
|
);
|
||||||
|
let blue = code.len() as u32;
|
||||||
|
code[jump..jump + 4].copy_from_slice(&blue.to_le_bytes());
|
||||||
|
code.extend(assemble("PUSH_I64 65535\nHOSTCALL 0\nFRAME_SYNC\nRET\n").unwrap());
|
||||||
|
let dir = cartridge_bytes(code, true);
|
||||||
|
let run = |c: &mut Client| {
|
||||||
|
boot(c, &dir);
|
||||||
|
c.ok("set_input", json!({"right":true}));
|
||||||
|
c.ok("advance", json!({"frames":12}));
|
||||||
|
let held = c.ok("capture", json!({}));
|
||||||
|
assert!(png_bytes(&held).as_chunks::<4>().0.iter().all(|p| *p == [255, 0, 0, 255]));
|
||||||
|
c.ok("clear_input", json!({}));
|
||||||
|
c.ok("advance", json!({"frames":1}));
|
||||||
|
let released = c.ok("capture", json!({}));
|
||||||
|
assert!(png_bytes(&released).as_chunks::<4>().0.iter().all(|p| *p == [0, 0, 255, 255]));
|
||||||
|
(held, released, c.ok("get_state", json!({})), c.ok("get_fault", json!({})))
|
||||||
|
};
|
||||||
|
let mut first = Client::new(&["--stdio"]);
|
||||||
|
first.initialize();
|
||||||
|
let expected = run(&mut first);
|
||||||
|
first.ok("reset", json!({}));
|
||||||
|
assert_eq!(run(&mut first), expected);
|
||||||
|
first.close();
|
||||||
|
let mut second = Client::new(&["--stdio"]);
|
||||||
|
second.initialize();
|
||||||
|
assert_eq!(run(&mut second), expected);
|
||||||
|
second.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn partial_guest_fault_and_host_watchdog_are_distinct_outcomes() {
|
||||||
|
let mut code =
|
||||||
|
assemble("GET_GLOBAL 0\nPUSH_I32 1\nADD\nSET_GLOBAL 0\nGET_GLOBAL 0\nPUSH_I32 3\nEQ\n")
|
||||||
|
.unwrap();
|
||||||
|
let jump = code.len() + 2;
|
||||||
|
code.extend(assemble("JMP_IF_FALSE 0\nTRAP\n").unwrap());
|
||||||
|
let next = code.len() as u32;
|
||||||
|
code[jump..jump + 4].copy_from_slice(&next.to_le_bytes());
|
||||||
|
code.extend(assemble("PUSH_I64 255\nHOSTCALL 0\nFRAME_SYNC\nRET\n").unwrap());
|
||||||
|
let dir = cartridge_bytes(code, true);
|
||||||
|
let mut c = Client::new(&["--stdio"]);
|
||||||
|
c.initialize();
|
||||||
|
boot(&mut c, &dir);
|
||||||
|
let outcome = c.ok("advance", json!({"frames":5}));
|
||||||
|
assert_eq!(outcome["completed"], 2);
|
||||||
|
assert_eq!(outcome["stop"], "faulted");
|
||||||
|
assert_eq!(outcome["fault"], c.ok("get_fault", json!({})));
|
||||||
|
c.ok("reset", json!({}));
|
||||||
|
let infinite = cartridge("JMP 0\n", false);
|
||||||
|
boot(&mut c, &infinite);
|
||||||
|
let outcome = c.ok("advance", json!({"frames":5}));
|
||||||
|
assert_eq!(outcome["completed"], 0);
|
||||||
|
assert_eq!(outcome["stop"], "host_error");
|
||||||
|
assert_eq!(outcome["error"]["code"], "watchdog_expired");
|
||||||
|
assert_eq!(c.ok("get_fault", json!({})), Value::Null);
|
||||||
|
assert_eq!(c.ok("get_state", json!({}))["status"], "paused");
|
||||||
|
c.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn faults_and_boot_failures_are_structured_not_log_parsing() {
|
||||||
|
let dir = cartridge("TRAP\nFRAME_SYNC\nRET\n", false);
|
||||||
|
let mut c = Client::new(&["--stdio"]);
|
||||||
|
c.initialize();
|
||||||
|
boot(&mut c, &dir);
|
||||||
|
let result = c.ok("advance", json!({"frames":5}));
|
||||||
|
assert_eq!(result["completed"], 0);
|
||||||
|
assert_eq!(result["stop"], "faulted");
|
||||||
|
assert_eq!(result["fault"]["kind"], "vm_trap");
|
||||||
|
assert!(result["fault"]["trap"]["code"].is_number());
|
||||||
|
assert_eq!(c.ok("get_fault", json!({})), result["fault"]);
|
||||||
|
assert_eq!(c.ok("get_state", json!({}))["status"], "faulted");
|
||||||
|
c.ok("reset", json!({}));
|
||||||
|
fs::write(dir.0.join("program.pbx"), b"not PBX").unwrap();
|
||||||
|
let response = c.call("boot", json!({"path":dir.0}));
|
||||||
|
assert_eq!(response["error"]["code"], "boot_failed");
|
||||||
|
assert_eq!(response["error"]["details"]["fault"]["kind"], "vm_init");
|
||||||
|
assert!(response["error"]["details"]["fault"]["initError"]["code"].is_string());
|
||||||
|
c.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn conflicting_work_is_rejected_and_cancellation_reports_partial_progress() {
|
||||||
|
let dir = colored_cart();
|
||||||
|
let mut c = Client::new(&["--stdio", "--max-frames", "100000"]);
|
||||||
|
c.initialize();
|
||||||
|
boot(&mut c, &dir);
|
||||||
|
let advance = c.send("advance", json!({"frames":100000}));
|
||||||
|
assert_eq!(c.event()["type"], "progress");
|
||||||
|
assert_eq!(c.call("reset", json!({}))["error"]["code"], "busy");
|
||||||
|
c.ok("cancel", json!({"targetRequestId":advance}));
|
||||||
|
let response = c.response(&advance);
|
||||||
|
let result = &response["result"];
|
||||||
|
assert_eq!(result["stop"], "canceled");
|
||||||
|
assert!(
|
||||||
|
result["completed"].as_u64().unwrap() >= 1
|
||||||
|
&& result["completed"].as_u64().unwrap() < 100000
|
||||||
|
);
|
||||||
|
assert_eq!(c.ok("get_state", json!({}))["logicalFrameIndex"], result["completed"]);
|
||||||
|
assert_eq!(
|
||||||
|
c.call("cancel", json!({"targetRequestId":advance}))["error"]["code"],
|
||||||
|
"not_cancelable"
|
||||||
|
);
|
||||||
|
c.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn shutdown_and_eof_interrupt_active_work_without_resuming_it() {
|
||||||
|
let dir = colored_cart();
|
||||||
|
for explicit in [true, false] {
|
||||||
|
let mut c = Client::new(&["--stdio", "--max-frames", "100000"]);
|
||||||
|
c.initialize();
|
||||||
|
boot(&mut c, &dir);
|
||||||
|
let advance = c.send("advance", json!({"frames":100000}));
|
||||||
|
assert_eq!(c.event()["type"], "progress");
|
||||||
|
if explicit {
|
||||||
|
let shutdown = c.send("shutdown", json!({}));
|
||||||
|
assert_eq!(c.response(&advance)["result"]["stop"], "canceled");
|
||||||
|
assert_eq!(c.response(&shutdown)["result"]["closed"], true);
|
||||||
|
} else {
|
||||||
|
c.input.take();
|
||||||
|
assert_eq!(c.response(&advance)["result"]["stop"], "canceled");
|
||||||
|
}
|
||||||
|
c.wait_exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn idle_eof_and_truncated_eof_close_the_process() {
|
||||||
|
for suffix in [b"".as_slice(), b"{\"requestId\":\"partial\"".as_slice()] {
|
||||||
|
let mut c = Client::new(&["--stdio"]);
|
||||||
|
c.raw(suffix);
|
||||||
|
c.input.take();
|
||||||
|
if !suffix.is_empty() {
|
||||||
|
assert_eq!(c.event()["error"]["code"], "invalid_request");
|
||||||
|
}
|
||||||
|
c.wait_exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn dispatcher_works_from_a_relocated_installation_and_other_cwd() {
|
||||||
|
let installation = TempDir::new();
|
||||||
|
let cwd = TempDir::new();
|
||||||
|
let dispatcher = installation.0.join(if cfg!(windows) { "prometeu.exe" } else { "prometeu" });
|
||||||
|
let headless = installation.0.join(if cfg!(windows) {
|
||||||
|
"prometeu-headless.exe"
|
||||||
|
} else {
|
||||||
|
"prometeu-headless"
|
||||||
|
});
|
||||||
|
fs::copy(env!("CARGO_BIN_EXE_prometeu"), &dispatcher).unwrap();
|
||||||
|
fs::copy(env!("CARGO_BIN_EXE_prometeu-headless"), &headless).unwrap();
|
||||||
|
let mut c = Client::spawn(
|
||||||
|
&dispatcher,
|
||||||
|
&[
|
||||||
|
"headless",
|
||||||
|
"--stdio",
|
||||||
|
"--max-frames",
|
||||||
|
"17",
|
||||||
|
"--max-command-bytes",
|
||||||
|
"8192",
|
||||||
|
"--max-response-bytes",
|
||||||
|
"16384",
|
||||||
|
"--handshake-timeout-ms",
|
||||||
|
"1234",
|
||||||
|
"--call-timeout-ms",
|
||||||
|
"2345",
|
||||||
|
"--shutdown-timeout-ms",
|
||||||
|
"3456",
|
||||||
|
],
|
||||||
|
Some(&cwd.0),
|
||||||
|
);
|
||||||
|
assert_eq!(
|
||||||
|
c.hello["limits"],
|
||||||
|
json!({"maxFrames":17,"maxCommandBytes":8192,"maxResponseBytes":16384,
|
||||||
|
"handshakeTimeoutMs":1234,"callTimeoutMs":2345,"shutdownTimeoutMs":3456})
|
||||||
|
);
|
||||||
|
c.initialize();
|
||||||
|
c.close();
|
||||||
|
let help = Command::new(&dispatcher).arg("--help").output().unwrap();
|
||||||
|
let help = String::from_utf8(help.stdout).unwrap();
|
||||||
|
for name in ["run", "debug", "headless"] {
|
||||||
|
assert!(help.contains(name));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn missing_binary_and_invalid_cli_limits_fail_explicitly() {
|
||||||
|
let installation = TempDir::new();
|
||||||
|
let dispatcher = installation.0.join(if cfg!(windows) { "prometeu.exe" } else { "prometeu" });
|
||||||
|
fs::copy(env!("CARGO_BIN_EXE_prometeu"), &dispatcher).unwrap();
|
||||||
|
let result = Command::new(&dispatcher).args(["headless", "--stdio"]).output().unwrap();
|
||||||
|
assert!(!result.status.success());
|
||||||
|
assert!(String::from_utf8_lossy(&result.stderr).contains("headless"));
|
||||||
|
for args in
|
||||||
|
[vec!["--stdio", "--max-frames", "0"], vec!["--stdio", "--max-response-bytes", "1"], vec![]]
|
||||||
|
{
|
||||||
|
let result =
|
||||||
|
Command::new(env!("CARGO_BIN_EXE_prometeu-headless")).args(args).output().unwrap();
|
||||||
|
assert!(!result.status.success());
|
||||||
|
assert!(result.stdout.is_empty());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn schemas_and_distributed_request_fixtures_are_consistent() {
|
||||||
|
let request: Value = serde_json::from_str(include_str!(
|
||||||
|
"../../../../devtools/headless-protocol/request.schema.json"
|
||||||
|
))
|
||||||
|
.unwrap();
|
||||||
|
let response: Value = serde_json::from_str(include_str!(
|
||||||
|
"../../../../devtools/headless-protocol/response.schema.json"
|
||||||
|
))
|
||||||
|
.unwrap();
|
||||||
|
jsonschema::meta::validate(&request).unwrap();
|
||||||
|
jsonschema::meta::validate(&response).unwrap();
|
||||||
|
let validator = jsonschema::validator_for(&request).unwrap();
|
||||||
|
let valid: Vec<Value> =
|
||||||
|
serde_json::from_str(include_str!("../../../../devtools/headless-protocol/requests.json"))
|
||||||
|
.unwrap();
|
||||||
|
for request in valid {
|
||||||
|
validator.validate(&request).unwrap();
|
||||||
|
}
|
||||||
|
let invalid: Vec<Value> = serde_json::from_str(include_str!(
|
||||||
|
"../../../../devtools/headless-protocol/invalid-requests.json"
|
||||||
|
))
|
||||||
|
.unwrap();
|
||||||
|
let mut c = Client::new(&["--stdio"]);
|
||||||
|
c.initialize();
|
||||||
|
for request in invalid {
|
||||||
|
assert!(!validator.is_valid(&request), "{request}");
|
||||||
|
let mut bytes = serde_json::to_vec(&request).unwrap();
|
||||||
|
bytes.push(b'\n');
|
||||||
|
c.raw(&bytes);
|
||||||
|
assert!(c.event().get("error").is_some(), "{request}");
|
||||||
|
}
|
||||||
|
c.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[ignore = "requires PROMETEU_PROTOCOL_TEST_INSTALL pointing to an extracted dist archive"]
|
||||||
|
fn packaged_installation_smoke() {
|
||||||
|
let installation = PathBuf::from(
|
||||||
|
std::env::var_os("PROMETEU_PROTOCOL_TEST_INSTALL")
|
||||||
|
.expect("set extracted distribution path"),
|
||||||
|
);
|
||||||
|
for file in [
|
||||||
|
"prometeu",
|
||||||
|
"prometeu-runtime",
|
||||||
|
"prometeu-headless",
|
||||||
|
"headless-protocol/request.schema.json",
|
||||||
|
"headless-protocol/response.schema.json",
|
||||||
|
"11a-headless-automation-protocol.md",
|
||||||
|
] {
|
||||||
|
assert!(installation.join(file).is_file(), "missing packaged {file}");
|
||||||
|
}
|
||||||
|
let cwd = TempDir::new();
|
||||||
|
let dir = colored_cart();
|
||||||
|
let mut c =
|
||||||
|
Client::spawn(&installation.join("prometeu"), &["headless", "--stdio"], Some(&cwd.0));
|
||||||
|
assert_eq!(c.hello["runtimeVersion"], env!("CARGO_PKG_VERSION"));
|
||||||
|
c.initialize();
|
||||||
|
boot(&mut c, &dir);
|
||||||
|
c.ok("advance", json!({"frames":3}));
|
||||||
|
let capture = c.ok("capture", json!({}));
|
||||||
|
assert!(png_bytes(&capture).as_chunks::<4>().0.iter().all(|p| *p == [255, 0, 0, 255]));
|
||||||
|
c.input.take();
|
||||||
|
c.wait_exit();
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"requestId": "negative",
|
||||||
|
"command": "advance",
|
||||||
|
"params": {
|
||||||
|
"frames": -1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "wrong-input",
|
||||||
|
"command": "set_input",
|
||||||
|
"params": {
|
||||||
|
"rigth": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "extra",
|
||||||
|
"command": "get_state",
|
||||||
|
"params": {
|
||||||
|
"extra": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "unknown",
|
||||||
|
"command": "missing",
|
||||||
|
"params": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "blank-path",
|
||||||
|
"command": "boot",
|
||||||
|
"params": {
|
||||||
|
"path": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "",
|
||||||
|
"command": "reset",
|
||||||
|
"params": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "no-params",
|
||||||
|
"command": "get_state"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "null-params",
|
||||||
|
"command": "get_state",
|
||||||
|
"params": null
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,284 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://prometeu.dev/headless/v1/request.schema.json",
|
||||||
|
"title": "Prometeu Headless v1 Request",
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"requestId",
|
||||||
|
"command",
|
||||||
|
"params"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"requestId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 128
|
||||||
|
},
|
||||||
|
"command": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "initialize"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"protocolVersion",
|
||||||
|
"requiredCapabilities"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"protocolVersion": {
|
||||||
|
"$ref": "#/$defs/version"
|
||||||
|
},
|
||||||
|
"requiredCapabilities": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "boot"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"path"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"path": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"pattern": "\\S"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "advance"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"frames"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"frames": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 18446744073709551615
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "set_input"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"$ref": "#/$defs/input"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "cancel"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"targetRequestId"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"targetRequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 128
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "reset"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"maxProperties": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "clear_input"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"maxProperties": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "capture"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"maxProperties": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "get_state"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"maxProperties": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "get_fault"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"maxProperties": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"command": {
|
||||||
|
"const": "shutdown"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"type": "object",
|
||||||
|
"maxProperties": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"$defs": {
|
||||||
|
"version": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [
|
||||||
|
"major",
|
||||||
|
"minor"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"major": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 4294967295
|
||||||
|
},
|
||||||
|
"minor": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 4294967295
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"input": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"up": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"down": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"left": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"right": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"a": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"b": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"x": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"y": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"l": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"r": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"start": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"select": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"touch": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"touchX": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": -2147483648,
|
||||||
|
"maximum": 2147483647,
|
||||||
|
"default": 0
|
||||||
|
},
|
||||||
|
"touchY": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": -2147483648,
|
||||||
|
"maximum": 2147483647,
|
||||||
|
"default": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"requestId": "init",
|
||||||
|
"command": "initialize",
|
||||||
|
"params": {
|
||||||
|
"protocolVersion": {
|
||||||
|
"major": 1,
|
||||||
|
"minor": 0
|
||||||
|
},
|
||||||
|
"requiredCapabilities": [
|
||||||
|
"advance",
|
||||||
|
"capture",
|
||||||
|
"cancel"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "boot",
|
||||||
|
"command": "boot",
|
||||||
|
"params": {
|
||||||
|
"path": "/cartridge"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "reset",
|
||||||
|
"command": "reset",
|
||||||
|
"params": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "input",
|
||||||
|
"command": "set_input",
|
||||||
|
"params": {
|
||||||
|
"right": true,
|
||||||
|
"touch": true,
|
||||||
|
"touchX": 123,
|
||||||
|
"touchY": 45
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "clear",
|
||||||
|
"command": "clear_input",
|
||||||
|
"params": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "advance",
|
||||||
|
"command": "advance",
|
||||||
|
"params": {
|
||||||
|
"frames": 60
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "capture",
|
||||||
|
"command": "capture",
|
||||||
|
"params": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "get_state",
|
||||||
|
"command": "get_state",
|
||||||
|
"params": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "get_fault",
|
||||||
|
"command": "get_fault",
|
||||||
|
"params": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "shutdown",
|
||||||
|
"command": "shutdown",
|
||||||
|
"params": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"requestId": "cancel",
|
||||||
|
"command": "cancel",
|
||||||
|
"params": {
|
||||||
|
"targetRequestId": "advance"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,666 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"title": "Prometeu headless server messages v1.0",
|
||||||
|
"$comment": "requestId additionally has a 128 UTF-8-byte bound; uint counters require lossless decoding. v1.0 producers are checked strictly. Consumers must allow compatible minor extensions.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"const": "hello"
|
||||||
|
},
|
||||||
|
"sessionId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
"protocolVersion": {
|
||||||
|
"$ref": "#/$defs/version"
|
||||||
|
},
|
||||||
|
"runtimeVersion": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
"capabilities": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"limits": {
|
||||||
|
"$ref": "#/$defs/limits"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type",
|
||||||
|
"sessionId",
|
||||||
|
"protocolVersion",
|
||||||
|
"runtimeVersion",
|
||||||
|
"capabilities",
|
||||||
|
"limits"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"const": "progress"
|
||||||
|
},
|
||||||
|
"sessionId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
"requestId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 128
|
||||||
|
},
|
||||||
|
"requested": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"completed": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type",
|
||||||
|
"sessionId",
|
||||||
|
"requestId",
|
||||||
|
"requested",
|
||||||
|
"completed"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"const": "response"
|
||||||
|
},
|
||||||
|
"sessionId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
"requestId": {
|
||||||
|
"type": [
|
||||||
|
"string",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 128
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"$ref": "#/$defs/error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type",
|
||||||
|
"sessionId",
|
||||||
|
"requestId",
|
||||||
|
"error"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"const": "response"
|
||||||
|
},
|
||||||
|
"sessionId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1
|
||||||
|
},
|
||||||
|
"requestId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 128
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/$defs/negotiated"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/$defs/state"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/$defs/advance"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/$defs/capture"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/$defs/fault"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {},
|
||||||
|
"required": [],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"targetRequestId": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 128
|
||||||
|
},
|
||||||
|
"requested": {
|
||||||
|
"const": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"targetRequestId",
|
||||||
|
"requested"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"closed": {
|
||||||
|
"const": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"closed"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type",
|
||||||
|
"sessionId",
|
||||||
|
"requestId",
|
||||||
|
"result"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"$defs": {
|
||||||
|
"version": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"major": {
|
||||||
|
"const": 1
|
||||||
|
},
|
||||||
|
"minor": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"major",
|
||||||
|
"minor"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"details": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"code",
|
||||||
|
"message",
|
||||||
|
"details"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"stack": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"kind": {
|
||||||
|
"const": "int32"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": -2147483648,
|
||||||
|
"maximum": 2147483647
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"kind",
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"kind": {
|
||||||
|
"enum": [
|
||||||
|
"int64",
|
||||||
|
"float64",
|
||||||
|
"string"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"kind",
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"kind": {
|
||||||
|
"const": "heap_ref"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"kind",
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"kind": {
|
||||||
|
"const": "boolean"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"kind",
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"kind": {
|
||||||
|
"const": "null"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"kind",
|
||||||
|
"value"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"state": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pc": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"stackTop": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/$defs/stack"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"logicalFrameIndex": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"tickIndex": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"appId": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"enum": [
|
||||||
|
"running",
|
||||||
|
"paused",
|
||||||
|
"terminated",
|
||||||
|
"faulted"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"pc",
|
||||||
|
"stackTop",
|
||||||
|
"logicalFrameIndex",
|
||||||
|
"tickIndex",
|
||||||
|
"appId",
|
||||||
|
"status"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"fault": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pc": {
|
||||||
|
"type": [
|
||||||
|
"integer",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"summary": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"kind": {
|
||||||
|
"const": "vm_trap"
|
||||||
|
},
|
||||||
|
"trap": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"opcode": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"pc": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"span": {
|
||||||
|
"type": [
|
||||||
|
"object",
|
||||||
|
"null"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"code",
|
||||||
|
"opcode",
|
||||||
|
"message",
|
||||||
|
"pc",
|
||||||
|
"span"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"pc",
|
||||||
|
"summary",
|
||||||
|
"kind",
|
||||||
|
"trap"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pc": {
|
||||||
|
"type": [
|
||||||
|
"integer",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"summary": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"kind": {
|
||||||
|
"const": "vm_panic"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"pc",
|
||||||
|
"summary",
|
||||||
|
"kind",
|
||||||
|
"message"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"pc": {
|
||||||
|
"type": [
|
||||||
|
"integer",
|
||||||
|
"null"
|
||||||
|
],
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"summary": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"kind": {
|
||||||
|
"const": "vm_init"
|
||||||
|
},
|
||||||
|
"initError": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"code": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"code",
|
||||||
|
"message"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"pc",
|
||||||
|
"summary",
|
||||||
|
"kind",
|
||||||
|
"initError"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"advance": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"requested": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"completed": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"stop": {
|
||||||
|
"enum": [
|
||||||
|
"completed",
|
||||||
|
"faulted",
|
||||||
|
"terminated",
|
||||||
|
"canceled",
|
||||||
|
"host_error"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"fault": {
|
||||||
|
"$ref": "#/$defs/fault"
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"$ref": "#/$defs/error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"requested",
|
||||||
|
"completed",
|
||||||
|
"stop"
|
||||||
|
],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"properties": {
|
||||||
|
"stop": {
|
||||||
|
"const": "faulted"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"required": [
|
||||||
|
"fault"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"properties": {
|
||||||
|
"stop": {
|
||||||
|
"const": "host_error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"then": {
|
||||||
|
"required": [
|
||||||
|
"error"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"capture": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"mimeType": {
|
||||||
|
"const": "image/png"
|
||||||
|
},
|
||||||
|
"encoding": {
|
||||||
|
"const": "base64"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"type": "string",
|
||||||
|
"contentEncoding": "base64"
|
||||||
|
},
|
||||||
|
"width": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"height": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"stridePixels": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"pixelFormat": {
|
||||||
|
"const": "RGBA8888"
|
||||||
|
},
|
||||||
|
"logicalFrameIndex": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"frameId": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"mimeType",
|
||||||
|
"encoding",
|
||||||
|
"data",
|
||||||
|
"width",
|
||||||
|
"height",
|
||||||
|
"stridePixels",
|
||||||
|
"pixelFormat",
|
||||||
|
"logicalFrameIndex",
|
||||||
|
"frameId"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"negotiated": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"protocolVersion": {
|
||||||
|
"$ref": "#/$defs/version"
|
||||||
|
},
|
||||||
|
"capabilities": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"protocolVersion",
|
||||||
|
"capabilities"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"limits": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"maxFrames": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"maxCommandBytes": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"maxResponseBytes": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"handshakeTimeoutMs": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"callTimeoutMs": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"shutdownTimeoutMs": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"maxFrames",
|
||||||
|
"maxCommandBytes",
|
||||||
|
"maxResponseBytes",
|
||||||
|
"handshakeTimeoutMs",
|
||||||
|
"callTimeoutMs",
|
||||||
|
"shutdownTimeoutMs"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,51 +0,0 @@
|
|||||||
{"type":"meta","next_id":{"DSC":51,"AGD":54,"DEC":45,"PLN":176,"LSN":59,"CLSN":1}}
|
|
||||||
{"type":"discussion","id":"DSC-0050","status":"done","ticket":"headless-automation-host-hardening","title":"AGD-0052 Hardening — Headless Automation Host and Deterministic Runtime Control","created_at":"2026-09-22","updated_at":"2026-09-23","tags":["runtime","host","headless","automation","deterministic","concurrency","testing"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0058","file":"discussion/lessons/DSC-0050-headless-automation-host-hardening/LSN-0058-deterministic-observation-must-follow-the-active-producer.md","status":"done","created_at":"2026-09-23","updated_at":"2026-09-23"}]}
|
|
||||||
{"type":"discussion","id":"DSC-0049","status":"done","ticket":"headless-automation-host-and-deterministic-runtime-control","title":"Headless Automation Host and Deterministic Runtime Control","created_at":"2026-09-22","updated_at":"2026-09-22","tags":["runtime","host","headless","automation","testing","ai","deterministic","input","framebuffer","debugger"],"agendas":[],"decisions":[],"plans":[],"lessons":[{"id":"LSN-0057","file":"discussion/lessons/DSC-0049-headless-automation-host-and-deterministic-runtime-control/LSN-0057-deterministic-host-control-follows-logical-runtime-boundaries.md","status":"done","created_at":"2026-09-22","updated_at":"2026-09-22"}]}
|
|
||||||
{"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-09-22","tags":[],"agendas":[{"id":"AGD-0002","file":"AGD-0002-packed-cartridge-loader-pmc.md","status":"open","created_at":"2026-03-27","updated_at":"2026-09-22"}],"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-09-22","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-09-22"}],"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-09-22","tags":[],"agendas":[{"id":"AGD-0005","file":"AGD-0005-vm-owned-random-service.md","status":"open","created_at":"2026-03-27","updated_at":"2026-09-22"}],"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-09-22","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-09-22"}],"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"}]}
|
|
||||||
@@ -1,118 +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;
|
|
||||||
- equivalência observável entre diretório e `.pmc` para qualquer host que use `CartridgeLoader`, incluindo o host desktop e o host headless de `AGD-0052`.
|
|
||||||
|
|
||||||
## Revalidação — 2026-09-22
|
|
||||||
|
|
||||||
Revalidada contra o código atual e contra `AGD-0052` / `DSC-0049` (Headless Automation Host and Deterministic Runtime Control). A agenda permanece aberta.
|
|
||||||
|
|
||||||
### O que permanece
|
|
||||||
|
|
||||||
`PackedCartridgeLoader::load` ainda retorna `CartridgeError::InvalidFormat` sem ler o arquivo. O dispatcher continua aceitando a extensão `.pmc` e delegando para esse stub. O loader de diretório é o caminho real: `manifest.json`, `program.pbx` e `assets.pa` quando a capability de asset exige. Boot direto (`BootTarget::Cartridge`) e o host desktop usam esse mesmo `CartridgeLoader`.
|
|
||||||
|
|
||||||
O problema original segue válido: a plataforma anuncia dois formatos e só o diretório funciona.
|
|
||||||
|
|
||||||
### Efeito da direção headless
|
|
||||||
|
|
||||||
`AGD-0052` coloca o host headless como consumidor novo do loader, e deixa o formato `.pmc` fora do primeiro ciclo. O primeiro boot automatizado usa cartucho de diretório, o mesmo artefato que o host desktop já carrega.
|
|
||||||
|
|
||||||
Consequências para esta agenda:
|
|
||||||
|
|
||||||
- headless, CI e agente não definem o container;
|
|
||||||
- quando `.pmc` existir, diretório e pacote precisam materializar o mesmo cartucho lógico, para o determinismo não depender da origem dos bytes;
|
|
||||||
- a ordem física do container continua impedida de alterar o resultado, como o item de segurança e determinismo já pedia;
|
|
||||||
- esta agenda não absorve captura de framebuffer, replay ou protocolo de automação.
|
|
||||||
|
|
||||||
### O que não mudou no critério
|
|
||||||
|
|
||||||
Formato, arquivos obrigatórios, erros canônicos, invariantes de segurança e testes de equivalência continuam sendo o fechamento. O critério de saída ganhou só a exigência de que essa equivalência valha para todo host do `CartridgeLoader`.
|
|
||||||
|
|
||||||
### Perguntas que continuam abertas
|
|
||||||
|
|
||||||
- [ ] O `.pmc` é zip, tar, formato próprio ou envelope com header e blobs?
|
|
||||||
- [ ] Quais entradas são obrigatórias além das que o loader de diretório já exige?
|
|
||||||
- [ ] Qual matriz de erro determinística substitui o `InvalidFormat` genérico do stub?
|
|
||||||
@@ -1,84 +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 domínio `system` exposto à userland ficou pequeno, e a política de retorno dele ainda não está escrita.
|
|
||||||
|
|
||||||
Estado em 2026-09-22:
|
|
||||||
|
|
||||||
- a superfície gerada é só `system.has_cart` (`Syscall::SystemHasCart`), com 1 retorno e capability `SYSTEM`;
|
|
||||||
- o dispatch devolve `true` fixo, sem consultar cartucho e sem `status`;
|
|
||||||
- `system.run_cart` saiu da ABI de userland. Launch de cartucho é ação de SystemOS/firmware/host (`LSN-0051`, `DSC-0004`);
|
|
||||||
- fault de execução da VM já tem forma estruturada em `CrashReport` (`VmTrap`, `VmPanic`, `VmInit`), observada pelo host e pelo debugger.
|
|
||||||
|
|
||||||
O texto de 2026-03-27 tratava `SystemRunCart` como operação ainda sem efeito e apontava a agenda `009` e `virtual_machine_runtime/dispatch.rs`. Esses dois pontos ficaram obsoletos. A política de fault do que permanece no domínio `system` continua aberta.
|
|
||||||
|
|
||||||
## Dor
|
|
||||||
|
|
||||||
- `has_cart` pode permanecer um bool fixo e mascarar ausência, cartucho inválido ou consulta fora de autoridade;
|
|
||||||
- uma futura operação de `system` pode herdar `Trap` ou `Panic` onde o contrato transversal pede `status`;
|
|
||||||
- automação headless (`AGD-0052`) precisa observar fault estruturado sem que esta agenda redesenhe `CrashReport` nem invente syscall de controle para CI ou agente.
|
|
||||||
|
|
||||||
## Hotspots Atuais
|
|
||||||
|
|
||||||
- `crates/console/prometeu-hal/src/syscalls/domains/system.rs`
|
|
||||||
- `crates/console/prometeu-system/src/services/vm_runtime/dispatch.rs` (`SystemHasCart` retorna `true`)
|
|
||||||
- `crates/console/prometeu-system/src/crash_report.rs`
|
|
||||||
- `docs/specs/runtime/16a-syscall-policies.md`
|
|
||||||
- `discussion/lessons/DSC-0004-system-run-cart/LSN-0051-launch-authority-belongs-to-systemos.md`
|
|
||||||
|
|
||||||
## Alvo da Discussao
|
|
||||||
|
|
||||||
Fechar a política de fault e retorno do domínio `system` que ainda é visível à userland, e separar essa política da observação de fault de VM feita pelo host.
|
|
||||||
|
|
||||||
## O Que Precisa Ser Definido
|
|
||||||
|
|
||||||
1. Queries simples.
|
|
||||||
Decidir a política de `has_cart`: bool atual, `status` mais payload, ou outra forma compatível com `16a`. Incluir o que a consulta realmente observa.
|
|
||||||
|
|
||||||
2. Operações que não voltam para a userland.
|
|
||||||
`run_cart` permanece fora da ABI de convidado. Falha de boot direto continua no caminho de host/firmware (`CartridgeError`, `CrashReport::VmInit`, transição de firmware), não como syscall de app.
|
|
||||||
|
|
||||||
3. Relação com firmware e com o host.
|
|
||||||
Delimitar falha de app, falha de firmware e falha de runtime. `CrashReport` é a observação estruturada de Trap/Panic/init. `summary()` e log são apresentação, não o contrato.
|
|
||||||
|
|
||||||
## Dependencias
|
|
||||||
|
|
||||||
- `docs/specs/runtime/16a-syscall-policies.md`
|
|
||||||
- `LSN-0051` / `DSC-0004`
|
|
||||||
- `AGD-0052` / `DSC-0049`, apenas como consumidor da observação estruturada
|
|
||||||
|
|
||||||
## Critério de Saida Desta Agenda
|
|
||||||
|
|
||||||
Pode virar decision quando houver definição escrita sobre:
|
|
||||||
|
|
||||||
- matriz de `status` / `Trap` / `Panic` para as operações userland que o domínio `system` mantém, começando por `has_cart`;
|
|
||||||
- confirmação de que launch de cartucho permanece fora da ABI de convidado;
|
|
||||||
- fronteira entre retorno operacional de syscall, erro de loader/boot e `CrashReport`.
|
|
||||||
|
|
||||||
## Revalidação — 2026-09-22
|
|
||||||
|
|
||||||
Revalidada contra o código atual e contra `AGD-0052`. A agenda permanece aberta. O alvo encolheu: ela não reabre `run_cart`.
|
|
||||||
|
|
||||||
### O que a direção headless muda
|
|
||||||
|
|
||||||
`AGD-0052` exige que automação distinga execução em curso, pause, término, `Trap` e `Panic` lendo dados estruturados. Esse requisito observa `CrashReport` e o estado da VM. Ele não altera a semântica normativa de fault de outros domínios e não cria syscall `system` para controle headless.
|
|
||||||
|
|
||||||
Esta agenda continua dona da matriz de retorno de `system`. A agenda headless continua dona de como o host expõe o fault que já existe.
|
|
||||||
|
|
||||||
### Perguntas que continuam abertas
|
|
||||||
|
|
||||||
- [ ] `has_cart` passa a ter `status` e um significado real de presença de cartucho, ou o bool atual é o contrato e o stub `true` é o bug a corrigir em outra discussão?
|
|
||||||
- [ ] Alguma falha de boot direto precisa ser visível ao convidado, ou toda falha de launch permanece em host, firmware e `CrashReport`?
|
|
||||||
- [ ] Quais campos de `CrashReport` são o contrato observável (`kind`, `pc`, `trap.code`) e quais são só texto de log?
|
|
||||||
@@ -1,99 +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. O caminho determinístico aceita só seed explícita. Entropia de host, se um dia existir, é modo separado e fica fora da timeline automatizada?
|
|
||||||
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?
|
|
||||||
5. O primeiro oráculo de `AGD-0052` pode provar determinismo com cartucho que não chama random, e qualquer cartucho que chame random espera o fechamento desta agenda?
|
|
||||||
|
|
||||||
## Dependencias
|
|
||||||
|
|
||||||
- contexto histórico, já aposentado como decisão viva: `discussion/lessons/DSC-0001-runtime-learn-legacy-import/LSN-0008-historical-vm-core-and-assets.md` cita `006-vm-owned-stateful-core-contract.md`
|
|
||||||
- `docs/vm-arch/ISA_CORE.md`
|
|
||||||
- `docs/specs/runtime/16-host-abi-and-syscalls.md`
|
|
||||||
- `docs/specs/runtime/16a-syscall-policies.md`
|
|
||||||
- `AGD-0052` / `DSC-0049`, como consumidor do contrato determinístico
|
|
||||||
|
|
||||||
Não há arquivo vivo em `discussion/workflow/decisions/` para a decisão `006`. Esta agenda não trata esse texto como contrato atual.
|
|
||||||
|
|
||||||
## Fora de Escopo
|
|
||||||
|
|
||||||
- entropia não determinística como contrato base;
|
|
||||||
- PRNGs múltiplos no mesmo ciclo de fechamento;
|
|
||||||
- APIs de coleções stateful;
|
|
||||||
- window/app model;
|
|
||||||
- formato persistente de replay. Esta agenda define reprodução em memória: seed explícita mais sequência de `next`. Arquivo, versão e timeline de input ficam para a agenda de replay citada por `AGD-0052`.
|
|
||||||
|
|
||||||
## Criterio de Saida Desta Agenda
|
|
||||||
|
|
||||||
Pode virar decision quando houver definição escrita sobre:
|
|
||||||
|
|
||||||
- surface mínima de random VM-owned;
|
|
||||||
- contrato de determinismo: seed explícita, ausência de entropia implícita de host, reprodução da sequência;
|
|
||||||
- fault/status de random;
|
|
||||||
- IDs/versionamento e validações de verifier para as operações do domínio;
|
|
||||||
- o que um host automatizado precisa fixar (seeds iniciais) para que duas execuções coincidam.
|
|
||||||
|
|
||||||
## Revalidação — 2026-09-22
|
|
||||||
|
|
||||||
Revalidada contra o código atual e contra `AGD-0052`. A agenda permanece aberta. Não existe serviço de random na VM. O scheduler declara ausência de randomness. `prometeu-test-support` oferece `StdRng` semeado para testes Rust; isso não é random de convidado.
|
|
||||||
|
|
||||||
### Efeito da direção headless
|
|
||||||
|
|
||||||
`AGD-0052` diz que random VM-owned usado em execução automatizada obedece ao contrato desta agenda, e que entropia implícita do host não entra no caminho determinístico. Isso reforça a pergunta 1 na direção de seed explícita como único modo determinístico.
|
|
||||||
|
|
||||||
O primeiro teste end-to-end headless pode usar um cartucho que não chama random. Esse teste prova input, frame e fault. Ele não prova random. Cartucho cujo resultado depende de random só serve como oráculo depois que esta agenda fechar seeds, sequência e faults.
|
|
||||||
|
|
||||||
Relógio de parede em telemetria (`host_cpu_time_us`, timestamp de certificação) não é fonte de random e não entra neste contrato.
|
|
||||||
|
|
||||||
Replay em arquivo continua fora daqui e fora do primeiro ciclo headless. O que esta agenda precisa deixar pronto é a reprodução em memória da sequência a partir das seeds.
|
|
||||||
@@ -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,140 +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? Encaminhada para `AGD-0052` / `DSC-0049`: o host headless é o lugar dessa prova. Esta agenda continua dona da escolha de backend portátil, não do controle determinístico.
|
|
||||||
- [ ] 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.
|
|
||||||
|
|
||||||
Atualizacao 2026-09-22: `AGD-0052` abre um terceiro host, headless, para teste, CI e controle determinístico em memória. Esse host não substitui o candidato portátil desta agenda e não escolhe SDL. A pergunta de validar input e pacing sem janela em CI passa a ser respondida lá. Extração de loop comum entre winit, SDL e headless continua esperando duplicação real.
|
|
||||||
|
|
||||||
## Resolution
|
|
||||||
+1
-1
@@ -15,4 +15,4 @@ targets = ["aarch64-apple-darwin", "x86_64-apple-darwin"]
|
|||||||
unix-archive = ".zip"
|
unix-archive = ".zip"
|
||||||
macos-universal-binaries = true
|
macos-universal-binaries = true
|
||||||
[dist.hooks]
|
[dist.hooks]
|
||||||
pre-build = ["./scripts/pre-dist.sh"]
|
pre-build = ["./scripts/gen-version.sh"]
|
||||||
|
|||||||
@@ -98,7 +98,9 @@ meanings even though their transports and pacing differ:
|
|||||||
| Reset the machine execution | not defined by the debugger protocol | `reset()` |
|
| Reset the machine execution | not defined by the debugger protocol | `reset()` |
|
||||||
| Capture the canonical published frame | not defined by the debugger protocol | `capture_frame()` |
|
| 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.
|
The in-process headless API does not itself define or extend a wire protocol.
|
||||||
|
The separate [headless automation protocol](11a-headless-automation-protocol.md)
|
||||||
|
exposes that API over versioned JSONL/stdio without extending human DevTools.
|
||||||
|
|
||||||
## 4 State Inspection Boundary
|
## 4 State Inspection Boundary
|
||||||
|
|
||||||
|
|||||||
@@ -219,6 +219,10 @@ PROMETEU promises:
|
|||||||
|
|
||||||
## 13 Deterministic Headless Control
|
## 13 Deterministic Headless Control
|
||||||
|
|
||||||
|
The external tooling boundary is specified separately in
|
||||||
|
[Headless Automation Protocol v1](11a-headless-automation-protocol.md). It preserves
|
||||||
|
the in-process semantics in this section and does not extend the guest ABI.
|
||||||
|
|
||||||
The headless host is a separate, generic Prometeu host for in-process
|
The headless host is a separate, generic Prometeu host for in-process
|
||||||
automation. It runs the same directory cartridge, firmware, active VM session,
|
automation. It runs the same directory cartridge, firmware, active VM session,
|
||||||
capability checks, normalized input, render submissions, and fault model as an
|
capability checks, normalized input, render submissions, and fault model as an
|
||||||
@@ -255,9 +259,13 @@ wall-clock timeout.
|
|||||||
- `advance_frames(n)` is repeated `advance_frame()`. It reports the requested
|
- `advance_frames(n)` is repeated `advance_frame()`. It reports the requested
|
||||||
and completed counts plus completed-all, fault, or termination. Zero is a
|
and completed counts plus completed-all, fault, or termination. Zero is a
|
||||||
no-op; fault or termination preserves partial completed progress.
|
no-op; fault or termination preserves partial completed progress.
|
||||||
- A frame advance finishes paused. Guest faults are outcomes represented by
|
- A frame advance finishes paused and clears its host-owned debug-step request,
|
||||||
`CrashReport`; host precondition, publication, and safety-limit failures are
|
including when lifecycle termination interrupts the advance. Guest faults
|
||||||
host errors.
|
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
|
- `capture_frame()` returns an owned clone of the canonical frame paired with
|
||||||
the latest successful advance. The explicit `{logical_frame_index, FrameId}`
|
the latest successful advance. The explicit `{logical_frame_index, FrameId}`
|
||||||
pair is authoritative; no numeric equality or fixed offset is implied.
|
pair is authoritative; no numeric equality or fixed offset is implied.
|
||||||
|
|||||||
@@ -0,0 +1,161 @@
|
|||||||
|
# Headless Automation Protocol v1
|
||||||
|
|
||||||
|
**Domain:** runtime host tooling. **Function:** normative.
|
||||||
|
|
||||||
|
This chapter implements Studio DSC-0068 / DEC-0060 baseline v1, runtime phase
|
||||||
|
of PLN-0139. The host owns this wire contract. It does not change guest ABI,
|
||||||
|
firmware, VM, frame/input semantics or the desktop DevTools protocol.
|
||||||
|
|
||||||
|
## Process and transport
|
||||||
|
|
||||||
|
`prometeu headless --stdio` starts the distributed `prometeu-headless` tool from
|
||||||
|
the same installation. One process owns one HeadlessHost. No display, native
|
||||||
|
audio, network service or realtime pacing is required. A client must use its
|
||||||
|
configured installation; missing binaries/capabilities are explicit failures.
|
||||||
|
|
||||||
|
Transport is UTF-8 JSON objects separated by LF (CRLF is accepted). stdout is
|
||||||
|
protocol-only; diagnostics go to stderr. Fragmented reads must be accumulated;
|
||||||
|
allocation is bounded by the command limit. An oversized line is rejected and
|
||||||
|
drained through LF before reading the next request. EOF with an incomplete line
|
||||||
|
reports `invalid_request`, then closes the session. EOF always requests shutdown.
|
||||||
|
|
||||||
|
All sizes exclude the LF delimiter and include the complete JSON envelope and
|
||||||
|
base64 payload. Responses exceeding their bound become `response_too_large`,
|
||||||
|
never truncated data. Clients must continuously consume stdout, including events.
|
||||||
|
Backpressure may block output; the supervising client owns wall-clock deadlines
|
||||||
|
and may terminate the process tree. There is no transport replay or durable queue.
|
||||||
|
|
||||||
|
## Handshake and compatibility
|
||||||
|
|
||||||
|
The server first emits a `hello` object with `sessionId`, `protocolVersion`
|
||||||
|
(`major: 1, minor: 0`), real `runtimeVersion`, `capabilities` and `limits`.
|
||||||
|
Session identity is opaque and process-local, excluded from deterministic oracles.
|
||||||
|
|
||||||
|
Before work, the client sends `initialize` with `protocolVersion` and an array
|
||||||
|
`requiredCapabilities`. An incompatible major returns `incompatible_version`;
|
||||||
|
missing capabilities return `unsupported_capability`. The session remains
|
||||||
|
uninitialized and cannot execute work. Compatible minor additions are permitted;
|
||||||
|
the initialize result returns the lesser supported minor. Initialize is accepted
|
||||||
|
once; repeated initialization returns `already_initialized`. Shutdown is permitted
|
||||||
|
even before initialization. All other work requires successful initialization.
|
||||||
|
|
||||||
|
## Envelopes
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"requestId":"a1","command":"advance","params":{"frames":60}}
|
||||||
|
```
|
||||||
|
|
||||||
|
`requestId` is a nonempty string of at most 128 UTF-8 bytes, selected by the
|
||||||
|
client; concurrent requests must have distinct identities. `command` and `params`
|
||||||
|
are required. Unknown fields and invalid parameter types are rejected. The
|
||||||
|
request schema is distributed in `devtools/headless-protocol/request.schema.json`;
|
||||||
|
`response.schema.json` defines hello, progress and every response/result shape.
|
||||||
|
Valid and invalid request fixtures are shipped beside the schemas. Process tests
|
||||||
|
validate actual server output against the response schema (including image results).
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"type":"response","sessionId":"opaque","requestId":"a1","result":{"requested":60,"completed":60,"stop":"completed"}}
|
||||||
|
{"type":"response","sessionId":"opaque","requestId":"a1","error":{"code":"busy","message":"...","details":{}}}
|
||||||
|
```
|
||||||
|
|
||||||
|
A response contains exactly one of result/error. Errors have stable `code`,
|
||||||
|
human-readable `message` and structured `details`. Unparseable/unusable request
|
||||||
|
identity is represented by null; valid identity is preserved on parameter errors.
|
||||||
|
Malformed JSON, invalid schema and unknown commands must never disappear silently.
|
||||||
|
Wire requestId is correlation, not deduplication: the client must not retry an
|
||||||
|
advance blindly after a lost response. Studio task-level clientRequestId and
|
||||||
|
operationId are a separate boundary, not part of this wire protocol.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
| Command | Parameters | Result/meaning |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| initialize | protocolVersion, requiredCapabilities | negotiated version and capabilities |
|
||||||
|
| boot | path (nonempty directory-cartridge path) | current state; existing boot preconditions apply |
|
||||||
|
| reset | empty object | reset state, clears input/fault/frame correlation |
|
||||||
|
| set_input | complete snapshot fields listed below; omitted fields reset to defaults | input replaced, not patched |
|
||||||
|
| clear_input | empty object | input restored to defaults |
|
||||||
|
| advance | frames: unsigned integer, including zero | requested, completed, stop, optional fault/error details |
|
||||||
|
| capture | empty object | PNG/base64 plus canonical frame metadata |
|
||||||
|
| get_state | empty object | pc, stackTop, logicalFrameIndex, tickIndex, appId, status |
|
||||||
|
| get_fault | empty object | fault object or null |
|
||||||
|
| cancel | targetRequestId | acknowledgement that cancellation was requested for that active advance |
|
||||||
|
| shutdown | empty object | acknowledgement after the active operation stops and host is dropped |
|
||||||
|
|
||||||
|
Input snapshot fields are `up`, `down`, `left`, `right`, `a`, `b`, `x`, `y`, `l`,
|
||||||
|
`r`, `start`, `select`, `touch` (booleans), and `touchX`, `touchY` (signed i32).
|
||||||
|
Omitted booleans are false and omitted coordinates are zero. The ordinary runtime
|
||||||
|
begin-frame sampling derives press/release/hold edges. No new input semantics exist.
|
||||||
|
|
||||||
|
State statuses are `running`, `paused`, `terminated`, `faulted`; `running` does
|
||||||
|
not mean background execution. Stack values preserve their type through tagged
|
||||||
|
`kind`/`value` objects; i64 values are decimal strings and float values carry an
|
||||||
|
exact round-trippable string (including non-finite values). Faults expose kind,
|
||||||
|
pc, summary and structural trap code/opcode/message/source span or init-error code.
|
||||||
|
No client must parse a summary to distinguish trap, panic or initialization failure.
|
||||||
|
|
||||||
|
## Ordering, cancellation and lifecycle
|
||||||
|
|
||||||
|
Only one host operation is admitted at a time. Conflicting work, including state
|
||||||
|
inspection while the host is executing, returns `busy`; it is not implicitly
|
||||||
|
queued. The command reader remains available for cancel/shutdown while an advance
|
||||||
|
executes. Cancellation targets an active advance's requestId; no active matching
|
||||||
|
advance returns `not_cancelable`. An acknowledgement is not a completed cancellation.
|
||||||
|
|
||||||
|
Advancement is repeated `advance_frame()`, checking cancellation between frames.
|
||||||
|
The current frame keeps the existing deterministic host-tick watchdog. Zero frames
|
||||||
|
is a no-op. Results preserve requested/completed counts and `stop` values:
|
||||||
|
`completed`, `faulted`, `terminated`, `canceled`, `host_error`.
|
||||||
|
Guest faults are outcomes, not malformed-request errors. Host errors include a
|
||||||
|
stable code and known completed progress; they do not manufacture guest faults.
|
||||||
|
|
||||||
|
Each completed frame emits `type: progress`, requestId, sessionId, requested and
|
||||||
|
completed counts before the terminal response. A client can retain known progress
|
||||||
|
if the process dies. The final response is authoritative when delivered.
|
||||||
|
|
||||||
|
Shutdown/EOF requests cancellation, waits for the active work to reach its boundary,
|
||||||
|
drops the host and exits; explicit shutdown receives its response after cleanup.
|
||||||
|
Disconnect never starts/resumes execution. A failed process requires a new explicit
|
||||||
|
session, not replay. Host session loss does not implicitly release Studio authority.
|
||||||
|
|
||||||
|
## Capture
|
||||||
|
|
||||||
|
Capture returns `mimeType: image/png`, `encoding: base64`, `data`, `width`, `height`,
|
||||||
|
`stridePixels`, `pixelFormat: RGBA8888`, `logicalFrameIndex` and `frameId`.
|
||||||
|
The envelope carries sessionId; the Studio consumer adds build correlation.
|
||||||
|
Frame identities/counters on this wire are unsigned JSON integers and must be
|
||||||
|
decoded losslessly. logicalFrameIndex and frameId have no numeric equality rule.
|
||||||
|
|
||||||
|
PNG stores visible RGBA channels in row order, losslessly, without stride padding.
|
||||||
|
stridePixels describes the original canonical buffer. Before a completed frame,
|
||||||
|
including after reset, capture returns `no_frame_available`; it cannot reuse an
|
||||||
|
old run. No desktop screenshot, hash-only substitute, temporary-image-file transport
|
||||||
|
or continuous video is permitted.
|
||||||
|
|
||||||
|
## Configurable limits and supervision
|
||||||
|
|
||||||
|
| CLI option / handshake field | Default |
|
||||||
|
| --- | --- |
|
||||||
|
| --max-frames / maxFrames | 600 |
|
||||||
|
| --max-command-bytes / maxCommandBytes | 65536 |
|
||||||
|
| --max-response-bytes / maxResponseBytes | 33554432 |
|
||||||
|
| --handshake-timeout-ms / handshakeTimeoutMs | 5000 |
|
||||||
|
| --call-timeout-ms / callTimeoutMs | 60000 |
|
||||||
|
| --shutdown-timeout-ms / shutdownTimeoutMs | 5000 |
|
||||||
|
|
||||||
|
Limits must be positive; message bounds must be at least 4096 bytes to admit the
|
||||||
|
handshake and bounded errors. Limits apply to serialized bytes, not characters.
|
||||||
|
Clients must enforce the advertised handshake/call deadlines and 5-second default
|
||||||
|
cancel/shutdown grace, then terminate only the process tree they own. Deadlines are
|
||||||
|
host supervision, not simulated guest time. Runtime enforces frame/message bounds
|
||||||
|
without clamping. Requests over limits fail explicitly. Clients configure startup
|
||||||
|
timeouts before seeing the handshake, then verify the announced values.
|
||||||
|
|
||||||
|
## Conformance
|
||||||
|
|
||||||
|
The runtime gate includes fragmented/invalid/oversized lines, negotiation failures,
|
||||||
|
all commands, busy/cancel/shutdown races, EOF, real CLI distribution invocation,
|
||||||
|
PNG pixel equality, independent logical/render identity, repeat/reset determinism,
|
||||||
|
structured faults, progress on partial failure and retained desktop run/debug.
|
||||||
|
Neither Studio UI nor an AI model is required. See `tests/automation_process.rs`
|
||||||
|
in prometeu-cli and the in-process deterministic-control tests in the headless crate.
|
||||||
@@ -90,6 +90,7 @@ In the current state, no chapter under the active `docs/runtime/specs/` root is
|
|||||||
| [`09a-coroutines-and-cooperative-scheduling.md`](09a-coroutines-and-cooperative-scheduling.md) | VM coroutine model | normative |
|
| [`09a-coroutines-and-cooperative-scheduling.md`](09a-coroutines-and-cooperative-scheduling.md) | VM coroutine model | normative |
|
||||||
| [`10-debug-inspection-and-profiling.md`](10-debug-inspection-and-profiling.md) | machine diagnostics | normative |
|
| [`10-debug-inspection-and-profiling.md`](10-debug-inspection-and-profiling.md) | machine diagnostics | normative |
|
||||||
| [`11-portability-and-cross-platform-execution.md`](11-portability-and-cross-platform-execution.md) | portability contract | normative |
|
| [`11-portability-and-cross-platform-execution.md`](11-portability-and-cross-platform-execution.md) | portability contract | normative |
|
||||||
|
| [`11a-headless-automation-protocol.md`](11a-headless-automation-protocol.md) | external headless host automation | normative |
|
||||||
| [`12-firmware-pos-and-prometeuhub.md`](12-firmware-pos-and-prometeuhub.md) | firmware and system orchestration | normative |
|
| [`12-firmware-pos-and-prometeuhub.md`](12-firmware-pos-and-prometeuhub.md) | firmware and system orchestration | normative |
|
||||||
| [`13-cartridge.md`](13-cartridge.md) | cartridge package | normative |
|
| [`13-cartridge.md`](13-cartridge.md) | cartridge package | normative |
|
||||||
| [`14-boot-profiles.md`](14-boot-profiles.md) | firmware boot flow | normative |
|
| [`14-boot-profiles.md`](14-boot-profiles.md) | firmware boot flow | normative |
|
||||||
|
|||||||
+13
-8
@@ -1,30 +1,35 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Resolve inputs from this checkout, independently of the caller's cwd.
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
# Generate version
|
# Generate version
|
||||||
./scripts/gen-version.sh
|
./scripts/gen-version.sh
|
||||||
|
|
||||||
# Prepare staging for SDK extra files
|
# Prepare staging for SDK extra files
|
||||||
echo "Preparing dist-staging..."
|
echo "Preparing dist-staging..."
|
||||||
rm -rf dist-staging/devtools/debugger-protocol
|
|
||||||
|
|
||||||
mkdir -p dist-staging/devtools/debugger-protocol
|
mkdir -p dist-staging/devtools/debugger-protocol
|
||||||
|
mkdir -p dist-staging/devtools/headless-protocol dist-staging/docs/runtime
|
||||||
|
|
||||||
cp devtools/debugger-protocol/protocol.json dist-staging/devtools/debugger-protocol/
|
cp devtools/debugger-protocol/protocol.json dist-staging/devtools/debugger-protocol/
|
||||||
|
|
||||||
cp VERSION.txt dist-staging/devtools/debugger-protocol/VERSION.txt
|
cp VERSION.txt dist-staging/devtools/debugger-protocol/VERSION.txt
|
||||||
|
cp devtools/headless-protocol/*.json dist-staging/devtools/headless-protocol/
|
||||||
|
cp VERSION.txt dist-staging/devtools/headless-protocol/VERSION.txt
|
||||||
|
cp docs/specs/runtime/11a-headless-automation-protocol.md dist-staging/docs/runtime/
|
||||||
|
|
||||||
# Clean and prepare the version-specific directory
|
# Clean and prepare the version-specific directory
|
||||||
echo "Cleaning dist-staging/stable..."
|
echo "Preparing dist-staging/stable (existing archives are retained)..."
|
||||||
mkdir -p "dist-staging/stable"
|
mkdir -p "dist-staging/stable"
|
||||||
rm -rf "dist-staging/stable/*"
|
|
||||||
|
|
||||||
# Build stable using cargo build
|
# Build stable using cargo build
|
||||||
dist build
|
dist build "$@"
|
||||||
|
|
||||||
echo "Copying target/distrib content to dist-staging/stable..."
|
echo "Copying target/distrib content to dist-staging/stable..."
|
||||||
if [ -d "target/distrib" ] && [ "$(ls -A target/distrib)" ]; then
|
if [ -d "target/distrib" ] && [ "$(ls -A target/distrib)" ]; then
|
||||||
cp -r target/distrib/* "dist-staging/stable/"
|
cp -r target/distrib/* "dist-staging/stable/"
|
||||||
else
|
else
|
||||||
echo "Warning: target/dist directory not found or empty."
|
echo "Error: target/distrib directory not found or empty." >&2
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user