Control Panel Service Lifecycle And Quality Gates
Purpose
The control panel is the operator UI for local service lifecycle, remote control-agent operations, monitoring, presence/fleet views, account/admin actions, and descriptor-backed quality gates. It should surface service state without becoming a second source of service orchestration rules.
Local Service Model
The local model describes control-plane, login-server, and game-server services, their labels, dependencies, ports, commands, and readiness checks. Start order should respect dependencies: control-plane first, login next, game after the coordination and database path are available.
Config And Secrets
Control-panel config stores local service settings such as database URL, Redis URL, ports, and control auth secret handling. Secret placeholders should be redacted in UI and inherited consistently by child service processes.
Start, Stop, And Restart
Start builds or runs the service command, waits for dependencies where required, records process metadata, captures logs, and updates readiness state. Stop and restart should terminate the process tree owned by the launched service, not unrelated developer processes.
Remote Agent Operations
Remote control-agent calls use agent endpoints and bearer-token auth. Agent operations do not automatically sequence local dependencies; the operator must understand whether a remote start or stop affects other registered services.
Polling And Projections
The panel polls health, readiness, fleet/presence, and agent reachability. Projection code should convert raw service responses into stable labels and actions so the UI does not duplicate service-specific interpretation.
Quality Gate Tab
Quality gate actions come from shared xtask descriptors. The panel should render the same command specs, plan outputs, JSONL events, and pass/fail summaries as the CLI. If a gate button drifts from xtask, fix the descriptor path.
Failure Playbook
For build failures, inspect the captured service log. For dependency failures, check the upstream service /ready. For stale process state, compare process records with the actual process tree. For agent auth failures, verify endpoint and token. For gate failures, use the gate plan and event JSONL before rerunning.