Add run lifecycle report projection
This commit is contained in:
@@ -9,11 +9,13 @@ The corrected ownership model is: Platform builds and authenticates a server-sco
|
||||
**Goals:**
|
||||
- Stop generated Run registration from enqueueing `process.start` or `process.status` jobs as a bootstrap side effect.
|
||||
- Add a generated-package autonomous lifecycle plan containing plugin lifecycle action refs, dependency declarations, safe deployment inputs, log sources, and selected runtime profile metadata.
|
||||
- Implement the independent Run repository's generic plan loader/executor so generated packages consume `.platform/autonomous-lifecycle-plan.json` locally and report terminal lifecycle facts back to Platform.
|
||||
- Add a Platform lifecycle report endpoint that authenticates the active Run session, validates the server binding, records audit evidence, and projects visible server state from Run-reported facts without creating jobs.
|
||||
- Keep Platform responsible for server records, registration binding, auth, distribution builds, audit, and visible projections from Run reports.
|
||||
- Update governance and protocol docs so future work treats Run as the lifecycle authority.
|
||||
|
||||
**Non-Goals:**
|
||||
- Implement the independent `run` repository's plan executor in this repo.
|
||||
- Re-add the independent `run` repository as a source tree owned by this repo.
|
||||
- Add game-specific SCUM install/start behavior to Platform.
|
||||
- Move distribution builds to machine-side Run endpoints or expose distribution-build authority to generated Runs.
|
||||
- Remove explicit operator lifecycle command APIs in this change.
|
||||
@@ -24,11 +26,12 @@ The corrected ownership model is: Platform builds and authenticates a server-sco
|
||||
- **Use plugin declarations, not Platform logic, for game behavior.** The plan references action files, dependency probes/install plans, process log sources, DLL extension declarations, and sanitized deployment inputs already declared by the plugin. It does not include SCUM executable names, Steam app IDs, ports, or platform-side command synthesis.
|
||||
- **Make registration binding-only for generated Run bootstrap.** `RegisterRunHello` continues to authenticate the component, upsert endpoint metadata, and issue a session token. It does not dispatch lifecycle or reconciliation work merely because a generated Run appeared.
|
||||
- **Keep Platform projections report-driven.** Existing terminal job/result projection can remain for explicit lifecycle commands, but generated Run startup state must converge through Run reports rather than Platform's stale stored state or registration-time probes.
|
||||
- **Report autonomous execution as observed facts, not job completions.** Run submits terminal autonomous lifecycle results through a signed lifecycle report route. Platform verifies the report belongs to the bound server/run session, then reuses lifecycle projection logic without manufacturing a platform job lease.
|
||||
- **Preserve builder security boundaries.** The platform-owned builder receives the plaintext component auth key internally and the autonomous plan as build input. Machine-side run endpoints still cannot claim `distribution.build` jobs or fetch plaintext build input.
|
||||
|
||||
## Risks / Trade-offs
|
||||
|
||||
- **Run repository lag** -> The generated package can carry the plan before the independent Run executable consumes it. Mitigation: protocol and build input are explicit, and this repo does not re-add Run source.
|
||||
- **Cross-repository release skew** -> Platform can build packages with the plan before every deployed Run binary has the autonomous executor. Mitigation: generated Run logs explicit plan load/skip/failure states, tests cover the independent `run` repository, and this repo still does not own the `run/` source tree.
|
||||
- **Stored Platform state may look stale until Run reports** -> Registration no longer paper-over probes with Platform jobs. Mitigation: UI/API must treat persisted lifecycle state as projection, not observed process truth.
|
||||
- **Plan drift between build and execution** -> A package carries the plugin declarations and deployment revision available at build time. Mitigation: include plugin version, profile key, deployment revision, and target release so Run and Platform can report stale-plan evidence.
|
||||
- **Operator command APIs still dispatch jobs** -> This change fixes generated Run autonomous startup first. Explicit commands remain auditable Platform requests until a later change redesigns command transport around Run-owned intent handling.
|
||||
@@ -38,6 +41,8 @@ The corrected ownership model is: Platform builds and authenticates a server-sco
|
||||
- Stop queuing registration-time lifecycle/status jobs for generated Runs.
|
||||
- Extend run distribution build input and DTOs with `autonomousLifecycle` for Run packages only.
|
||||
- Update platform builder input materialization so the generated package has a serialized plan alongside the existing workspace seed.
|
||||
- Add Platform's signed lifecycle report endpoint for Run-owned bootstrap results.
|
||||
- Update the independent Run repository to load, validate, execute, and report the autonomous plan using generic lifecycle capabilities.
|
||||
- Update service tests to assert registration does not enqueue bootstrap/reconciliation jobs and build input includes the plan.
|
||||
|
||||
## Open Questions
|
||||
|
||||
Reference in New Issue
Block a user