Skip to content

fix: restore binary api compatibility#27

Merged
piotr-blue merged 1 commit into
nextfrom
fix/binary-api-compatibility
Jul 21, 2026
Merged

fix: restore binary api compatibility#27
piotr-blue merged 1 commit into
nextfrom
fix/binary-api-compatibility

Conversation

@piotr-blue

Copy link
Copy Markdown
Contributor

Summary

Restores JVM binary compatibility with the published 3.0 API while retaining the newer verified-reference and structural-cache safety guarantees.

Changes

  • restore deprecated FrozenNode and ResolvedReferenceCache compatibility APIs
  • isolate legacy BlueId-keyed aliases from verified provider evidence
  • restore Merger extensibility
  • restore the legacy one-argument MergeReverser overload
  • add compatibility and cache-integrity regression tests

Verification

  • ./gradlew clean build rcVerify jmhClasses --no-daemon
  • master → candidate: 0 incompatible changes
  • previous RC → candidate: 0 incompatible changes
  • unchanged client compiled against 3.0 runs against the candidate
  • release-tooling tests pass

@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

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.

@piotr-blue
piotr-blue merged commit 8790804 into next Jul 21, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant