Skip to content

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

TypeScript

test(e2e): satisfy WRC contract trigger policy

Alfredo Lopezec255de197f9
diff --git a/scripts/e2e/e2e-wrc-hcc-contracts.sh b/scripts/e2e/e2e-wrc-hcc-contracts.sh
index e0b4c5029..21438fec4 100755
--- a/scripts/e2e/e2e-wrc-hcc-contracts.sh
+++ b/scripts/e2e/e2e-wrc-hcc-contracts.sh
@@ -271,6 +271,8 @@ spec:
agent:
provider: zai
model: glm-4.7
+ triggers:
+ onDemand: {}
steps:
- id: tool-step
instruction: "Synthetic status-contract step for toolsCalled args validation."
diff --git a/scripts/tests/test-wrc-hcc-contracts-gate.sh b/scripts/tests/test-wrc-hcc-contracts-gate.sh
new file mode 100755
index 000000000..a0d6180bc
--- /dev/null
+++ b/scripts/tests/test-wrc-hcc-contracts-gate.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+set -u
+
+ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
+GATE="${ROOT}/scripts/e2e/e2e-wrc-hcc-contracts.sh"
+FAIL=0
+
+pass() { echo "PASS: $1"; }
+fail() { echo "FAIL: $1"; FAIL=1; }
+
+if bash -n "$GATE"; then
+ pass "WRC-HCC contracts gate has valid bash syntax"
+else
+ fail "WRC-HCC contracts gate has invalid bash syntax"
+fi
+
+# The Phase 2 fixture has steps, so the admission policy requires an explicit
+# trigger. Keep this immediately alongside the fixture's agent/steps contract
+# so the E2E cannot regress into an admission-only false negative.
+phase_two_fixture="$(sed -n '/^header "Phase 2 - WRC toolsCalled args status contract"$/,/^YAML$/p' "$GATE")"
+if [[ "$phase_two_fixture" == *$' triggers:\n onDemand: {}'* ]] &&
+ [[ "$phase_two_fixture" == *$' steps:'* ]]; then
+ pass "WRC-HCC Phase 2 fixture declares its required on-demand trigger"
+else
+ fail "WRC-HCC Phase 2 fixture can be rejected before its status contract runs"
+fi
+
+exit "$FAIL"