From e1d36e703f189941bd12da7272224f3717636045 Mon Sep 17 00:00:00 2001 From: Apurv Kumaria Date: Sat, 12 Sep 2026 22:28:29 -0700 Subject: [PATCH] test(e2e): map shared gateway restart coverage Signed-off-by: Apurv Kumaria --- test/automation/e2e/e2e-mock-parity.test.ts | 24 +++++++++++++++++++++ test/e2e/mock-parity.json | 7 ++++++ 2 files changed, 31 insertions(+) diff --git a/test/automation/e2e/e2e-mock-parity.test.ts b/test/automation/e2e/e2e-mock-parity.test.ts index 18f7bbc0cb8..0917fe60d1d 100644 --- a/test/automation/e2e/e2e-mock-parity.test.ts +++ b/test/automation/e2e/e2e-mock-parity.test.ts @@ -1,8 +1,10 @@ // SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. // SPDX-License-Identifier: Apache-2.0 +import fs from "node:fs"; import { describe, expect, it } from "vitest"; import { + DEFAULT_PARITY_MANIFEST, filterMockParityRelevantChangedFiles, isMockParityRelevantSourceChange, type MockParityManifest, @@ -20,6 +22,28 @@ function manifest(entries: MockParityManifest["entries"]): MockParityManifest { } describe("changed live E2E mock parity", () => { + it.each([ + "test/e2e/live/hermes-e2e.test.ts", + "test/e2e/live/managed-image-activation-e2e-helpers.ts", + "test/e2e/live/openshell-exact-main-driver-config.ts", + "test/e2e/live/pi-agent-qualification.test.ts", + "test/e2e/live/sandbox-survival.test.ts", + ])("accepts shared gateway restart coverage for %s", (changedLiveSource) => { + const currentManifest = JSON.parse( + fs.readFileSync(DEFAULT_PARITY_MANIFEST, "utf8"), + ) as MockParityManifest; + + expect( + validateMockParity({ + manifest: currentManifest, + changedFiles: [changedLiveSource, "test/e2e/support/e2e-phase-lifecycle.test.ts"], + }), + ).toEqual([]); + expect( + validateMockParity({ manifest: currentManifest, changedFiles: [changedLiveSource] }), + ).toHaveLength(1); + }); + it.each([ ["array", "const values = [1, 2];", "const values = [1, 2,];"], ["call", "check(1, 2);", "check(1, 2,);"], diff --git a/test/e2e/mock-parity.json b/test/e2e/mock-parity.json index 0445948cf8a..1bee5721ac3 100644 --- a/test/e2e/mock-parity.json +++ b/test/e2e/mock-parity.json @@ -59,6 +59,7 @@ "fast": [ "src/lib/onboard/command.test.ts", "src/lib/onboard/sandbox-workload-preparation.test.ts", + "test/e2e/support/e2e-phase-lifecycle.test.ts", "test/e2e/support/managed-image-activation-diagnostics.test.ts", "test/inference/managed/managed-image-publication-workflow.test.ts", "test/onboarding/onboard-managed-image-buildless-e2e.test.ts" @@ -74,6 +75,7 @@ "src/lib/agent/candidate.test.ts", "src/lib/agent/pi-lifecycle.test.ts", "src/lib/onboard/pi-candidate-rebuild.test.ts", + "test/e2e/support/e2e-phase-lifecycle.test.ts", "test/e2e/support/onboard-interactive-pty.test.ts", "test/e2e/support/pi-agent-qualification-events.test.ts", "test/agents/openclaw/runtime/pi-candidate-runtime-artifacts.test.ts" @@ -556,6 +558,7 @@ "src/lib/actions/sandbox/skill-install.test.ts", "test/agents/hermes/hermes-image-build-probes.test.ts", "test/agents/hermes/hermes-start.test.ts", + "test/e2e/support/e2e-phase-lifecycle.test.ts", "test/e2e/support/hermes-cli-adapter-live.test.ts", "test/e2e/support/hermes-acp-live.test.ts", "test/e2e/support/managed-image-cohort-contract.test.ts", @@ -632,6 +635,7 @@ "test/e2e/live/mcp-bridge-trusted-private.ts", "test/e2e/live/mcp-provider-rewrite-probe.ts", "test/e2e/live/openshell-allowed-ips-rebinding.ts", + "test/e2e/live/openshell-exact-main-driver-config.ts", "test/e2e/live/openshell-exact-main-runtime-contracts.ts" ], "fast": [ @@ -640,6 +644,7 @@ "src/lib/actions/sandbox/mcp-bridge-adapter-teardown.test.ts", "src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts", "src/lib/actions/sandbox/mcp-bridge-provider.test.ts", + "test/e2e/support/e2e-phase-lifecycle.test.ts", "test/e2e/support/e2e-cleanup-resources.test.ts", "test/e2e/support/e2e-clients.test.ts", "test/e2e/support/e2e-redaction-entry.test.ts", @@ -653,6 +658,7 @@ "test/e2e/support/mcp-bridge-tool-discovery.test.ts", "test/e2e/support/mcp-provider-rewrite-probe.test.ts", "test/e2e/support/mcp-workflow-boundary.test.ts", + "test/e2e/support/openshell-exact-main-driver-config.test.ts", "test/e2e/support/openshell-exact-main-runtime-contracts.test.ts", "test/mcp/mcp-bridge-servers.test.ts" ] @@ -858,6 +864,7 @@ { "live": "test/e2e/live/sandbox-survival.test.ts", "fast": [ + "test/e2e/support/e2e-phase-lifecycle.test.ts", "test/e2e/support/e2e-cleanup-resources.test.ts", "test/e2e/support/e2e-clients.test.ts" ]