An architectural fitness function is an automated or repeatable test that checks whether an architecture still satisfies defined structural and quality constraints. It supports evolutionary architecture by making migration risks visible and increasing confidence that changes preserve intended boundaries. section 2.3.3 section 2.4
A platform can use fitness functions to protect abstractions that let services move between cloud providers. For example, a repository layer can isolate service code from relational or unstructured datastore implementations. section 2.3.3
Figure 2.12 When a particular service within the API needs to interact with the API database, it calls a repository function that provides all the normal database methods. The repository function would call the datastore functions for the type of database the API needs to use (relational or unstructured, in our case).
The diagram traces a service request through repository and datastore layers, showing where an architectural boundary can be tested. section 2.3.3
