After working on some spec-based API tests for policy I found a bug eval and compile, which caused them to have server error 500. I found this by running thousands of test scenarios based on the policy API specification. I will add these scenarios to pipeline soon.
With this fix the API works as expected in all the scenarios.
While I consider this a bug, it's not likely to come into play or be seen in real life. Additionally these APIs are only known to be used by policy designers today. This would also apply to M18, but I don't see a need to cherry pick it.