Repository navigation
fix(semantic): three wrong GetElementProperties answers (filtered imports, qualified targets, decision branches) - #2496
Merged
Conversation
…orders them Co-Authored-By: jason.han <hanhuijun@gmail.com>
…lden for the pilot's flow order Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ential for the pilot's flow order Co-Authored-By: jason.han <hanhuijun@gmail.com>
…er package Co-Authored-By: jason.han <hanhuijun@gmail.com>
…t names, not a feature chain Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ferenceSubsetting Co-Authored-By: jason.han <hanhuijun@gmail.com>
…for the three reader fixes Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
5 of 6 tasks
github-merge-queue
Bot
removed this pull request from the merge queue due to invalid changes in the merge commit
Nov 21, 2026
This was referenced Nov 21, 2026
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.
What and why
Three wrong answers of the symbol-backed
GetElementPropertiesreader, each found by review of #2494 and each reproduced with a failing test before its fix.Chained on #2494 (head c39536f), so until that merges this diff also shows its three commits. The change itself is the last five commits.
package Both { private import P::*[@Safety]; private import P::*[@Security]; }Both.importedMembership=[P__A_om][P__A_om, P__B_om]transition qualified first a then S::b;targetis a synthetic chain…_pend1_pchainP__S__bdecide d; if true then b; else c;ReferenceSubsettingreferencedFeature=b(andc)Specification basis
FilterPackage: each filtered import owns its own Package.filterPackageOfbuilt both with the same key, so the structure collapsed them into one handle.TransitionSuccession: only a.step makes a feature chain.dottedTargetChainchained on every segment,::included.TargetSuccession: the target end refers to the branch's target.successionEndReferencehad no case for a decision's branch.It moves no row of
docs/project/spec-compliance/.How it was verified
Each test failed before its fix:
Try it:
go test -count=1 ./internal/frontend/grpc -run 'TestElementPropertiesReadEachFilteredImportOfANamespace|TestElementPropertiesReadAQualifiedTransitionTarget|TestElementPropertiesReadADecisionBranchTargetEnd'Baselines moved by their recorders only; every count moves toward agreement and no row is new:
Structure differential (
-update-structure-differential), symbol reader against the written graph, examples root:Feature::ownedReferenceSubsettingdifferent 93 → 0,Type::ownedSpecialization100 → 7,Element::ownedRelationship166 → 73,Type::feature408 → 335.Agreement ratchet (
-update-agreement-ratchet): 4 rows removed;ReferenceSubsetting::@id105 → 4,ReferenceUsage::ownedReferenceSubsetting103 → 2,ReferenceUsage::member228 → 151.Derived census (
derived-census -update -recorded-pilot): our element count rises toward the pilot's on four roots, for example examples 53774 → 53867 against the pilot's 57526.The export is untouched, so the api-json differential and the convert goldens do not move.
Gate
All exit 0:
go build ./...,go vet ./...,go vet -C tools ./...,gofmt -lon tracked files (empty),make lint,go test -count=1 ./...with the training, pilot and spec-example corpora required (140 packages ok),go test -C tools ./..., and-checkofpilot-diff,derived-census -recorded-pilot,doc-counts,hideo-suiteandpilot-apijson-diff.Not run:
-race, and the PSSM, reference-FMU and pilot-library-XMI gates beyond whatgo test ./...runs locally.Not in this PR
then decide;) still has no element of its own, so its branches' successions answer no source.Checklist
make testandmake lintpass locally (make lintandgo test ./...pass; the-racerun ofmake testwas not run)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (doc-counts -checkis current)F4,K5) in the body, docs, or changelogImplemented in session Fix the cross-MDK regression in #2042
Review with Devin · Open in Devin Desktop