Clean Architecture recommends to implement "enterprise wide rules" in the entity / domain level.
I'm struggling to understand how to deal with the following scenario: Take a warehouse where you need to make sure that safety rules are followed. For example, acid must not be stored above alkaline (lye) and vice versa. Or fresh meet must not be stored in an area without properly functioning air condition.
Because these are safety or hygiene rules which apply worldwide, the domain level seems the appropriate place to implement them. That could be a class called "WarehouseBoxUnit" with a method "AddProduct" that includes validation of environmental conditions.
However, in a typical scenario, you have to access an external state to check if there are any acid products are stored above or below a certain storage box where you want to put alkaline. Or you have even to access sensor data to check if the air conditioning is working. In any case, this state is dynamic and external. Accessing external data should be part of the infrastructure.
The conflict is that in Clear Architecture, the domain model should not have a reference to the infrastructure project. And that might be a circular reference anyway.
I could move the validation to the application layer where I would have interfaces to infrastructure classes. However, this would be risky as someone could forget to do all necessary validation when adding new features / use cases.
Is there an established way to deal with this?