[Sim Theme B] Launch menu & simulator lifecycle#23
Conversation
d2f0f14 to
44a7113
Compare
…ncurrency, reload reconnect, autostart (FR-B1..B8)
🤖 Automated PR reviewLaunch menu & lifecycle — Findings
✅ Security hardening is exemplary: launch/stop uses a registry-derived allowlist distinct from the restart allowlist, the id is charset-constrained by regex and validated against the registry, and only start/stop-by-container-id are issued — no exec/create/shell. Idempotent 204/304 handling, clean polling teardown in Recommendation: Approve; consider the reconcile-on-restart behavior before merge. |
jmservera
left a comment
There was a problem hiding this comment.
🤖 Automated line-anchored review — see the summary comment for the full findings table.
| // until launched from the menu, and autostart-on simulators are (re)started if | ||
| // the profile left them down. Runs once shortly after boot to let compose finish | ||
| // creating containers; failures are swallowed so the menu still works manually. | ||
| async function reconcileAutostart() { |
There was a problem hiding this comment.
🟡 Medium — reconcile-on-every-boot reverts manual launches. reconcileAutostart() runs on every control-plane boot and stops any running autostart:false sim. A control-plane restart (crash / restart: unless-stopped) therefore silently kills a simulator the user launched manually from the menu. Consider a one-shot-at-stack-start guard or a "user-touched" marker so reconcile doesn't undo manual launches. Separately (🟢 Low): the single fixed UBEROS_AUTOSTART_DELAY_MS timer can miss slow container creation — a short bounded retry would be more robust. The launch/stop allowlist hardening in this file is otherwise exemplary.
…im-theme-b-launch-menu
…im-theme-b-launch-menu
…im-theme-b-launch-menu
Implements Theme B of the Simulation & Visualization PRD (FR-B1..B8). Lane 1 (foundation) — depends on Theme A (registry + GET /simulators). Adds launch/stop endpoints, concurrent + reload-persistent lifecycle, allowlisted start/stop, configurable autostart. Plan: docs/plans/sim-theme-b-launch-menu.md. Draft.