Freshening asks a different question than type_level, so it needs its own - #71
Merged
Conversation
Contributor
Author
This was referenced Aug 10, 2026
dpmills
force-pushed
the
dmills/freshen-level
branch
from
August 10, 2026 21:41
90e3e50 to
90f496e
Compare
This was referenced Aug 11, 2026
sortalongo
approved these changes
Aug 11, 2026
…ts own A specialization clone must share no live inference state with the definition it was cloned from. That invariant breaks when a quantified variable is reachable only through a **refinement predicate**: `freshen_above` short-circuits on `type_level`, which is predicate-blind (it reports a `Refinement`'s base level), so a type whose only above-cutoff content sits in a nested predicate is returned verbatim — still pointing at the definition's own variables. The symptom is a duplicate specialization, the clone reaching one generalized `let` both through freshened variables and through the original's. The fix is a second level function, not a change to `type_level`, whose predicate-blindness is load-bearing for its other callers (extrusion, bound-recording scope, `should_generalize`); `freshen_level`'s doc comment states the two questions. No measured cost.
dpmills
force-pushed
the
dmills/freshen-level
branch
from
August 12, 2026 00:09
90f496e to
439d6b9
Compare
groundlar
removed their request for review
August 12, 2026 19:56
This was referenced Aug 12, 2026
Close a commit store's keys individually, so an await waits only for its own variable's writers
#102
Open
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.
A specialization clone must share no live inference state with the definition it was cloned from. That invariant breaks when a quantified variable is reachable only through a refinement predicate:
freshen_aboveshort-circuits ontype_level, which is predicate-blind (it reports aRefinement's base level), so a type whose only above-cutoff content sits in a nested predicate is returned verbatim — still pointing at the definition's own variables. The symptom is a duplicate specialization, the clone reaching one generalizedletboth through freshened variables and through the original's.The fix is a second level function, not a change to
type_level, whose predicate-blindness is load-bearing for its other callers (extrusion, bound-recording scope,should_generalize);freshen_level's doc comment states the two questions. No measured cost.