The reflection state is constructed in Builder, read in Lookup, and defined in Agent. This is coupling and not very opaque.
The reflection state should be a separable module defining the internal state, exposing functions to either mutate a state by adding an entry, or read a state by checking an existing state struct for a given entry. This would prevent the state internals from having to be known and checked in multiple modules.
This will replace the Lookup module, and be called by the Builder module during construction, removing state implementation details from the Builder and simplifying its code
The reflection state is constructed in Builder, read in Lookup, and defined in Agent. This is coupling and not very opaque.
The reflection state should be a separable module defining the internal state, exposing functions to either mutate a state by adding an entry, or read a state by checking an existing state struct for a given entry. This would prevent the state internals from having to be known and checked in multiple modules.
Example
This will replace the Lookup module, and be called by the Builder module during construction, removing state implementation details from the Builder and simplifying its code