fix(cluster-manager): announce only persisted endorsement changes - #62
Noah-Tervalon-Nvidia merged 4 commits into
Conversation
Reconciliation and validation updateRechecked this PR against NVIDIA What changed in this follow-upThe new commit is test-only; it preserves the existing runtime fix and the The tests now check the notification/persistence boundary rather than treating an in-memory read as disk-persistence evidence:
As a regression control, I ran the same test file against otherwise unchanged Fresh local validationValidation was executed on the pre-commit worktree whose three changed-path SHA-256 values match the blobs committed at Environment: Linux/amd64, Go From go test ./... -count=1 -timeout=180s -json
go test ./... -race -count=1 -timeout=180s -json
go test ./... -race -run TestTrustStore -count=50 -timeout=120s -json
go vet ./...All passed. The full module normal and race runs each executed 106 top-level tests with no failed or skipped test events. The repeated run includes the new concurrent regression; it is not a claim of universal race-freedom. Also passed:
GOFLAGS=-buildvcs=false go test ./... \
-run '^TestCluster(ManagerPairing|Fanout|Leave)$' \
-count=1 -timeout=180s -jsonAll three selected integration tests passed without skips. This covers pairing/removal, transitive membership propagation, and leave behavior; it is not a full cross-process-suite result. Broader gate remains openRepository-wide
These are local results bound to the stated source snapshot, not hosted-CI results. No hosted checks are currently reported for this PR, and maintainer review is still required. Windows/macOS execution, power-loss durability, live-engine testing, and deployment are not claimed. The change does not modify certificate/endorsement verification, admission authorization, pairing-PIN security, or mTLS policy. The original commits are retained, and the follow-up uses the same author with a matching DCO sign-off. This update does not merge the PR or change its draft state. The next gate is maintainer review of this focused fix and disposition of the broader baseline failure before treating the repository-wide validation gate as satisfied. |
|
Independent confirmation from a 9-node fleet (8× DGX Spark + 1 gateway box, all on PAIR 0.1.1 services): every node's Tracing it landed on the same line this PR fixes: in The fix here (announce only when an endorsement was actually persisted) matches what I would have written. +1 to landing it as a bug fix. |
Merge the reviewed three-path PAIR truststore correction into fork main. NVIDIA PR NVIDIA#62 remains untouched.
|
We'll need to rebaseline this against develop. I can help with that today, as I review the change. |
Emit truststore change announcements only after an endorsement merge adds and persists a new endorsement. Keep idempotent re-pins, empty or duplicate merges, and failed writes silent, with component-level regression and race coverage. Signed-off-by: Josh Stevenson <j.stevenson.cs@gmail.com>
Signed-off-by: Josh Stevenson <j.stevenson.cs@gmail.com>
Verify callback read-back and disk reload for direct and identical-pin merges, including mixed and duplicate batches. Exercise replace failures through both entry points, preserve old disk and live state, and verify recovery without temporary residue. Add concurrent identical submissions and missing-target regression coverage. Signed-off-by: Josh Stevenson <j.stevenson.cs@gmail.com>
Signed-off-by: Kaylee Lubick <klubick@nvidia.com>
da7df0a to
6cdc6c3
Compare
kjlubick
left a comment
There was a problem hiding this comment.
LGTM. I tweaked some of the tests to be more aligned with project guidelines and update the spec.
Thank you for the contribution!
Noah-Tervalon-Nvidia
left a comment
There was a problem hiding this comment.
LGTM, thanks for catching this!
Description
The truststore previously announced
cluster:trust-changedwhenever an endorsement merge returned successfully, even when it received only duplicates, had no target pin, or had nothing to merge. That caused consumers to refresh trust-derived state without a persisted change.The merge now reports whether it actually saved a new endorsement. Both direct endorsement additions and same-certificate re-pins announce only after that save succeeds. Failed writes leave the live and on-disk pin unchanged and emit no notification. The cluster manager spec now describes the notification and endorsement merge behavior.
Release intent
Changelog title
Avoid unnecessary cluster trust notifications
Changelog body
Cluster trust notifications now follow successfully saved peer endorsements. Duplicate endorsements and failed writes no longer cause unnecessary refreshes.
Bumps
Scope
services/nvpair-cluster-manager/truststore.go.cluster:trust-changedand endorsement merge semantics inservices/nvpair-cluster-manager/spec.md.services/versions.jsonandCHANGELOG.mdto the release-intent automation.Validation
go test ./... -count=1fromservices/nvpair-cluster-manager.go test ./... -run '^TestCluster(ManagerPairing|Fanout|Leave)$' -count=1 -timeout=180sfromservices/tests.git diff --check upstream/develop...HEAD.Risk
The change affects when truststore notifications are sent after endorsement updates. It does not change certificate validation, endorsement verification, admission authorization, PIN handling, or revocation. No data migration or JSON-RPC payload change is required.
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.jsonis written by automation — do not edit it by hand.