fix(deployment): read device_index for GPU attestation report label#3364
Merged
Conversation
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.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe GPU attestation report shape now uses ChangesGPU attestation device index rename
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
stalniy
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).GpuAttestationReportmodelled the field asindex, so the modal readgpu.index—undefinedat 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
GpuAttestationReport.index→device_indexto match the wire contract (consistent with the rest ofAttestationQuote, which already mirrors the snake_case payload untransformed).gpu.device_indexinAttestationEvidenceModal.AttestationEvidenceModal.spec.tsx,provider-proxy.service.spec.ts) to usedevice_index, and add theGPU 0/GPU 1label assertions that would have caught this.Note: the downloaded JSON bundle was already correct — it passes
gpu_reportsthrough verbatim, so it already containeddevice_index. Only the on-screen label was affected.Before:
GPU undefined→ After:GPU 0Summary by CodeRabbit