2.3 KiB
2.3 KiB
Why
The platform currently treats RunEndpoint as both a durable database resource and a live runtime connection. That creates the wrong product model: Platform should behave like a registry and dispatcher, while Run should behave like an authenticated RPC worker that registers, heartbeats, and receives work only while its token-backed session is alive.
What Changes
- BREAKING Remove first-party server-to-
RunEndpointpersistence as the runtime routing model; server records no longer bind to a durable run endpoint row. - Introduce a Redis-backed runtime session registry for Run registration, heartbeat leases, capability snapshots, capacity snapshots, and token/session lookup.
- Require development, test, and production flows to use Redis for runtime registry behavior; do not add an in-memory registry fallback for normal test execution.
- Retarget durable jobs from endpoint rows to logical server/component targets such as
serverInstanceId + componentKind + componentKey. - Keep platform-owned distribution builds separate from machine-side Run sessions; build routing remains a platform builder responsibility, not a registered Run endpoint capability.
- Replace user-facing run endpoint selection/status with runtime connection health derived from Redis leases and durable component/server records.
Capabilities
New Capabilities
redis-runtime-session-registry: Redis-backed registration, heartbeat, token validation, routing, and capability snapshots for machine-side Run sessions.
Modified Capabilities
platform-side-distribution-builds: Remove requirements that bind a server instance to a generated run endpoint; preserve platform-owned builds while using runtime registration rather than durable endpoint rows.
Impact
platform/: domain types, DTOs, repositories, service scheduling, Run control registration, job claim/lease validation, server lifecycle dispatch, runtime action availability, tests, and local dev/test setup.platform_web/: server management API types, runtime connection status UI, run generation/deployment copy, and tests that currently reference run endpoints.plugins/: plugin bridge and companion-facing contracts where they expose or consume run endpoint identifiers.- Infrastructure: Redis becomes a required dependency for dev, test, and production runtime registry behavior.