You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gpu-config [3/13]: derive the sync label value - #3249
The change adds module load-ID lookup and driver readiness checks. It adds versioned state parsing and persistence with exclusive locking and atomic writes. It also adds a sync label based on the recorded apply decision, module load ID, and configuration hash. Tests cover these behaviors, including parsing errors, lock contention, write restrictions, and sync outcomes.
Merge Risk: Minimal · up to 6107f
This change adds helpers for driver readiness, a persisted GPU configuration state file, and a derived sync label. Nothing consumes them yet, so there is no user-facing behavior change. The review found no merge-blocking problems, only two optional test-coverage improvements.
Security architecture risk: Minimal · up to 6107f
The change establishes internal contracts without activating a new production execution path. The inspected persistence and status logic did not establish an introduced security, failure-containment, rollback, or ownership defect.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The introduced contracts concern node-local driver and configuration state, not a demonstrated new remote or cross-tenant entrypoint. Sync performs no node-label mutation itself, and the supplied relationship evidence establishes no production label consumer.
Trust Boundaries and Controls
observed — The ownership classification uses the same labeled-DaemonSet controller-reference rule as the preexisting validator: an nvidia.com API-version prefix and ClusterPolicy or NVIDIADriver kind. It is not a newly strengthened identity check, and the PR does not replace the validator's existing control.
observed — Load identity, readiness-directory selection, ownership classification, and document hashes are caller-supplied inputs. The library compares these values but does not itself authenticate directory writers or bind a recorded decision to a completed GPU operation. Those guarantees must be assessed when production callers are introduced.
Resilience and Maintainability Implications
observed — Malformed or unsupported-version state returns an error instead of being overwritten through the normal locked write path. Missing state has no apply decision, and skipped, unknown, or stale-load decisions cannot produce in-sync merely because their hashes match.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
This fixture is readable. It fails because IS_HOST_DRIVER is missing, so the test checks parser-error propagation. It would still pass if readDriverInfo swallowed filesystem-read errors.
Keep this malformed-content case. Add a case that creates a directory at DriverReadyFile, then assert that Ready returns an error, false readiness and nil info.
As per coding guidelines, “New behavior needs appropriate test coverage.”
The first read already fails, so base is already nil. This test would still pass if Lock.Read retained an earlier successful snapshot after an error.
First read valid state successfully. Then replace it with version 2 and repeat the existing failure and preservation checks. This catches a regression that could overwrite unreadable state.
As per path instructions, “Flag assertions that would still pass if the behavior under test were broken.”
Reviewing files that changed from the base of the PR and between 246a9ca and 6107f41.
Files selected for processing: 9
internal/gpuconfig/loadid/driver.go
internal/gpuconfig/loadid/loadid.go
internal/gpuconfig/loadid/loadid_test.go
internal/gpuconfig/statefile/file.go
internal/gpuconfig/statefile/file_test.go
internal/gpuconfig/statefile/state.go
internal/gpuconfig/statefile/state_test.go
internal/gpuconfig/status/sync.go
internal/gpuconfig/status/sync_test.go
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.
henry118
changed the title
gpu-config: derive the sync label value
gpu-config [3/13]: derive the sync label value
Nov 19, 2026
This branch has not been deployed
No deployments
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
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.
Part of #3246 (3/13). Depends on: #3247. Review only the last commit.
Adds
internal/gpuconfig/status: the value of thenvidia.com/gpu-config.syncnode label. Not used yet.