|
| 1 | +# BUILD PR — Promotion Gate Authoritative/Passive Handoff Boundary |
| 2 | + |
| 3 | +## Purpose |
| 4 | +Make the authoritative/passive handoff boundary explicit for the promotion-gate lane without widening into replay, timeline, sample, or repo-structure work. |
| 5 | + |
| 6 | +## Exact Target Files |
| 7 | +- `src/advanced/promotion/createPromotionGate.js` |
| 8 | +- `src/advanced/state/createWorldGameStateSystem.js` |
| 9 | +- `src/shared/state/createPromotionStateSnapshot.js` |
| 10 | + |
| 11 | +## Why These Files |
| 12 | +This PR stays inside the existing promotion-gate and authoritative-state lane: |
| 13 | +- `createPromotionGate.js` is the promotion-gate owner |
| 14 | +- `createWorldGameStateSystem.js` is the authoritative world-state system entry |
| 15 | +- `createPromotionStateSnapshot.js` is the shared promotion snapshot contract already used in the lane |
| 16 | + |
| 17 | +This PR must not widen beyond these exact files. |
| 18 | + |
| 19 | +## Required Code Changes |
| 20 | +1. In `src/advanced/promotion/createPromotionGate.js` |
| 21 | + - make the handoff boundary between passive and authoritative modes explicit |
| 22 | + - ensure the gate names or uses a single handoff decision path |
| 23 | + - preserve current runtime semantics except where needed to remove ambiguous handoff behavior |
| 24 | + |
| 25 | +2. In `src/advanced/state/createWorldGameStateSystem.js` |
| 26 | + - align the world game state system with the explicit handoff path |
| 27 | + - make the minimum authoritative/passive transition boundary readable from the gate-facing integration |
| 28 | + - do not broaden this into general state cleanup |
| 29 | + |
| 30 | +3. In `src/shared/state/createPromotionStateSnapshot.js` |
| 31 | + - update the shared promotion snapshot shape only if required to support the explicit handoff boundary |
| 32 | + - keep this limited to handoff compatibility, not general snapshot redesign |
| 33 | + |
| 34 | +## Hard Constraints |
| 35 | +- exact files only |
| 36 | +- do not modify replay files |
| 37 | +- do not modify timeline files |
| 38 | +- do not modify selectors beyond what the exact files already require |
| 39 | +- do not modify sample files |
| 40 | +- do not modify game files |
| 41 | +- do not widen into debug UI work |
| 42 | +- do not perform repo-wide state cleanup |
| 43 | +- do not change unrelated state semantics |
| 44 | + |
| 45 | +## Validation Steps |
| 46 | +- confirm only the exact target files changed |
| 47 | +- confirm the promotion gate has a single explicit handoff path |
| 48 | +- confirm authoritative vs passive behavior boundary is explicit in the touched code |
| 49 | +- confirm imports/exports resolve |
| 50 | +- confirm no unrelated refactor or formatting-only churn was introduced |
| 51 | + |
| 52 | +## Acceptance Criteria |
| 53 | +- authoritative/passive handoff boundary is explicit |
| 54 | +- gate-to-state-system handoff path is singular and readable |
| 55 | +- promotion snapshot contract remains coherent with the handoff boundary |
| 56 | +- no replay/timeline/sample/game/debug scope expansion occurred |
0 commit comments