Unify qualified-reference resolution: witness type sources and alias validation - #79
Merged
Merged
Conversation
…; fix parallel TempDir flakiness
…nesting and module split
…aries into the conflict pass
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.
Unifies qualified-reference resolution across the analyser, closing #76, #77 and #78 along with several related gaps in the same area. The common thread is consistency: a check or resolution that applied at one site is made to apply at all of its siblings, single-file and across a
useedge alike.Qualified-reference resolution
One pass walks every qualified reference
alias/Nameand validates it at the reference site, single-file and multi-file:whentriggers, transition subjects, surfacecontext, inline parameters, field types,.created(...), provides entries, defaults and contract clauses. Previously only provides and default sites were checked.This replaces the per-site
providesanddefaultalias checks with a single resolution.Binding-type resolution
A witnessing rule's binding is typed from several sources, each now resolved consistently:
where,withand?refinements on a binding's type are unwrapped by one shared helper in every resolver, soReady(b: dom/Job where status = pending)andfacing b: dom/Job with …typebexactly as the bare form does.m: dom/E.due_at <= now) resolve across a module boundary, and the qualified field references they read are credited so the field is not reported unused.Branch traversal
Several passes walked only the top level of a rule body, silently skipping clauses nested in
if/elseorfor. All now descend through a shared helper: qualified creation and witnessed transitions in the reverse channel, emission parameter typing, undefined-binding detection, type-reference checking, and conflict and determinism effect analysis. Undefined-binding detection scopes branch-locallets, so it adds no false positive.Cross-module conflict detection
Two rules in an importer that can both fire in the same state of an imported entity and set conflicting statuses are now reported, matching the single-file behaviour. The importer's conflict pass is given the imported entity's status vocabulary (threaded through the existing cross-module context), so it can attribute both rules to the entity; the lifecycle checks stay local to each module. An actor's choice, where the rules fire on different triggers, is still not a conflict.
Diagnostic-code consolidation
Retired in favour of one code per behaviour, message-anchored at the reference:
allium.provides.undefinedImportedAliasandallium.default.undefinedImportedAliasbecomeallium.reference.undefinedImportedAlias(undeclared alias, any site).allium.provides.unknownTriggerbecomesallium.reference.unknownName(valid alias, nonexistent name, any site).allium.provides.undefinedImportedAliasshipped in 3.5.2, so flagging its retirement in case you would rather keep per-site codes.Tests
useedge. Generative variants cover random names, every binding-type source, refinements, multiple entities, multi-importer merges, deep branch nesting and a combined fuzzer.check,analyseandparseexit-code and JSON-envelope contract.Full workspace suite green, no new clippy warnings, behaviour specs updated.
Closes #76
Closes #77
Closes #78