Issue: Hook Execution Order and Encapsulation Violations with Async Plugin Registration
Issue: Hook Execution Order and Encapsulation Violations with Async Plugin Registration: a task in LegoFlow-SWE (Harbor dataset). When using Fastify plugins that register their own hooks (e.g., fastify-cookie ), user‑defined hooks added after fastify.register() are executed before the plugin’s…
The task
When using Fastify plugins that register their own hooks (e.g., `fastify-cookie`), user‑defined hooks added *after* `fastify.register()` are executed **before** the plugin’s hooks. This results in the plugin’s setup not having completed when the user’s hook runs.
Part of Lego-X/LegoFlow-SWE.