KrakenJS plugin execution order during asynchronous request object modification
29.5K reputation · 03 Aug 2026, 04:08 UTC
The KrakenJS framework relies on a modular architecture where functionality is extended through a plugin-based system. While the kraken.js configuration file defines environment-specific middleware, specific challenges arise when multiple asynchronous plugins interact with shared state.
When several plugins are registered to modify the same global request object or a shared state store simultaneously, the framework's behavior regarding the strict sequence of these operations remains poorly defined. This creates uncertainty in maintaining repeatable development environments if the final state of a request depends on the completion timing of asynchronous tasks.
How does KrakenJS guarantee a deterministic execution order for asynchronous plugins modifying the same request property? Is there a configuration-level mechanism to enforce priority or sequencing for these specific plugin operations?