Skip to content

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

TypeScript

fix(wrc): report no policy summary from the disabled SDK-only branch

Alfredo Lopez84c634dce0a6
diff --git a/workflow-recipes/package-lock.json b/workflow-recipes/package-lock.json
index 5dba8d261..a3d6a34f7 100644
--- a/workflow-recipes/package-lock.json
+++ b/workflow-recipes/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "workload-recipes-controller",
- "version": "0.1.389",
+ "version": "0.1.390",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "workload-recipes-controller",
- "version": "0.1.389",
+ "version": "0.1.390",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@aws-sdk/client-s3": "^3.1009.0",
diff --git a/workflow-recipes/package.json b/workflow-recipes/package.json
index f77334832..0ba32fea0 100644
--- a/workflow-recipes/package.json
+++ b/workflow-recipes/package.json
@@ -1,6 +1,6 @@
{
"name": "workload-recipes-controller",
- "version": "0.1.389",
+ "version": "0.1.390",
"description": "Workload Recipes Controller (WRC) - WorkloadRecipe lifecycle management and MCP server interface",
"main": "dist/main.js",
"engines": {
diff --git a/workflow-recipes/src/workflow/workflowReconciler.test.ts b/workflow-recipes/src/workflow/workflowReconciler.test.ts
index 0b7ea1f8e..e4165756f 100644
--- a/workflow-recipes/src/workflow/workflowReconciler.test.ts
+++ b/workflow-recipes/src/workflow/workflowReconciler.test.ts
@@ -1624,6 +1624,30 @@ describe('WorkflowReconciler — Plugin Workload SDK eager mcp-host', () => {
expect(createdServiceNames).not.toContain(serviceName)
})
+ // The disabled branch applies no policy, so it must not report a summary: an
+ // empty summary reads as "evaluated, no conflict" and would clear a published
+ // WorkflowNetworkPolicyOwnership condition.
+ it('reports no NetworkPolicy summary when the SDK runtime is disabled', async () => {
+ const deps = makeDeps()
+ const reconciler = new WorkflowReconciler({
+ ...deps,
+ config: { ...deps.config, pluginWorkloadSdkEnabled: false },
+ })
+
+ const result = await reconciler.reconcilePluginWorkloadSdkOnly(
+ 'sdk-only',
+ 'uid-sdk-only',
+ sandboxNamespace,
+ sdkSpec({ steps: undefined })
+ )
+
+ expect(result.phase).toBe('active')
+ expect(result.message).toBe('Plugin Workload SDK runtime disabled')
+ expect(mockCoreApi.createNamespacedPod).not.toHaveBeenCalled()
+ expect(mockNetworkingApi.createNamespacedNetworkPolicy).not.toHaveBeenCalled()
+ expect(result.networkPolicies).toBeUndefined()
+ })
+
describe('NetworkPolicy ownership conflicts', () => {
const foreignOwnedPolicy = (name: string) => ({
metadata: {
diff --git a/workflow-recipes/src/workflow/workflowReconciler.ts b/workflow-recipes/src/workflow/workflowReconciler.ts
index 25593b572..971fd2a7d 100644
--- a/workflow-recipes/src/workflow/workflowReconciler.ts
+++ b/workflow-recipes/src/workflow/workflowReconciler.ts
@@ -1266,10 +1266,11 @@ export class WorkflowReconciler {
networkPolicies?: WorkflowNetworkPolicyApplySummary
}> {
if (!this.deps.config.pluginWorkloadSdkEnabled || !spec.pluginWorkloadSdk) {
+ // Nothing is applied here, so no summary: an empty one would read as
+ // "evaluated, no conflict" and clear a published ownership condition.
return {
phase: 'active',
message: 'Plugin Workload SDK runtime disabled',
- networkPolicies: { conflicts: [], retryPending: false },
}
}
if ((spec.steps?.length ?? 0) > 0) {