Files
browser/openspec/changes/repair-run-runtime-state-and-log-recovery/proposal.md
T

29 lines
2.4 KiB
Markdown

## Why
Stopping or restarting a generated Run can leave Platform displaying a stale `running` server projection, while newly produced supervised-process logs are rejected because the restarted Run reuses an already acknowledged sequence range. Operators then see neither a trustworthy runtime state nor new terminal output, even though control registration and SSE remain available.
## What Changes
- Make generated Run report later supervised-process exits and recovered process facts through the existing signed lifecycle report channel, not only the initial autonomous bootstrap result.
- Define a durable per-log-stream sequence and acknowledgement recovery contract so a Run restart can continue an existing stream without reusing conflicting sequence numbers; explicitly isolate irreconcilable local spool segments instead of retrying them forever.
- Expose runtime observation freshness separately from the persisted lifecycle projection, so Platform Web does not present an unverified historical `running` state as current process truth after the bound Run is offline.
- Ensure direct Run shutdown has explicit generic process-supervision semantics; it must not silently imply that a game process stopped unless Run observed and reported that fact.
## Capabilities
### New Capabilities
- `run-supervised-runtime-observation`: Run reports observed transitions for generated autonomous processes, and Platform preserves their audited lifecycle projection.
- `restart-safe-run-log-ingest`: Generated Run restores durable per-stream log progress or isolates conflicts so restarted log delivery resumes without sequence overlap.
- `runtime-observation-freshness`: Management views distinguish a current Run-observed state from a stale lifecycle projection when the bound endpoint is offline or its heartbeat is overdue.
### Modified Capabilities
- None.
## Impact
- Affects the independent `run` repository's process supervisor, autonomous lifecycle monitor, log spool, and Run-Platform protocol client.
- Affects `platform/` lifecycle projection, log ingest contracts, DTO/API types, and endpoint freshness data.
- Affects `platform_web/` server list/detail and management-terminal status presentation; SSE remains the browser log transport.
- Requires synchronized contract changes and end-to-end restart/recovery tests. It does not add plugin-specific lifecycle behavior, new product areas, or direct browser-to-host access.