1.9 KiB
1.9 KiB
Spec Delta — game-server / integrations capability
ADDED Requirements
Requirement: EnhancedGameServer top-of-stack bootstrap
The @suaveplan/game-server package SHALL expose an EnhancedGameServer
class under the ./integrations/enhanced-server subpath export that
bootstraps the canonical engine + plugin stack via a single
bootstrap(options) entry point.
Scenario: Bootstrap installs all eight plugins
- WHEN
bootstrap()is invoked with valid options - THEN a
GameLoop,PluginManager, andGameEngineSHALL be constructed and wired - AND all eight built-in plugins (
ABTestPlugin,AnalyticsPlugin,FeatureFlagPlugin,LoggingPlugin,PersistencePlugin,RulesPlugin,WorkflowPlugin, and one further reserved slot satisfied byBasePluginderivatives) SHALL be installed in dependency order viaPluginManager.installAll - AND the
GameEngineSHALL be returned ready tostart().
Scenario: Double bootstrap rejected
- WHEN
bootstrap()is invoked twice on the sameEnhancedGameServer - THEN the second call SHALL throw
GameServerErrorwith codeGAME_SERVER.ALREADY_BOOTSTRAPPED.
Scenario: Plugin install failure rolls back
- WHEN any plugin install fails during
bootstrap() - THEN the failure SHALL be wrapped as
GameServerErrorwith codeGAME_SERVER.BOOTSTRAP_FAILED - AND the underlying
causeSHALL be the original error.
Scenario: Lifecycle deferral
- WHEN the caller invokes
start()/tick()/stop()/dispose() - THEN the
EnhancedGameServerSHALL delegate to the underlyingGameEngineso existing engine lifecycle codes propagate unchanged.
Scenario: Injected dependencies are honoured
- WHEN
bootstrap(options)is invoked - THEN every plugin SHALL receive the injected
ClockandLoggerLikeso deterministic tests observe stable timestamps and captured logs.