|
| 1 | +# Manifest Runtime Boundary |
| 2 | + |
| 3 | +PR: PR_26152_159-manifest-runtime-boundary |
| 4 | +Date: 2026-06-02 |
| 5 | + |
| 6 | +## Scope |
| 7 | + |
| 8 | +- Defined the manifest-to-runtime boundary. |
| 9 | +- Defined what belongs in `game.manifest.json`. |
| 10 | +- Defined what belongs in engine runtime. |
| 11 | +- Defined authoritative ownership. |
| 12 | +- Added no runtime implementation. |
| 13 | + |
| 14 | +## Boundary |
| 15 | + |
| 16 | +`game.manifest.json` is the portable authored game configuration surface. It should describe what a game is and what data the runtime consumes after validation. It must not become executable code, hidden runtime state, sample fallback data, or ProjectWorkspace storage. |
| 17 | + |
| 18 | +Engine runtime owns interpretation, execution, timing, rendering, input dispatch, physics, collision algorithms, audio playback, scene orchestration, and error reporting. Runtime may consume manifest data only after explicit validation and must reject invalid handoff before partial render. |
| 19 | + |
| 20 | +## Belongs In `game.manifest.json` |
| 21 | + |
| 22 | +| Area | Manifest Ownership | |
| 23 | +| --- | --- | |
| 24 | +| Identity | Game id, display name, folder, schema/version. | |
| 25 | +| Launch | Direct launch path and optional ProjectWorkspace launch path. | |
| 26 | +| Screen | Intended canvas/screen dimensions and viewport configuration. | |
| 27 | +| Assets | Asset ids, file/path references, roles, types, and portable metadata. | |
| 28 | +| Input | Action names and declared input bindings. | |
| 29 | +| Object geometry | Object ids, tags, shape payloads, animation states, and runtime object identity. | |
| 30 | +| Object types | Future declarative object type records such as static, dynamic, killable, collectible, trigger, projectile, zone, and UI. | |
| 31 | +| Rules | Future declarative gameplay rule records such as movement, bounce, gravity, health, damage, collision, spawn, despawn, scoring, and cooldowns. | |
| 32 | +| Tool payload references | Project/tool payload data that is already approved as manifest-owned or Tool State-owned. | |
| 33 | + |
| 34 | +## Belongs In Engine Runtime |
| 35 | + |
| 36 | +| Area | Runtime Ownership | |
| 37 | +| --- | --- | |
| 38 | +| Execution | Main loop, fixed tick, scene transitions, update/render order. | |
| 39 | +| Algorithms | Physics, collision resolution, pathfinding, combat application, spawn ticking, rendering transforms. | |
| 40 | +| Runtime state | Transient entity state, timers, active scene state, frame metrics, current input state, audio handles. | |
| 41 | +| Validation handling | Rejecting invalid manifest/toolState handoff before render and logging actionable failures. | |
| 42 | +| Asset resolution | Resolving manifest paths to loadable runtime resources without rewriting manifest ownership. | |
| 43 | +| ProjectWorkspace handoff | Accepting explicit manifest/toolState inputs while leaving ProjectWorkspace as coordination-only. | |
| 44 | + |
| 45 | +## Authoritative Ownership |
| 46 | + |
| 47 | +| Surface | Owns | Must Not Own | |
| 48 | +| --- | --- | --- | |
| 49 | +| Project | Persisted DB container and ownership boundary. | Runtime session state. | |
| 50 | +| ProjectWorkspace | Runtime-only working context and active references. | Saved game data, Tool State payloads, manifest payloads. | |
| 51 | +| Tool State | Persisted per-tool payload record. | Engine execution logic. | |
| 52 | +| Game Manifest | Portable export/import description of a game. | Database source of truth or runtime session state. | |
| 53 | +| Engine runtime | Validated execution of manifest-authored data. | Authored configuration ownership. | |
| 54 | + |
| 55 | +## Current Evidence |
| 56 | + |
| 57 | +- `tools/schemas/game.manifest.schema.json` currently owns schema/version, game identity, launch, screen, music, and a `tools` map. |
| 58 | +- `src/shared/contracts/gameManifestContract.js` defines Game Manifest as portable export/import format, not the database source of truth. |
| 59 | +- `src/shared/contracts/projectWorkspaceRuntimeContract.js` defines ProjectWorkspace as runtime-only and forbids persisted payload/storage fields. |
| 60 | +- `src/engine/core/Engine.js` owns runtime loop, scene updates, rendering, fullscreen layers, audio, and runtime monitoring. |
| 61 | + |
| 62 | +## Validation |
| 63 | + |
| 64 | +Command: |
| 65 | + |
| 66 | +```powershell |
| 67 | +git diff --check |
| 68 | +``` |
| 69 | + |
| 70 | +Result: PASS. |
| 71 | + |
| 72 | +## Lanes Executed |
| 73 | + |
| 74 | +- engine - documentation/static boundary review for manifest-to-runtime ownership. |
| 75 | +- contract - documentation/static review against Game Manifest, Tool State, and ProjectWorkspace contracts. |
| 76 | + |
| 77 | +## Lanes Skipped |
| 78 | + |
| 79 | +- runtime - no runtime behavior changed. |
| 80 | +- integration - no ProjectWorkspace handoff implementation changed. |
| 81 | +- samples - permanently out of scope for this stack. |
| 82 | +- recovery/UAT - no recovery behavior changed. |
| 83 | +- Playwright - not impacted. |
| 84 | + |
| 85 | +## Samples Decision |
| 86 | + |
| 87 | +SKIP. Samples are permanently out of scope for this stack. |
| 88 | + |
| 89 | +## Playwright |
| 90 | + |
| 91 | +Playwright impacted: No. This PR is docs/report-only. |
| 92 | + |
| 93 | +## Blocker Scope |
| 94 | + |
| 95 | +No blocker for the documentation boundary. Future implementation is blocked until object type and rule contracts are explicitly promoted into manifest schema/runtime validation. |
0 commit comments