Skip to content

feat: Inband attestation should collect stderr from nvattest sdk#228

Merged
ambermingxin merged 3 commits into
mainfrom
GPUHEALTH-2496
Jul 2, 2026
Merged

feat: Inband attestation should collect stderr from nvattest sdk#228
ambermingxin merged 3 commits into
mainfrom
GPUHEALTH-2496

Conversation

@ambermingxin

@ambermingxin ambermingxin commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • Bug Fixes
    • Improved attestation command feedback by appending the underlying CLI’s raw error output to the result message (in addition to any existing message content) when parsing succeeds.
  • Tests
    • Updated the attestation collector test to verify the result message contains the expected base text plus the appended stderr details, rather than requiring an exact match.

Signed-off-by: ambermingxin <ambermingxin@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

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: Enterprise

Run ID: 3f156275-5785-40a3-953b-cf089b1ea18a

📥 Commits

Reviewing files that changed from the base of the PR and between 7c5a0ca and 6d9ea55.

📒 Files selected for processing (1)
  • internal/attestation/collector.go
💤 Files with no reviewable changes (1)
  • internal/attestation/collector.go

📝 Walkthrough

Walkthrough

Modifies the attestation collector to append raw stderr to the CLI result message, with the test updated to match the new message format.

Changes

Attestation Collector Updates

Layer / File(s) Summary
Append stderr to result message
internal/attestation/collector.go, internal/attestation/collector_test.go
After unmarshalling the CLI response, stderr is appended to ResultMessage, and the test now checks for the updated message content.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: inband attestation now collects stderr from nvattest.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 GPUHEALTH-2496

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/attestation/collector.go`:
- Line 95: The `collector.go` success logging is redundant because
`log.Logger.Infow` already records the summary fields from `response`; remove
the full `response` dump or move it behind a debug-level log. Keep the existing
`result_code`, `result_message`, and `evidences_count` logging, and avoid
logging the `Evidences` payload in `nvattest`-related collection flow.
- Around line 84-85: The attestation collector is unconditionally appending
stderr into response.ResultMessage, which leaks into backend resultMessage for
every run. Update the collector logic in the attestation flow to only include
stderr when stderr.String() is non-empty and when it belongs in an error/context
path, not the primary success ResultMessage. Use the collector’s SDKResponse
assignment in manager.go and the mapping in toAttestationRequest as the
references to keep the success payload clean.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4fb72c91-a82a-4465-ad62-312926aead1c

📥 Commits

Reviewing files that changed from the base of the PR and between 9c6d118 and 896ebdd.

📒 Files selected for processing (1)
  • internal/attestation/collector.go

Comment thread internal/attestation/collector.go
Comment thread internal/attestation/collector.go Outdated
Signed-off-by: ambermingxin <ambermingxin@nvidia.com>
Signed-off-by: ambermingxin <ambermingxin@nvidia.com>
@ambermingxin ambermingxin merged commit 24228fd into main Jul 2, 2026
9 checks passed
@ambermingxin ambermingxin deleted the GPUHEALTH-2496 branch July 2, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants