Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(egress): make T6 pin the second-order fix it is credited with
Alfredo Lopez3f4446841700
diff --git a/host-context-controller/package-lock.json b/host-context-controller/package-lock.jsonindex aa4238fa6..6704209ff 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.287",+ "version": "0.1.288","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-host-context-controller",- "version": "0.1.287",+ "version": "0.1.288","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.jsonindex 53fc757ae..ac6bbd4bb 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.287",+ "version": "0.1.288","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/networkPolicyReconciler.egressClassification.test.ts b/host-context-controller/src/networkPolicyReconciler.egressClassification.test.tsindex 7bb699535..5e40184da 100644--- a/host-context-controller/src/networkPolicyReconciler.egressClassification.test.ts+++ b/host-context-controller/src/networkPolicyReconciler.egressClassification.test.ts@@ -314,9 +314,18 @@ describe('#513: a non-DNS exception inside the resolve block is not a DNS conditreconciler.reconcileExternalEgress(bindings(['b.example.com']), { isCurrent: () => true })).rejects.toThrow(TypeError)+ // Exactly one delete, and it is A's. `toHaveBeenCalledWith` alone is a+ // membership check, not an exclusivity one: it stays green when the cleanup+ // deletes BOTH policies, which is what happens if the faulting binding is+ // left out of desiredPolicyNames. The count and the negative assertion are+ // what make this test pin the second-order effect it claims to.+ expect(mockApi.deleteNamespacedNetworkPolicy).toHaveBeenCalledTimes(1)expect(mockApi.deleteNamespacedNetworkPolicy).toHaveBeenCalledWith(expect.objectContaining({ name: 'ext-egress-classify-mcp-a.example.com-443' }))+ expect(mockApi.deleteNamespacedNetworkPolicy).not.toHaveBeenCalledWith(+ expect.objectContaining({ name: 'ext-egress-classify-mcp-b.example.com-443' })+ )})it('T5 keeps freezing the lapsed window on a real transient resolver code', async () => {diff --git a/packages/network-policy-core/index.cjs b/packages/network-policy-core/index.cjsindex 2f2195f38..8321f2efd 100644--- a/packages/network-policy-core/index.cjs+++ b/packages/network-policy-core/index.cjs@@ -89,6 +89,19 @@ const TRANSIENT_DNS_CODES = new Set([*/const PERMANENT_DNS_CODES = new Set(['ENODATA', 'ENOTFOUND', 'EBADNAME'])+/**+ * Seam worth knowing about, not a defect today: this set and TRANSIENT_DNS_CODES+ * decide what the egress gates treat as a DNS verdict, while WRC's downstream+ * retry classifier keys on a DIFFERENT set — RETRYABLE_SOCKET_CODES in+ * `workflow-recipes/src/reconciler/k8sErrors.ts`. Codes in the gap+ * (EHOSTUNREACH, ENETDOWN, EPIPE, UND_ERR_*) would be called a controller fault+ * here and then re-rescued into a retry there. Unreachable in practice: c-ares+ * emits ETIMEOUT/ENETUNREACH, both already transient. It is recorded because two+ * sources of truth for "which failures are worth retrying" drifting apart is the+ * same class of bug as issue #513 itself — one question's answer reused for+ * another question.+ */+function isPermanentDnsCode(code) {return typeof code === 'string' && PERMANENT_DNS_CODES.has(code)}