From 5efcafc9c8b9e656b24d7814a9ccdfc0eb3fbb29 Mon Sep 17 00:00:00 2001 From: Sebastian Spaink Date: Mon, 10 Aug 2026 12:25:58 -0500 Subject: [PATCH] fix(builtins): register crypto and semver providers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The BuiltinProvider entries for opa-builtins-crypto and opa-builtins-semver were commented out in their META-INF/services files, so ServiceLoader never discovered them. Both modules were documented as supported in opa-builtins/README.md, but consumers could not actually call any of their builtins — `eval --capabilities-current` reported 113 builtins where it now reports 123. Registering these two needs no parity fixes: the compliance suite is green with their ten entries removed from known-missing-builtins.txt. The json, net and regex providers are still commented out. Registering all five at once fails 32 compliance cases (json 16, net 13, regex 3) and exhausts the default test heap, so those are left for follow-ups and the list header now records the split. Signed-off-by: Sebastian Spaink --- ...licy_agent.opa.ast.builtin.BuiltinProvider | 2 +- ...licy_agent.opa.ast.builtin.BuiltinProvider | 2 +- .../compliance/known-missing-builtins.txt | 21 ++++++------------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/opa-builtins/opa-builtins-crypto/src/main/resources/META-INF/services/io.github.open_policy_agent.opa.ast.builtin.BuiltinProvider b/opa-builtins/opa-builtins-crypto/src/main/resources/META-INF/services/io.github.open_policy_agent.opa.ast.builtin.BuiltinProvider index ea46adac..ada6ac04 100644 --- a/opa-builtins/opa-builtins-crypto/src/main/resources/META-INF/services/io.github.open_policy_agent.opa.ast.builtin.BuiltinProvider +++ b/opa-builtins/opa-builtins-crypto/src/main/resources/META-INF/services/io.github.open_policy_agent.opa.ast.builtin.BuiltinProvider @@ -1 +1 @@ -#io.github.open_policy_agent.opa.ast.builtin.impls.CryptoBuiltins +io.github.open_policy_agent.opa.ast.builtin.impls.CryptoBuiltins diff --git a/opa-builtins/opa-builtins-semver/src/main/resources/META-INF/services/io.github.open_policy_agent.opa.ast.builtin.BuiltinProvider b/opa-builtins/opa-builtins-semver/src/main/resources/META-INF/services/io.github.open_policy_agent.opa.ast.builtin.BuiltinProvider index 489b1f13..b0809717 100644 --- a/opa-builtins/opa-builtins-semver/src/main/resources/META-INF/services/io.github.open_policy_agent.opa.ast.builtin.BuiltinProvider +++ b/opa-builtins/opa-builtins-semver/src/main/resources/META-INF/services/io.github.open_policy_agent.opa.ast.builtin.BuiltinProvider @@ -1 +1 @@ -#io.github.open_policy_agent.opa.ast.builtin.impls.SemverBuiltins +io.github.open_policy_agent.opa.ast.builtin.impls.SemverBuiltins diff --git a/opa-evaluator/src/test/resources/compliance/known-missing-builtins.txt b/opa-evaluator/src/test/resources/compliance/known-missing-builtins.txt index 4a197ebd..9acde2d1 100644 --- a/opa-evaluator/src/test/resources/compliance/known-missing-builtins.txt +++ b/opa-evaluator/src/test/resources/compliance/known-missing-builtins.txt @@ -12,18 +12,13 @@ # opa-builtins/README.md, but the BuiltinProvider entry in each module's # META-INF/services file is commented out, so ServiceLoader never finds them # and they are unreachable for consumers. Tracked separately from this list; -# un-commenting the five files is the fix, after which the parity failures the +# un-commenting the file is the fix, after which the parity failures the # fixtures then expose need triage. - -# opa-builtins-crypto -crypto.hmac.equal -crypto.hmac.md5 -crypto.hmac.sha1 -crypto.hmac.sha256 -crypto.hmac.sha512 -crypto.md5 -crypto.sha1 -crypto.sha256 +# +# opa-builtins-crypto and opa-builtins-semver are done — registering them +# needed no parity fixes. The three below do: registering all of them at once +# fails 32 compliance cases (json 16, net 13, regex 3) and exhausts the default +# test heap, so they are being taken one module at a time. # opa-builtins-json json.filter @@ -58,10 +53,6 @@ regex.replace regex.split regex.template_match -# opa-builtins-semver -semver.compare -semver.is_valid - # --- Not implemented anywhere in the SDK ------------------------------------- bits.and