Skip to content

Conversation

@DFrenkel
Copy link
Contributor

@DFrenkel DFrenkel commented Nov 4, 2025

Following open-policy-agent/opa@6415ef1, we add equivalent compliance tests to Swift OPA
compliance suite to verify consistent behavior
of uuid.rfc4122 and time.now_ns builtins
when invoked multiple times during a single eval.

Following open-policy-agent/opa@6415ef1,
we add equivalent compliance tests to Swift OPA
compliance suite to verify consistent behavior
of `uuid.rfc4122` and `time.now_ns` builtins
when invoked multiple times during a single eval.

Signed-off-by: Dmitry Frenkel <[email protected]>
@DFrenkel DFrenkel marked this pull request as ready for review November 4, 2025 21:24
@DFrenkel
Copy link
Contributor Author

DFrenkel commented Nov 4, 2025

Note that consistent behavior for uuid.rfc4122 and time.now_ns invocations is enabled by plumbing BuiltinsCache and creation timestamp to all BuiltinContext instances at the moment the evaluate is called. The cache part is addressed in #33, and creation timestamp is addressed in #5, so this PR can either be merged with an expected/new compliance test failures related to caching or we wait on PRs mentioned here to be merged first. @shomron @patrick-east FYI

@srenatus
Copy link
Contributor

srenatus commented Nov 5, 2025

Would it perhaps be a good moment to pull in all the current tests from OPA @ main? We're currently on some old snapshot converted with an internal tool; instead of adding a single file on top of that, I think we should fast-forward our snapshot... 🤔

@DFrenkel
Copy link
Contributor Author

DFrenkel commented Nov 6, 2025

Would it perhaps be a good moment to pull in all the current tests from OPA @ main? We're currently on some old snapshot converted with an internal tool; instead of adding a single file on top of that, I think we should fast-forward our snapshot... 🤔

Yes, agreed. I'll mark this PR as draft and refresh all compliance tests from OPA @ main.

@DFrenkel DFrenkel marked this pull request as draft November 6, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants