Repository navigation
fix(semantics,query): a transition owns the Membership naming its first source and its in link parameters on the native walk — a ReferenceUsage through a ParameterMembership ahead of its trigger, a second one when it declares a trigger — as the conversion mints them and the pilot exports them, and the query leg reads their ids - #2222
Merged
Merged
Conversation
…st source and its in link parameters on the native walk — a ReferenceUsage through a ParameterMembership ahead of its trigger, a second one when it declares a trigger — as the conversion mints them and the pilot exports them, and the query leg reads their ids A `transition` owned only its succession on the native walk, where the RDF conversion mints the Membership of its `first` source (`<id>_psourcemember`), an `in` ReferenceUsage through a ParameterMembership (`<id>_linkparam`, `_linkparam_om`) and a second one ahead of a trigger (`<id>_triggerparam`), and the pilot exports a Membership, a ParameterMembership and the succession's OwningMembership for it. The semantic model now synthesizes the link parameters (ExpressionTransitionLinkParameter) and lists the source Membership first, the conversion files the ids under the transition's node, and the query leg reads them — for a `transition`, a triggered one and a guarded one. A state body's `then x;` written as a transition owns neither on either leg, as the conversion writes it. Structure differential re-recorded: matched grows on every root, no `different` row grows; derived census re-recorded: carriers grow by the new elements, Step::parameter answered on 109 more transitions, no pilot column moves. api-json `-check`, the round-trip sweep and docs-counts reproduce. 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)".
|
…version's ids — `<transition>_linkparam` and `_triggerparam` — through SynthesizedElementID, so a metaobject over gRPC references them as it does the transition's succession SynthesizedElementID had no case for ExpressionTransitionLinkParameter, so the protobuf conversion serialized a link parameter's metaobject as an unsupported null where the transition's succession resolved to its element reference. The two slots the conversion mints them at are named once, in transitionLinkParameterSlots, and the recorder and the synthesized-id table both read them. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…endpoint resolution on the native walk, so a vertex nested in a sibling state owns its Membership as the conversion writes it
transitionSourceMember used ResolveTarget, the ordinary lookup, which does not reach a state nested in a sibling state (`transition deep first nested then busy;` beside `state outer { state nested; }`), where the conversion's edgeReference reads the endpoint resolution and states the Membership; the native walk omitted it. EndpointSymbol is the resolution lowering and the conversion share.
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
… elements — `<transition>_succession`, `_linkparam` and `_triggerparam` decode to the transition they are minted off, so a metaobject naming one crosses back over gRPC The element form's Owner decoder read expression ids and encoded names only, so an id the conversion mints with a suffix of its own — the transition's succession since #2216, its link parameters here — named no element on the way back (ErrMetaobjectUnbound). SynthesizedElementOwner decodes those suffixes off the owner's encoded name, and Owner reads it as one element below that owner; the identity round-trip test covers the three and refuses the suffix on a state that owns no succession. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Contributor
Author
|
|
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
NicolasRouquette
approved these changes
Nov 14, 2026
6 tasks done
devin-ai-integration Bot
added a commit
that referenced
this pull request
Nov 14, 2026
…ava 21 Ours columns reproduce develop's (#2222) on every line; the pilot columns reproduce the 2026-09.1 recording on every line. Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
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
A
transitionowned only its succession on the native walk (Element::ownedRelationship), where the RDF conversion mints the Membership of itsfirstsource (<id>_psourcemember), aninReferenceUsage through a ParameterMembership (<id>_linkparam/_linkparam_om) and a second one ahead of a trigger (<id>_triggerparam/_triggerparam_om) — and where the pilot exports, fortransition go first idle then busy;, aMembershipofidle, aParameterMembershipoftransitionLinkSource, the succession'sOwningMembershipand aFeatureMembershipoftransitionLink. The two legs of the reflection disagreed onTransitionUsage::ownedRelationshipfor every transition, with ids that already agreed since #2216.Now:
internal/semantic/semantics/reflective_transitions.gosynthesizes the link parameters asReferenceUsageparts (symbols.ExpressionTransitionLinkParameter, directionin): one for every explicit transition head, a second when it declares a trigger (SysML.xtextEmptyParameterMember);transitionSourceMemberresolves a named, unchainedfirstsource.reflective_memberships.golists the sourceMembership(slotpsourcemember) ahead of everything else the transition owns, then theParameterMemberships, the trigger, guard and succession in their written order;annotations.goandreflective_expression_parts.goanswer the parts' direction and metaclass.internal/translate/export/element_ids.go(recordTransitionHead) files the conversion's ids under the transition's node at those slots, andinternal/doc/queryexec/elementids.goreads them, so the query leg answers<id>_psourcemember,<id>_linkparam,<id>_linkparam_om,<id>_triggerparam.api_json_symbol_structure_test.go) routes the new parts to the graph's_linkparam/_triggerparamelements.Mirrors the conversion form by form: a state body's
then x;written as a transition and a guardedtransition if g then x;own the link parameter (the first also when the conversion writes one) but no sourceMembershipwhere the conversion mints none. Two gaps stay open on both legs, for a follow-up: the pilot'stransitionLinkFeatureMembership, which neither leg has, and the sourceMembershipof a state body'sthen x;, which the pilot owns and the conversion does not write.Specification basis
SysML v2 textual notation (SysML.xtext,
TransitionUsage→TransitionUsageDeclaration/GuardedTargetSuccession): a transition'sfirstsource is referenced through aMembership(FeatureChainMember), and its head owns anEmptyParameterMemberahead of aTriggerActionMember, a second ahead of the trigger when one is declared; the pilot implementation (SysMLv2 release 2025-xx, probed through its API-JSON exporter) exports exactly these memberships. No row ofdocs/project/spec-compliance/moves: the change makes the reflective layer answer what the conversion already states.How it was verified
internal/semantic/semantics/transition_memberships_test.go: atransition, a triggered one, a guarded one and a state body'sthen x;— the memberships each owns, in order, their metaclasses, the link parameters'indirection; fails ondevelop(the transition owns only its succession).internal/doc/queryexec/transition_memberships_ids_test.go: the query leg answersObservatory__S__go_psourcemember,_linkparam,_linkparam_om,_succession_om; fails ondevelop.reflective_transition_kinds_test.goanddescendants_relationships_test.goadjusted for the memberships and the one more non-endReferenceUsage.TestSymbolStructureMatchesGraphStructure -update-structure-differential) re-recorded: matched grows on every root (examples +414, tests/testdata +15, training +115, pilot corpora +321, spec examples +60); nodifferentrow grows — the only rows that grow are the three every newly matched element adds (Feature::isConstantsymbol-extra;Membership::memberElementId/OwningMembership::ownedMemberElementIdsymbol-missing, the id properties the symbol side never answers);Element::ownedElement/ownedRelationshipdifferentfall (examples 824→796 / 1413→1385, pilot corpora 1483→1469 / 2180→2166, spec examples 397→395 / 512→510).derived-census -update) re-recorded: no pilot column moves on any row; ours carriers grow by the new elements (examples root:Element::owner33890→34304,ParameterMembership::ownedMemberParameter2171→2323,Membership::memberElement14350→14612,Feature::direction+152 statedin);Step::parameter's split moves 1264/2449→1373/2340 — 109 transitions now derive a non-emptyparameter, as the pilot does.pilot-apijson-diff -checkreproduces (no triple changes);TestExamplesSweepwith the three corpora required reproduces;make docs-countsreproduces.go testoninternal/semantic/...,internal/doc/queryexec,internal/translate/export,tests/export,tests/identitygreen;make lint,go vet ./...,gofmt -l .(empty),make changelog-check,scripts/check-doc-ids.py,tests/hygieneclean.make test-shortruns now; result in a comment.Checklist
make testandmake lintpass locally (make test-shortresult to follow in a comment)changes/unreleased/transition-native-memberships.fixed.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (structure differential and derived census re-recorded; docs-counts reproduces)F4,K5) in the body, docs, or changelogLink 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