Skip to content

fix(deployment): read device_index for GPU attestation report label#3364

Merged
baktun14 merged 1 commit into
mainfrom
fix/deployment-attestation-gpu-device-index
Jun 25, 2026
Merged

fix(deployment): read device_index for GPU attestation report label#3364
baktun14 merged 1 commit into
mainfrom
fix/deployment-attestation-gpu-device-index

Conversation

@baktun14

@baktun14 baktun14 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Why

The "Attestation evidence" modal renders "GPU undefined" instead of "GPU 0" for confidential-compute (SNP-GPU) leases.

The provider's live quote endpoint returns each GPU report with a snake_case device_index, and the quote is forwarded to the UI as a pure passthrough (no snake→camel transform). GpuAttestationReport modelled the field as index, so the modal read gpu.indexundefined at runtime — and rendered "GPU undefined".

Tests didn't catch it: the mocks used the wrong field (index) and the modal spec asserted only the GPU count and the report text, never the per-GPU label.

Ref CON-540

What

  • Rename GpuAttestationReport.indexdevice_index to match the wire contract (consistent with the rest of AttestationQuote, which already mirrors the snake_case payload untransformed).
  • Read gpu.device_index in AttestationEvidenceModal.
  • Fix the test mocks (AttestationEvidenceModal.spec.tsx, provider-proxy.service.spec.ts) to use device_index, and add the GPU 0 / GPU 1 label assertions that would have caught this.

Note: the downloaded JSON bundle was already correct — it passes gpu_reports through verbatim, so it already contained device_index. Only the on-screen label was affected.

Before: GPU undefinedAfter: GPU 0

Summary by CodeRabbit

  • Bug Fixes
    • Fixed GPU attestation report display so GPU labels and report details render correctly using the updated GPU index field.
    • Kept the existing attestation evidence layout and download behavior unchanged.
    • Updated related validation to match the revised GPU report data shape, helping ensure attestation details continue to appear as expected.

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.
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f5684dde-0a3d-4c1a-90c0-d6e212db280e

📥 Commits

Reviewing files that changed from the base of the PR and between 8611654 and 1ef3d41.

📒 Files selected for processing (4)
  • apps/deploy-web/src/components/deployments/AttestationEvidenceModal.spec.tsx
  • apps/deploy-web/src/components/deployments/AttestationEvidenceModal.tsx
  • apps/deploy-web/src/services/provider-proxy/provider-proxy.service.spec.ts
  • apps/deploy-web/src/utils/confidentialCompute.ts

📝 Walkthrough

Walkthrough

The GPU attestation report shape now uses device_index across the shared type, modal rendering, and related test fixtures and mocks.

Changes

GPU attestation device index rename

Layer / File(s) Summary
Shared report shape
apps/deploy-web/src/utils/confidentialCompute.ts
GpuAttestationReport now exposes device_index instead of index.
Modal and fixture updates
apps/deploy-web/src/components/deployments/AttestationEvidenceModal.tsx, apps/deploy-web/src/components/deployments/AttestationEvidenceModal.spec.tsx, apps/deploy-web/src/services/provider-proxy/provider-proxy.service.spec.ts
AttestationEvidenceModal reads gpu.device_index for keys and labels, and the related specs and mocked attestation quotes use device_index in GPU report objects.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deployment-attestation-gpu-device-index

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.23%. Comparing base (8611654) to head (1ef3d41).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3364      +/-   ##
==========================================
- Coverage   69.63%   68.23%   -1.40%     
==========================================
  Files        1088      998      -90     
  Lines       26663    24330    -2333     
  Branches     6408     5950     -458     
==========================================
- Hits        18566    16602    -1964     
+ Misses       7107     6770     -337     
+ Partials      990      958      -32     
Flag Coverage Δ *Carryforward flag
api 84.96% <ø> (ø) Carriedforward from 8611654
deploy-web 55.20% <ø> (ø) Carriedforward from 8611654
log-collector ?
notifications 91.44% <ø> (ø) Carriedforward from 8611654
provider-console 81.38% <ø> (ø) Carriedforward from 8611654
provider-inventory ?
provider-proxy 86.26% <ø> (ø) Carriedforward from 8611654
tx-signer ?

*This pull request uses carry forward flags. Click here to find out more.
see 90 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@baktun14 baktun14 added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit 9d91c3b Jun 25, 2026
57 checks passed
@baktun14 baktun14 deleted the fix/deployment-attestation-gpu-device-index branch June 25, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants