From 1ef3d417de4ed44cf2c73e97afe31063dc2db563 Mon Sep 17 00:00:00 2001 From: Maxime Beauchamp <15185355+baktun14@users.noreply.github.com> Date: Thu, 25 Jun 2026 13:15:03 -0400 Subject: [PATCH] fix(deployment): read device_index for GPU attestation report label The provider returns each GPU attestation report with a snake_case `device_index`, and the quote is forwarded to the UI as a pure passthrough. GpuAttestationReport modelled the field as `index`, so the evidence modal read `gpu.index` (undefined at runtime) and rendered "GPU undefined" instead of "GPU 0". Align the type and the modal to the wire field, fix the test mocks that used the wrong field, and add the per-GPU label assertion that would have caught the regression. --- .../deployments/AttestationEvidenceModal.spec.tsx | 6 ++++-- .../src/components/deployments/AttestationEvidenceModal.tsx | 2 +- .../services/provider-proxy/provider-proxy.service.spec.ts | 2 +- apps/deploy-web/src/utils/confidentialCompute.ts | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/deploy-web/src/components/deployments/AttestationEvidenceModal.spec.tsx b/apps/deploy-web/src/components/deployments/AttestationEvidenceModal.spec.tsx index 99c7ced2e..aa1b076d2 100644 --- a/apps/deploy-web/src/components/deployments/AttestationEvidenceModal.spec.tsx +++ b/apps/deploy-web/src/components/deployments/AttestationEvidenceModal.spec.tsx @@ -26,12 +26,14 @@ describe(AttestationEvidenceModal.name, () => { report: "cpu-report", tee_platform: "snp-gpu", gpu_reports: [ - { index: 0, report: "gpu-0-report" }, - { index: 1, report: "gpu-1-report" } + { device_index: 0, report: "gpu-0-report" }, + { device_index: 1, report: "gpu-1-report" } ] } }); expect(screen.getByText("GPU reports (2)")).toBeInTheDocument(); + expect(screen.getByText("GPU 0")).toBeInTheDocument(); + expect(screen.getByText("GPU 1")).toBeInTheDocument(); expect(screen.getByText("gpu-0-report")).toBeInTheDocument(); expect(screen.getByText("gpu-1-report")).toBeInTheDocument(); }); diff --git a/apps/deploy-web/src/components/deployments/AttestationEvidenceModal.tsx b/apps/deploy-web/src/components/deployments/AttestationEvidenceModal.tsx index 70ed3f206..c4f766ecb 100644 --- a/apps/deploy-web/src/components/deployments/AttestationEvidenceModal.tsx +++ b/apps/deploy-web/src/components/deployments/AttestationEvidenceModal.tsx @@ -121,7 +121,7 @@ export function AttestationEvidenceModal({ provider, lease, onClose, dependencie
GPU reports ({gpuReports.length}) {gpuReports.map(gpu => ( - + ))}
)} diff --git a/apps/deploy-web/src/services/provider-proxy/provider-proxy.service.spec.ts b/apps/deploy-web/src/services/provider-proxy/provider-proxy.service.spec.ts index c353034f8..8e47a152f 100644 --- a/apps/deploy-web/src/services/provider-proxy/provider-proxy.service.spec.ts +++ b/apps/deploy-web/src/services/provider-proxy/provider-proxy.service.spec.ts @@ -1128,7 +1128,7 @@ describe(ProviderProxyService.name, () => { describe("fetchAttestationQuote", () => { it("posts a fresh 64-byte nonce to the attestation quote endpoint with jwt credentials", async () => { - const quote = { report: "cpu-report", tee_platform: "snp-gpu", gpu_reports: [{ index: 0, report: "gpu-0" }] }; + const quote = { report: "cpu-report", tee_platform: "snp-gpu", gpu_reports: [{ device_index: 0, report: "gpu-0" }] }; const httpClient = mock({ post: vi.fn().mockResolvedValue({ data: quote }) } as unknown as HttpClient); const { service } = setup({ httpClient }); diff --git a/apps/deploy-web/src/utils/confidentialCompute.ts b/apps/deploy-web/src/utils/confidentialCompute.ts index 76eaf2ccd..fd7bcc052 100644 --- a/apps/deploy-web/src/utils/confidentialCompute.ts +++ b/apps/deploy-web/src/utils/confidentialCompute.ts @@ -197,7 +197,7 @@ export type TeePlatform = "snp" | "tdx" | "snp-gpu" | "tdx-gpu"; export interface GpuAttestationReport { /** Device index of the GPU this report attests, used to disambiguate multiple GPUs. */ - index: number; + device_index: number; /** Hardware-signed GPU attestation report, base64. */ report: string; }