commit 3bc2a8bfa6bf28ac405fff55023c3dcca7a142c9
parent b70d7d4e2c9e5312840fd8598deb4502250a550d
Author: triesap <tyson@radroots.org>
Date: Mon, 21 Sep 2026 15:01:20 +0000
provider: add live jev contract smoke command
Diffstat:
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/pixi.toml b/pixi.toml
@@ -36,6 +36,7 @@ check-build = "mkdir -p .pixi/build && mojo build -I src src/main.mojo -o .pixi/
check-format = "sh tools/check_format.sh"
test-architecture = "sh tools/check_architecture.sh --self-test"
smoke-max-local = "mojo -I src -I tests tests/max_local_operator_smoke.mojo"
+smoke-jev = "mojo -I src -I tests tests/smoke_jev.mojo"
test-runtime-contract = { depends-on = [
"test-runtime",
"test-repo-local-process",
diff --git a/tests/smoke_jev.mojo b/tests/smoke_jev.mojo
@@ -0,0 +1,30 @@
+from std.os import getenv
+
+from hyf_provider.jev_client import post_jev_systemone
+from hyf_runtime.jev_composition import typesafe_api_key_present
+from json import loads
+
+
+comptime BASE_URL = "https://api.typesafe.ai"
+comptime MODEL = "jev-1.13.0"
+
+
+def main() raises:
+ if not typesafe_api_key_present():
+ print(
+ "BLOCKED: live Jev smoke requires TYPESAFE_API_KEY and explicit "
+ "authorization; no external call was made."
+ )
+ raise Error("live_jev_prerequisite_missing")
+ var body = loads(
+ '{"model":"'
+ + MODEL
+ + '","state":"Roma tomatoes available now; basil sold out.",'
+ + '"questions":{"supply_status":{"type":"choice","instructions":'
+ + '"Is produce reported available?","criteria":{"offered":"yes",'
+ + '"unclear":"no"}}}}'
+ )
+ var outcome = post_jev_systemone(BASE_URL, body, 15000)
+ if outcome.status < 200 or outcome.status >= 300:
+ raise Error("live Jev smoke failed with status " + String(outcome.status))
+ print("ok: live Jev smoke status " + String(outcome.status))