Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test: require Codex and Grok subscriptions on in base and minikube (#739)

Alfredo Lopez243ce6d8e0a0
diff --git a/scripts/tests/test-codex-llm-proxy-deploy-contract.sh b/scripts/tests/test-codex-llm-proxy-deploy-contract.sh
index 61c49c048..76fe3f1ab 100755
--- a/scripts/tests/test-codex-llm-proxy-deploy-contract.sh
+++ b/scripts/tests/test-codex-llm-proxy-deploy-contract.sh
@@ -162,6 +162,26 @@ if "clerum/codex-llm-proxy" not in ghcr.read_text():
if "clerum/codex-llm-proxy" not in minikube.read_text():
errors.append("minikube overlay images: missing codex-llm-proxy")
+# Codex subscriptions are on by default (#739): base enables both switches,
+# and the minikube overlay sets the same values explicitly. The code defaults
+# stay off, so a deploy that drops the keys fails closed.
+if "CONTROL_API_CODEX_SUBSCRIPTION_ENABLED: 'true'" not in cm:
+ errors.append("base control-api config must enable Codex subscriptions")
+if 'CODEX_LLM_PROXY_EXECUTION_ENABLED: "true"' not in text:
+ errors.append("base codex-llm-proxy config must enable execution")
+overlay = minikube.parent
+overlay_cm = (overlay / "configmaps/control-api-config.yaml").read_text()
+for needle in (
+ "CONTROL_API_CODEX_SUBSCRIPTION_ENABLED: 'true'",
+ "CODEX_LLM_PROXY_EXECUTION_ENABLED: 'true'",
+):
+ if needle not in overlay_cm:
+ errors.append(f"minikube control-api-config must set {needle}")
+if "CODEX_LLM_PROXY_EXECUTION_ENABLED: 'true'" not in (
+ overlay / "configmaps/codex-llm-proxy-config.yaml"
+).read_text():
+ errors.append("minikube codex-llm-proxy-config must enable execution")
+
if errors:
print("\n".join(errors))
sys.exit(1)
diff --git a/scripts/tests/test-grok-llm-proxy-deploy-contract.sh b/scripts/tests/test-grok-llm-proxy-deploy-contract.sh
index fb0985eb7..b4c457b2b 100755
--- a/scripts/tests/test-grok-llm-proxy-deploy-contract.sh
+++ b/scripts/tests/test-grok-llm-proxy-deploy-contract.sh
@@ -81,8 +81,31 @@ if "location = /api/v1/internal/llm/grok/provider-attempts/finalize" not in cm:
errors.append("rpc gateway missing exact Grok finalize location")
if re.search(r"location\s+/api/v1/internal/llm/grok", cm):
errors.append("Grok redeem/finalize paths must stay exact-match, not a prefix wildcard")
-if "CONTROL_API_GROK_SUBSCRIPTION_ENABLED: 'false'" not in cm:
- errors.append("base control-api config must keep Grok subscription disabled")
+# Grok subscriptions are on by default (#739): base enables every Grok switch,
+# and the minikube overlay sets the same values explicitly. The code defaults
+# stay off, so a deploy that drops the keys fails closed. The Host switch
+# (MCP_HOST_GROK_SUBSCRIPTION_ENABLED) is not here: HCC injects it per Host.
+if "CONTROL_API_GROK_SUBSCRIPTION_ENABLED: 'true'" not in cm:
+ errors.append("base control-api config must enable Grok subscriptions")
+if 'GROK_LLM_PROXY_EXECUTION_ENABLED: "true"' not in text:
+ errors.append("base grok-llm-proxy config must enable execution")
+wrc_enabled = re.compile(r'- name: WRC_GROK_SUBSCRIPTION_ENABLED\n\s+value: "true"\n')
+if not wrc_enabled.search((manifest.parent / "workflow-recipes.yaml").read_text()):
+ errors.append("base workflow-recipes must enable Grok subscriptions")
+overlay = minikube.parent
+if "CONTROL_API_GROK_SUBSCRIPTION_ENABLED: 'true'" not in (
+ overlay / "configmaps/control-api-config.yaml"
+).read_text():
+ errors.append("minikube control-api-config must enable Grok subscriptions")
+if "GROK_LLM_PROXY_EXECUTION_ENABLED: 'true'" not in (
+ overlay / "configmaps/grok-llm-proxy-config.yaml"
+).read_text():
+ errors.append("minikube grok-llm-proxy-config must enable execution")
+wrc_patch = overlay / "patches/workflow-recipes-grok.yaml"
+if "patches/workflow-recipes-grok.yaml" not in minikube.read_text():
+ errors.append("minikube overlay must apply patches/workflow-recipes-grok.yaml")
+if not wrc_patch.is_file() or not wrc_enabled.search(wrc_patch.read_text()):
+ errors.append("minikube workflow-recipes patch must enable Grok subscriptions")
if cm.count("location / {\n return 403;") < 2:
errors.append("gateways must keep catch-all 403")