diff --git a/ci/e2e-assertion-budget.json b/ci/e2e-assertion-budget.json index da92fae4f5b..661ec65165f 100644 --- a/ci/e2e-assertion-budget.json +++ b/ci/e2e-assertion-budget.json @@ -35,8 +35,8 @@ "throwGuards": 633, "objectFieldAssertions": 344, "assertionPoints": 4305, - "generatedProbeBlocks": 279, - "generatedProbeConditions": 950 + "generatedProbeBlocks": 278, + "generatedProbeConditions": 949 }, "fileMetricOrder": [ "directExpectCalls", @@ -68,7 +68,7 @@ "test/e2e/live/gpu-e2e.test.ts": [40,45,73,91,3], "test/e2e/live/hermes-discord.test.ts": [10,25,17,64,14], "test/e2e/live/hermes-e2e.test.ts": [82,93,112,127,3], - "test/e2e/live/hermes-gpu-startup.test.ts": [19,29,63,108,13], + "test/e2e/live/hermes-gpu-startup.test.ts": [19,29,63,108,12], "test/e2e/live/hermes-inference-switch.test.ts": [61,67,72,92,2], "test/e2e/live/hermes-root-entrypoint-smoke.test.ts": [4,27,4,27,4], "test/e2e/live/hermes-sandbox-secret-boundary.test.ts": [20,27,20,27,4], diff --git a/test/e2e/live/hermes-gpu-startup-fallback.ts b/test/e2e/live/hermes-gpu-startup-fallback.ts index e1825051ed0..da5d0aafed2 100644 --- a/test/e2e/live/hermes-gpu-startup-fallback.ts +++ b/test/e2e/live/hermes-gpu-startup-fallback.ts @@ -143,13 +143,11 @@ export function createHermesGpuFallbackWrapper( " fi", "fi", "", - "is_native_nvidia_smi_proof=0", - 'if [[ "$#" -eq 8 && "${1:-}" == "sandbox" && "${2:-}" == "exec" && "${3:-}" == "-n" && -n "${4:-}" && "${5:-}" == "--" && "${6:-}" == "sh" && "${7:-}" == "-lc" && "${8:-}" == "$NATIVE_NVIDIA_SMI_PROOF" ]]; then', - " is_native_nvidia_smi_proof=1", - "fi", - "", - 'if [[ "$is_native_nvidia_smi_proof" == "1" && -d "$NATIVE_CREATE_REJECTED" ]]; then', + 'if [[ -d "$NATIVE_CREATE_REJECTED" && "$#" -eq 8 && "${1:-}" == "sandbox" && "${2:-}" == "exec" && "${3:-}" == "-n" && -n "${4:-}" && "${5:-}" == "--" && "${6:-}" == "sh" && "${7:-}" == "-lc" && "${8:-}" == "$NATIVE_NVIDIA_SMI_PROOF" ]]; then', ` printf '%s\\n' '${HERMES_GPU_FALLBACK_EVENTS.delegateNvidiaSmiProofAfterFallback}' >>"$FALLBACK_STATE_DIR/events.log"`, + " # Later forwards must retain the selected executable identity for ownership checks.", + ' ln -s "$REAL_OPENSHELL" "$FALLBACK_STATE_DIR/openshell"', + ' mv -f "$FALLBACK_STATE_DIR/openshell" "$0"', "fi", "", "# Transparent test-only delegation: argv is never written by this wrapper.", diff --git a/test/e2e/mock-parity.json b/test/e2e/mock-parity.json index 69f4a227d70..1df367447fd 100644 --- a/test/e2e/mock-parity.json +++ b/test/e2e/mock-parity.json @@ -121,7 +121,10 @@ }, { "live": "test/e2e/live/hermes-gpu-startup.test.ts", - "liveSources": ["test/e2e/live/hermes-gpu-startup-proof.ts"], + "liveSources": [ + "test/e2e/live/hermes-gpu-startup-fallback.ts", + "test/e2e/live/hermes-gpu-startup-proof.ts" + ], "fast": [ "test/e2e/support/hermes-gpu-startup-fallback.test.ts", "test/e2e/support/hermes-gpu-startup-integrity.test.ts", diff --git a/test/e2e/support/hermes-gpu-startup-fallback.test.ts b/test/e2e/support/hermes-gpu-startup-fallback.test.ts index 17f1aec4c7d..ff9a6a5a407 100644 --- a/test/e2e/support/hermes-gpu-startup-fallback.test.ts +++ b/test/e2e/support/hermes-gpu-startup-fallback.test.ts @@ -125,7 +125,7 @@ describe("Hermes GPU startup fallback OpenShell wrapper", () => { }); it("rejects native create before progress and delegates one compatibility attempt (#10155)", () => { - const { root, wrapper } = createWrapperFixture("hermes-gpu-fallback-test-", { + const { realOpenshell, root, wrapper } = createWrapperFixture("hermes-gpu-fallback-test-", { openshell: [ "#!/usr/bin/env bash", "marker=delegated", @@ -189,6 +189,7 @@ describe("Hermes GPU startup fallback OpenShell wrapper", () => { env, ); expect(compatibilityProof.status, compatibilityProof.stderr).toBe(0); + expect(fs.realpathSync(wrapper.wrapperPath)).toBe(fs.realpathSync(realOpenshell)); const version = runWrapper(wrapper.wrapperPath, ["--version"], env); expect(version.status, version.stderr).toBe(0);