Выделить event-driven PuzzleSystem
This commit is contained in:
@@ -179,12 +179,15 @@ baseline-задачи также имели явного владельца по
|
||||
- принят `goon-game-milestone-production`.
|
||||
|
||||
Статус на 19 августа 2026: Stage 6 начат в изолированном production stream.
|
||||
Завершены первые два foundation slice. `goon-game-character-states` добавил
|
||||
Завершены три foundation slice. `goon-game-character-states` добавил
|
||||
явные Idle/Run/Turn/Jump/Fall/Land/Interact/Stunned/Death transitions.
|
||||
`goon-game-corpse-manager` перенёс регистрацию, transforms, FIFO budget, reset,
|
||||
save/restore и diagnostics тел в отдельного владельца без изменения физики и
|
||||
геометрии. Последний gate: 84 JVM-теста и Android 16 matrix `37/37`.
|
||||
Следующий foundation slice — event-driven `PuzzleSystem`.
|
||||
геометрии. `goon-game-puzzle-events` выделил pressure/toggle/timed/relay channels,
|
||||
immutable events и явные DoorController states; двери и платформы читают общую
|
||||
data-driven модель. Последний gate: 89 JVM-тестов и Android 16 matrix `38/38`.
|
||||
Следующая итерация — production-каталог hazards (`crusher`, `fire`, projectile,
|
||||
explosion), который затем даёт источники для новых corpse states.
|
||||
|
||||
### Этап 7. Техническая стабилизация и release engineering — P0, 4–8 дней
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Stage 6 event-driven PuzzleSystem
|
||||
|
||||
Date: 19 August 2026
|
||||
|
||||
Beads task: `goon-game-puzzle-events`
|
||||
|
||||
## Contract
|
||||
|
||||
`PuzzleSystem` is the deterministic owner of puzzle signal channels. Each frame,
|
||||
`GameView` submits data-bound source facts and consumes published transitions:
|
||||
|
||||
- pressure and conductive-relay sources aggregate by channel;
|
||||
- toggle and timed sources react only to their own rising contact edge;
|
||||
- timed channels expire deterministically and can be rearmed;
|
||||
- `DoorController` has an explicit `CLOSED` or `OPEN` state and ANDs its required
|
||||
channels;
|
||||
- controlled platforms read the same channel state as doors and rendering;
|
||||
- signal and door open/close transitions are immutable frame events;
|
||||
- diagnostics expose update and transition counts without mutating gameplay.
|
||||
|
||||
`GameView` remains the geometry adapter: it detects player/body contact and
|
||||
conductive-body overlap, but it no longer owns toggle/timer maps or calculates a
|
||||
door's required signals. Door audio and camera focus consume `DOOR_OPENED` rather
|
||||
than comparing an ad-hoc previous aggregate.
|
||||
|
||||
The existing JSON `signalId`, `requiredSignals`, `controlId`, duration, and mass
|
||||
bindings remain unchanged. Existing content validation still rejects missing
|
||||
sources before packaging.
|
||||
|
||||
## Lifecycle
|
||||
|
||||
Puzzle state has an immutable snapshot containing toggle and timed channels.
|
||||
Reset clears channels, source edges, door states, events, and diagnostics. Restore
|
||||
also seeds held-source edge activity, so recreating an Activity while standing on
|
||||
a toggle or timer does not activate it a second time. Pressure and relay state is
|
||||
recomputed from restored bodies and geometry without user feedback side effects.
|
||||
|
||||
## TDD evidence
|
||||
|
||||
Separate RED cycles covered the missing base contract, pressure aggregation,
|
||||
timed expiry/rearm, relay plus explicit AND-door transitions, immutable
|
||||
reset/save/restore, restored held-source edges, diagnostics, and the missing
|
||||
`GameView` integration hook. Every RED was followed by its focused GREEN before
|
||||
the next behavior was added.
|
||||
|
||||
The focused Android test completes the level-3 production-input route, leaves the
|
||||
saw body on its pressure plate, and verifies an activated signal, a published
|
||||
door-open transition, and one open `DoorController` through read-only diagnostics.
|
||||
|
||||
## Final gates
|
||||
|
||||
- JSON validator: `10/10`, format `1`, physics `1`.
|
||||
- JVM: `89`, failures `0`, errors `0`, skipped `0`.
|
||||
- `lintDebug`, `assembleDebug`, `assembleDebugAndroidTest`: GREEN.
|
||||
- focused Android 16 pressure/door integration: `1/1` GREEN.
|
||||
- final unfiltered Android 16 matrix: `38/38`, failures `0`, errors `0`,
|
||||
skipped `0`, `433.599 s`, on the exact final APK/test APK.
|
||||
- debug APK ZIP integrity: `unzip -t` GREEN.
|
||||
- debug APK SHA-256:
|
||||
`adeed8b3959e2192e15917136e754e626cf06248bbba0dcd7596d55b2685e011`.
|
||||
|
||||
The dedicated AVD was stopped after the final gate. No movement, collision,
|
||||
physics version, level geometry, or accepted solution signature changed.
|
||||
Reference in New Issue
Block a user