Repository navigation
[Calls] Enforce the pre-frozen class IR universe - #527
Merged
Merged
Conversation
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.
Raw class diagnostics can count a lifted closure absent from the pre-frozen runtime-class IR universe. In the observed case, the frontend attached it to a same-signature interface instead of the runtime class. The frontend ownership fix is UnitTestBot/jacodb#444.
Freeze a copy of the existing source-mapped IR universe before analysis and require every original-entry hit to belong to it. Retain any violation and reject final raw results even if exploratory execution catches the observer exception as an interpreter failure. Journal finalization still runs before rejection. This never grows the denominator from observed hits or drops unexpected hits silently.
The ordinary class-startup regressions cover interfaces before/after the class and require the lifted closure to execute and be present in the frozen universe. A focused observer contract regression verifies that mutating the caller's list cannot extend the universe and that catching its callback exception cannot yield a valid result.
Validation: 13 focused Kotlin tests passed against local JacoDB #444 (12 class-startup tests, 1 observer contract test), with zero skips; strict Calls Detekt passed. Removing the membership guard makes the new observer test fail at the expected exception assertion; restoring it passes. Frontend #444 separately passed typecheck and 67 focused tests, including before-fix failure for both interface-first cases.
Integration dependency: this branch pins JacoDB #444 at c6d1fe316cdca9b08a674e1638ff6d485ae17824, required by the interface-first source regression. Local verification used that exact source commit; dependency publication and CI are separate checks. This is raw symbolic diagnostic IR, not native class-statement coverage. Existing native admission limits for unverified nested classes/closures remain. Related to #489.