Skip to content

[Calls] Enforce the pre-frozen class IR universe - #527

Merged
CaelmBleidd merged 2 commits into
mainfrom
caelmbleidd/class-ir-universe-membership
Oct 16, 2026
Merged

CaelmBleidd merged 2 commits into
mainfrom
caelmbleidd/class-ir-universe-membership

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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.

@CaelmBleidd
CaelmBleidd merged commit ee51d66 into main Oct 16, 2026
8 of 13 checks passed
@CaelmBleidd
CaelmBleidd deleted the caelmbleidd/class-ir-universe-membership branch October 16, 2026 12:48
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