Skip to content

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

TypeScript

fix: classify Grok NP reads and restore Codex live-target tests

Jose Gabriel Ramirez Encinas292da96c29c2
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index fca5fe414..4f0bc6abc 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.565",
+ "version": "0.1.566",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.565",
+ "version": "0.1.566",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",
diff --git a/control-api/package.json b/control-api/package.json
index a85620e93..9afa490e1 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.565",
+ "version": "0.1.566",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/test/pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.ts b/control-api/test/pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.ts
index f566015ac..463f2086b 100644
--- a/control-api/test/pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.ts
+++ b/control-api/test/pluginWorkloadSdkCodexDualLedger.realPostgres.integration.test.ts
@@ -146,6 +146,10 @@ describeRealPostgres('Plugin Workload SDK Codex dual ledger on real PostgreSQL',
getConnection: getSafeCodexSubscriptionConnection,
getModelState: getCodexCatalogModelState,
resolveConnectionKey: async () => 'deployment-default',
+ resolveAssignment: async () => ({
+ liveBrokerProviders: ['codex-subscription'],
+ liveConnectionRef: 'deployment-default',
+ }),
evaluateBudget: evaluateBudgetCheck,
getActiveReservation,
getMaxGeneration: getMaxLlmProviderAttemptGeneration,
diff --git a/control-api/test/services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts b/control-api/test/services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts
index 5e28c2c9f..def692584 100644
--- a/control-api/test/services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts
+++ b/control-api/test/services.llmProviderAttemptAuthorization.realPostgres.integration.test.ts
@@ -102,6 +102,10 @@ describeRealPostgres('Codex provider-attempt authorization on real PostgreSQL',
getConnection: getSafeCodexSubscriptionConnection,
getModelState: getCodexCatalogModelState,
resolveConnectionKey: async () => 'deployment-default',
+ resolveAssignment: async () => ({
+ liveBrokerProviders: ['codex-subscription'],
+ liveConnectionRef: 'deployment-default',
+ }),
evaluateBudget: evaluateBudgetCheck,
getActiveReservation,
getMaxGeneration: getMaxLlmProviderAttemptGeneration,
diff --git a/host-context-controller/package-lock.json b/host-context-controller/package-lock.json
index 3b1d90381..ab7cd6286 100644
--- a/host-context-controller/package-lock.json
+++ b/host-context-controller/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-host-context-controller",
- "version": "0.1.329",
+ "version": "0.1.330",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-host-context-controller",
- "version": "0.1.329",
+ "version": "0.1.330",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@clerum/codex-catalog-projection": "file:../packages/codex-catalog-projection",
diff --git a/host-context-controller/package.json b/host-context-controller/package.json
index 514f30a40..a20e65372 100644
--- a/host-context-controller/package.json
+++ b/host-context-controller/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-host-context-controller",
- "version": "0.1.329",
+ "version": "0.1.330",
"description": "Host Context Controller - provides McpServer CRDs to mcp-host via REST API",
"main": "dist/main.js",
"engines": {
diff --git a/host-context-controller/src/existenceReadMetrics.test.ts b/host-context-controller/src/existenceReadMetrics.test.ts
index ac29e683c..c71df72ba 100644
--- a/host-context-controller/src/existenceReadMetrics.test.ts
+++ b/host-context-controller/src/existenceReadMetrics.test.ts
@@ -88,6 +88,10 @@ const readExclusions: Record<string, readonly [number, string]> = {
1,
'Ownership before deletion',
],
+ 'hostReconciler.ts::deleteMcpHostGrokProxyEgressNetworkPolicy::readNamespacedNetworkPolicy': [
+ 1,
+ 'Ownership before deletion',
+ ],
'hostReconciler.ts::deleteHostNetworkPolicies::readNamespacedNetworkPolicy': [
1,
'Ownership before deletion',
@@ -251,7 +255,7 @@ function assertReadInventory(sources: Record<string, string>): void {
expect(excluded[id], `Stale or changed read exclusion: ${id}`).toBe(count)
}
expect(Object.values(wrapped).reduce((sum, count) => sum + count, 0)).toBe(26)
- expect(Object.values(excluded).reduce((sum, count) => sum + count, 0)).toBe(43)
+ expect(Object.values(excluded).reduce((sum, count) => sum + count, 0)).toBe(44)
}
it('classifies every direct dot-property production SDK read as observed or explicitly excluded', () => {
diff --git a/scripts/tests/test-inter-service-tokens.sh b/scripts/tests/test-inter-service-tokens.sh
index efa18b050..bfdedb704 100755
--- a/scripts/tests/test-inter-service-tokens.sh
+++ b/scripts/tests/test-inter-service-tokens.sh
@@ -15,7 +15,14 @@ cat > "$TMP/bin/openssl" <<'SH'
#!/usr/bin/env bash
set -euo pipefail
if [[ "${1:-}" == "rand" && "${2:-}" == "-hex" ]]; then
- printf '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\n'
+ count_file="${OPENSSL_RAND_COUNT_FILE:?}"
+ count=0
+ if [[ -f "$count_file" ]]; then
+ count="$(cat "$count_file")"
+ fi
+ count=$((count + 1))
+ printf '%s' "$count" > "$count_file"
+ printf '%064x\n' "$count"
exit 0
fi
echo "unexpected openssl invocation" >&2
@@ -113,7 +120,9 @@ assert_no_secret_material() {
run_apply() {
local context="$1" capture="$2"
shift 2
+ : > "$TMP/openssl-rand-count"
CAPTURE_FILE="$capture" PATH="$TMP/bin:$PATH" CONTEXT="$context" \
+ OPENSSL_RAND_COUNT_FILE="$TMP/openssl-rand-count" \
CLERUM_PROJECT_DIR="$TMP/sibling" "$@" \
bash "$ROOT/deploy/scripts/apply-inter-service-tokens.sh" >"$TMP/stdout" 2>"$TMP/stderr"
}
@@ -122,8 +131,11 @@ run_hcc_apply() {
local rollout="$1"
shift
: > "$rollout"
+ : > "$TMP/openssl-rand-count"
CAPTURE_FILE="$TMP/hcc-capture.json" ROLLOUT_LOG="$rollout" KUBE_DEPLOY_EXISTS=1 \
- PATH="$TMP/bin:$PATH" CONTEXT=gke-dev CLERUM_PROJECT_DIR="$TMP/sibling" "$@" \
+ PATH="$TMP/bin:$PATH" CONTEXT=gke-dev \
+ OPENSSL_RAND_COUNT_FILE="$TMP/openssl-rand-count" \
+ CLERUM_PROJECT_DIR="$TMP/sibling" "$@" \
bash "$ROOT/deploy/scripts/apply-inter-service-tokens.sh" >"$TMP/stdout" 2>"$TMP/stderr"
}
@@ -138,6 +150,7 @@ minikube_capture="$TMP/minikube-control-api-internal-tokens.json"
run_apply clerum-codex-member-registration-test "$minikube_capture" env
jq -e '.stringData.CONTROL_API_MEMBER_REGISTRATION_HMAC_SECRET and .stringData.CONTROL_API_INTERNAL_TOKENS and .stringData.CONTROL_API_INTERNAL_SERVICE_TOKENS' "$minikube_capture" >/dev/null
jq -e '.stringData.CONTROL_API_INTERNAL_SERVICE_TOKENS | contains("codex-llm-proxy=")' "$minikube_capture" >/dev/null
+jq -e '.stringData.CONTROL_API_INTERNAL_SERVICE_TOKENS | contains("grok-llm-proxy=")' "$minikube_capture" >/dev/null
branch_profile_capture="$TMP/branch-profile-control-api-internal-tokens.json"
run_apply clerum-cursor-46f812cd-185fc31b "$branch_profile_capture" env