Conversation
Signed-off-by: magrhino <12738722+magrhino@users.noreply.github.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
magrhino
marked this pull request as ready for review
September 15, 2026 00:22
This was referenced Sep 15, 2026
17 tasks
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
Repeated searches and concurrent metadata cache misses currently send redundant provider requests, while routed and explicit Hardcover edition lookups can miss each other's cache entries. This change reuses successful provider responses and combines identical in-flight fetches while preserving account isolation, cancellation, complete editions, and retryable failures. Closes #2594; refs #2592.
Scope
When integrating #2593, retain quota state in token-bound clients, keep cache hits and shared waiters outside attempt accounting, and verify quota headroom for mixed interactive/background callers. This PR does not implement quota accounting.
Checklist
git commit -sREADME.mdanddocs/DEPLOYMENT.mdupdated; provider cache contract documented inCONTRIBUTING.mdand godocchangelog.d/2594-metadata-request-caching.mdtemplate.envupdated — N/A: no environment variables or configuration format changesCHANGELOG.mdupdated — N/A: repository policy uses fragments and assembles the changelog at release timeTest plan
Go checks used
GOTOOLCHAIN=go1.26.1.make test— full backend tests and coveragego test -race ./internal/metadata/...go test -race -count=10 ./internal/metadata ./internal/metadata/hardcovergo vet ./...go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 run --timeout=5m ./internal/metadata/...— zero issuesgo run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4 run --timeout=5m— full Go lint, zero issuesgit diff --checkand formatting checksGOTOOLCHAIN=go1.26.6 go run golang.org/x/vuln/cmd/govulncheck@d1f380186385b4f64e00313f31743df8e4b89a77 ./...— zero affected vulnerabilities; one required-module advisory with no called vulnerable symbolsGOTOOLCHAIN=go1.26.1failed with 16 standard-library advisories. The patched-toolchain scan above passed; no repository toolchain/dependency changes are included.tests/run-all.sh— N/A: backend validation uses the repository's Make targetsThe complete local patch passed an independent high-risk review after the cache-scope and scheduling-deadline fixes. Remote CI is not certified by these local results.