Repository navigation
fix(metamodel): a feature typed by a library type inherits that type's memberships in the symbol structure — a stated library base is read from the inheritance table as an implied one is - #2063
Merged
NicolasRouquette merged 21 commits intoNov 9, 2026
Conversation
…s memberships in the symbol structure — a stated library base is read from the inheritance table as an implied one is A base the model implies (Base::dataValues) reached the structure walk as a symbol element and took the library-members path; a base the notation states (`: Boolean`) came back as the SymbolStructure's handle for a library row — no symbol, metaclass known — and fell through to the owned-relationship filter, which has nothing for a library row. Every library-typed feature therefore answered Type::inheritedMembership, Namespace::membership, Type::feature and the properties built on them with "unresolved specialization references". structureLibraryBase resolves such a handle through the LibrarySymbolResolver. Derived-property census and structure differential re-recorded; the element-form omission test reads a genuinely unresolved type and asserts the library-typed feature is carried. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Contributor
Author
There was a problem hiding this comment.
Devin Review found 1 finding. Devin automatically fixed it.
Fixed by Devin (1)
- Library-base comment exceeds length limit — The comment restated in two lines: the decision both member walks make and why a library type the structure only references (implied or stated) is read by its symbol.
NicolasRouquette
approved these changes
Nov 8, 2026
…e stated type's own feature — Quantities::ScalarQuantityValue::mRef, which no implied base supplies Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ership-library-typed Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> # Conflicts: # internal/semantic/metamodel/derived_census_baseline.json # internal/translate/export/testdata/structure_differential_expected.txt
…ure differential on develop at #2060 — library-typed features inherit their type's memberships, metadata body features own their implied Redefinition Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…only — a graph structure states its library bases as symbols already The graph structure the API-JSON element form evaluates over resolves a library reference by its id, and an anonymous graph base resolved to an unrelated library type (Metadata::MetadataItem, Items::Item), so the form listed their members as inherited; pilot-apijson-diff caught it. The symbol structure is the only one that refers to a library type by a row of its own. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…yped feature; the structure differential re-recorded on the symbol-only fallback The API-JSON graph structure states its library bases as symbols already, so the fallback that reads a library row through the symbol structure does not reach it: the element form omits a library-typed feature's inherited features exactly as develop does, and its test says so again. The differential now records the symbol structure computing what the graph structure leaves unsupported. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ership-library-typed
…ership-library-typed Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> # Conflicts: # internal/translate/export/testdata/structure_differential_expected.txt
… comment-parser fix The symbol structure now computes Type::feature, Namespace::member and what builds on them for library-typed features; the graph structure still leaves those cells unsupported, so they move from equal to symbol-extra. No different or symbol-missing count moves on any root. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ent-parser fix develop's comment-parser fix registers a bare /* */ comment at a member position as an element; the training root gains 26 elements (13 implied) and 40 rules of the Element, Annotation, Membership, Namespace and Relationship families move by that count. Against develop re-recorded at the same commit, this branch differs on exactly the 29 rules its body names; summary and silent list unchanged. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ership-library-typed
…ership-library-typed Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> # Conflicts: # internal/semantic/metamodel/derived_census_baseline.json # internal/translate/export/testdata/structure_differential_expected.txt
…re differential on develop at #1980 Both were re-recorded on develop by #1980 and conflicted with this branch's recordings; re-recorded with their tools on the merged tree. Against develop's recording, the census differs on exactly the 29 rules this fix moves (summary and silent list unchanged: Type::feature not-derived 5995 → 1071, Namespace::member 6576 → 1706, Usage::usage 4830 → 616), and the structure differential moves 91 rows, every one from equal to symbol-extra; different and symbol-missing never rise. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ership-library-typed Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> # Conflicts: # internal/semantic/metamodel/derived_census_baseline.json # internal/translate/export/testdata/structure_differential_expected.txt
…e differential on the develop merge Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
NicolasRouquette
requested changes
Nov 9, 2026
…ership-library-typed
…member walks Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ership-library-typed Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> # Conflicts: # internal/semantic/metamodel/derived_census_baseline.json # internal/translate/export/testdata/structure_differential_expected.txt
…ifferential on the merged tree Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
HuiJun
approved these changes
Nov 9, 2026
NicolasRouquette
approved these changes
Nov 9, 2026
6 tasks done
devin-ai-integration Bot
added a commit
that referenced
this pull request
Nov 9, 2026
…ructure Snapshot regenerated first (unchanged). #2063's structureLibraryBase is kept as the one decision both member walks make; the recovered-symbol reading of this branch (a library type held as a symbol-less row, a feature the structure leaves to the semantic model) is folded into it, so there is a single rule. Re-recorded by tool: goldens (condition_references re-pinned), the conformance library table (260 -> 262), the agreement ratchet (constraint, calculation and assert-constraint member rows keyed symbol-51/symbol-53), the structure differential, the API JSON baseline (reproduces under -check) and both corpus round trips (no verdict moved). Structure differential: every root's matched/unmatched count is identical to the pre-merge record; 53 property rows move because the graph structure now derives the implicit Base::things subsetting of anonymous filter references (Base::things::that, which the pilot writes) while the symbol structure does not yet - graph-correct, symbol-side follow-up - and develop respells one unbounded_operand id. Co-Authored-By: jason.han <hanhuijun@gmail.com>
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
Every feature typed by a library type —
attribute isMandatory : Boolean;in a metadata definition,attribute q : Quantities::ScalarQuantityValue;— failedType::inheritedMembership,Namespace::membership,Type::feature,Type::inheritedFeature,Type::directedFeature,Definition::usageand everything built on them in the symbol-backed structure ("unresolved specialization references"). #2060 made it visible on 16 metadata-body features of the training root, but the hole is older: a stated library base reachescomputeStructureTypeMembersas the structure's own handle for a library row (ametamodel.Elementwith noSymbol), which the library-members path — gated onelement.Symbol != nil && !e.structureKnows(element)— never selected; an implied base (Base::dataValues) arrives as a symbol and took it, which is why the implied members were there and the stated type's own were not.structureLibraryBasenames the library type a base stands for: a symbol-carrying base the structure does not own, or a library row theSymbolStructureresolves throughLibrarySymbol.computeStructureTypeMembersandcomputeStructureNonPrivateMembershipsread that type's memberships from the semantic inheritance table, as they already did for implied bases.The fallback is the symbol structure's only. The API-JSON graph structure (
apiJSONGraphStructure) states its library bases as symbols already, and itsLibrarySymbolresolves a graph reference through the identity catalog — which, for an anonymous base, answers an unrelated library type (Items::Item,Metadata::MetadataItem,Metaobjects::Metaobject). A first version of this branch reached it and moved the api-json differential oninheritedMembership/feature/memberby tens of thousands of cells (the pilot-apijson-diff gate caught it); restricted to*SymbolStructure, the api-json baseline reproduces unchanged and the element form reads exactly as develop. The catalog mis-resolution is pre-existing and out of scope here; filed as a follow-up.Measured (derived-property census,
tools/cmd/derived-census -checkgreen on the re-recorded baseline): against develop at #1980's merge, not-derivedType::featurefamily 5995 → 1071,Namespace::member6576 → 1706,Usage::usage4830 → 616; every one of the 29 moved rows moves toward the pilot; summary andsilentlist unchanged.Structure differential (
testdata/structure_differential_expected.txt, re-recorded with-update-structure-differential): the symbol structure now computes membership cells for library-typed features that the graph structure still leaves unsupported, so those cells move fromequal(the differential counts a cell both sides leave unsupported as equal) tosymbol-extra— onexamples,Namespace::member215 → 2092 symbol-extra,Type::feature215 → 2138,Behavior::step+25,Definition::usage/directedUsage+38,RequirementUsage::{actor,stakeholder,subject}Parameter+8,Function::expression+25;differentandsymbol-missingdo not move on any root.Develop merged in
--no-ffeight times, the last at #2051's merge 227e88e (base of this head); the generated files that conflicted each time (census baseline, structure differential) were taken from develop and re-recorded with their tools on the merged tree, never hand-merged. At 227e88e, develop's own re-recording at that commit reproduces its committed baseline (no drift), and this branch's differs from it on exactly the 29 census rules named above (summaryserved 297 / answering 276 / notDerived 9and thesilentlist unchanged;Type::featurenot-derived 5995 → 1071,Namespace::member6576 → 1706,Usage::usage4830 → 616) and moves 29 structure-differential rowsequal→symbol-extra(19 existing, 10 new), withdifferentandsymbol-missingunmoved on every root.make stdlib-snapshotleavesstdlib.snapshotunchanged;pilot-apijson-diff -checkreproduces without re-recording.How it was verified
internal/semantic/metamodel/structure_library_base_test.go:attribute q : Quantities::ScalarQuantityValue;—Type::inheritedMembershipandNamespace::membershipmust carryQuantities::ScalarQuantityValue::mRef, a feature only the stated type owns (the impliedBase::dataValuescannot supply it); fails without the fix.internal/translate/export/api_json_element_form_test.gois develop's: the element form (graph structure) still omits a library-typed feature's inherited features with the unresolved-reference reason, as on develop — this PR fixes the symbol structure.go run -C tools ./cmd/pilot-apijson-diff -check: baseline reproduces, every root.go run -C tools ./cmd/derived-census -check: green on the re-recorded baseline.go build ./...,go vet ./...,go vet -C tools ./...,gofmt -l .empty,make lint,make docs-counts,go test ./...(132 packages ok, training/pilot/spec-example corpora required),derived-census -check,pilot-apijson-diff -check,TestSymbolStructureMatchesGraphStructure;git merge-treeagainst develop@227e88ee3b clean, no conflict markers.Checklist
developchanges/unreleased/library-typed-feature-inherited-membership.fixed.mdLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/18ad47adf36f44e9b6824a4472f9678d
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/18ad47adf36f44e9b6824a4472f9678d?variant=devin
Requested by: @NicolasRouquette
🟢 Devin Review found nothing to fix · View findings · Follow Devin's work