Repository navigation
Conversation
yizha1
requested review from
NiazFK,
gokarnm,
priteshbandi,
rgnote,
shizhMSFT,
toddysm and
vaninrao10
as code owners
October 1, 2026 16:08
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused test-only change correctly removes the stale certificate assumption without weakening error verification.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the timestamp revocation test to tolerate DigiCert certificate rotation while retaining exact error validation.
Changes:
- Captures the certificate marked revoked by the test validator.
- Derives the expected error from the current certificate subject.
- Explicitly verifies revocation validation occurred.
| File | Description |
|---|---|
internal/timestamp/timestamp_test.go |
Makes the live DigiCert revocation test certificate-rotation-safe. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #321 +/- ##
==========================================
+ Coverage 92.26% 92.69% +0.42%
==========================================
Files 32 32
Lines 2806 2204 -602
==========================================
- Hits 2589 2043 -546
+ Misses 165 109 -56
Partials 52 52 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Derive the expected revocation error from the certificate marked revoked by the test validator instead of hard-coding DigiCert's 2024 certificate subject. Preserve the exact error assertion and require revocation validation to run. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Yi Zha <yizha1+microsoft@microsoft.com>
yizha1
force-pushed
the
yizha1-microsoft-dependency-pr-merge
branch
from
October 1, 2026 17:44
46533b0 to
627125a
Compare
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.
Summary
Fix the timestamp revocation test without changing production code or removing its live DigiCert request.
The test expected the exact subject of DigiCert's 2024 timestamp certificate. DigiCert now returns a different certificate, causing the test to fail even though the revoked certificate is correctly rejected. The same failure was reproduced on unchanged
mainbefore this fix.Record the certificate marked revoked by the test validator and derive the expected error from its subject. Keep the exact error comparison, and explicitly fail if revocation validation was not reached.
Validation
mainusing Go 1.23.12.go test -race ./internal/timestamp -count=1passed with Go 1.23.12 and Go 1.24.13.git diff --checkpassed.Scope
Only
internal/timestamp/timestamp_test.gochanges. The test still contacts DigiCert. No dependency updates or production behavior changes are included.