Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(workflow-recipes): run the real terminal teardown in the terminal-row test (R3-L5)
Alfredo Lopez2649a8c0dc29
diff --git a/workflow-recipes/package-lock.json b/workflow-recipes/package-lock.jsonindex 691d6a4c3..e695c855e 100644--- a/workflow-recipes/package-lock.json+++ b/workflow-recipes/package-lock.json@@ -1,12 +1,12 @@{"name": "workload-recipes-controller",- "version": "0.1.447",+ "version": "0.1.448","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "workload-recipes-controller",- "version": "0.1.447",+ "version": "0.1.448","license": "SEE LICENSE IN LICENSE","dependencies": {"@aws-sdk/client-s3": "^3.1009.0",diff --git a/workflow-recipes/package.json b/workflow-recipes/package.jsonindex 9b0263977..b3a17a5bb 100644--- a/workflow-recipes/package.json+++ b/workflow-recipes/package.json@@ -1,6 +1,6 @@{"name": "workload-recipes-controller",- "version": "0.1.447",+ "version": "0.1.448","description": "Workload Recipes Controller (WRC) - WorkloadRecipe lifecycle management and MCP server interface","main": "dist/main.js","engines": {diff --git a/workflow-recipes/src/reconciler/reconciler.test.ts b/workflow-recipes/src/reconciler/reconciler.test.tsindex eb8765ef8..e0ac9d653 100644--- a/workflow-recipes/src/reconciler/reconciler.test.ts+++ b/workflow-recipes/src/reconciler/reconciler.test.ts@@ -16848,7 +16848,9 @@ describe('WorkflowRecipeReconciler', () => {conflicts: [],retryPending: false,})- const teardown = vi.spyOn(inner, 'teardownComputePodsForTerminalRun').mockResolvedValue()+ // The real teardown runs: the "no run-lane DELETE" assertion below is+ // only meaningful if the code that could send one executes.+ const teardown = vi.spyOn(inner, 'teardownComputePodsForTerminalRun')const retry = vi.spyOn(inner, 'retryRunLaneNetworkPolicies')mockCustomApi.patchNamespacedCustomObjectStatus.mockClear()const recipe = runScopedRecipe({@@ -16858,10 +16860,24 @@ describe('WorkflowRecipeReconciler', () => {conditions: published,})- await reconciler.reconcile(recipe)+ // The shared core mock has no single-Pod DELETE; the teardown deletes+ // the run's compute pods one by one.+ const coreApi = mockCoreApi as unknown as Record<string, unknown>+ const deletePod = vi.fn().mockResolvedValue({})+ coreApi.deleteNamespacedPod = deletePod+ try {+ await reconciler.reconcile(recipe)+ } finally {+ delete coreApi.deleteNamespacedPod+ }- // Witness: the terminal branch tore the run's compute down.+ // Witnesses: the terminal branch ran the real teardown, which deleted+ // the run's coordinator pod.expect(teardown).toHaveBeenCalledWith(RECIPE)+ expect(deletePod).toHaveBeenCalledWith({+ name: `${RECIPE}-coordinator`,+ namespace: 'sandbox-recipes',+ })expect(retry).not.toHaveBeenCalled()expect(deletedPolicyNames().filter(name => name !== GFS)).toEqual([])expect(markers(recipe.status?.conditions)).toMatchObject([