fix: restore binary api compatibility#27
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c8b22bc64
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| * with existing clients.</p> | ||
| */ | ||
| public final class Merger implements NodeResolver { | ||
| public class Merger implements NodeResolver { |
There was a problem hiding this comment.
Avoid issuing verified evidence from subclass overrides
When an existing compatibility subclass overrides resolve or merge and then uses the inherited resolveSnapshot(..., NO_LIMITS), the snapshot path still calls those virtual methods and mints a VerifiedReferenceResolution for whatever resolved graph the subclass returned. That evidence is accepted by ResolvedReferenceCache.putVerifiedResolved, so a subclass can accidentally publish a resolved graph that was not produced by the trusted verifier under the canonical BlueId; keeping the class extensible needs to disable verified evidence for subclass-produced resolutions or otherwise route verification through non-overridable logic.
Useful? React with 👍 / 👎.
| } | ||
| legacyInsertionOrder.remove(blueId); | ||
| legacyInsertionOrder.add(blueId); | ||
| legacyCurrentWeight = saturatedAdd(legacyCurrentWeight, weight); |
There was a problem hiding this comment.
Account for legacy aliases in cache stats
When callers use the restored deprecated alias APIs, this line retains bytes in legacyCurrentWeight, but CacheStats/localCacheStats() never include that lane and Blue.clear*RuntimeCaches() reports released bytes only from those stats. In that compatibility path, cacheStats().currentWeightBytes() and lifecycle released-memory gauges can under-report retained/released memory by up to the transient-reference bound per live cache even though the aliases remain stored until eviction or clear.
Useful? React with 👍 / 👎.
Summary
Restores JVM binary compatibility with the published 3.0 API while retaining the newer verified-reference and structural-cache safety guarantees.
Changes
Verification
./gradlew clean build rcVerify jmhClasses --no-daemon