Repository navigation
Conversation
TAJWKSRefresher.Start and Add polled each trust anchor with EnableJWKSUpdate once before starting its polling goroutine, and returned an error when that poll failed: the trust anchor was never polled, and Start stopped at the first one, leaving the refresher half-started. A trust anchor that is briefly unreachable (restarting, or not serving yet when this entity starts) thus stopped callers that treat Start errors as fatal, or was left unpolled. Start and Add now share startPolling, which logs a failed initial poll as a warning and starts the goroutine with a first wait of initialBackoff; the trust anchor keeps its current JWKS meanwhile. Start still fails when a trust anchor has no JWKS and no storage to seed it. Fixes go-oidfed#214 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QYDqsx3UGxpCKvCiUxShZq
Contributor
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Go | Nov 12, 2026 9:02a.m. | Review ↗ | |
| Code coverage | Nov 12, 2026 9:33a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
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.
Fixes #214.
A failed initial poll of a trust anchor with
EnableJWKSUpdateno longer failsTAJWKSRefresher.StartorAdd(and soUpdate):StartandAddshare a newstartPolling. It runs the initial poll and, if the poll fails, logs a warning and starts the polling goroutine anyway, with a first wait ofinitialBackoff. The backoff then doubles up tomaxBackoffas before.pollGoroutinetakes that first wait as a parameter.Startno longer stops at the first unreachable trust anchor, so it can't leave the refresher half-started.Startstill returns the "no JWKS available" error when a trust anchor has no JWKS and there is no storage to seed one.Tests (
ta_jwks_refresher_test.go):Startwith an unreachable trust anchor and storage succeeds (this updatesTestTAJWKSRefresher_FirstPollSeedValidation, which asserted the old error);Addof an unreachable trust anchor succeeds and keeps its JWKS;The new tests fail on
mainand pass with this change;go test ./...passes.Like #212 and #213, this adds a changelog entry under a new "Unreleased" heading; please merge or move it as you prefer.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QYDqsx3UGxpCKvCiUxShZq