Repository navigation
fix(semantics,query): a flow owns its two FlowEnds on the native walk — an EndFeatureMembership each after its payload, the end reference-subsetting the feature before the last it names and owning the ReferenceUsage that redefines that last one — as the conversion mints them and the pilot exports connectorEnd, and the query leg reads the conversion's ids - #2266
Conversation
… — an EndFeatureMembership each after its payload, the end reference-subsetting the feature before the last it names and owning the ReferenceUsage that redefines that last one — as the conversion mints them and the pilot exports connectorEnd, and the query leg reads the conversion's ids A `flow` stating its `from` and `to` (not a `message`) owns a source and a target FlowEnd through an EndFeatureMembership each: nameless, named by the Flows::Flow end they redefine, isEnd, no default multiplicity. Each end reference-subsets the feature before the last it names (the chain Feature for two or more, which it then owns) and owns through a FeatureMembership the ReferenceUsage redefining that last feature. The query leg reads `_pend0`, `_pend0_om`, `_pend0_prs`, `_pend0_pff`, `_pend0_pff_om`, `_pend0_pff_rd0`. Structure differential: Flow::flowEnd closes in every root; matched rows grow. Derived census (JDK 21): no pilot column moves; the connector and relationship end families derive on flows; the not-derived rows that grow are pre-existing families on the new carriers. api-json unchanged. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…as a related feature — `flow f4 :> f3` inherits f3's two ends and passes the related-elements check again Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…feature it redefines, so it answers that feature's type as the pilot derives it Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…enceUsage it owns, as ownedMember and ownedFeature already do Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ter the payload's FeatureMembership, as the pilot orders them and its ownedRelationship already did Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
There was a problem hiding this comment.
Devin Review found 4 findings. Devin automatically fixed all 4 findings.
Fixed by Devin (4)
- Inherited flows fail related-feature validation — Real (and CI's TestW10BKerMLConnectorRelatedFeatures failure): f4 :> f3 answered 0. endReferencesFeature now counts an implied connector end, which is minted only once its clause attaches it to a feature; new test asserts RelatedFeatureCount(f4) == 2.
- Flow-feature redefinitions lose payload types — Real: the pilot exports the end's ReferenceUsage typed by Photon through its Redefinition; ours answered no type. DirectSupertypes now includes flowEndFeatureRedefinition; test asserts type = Photon.
- Flow-end children missing from feature queries — Real: feature and ownedElement enumerated the scope only. Both now go through withFlowEndFeature as ownedMember/ownedFeature do; test asserts all five readers answer the ReferenceUsage.
- Payload membership follows flow ends — Real: the pilot owns the PayloadFeature's FeatureMembership before the two EndFeatureMemberships; OwnedMemberships now emits the ends right after a declared payload's membership (ahead of the body when none), agreeing with OwnedRelationships; test asserts p source target on both.
|
Gate: |
Brings in #2259, #2260 and #2270 as landed; annotations.go composes withFlowEndFeature over develop's withConstraintResult. The derived census and the structure differential are re-recorded by tool under the merged code, every moved value the sum of what each side moved alone (the kerml-examples Usage rows are this branch's own, unchanged by the merge). Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Brings in #2261 as landed. The derived census and the structure differential are re-recorded by tool under the merged code; every moved value is the sum of what each side moved alone (zero interaction rows); the api-json and pilot differentials reproduce unchanged. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…feature-membership-native Stacks this change on #2266 (04156ff). The Turtle golden digests, the structure differential and the derived census are re-recorded by tool under the merged code; the census rows new to the merge are #2266's own (Usage::*, kerml-examples) rows unchanged, every other moved value is the sum of what each side moved alone; the api-json and pilot differentials reproduce unchanged. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…e/transition-effect-perform-action Stacks this change on #2268 (82ec554), itself on #2266 and develop at #2261. The state-machine Turtle golden digest, the structure differential and the derived census are re-recorded by tool under the merged code. Beyond what each side moves alone, the two interact on a transition's effect PerformActionUsages: six effects now agree with the graph on Feature::isComposite and Usage::isReference, two Type::endFeature 'symbol unsupported' rows resolve and one appears, and the census's Namespace, Type and Usage rows move by two to seven values on the same carriers with the pilot column unchanged. The api-json and pilot differentials reproduce unchanged. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
|
ci:rebaseline stopped without pushing (run, failure). Movement seen so far:
|
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
The derived census (JDK 21, pilot exported; -check reproduces) is the only
baseline the merge moved: the structure differential, the Turtle goldens, the
api-json differential, the corpus ratchets and the parser goldens reproduce as
merged.
- internal/semantic/metamodel/derived_census_records.tsv: 874 records moved;
838 moved by both sides (develop's pilot.nondeterministic column and its own
rows, this branch's flow-end counts), 36 moved by this branch alone.
- ours.carriers 5681228 -> 5772966 (+91738), ours.value 2084939 -> 2124385
(+39446), ours.empty 3431759 -> 3481760 (+50001), ours.notDerived
164530 -> 166821 (+2291): develop's growth plus this branch's two FlowEnds
and their ReferenceUsages per flow, as its description attributes them.
- Connector::connectorEnd kerml-examples 90 68 4 18 -> 90 70 2 18: the
cell-wise driver refuses it (develop kept the row, this branch moved its
counts); the fresh run answers this branch's counts: the two KerML flows
stating both ends (Simple Tests/Behaviors.kerml 'flow a.y to b.x1;',
Behavior Examples/TakePicture.kerml 'succession flow exposure ... from
step1.xrsl to step2.xsf;') derive connectorEnd where they were empty.
- The 36 kerml-examples Usage::* rows scripts/rebaseline-movement.py reports
unexplained are not a change in what the merged tree derives: they exist
on this branch alone (the four Usage carriers its flow ends and the
ReferenceUsages they own are in that root), develop has no row to carry,
and the fresh run writes them in develop's eleven-column format
(pilot.nondeterministic appended, 0). Every count on them equals this
branch's; stripping the appended column leaves no difference.
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…uffix as develop now declares it develop names a reference subsetting by its own kind (ast.RelReferences) and dropped relationshipSuffix's referenceForm argument; the two calls this branch added for a flow end's redefinition (_rd0) pass the remaining four. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…develop The only baseline the merge moves (-check reproduces; census, Turtle goldens, api-json differential, corpus ratchets and parser goldens reproduce as merged): 24 records, every one moved by both sides, all toward agreement. develop now names a reference subsetting by its own kind (RelReferences) and this branch's flow ends reference-subset the feature before the last one they name, so on the merged tree the five ReferenceSubsetting::referencingFeature symbol-missing rows close (the row leaves the report), Feature::ownedReferenceSubsetting different 119 -> 114 (spec-examples 20 -> 15), and examples/spec-examples matched 8532 -> 8534, unmatched 3079 -> 3077; the Element::* equal counts of that root rise by the same two elements. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
The structure differential merged cell by cell through the baseline merge driver; its -check reproduces the merged file. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…erging fix/flow-end-native-memberships The only baseline the merge moves (-check reproduces for the census, the structure differential, the api-json differential, the corpus ratchets and the parser goldens; rebaseline-movement.py: nothing unexplained): the endpoint_scopes fixture's conversion now carries both this branch's FeatureMembership-owned declared ends and the flow ends #2266 mints. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…-end-native-memberships -check -recorded-pilot reproduces. rebaseline-movement.py: 2295 records moved, nothing unexplained — 2284 moved by the merged branch alone (develop's eleven-column format with the pilot.nondeterministic column, 0 -> 804, and its pilot column: pilot.value 3069559 -> 3069052, pilot.empty 2834157 -> 2833860), 11 moved by both sides: this branch's FeatureMembership-owned declared ends counted beside #2266's flow ends on the same carriers. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…mbership-native The structure differential and four Turtle golden digests (endpoint_scopes, imported_references, irregular_layout, state_machine) are the baselines the merge moves; the derived census (-check -recorded-pilot), the api-json differential, the corpus ratchets and the parser goldens reproduce as merged. rebaseline-movement.py: 398 structure-differential records moved, every one moved by both sides (#2268's FeatureMembership-owned declared ends and #2266's flow ends under the same roots as this branch's positional succession ends), nothing unexplained. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ition owns its two end features — a bare `entry;` or an unnamed action before it, with or without a multiplicity — on the native walk and in the RDF conversion, as the notation grammar's TargetSuccession declares them and the pilot exports them (#2278) * fix(semantics,export): a `then` succession reaching its source by position owns its two end features — a bare `entry;` or an unnamed action before it, with or without a multiplicity — on the native walk and in the RDF conversion, as the notation grammar's TargetSuccession declares them and the pilot exports them A positional `then x;` whose source carried no multiplicity owned no ends on either leg, so Type::endFeature, Connector::relatedFeature and SuccessionAsUsage::ownedRelationship answered one way for `first a then b;` and another for `then b;`. SuccessionMintsEnds and the writer now mint the two EndFeatureMemberships for every `then` succession however its source is reached. The state-machine compliance row for a state body's succession ends moves to Faithful; four Turtle goldens, the structure differential, the derived census and the api-json differential are re-recorded and adjudicated (no pilot column moves; the rows that grow are pre-existing families on the new carriers). Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> * docs(export): name the grammar rule a positional then succession's source end comes from Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> * docs(spec-compliance): the state-body succession-ends row states only the owned ends; relatedFeature derivation stays on its own approximate row Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> * docs(spec-compliance): the action-body then row no longer says a positional succession owns no ends Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> * chore(baselines): re-record after merging develop - `internal/semantic/metamodel/derived_census_records.tsv`: 854 record(s) moved; 854 moved by both sides (the merge's verdict, adjudicate) - ours.carriers: 5681228 → 5707923 (+26695) - ours.empty: 3431759 → 3447662 (+15903) - ours.notDerived: 164530 → 165126 (+596) - ours.value: 2084939 → 2095135 (+10196) - `internal/translate/export/testdata/structure_differential_expected.txt`: 401 record(s) moved; 247 moved by this branch; 154 moved by both sides (the merge's verdict, adjudicate) - examples matched: 36647 → 36792 (+145) - examples unmatched: 11560 → 11570 (+10) - examples/pilot-corpora matched: 51298 → 51488 (+190) - examples/pilot-corpora unmatched: 10041 → 10061 (+20) - examples/spec-examples matched: 8354 → 8409 (+55) - examples/spec-examples unmatched: 3257 → 3262 (+5) - examples/sysml-v2-training matched: 9271 → 9316 (+45) - examples/sysml-v2-training unmatched: 1965 → 1975 (+10) - tests/testdata matched: 1559 → 1584 (+25) * chore(baselines): re-record after merging fix/declared-end-feature-membership-native The structure differential and four Turtle golden digests (endpoint_scopes, imported_references, irregular_layout, state_machine) are the baselines the merge moves; the derived census (-check -recorded-pilot), the api-json differential, the corpus ratchets and the parser goldens reproduce as merged. rebaseline-movement.py: 398 structure-differential records moved, every one moved by both sides (#2268's FeatureMembership-owned declared ends and #2266's flow ends under the same roots as this branch's positional succession ends), nothing unexplained. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
develop's native FlowEnds (#2266, #2268, #2369) supersede this branch's synthesized ones, so the synthesis, its ExpressionFlowEnd role, ids and tests are dropped; the filter-condition and body-result synthesis stays and wraps develop's withFlowEndFeature. kinds.go keeps this branch's ExtendedUsage branch ahead of #2279's narrowed ReferenceUsage test. Two gaps the merge exposed are fixed at the root: a flow's FlowEnds are now also its ownedMember/ownedElement/member (withSynthesizedMembers places FlowEndMembers at their clause) and the element form answers an implied end, its ReferenceUsage and its ReferenceSubsetting from the conversion's slots; and a usage declared by prefix metadata alone (`#M x;`, a plain Usage) is composite by default on the symbol side as the RDF writer already states it, instead of referential. Generated artifacts re-recorded by tool only: structure differential (FlowEnds listed as members, Usage::isReference back to develop's figures), derived census (elements/implied fall where the duplicate FlowEnd synthesis went away). Co-Authored-By: jason.han <hanhuijun@gmail.com>
…by the feature it redefines in the RDF conversion and answers isVariable true on the native walk — `image` in `flow from telescope.image to …`, owned by an Occurrence-typed FlowEnd — as KerML 1.1 § 8.3.3.3.4 names it, SysML v2.1 § 8.3.16.6 types its owner and the pilot exports both The two legs disagreed on four cells of a flow end's redefining ReferenceUsage (the QVTS reflection cross at the Open-MBEE#2266 pin): the native walk answered isVariable false where the conversion stated true, and the conversion stated no memberName on its FeatureMembership (nor a name on the usage) where the native walk derived the redefined feature's. The pilot exports memberName and name "image", isVariable and mayTimeVary true. - semantics/usage.go: synthesizedUsageMayTimeVary answers for the implied flow-end feature as for the other synthesized referential parts — its owning type is the FlowEnd, redefining Flows::Flow::source/target, an Occurrence-typed feature (UsageMayTimeVaryUnderLibraryFeature), never in a KerML document. - export/rdf_out.go: flowEndReferences states sysml:name on the usage and sysml:memberName on its membership from the model's effective name (flowEndFeatureName); nothing when the end resolves to nothing. - export/mapping_shape.go: a nameless feature its FeatureMembership names under a positional owner stays positional for the decoder, as the end itself is, so the round trip holds. - Tests: TestFlowEndFeatureVariesInTime (library-backed), TestElementFormFlowEndFeatureIsNamedByItsRedefinedFeatureAndVaries. - Re-recorded by tool: tests/export goldens (4 files: two name and two memberName triples); structure differential (name/qualifiedName/memberName/ownedMemberName symbol-extra 5 -> 2 and 4 -> 1, both roots, all toward agreement); api-json differential (FeatureMembership.memberName oursMissing -> presentEqual in 11 fragments, 92 values; presentEqual 2105606 -> 2105698, oursMissing 303083 -> 302991), adjudicated in docs/project/api-json-differential.md; derived census and the corpus round-trip sweep reproduce. Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
What and why
On the native walk a
flowowned noFlowEnds:Connector::connectorEnd,Type::endFeatureandNamespace::ownedRelationshipanswered the inheritedFlows::Flowends (source,target) or nothing, while the RDF conversion mints twoFlowEnds per flow (_pend0/_pend1) and the pilot exports them. Every reflective query over a flow's ownership therefore answered differently on the two legs.Now a
flow(not amessage) stating both itsfromand itstoowns twoFlowEnds through anEndFeatureMembershipeach, after its payload and before its body — as the conversion writes them and the pilot exports them:srcofflow src.op to snk.ip; the chain Feature fora.bofflow a.b.x to c.y; nothing for a lone name), and owns through aFeatureMembershiptheReferenceUsagethat redefines that last feature (op,ip,photons); the end and that usage are nameless, named by what they redefine (source/target,op/ip), typed through it (the usage redefiningout x : PhotonanswerstypePhoton), and carry no default multiplicity;flow of p : T) owns the ends right after the payload'sFeatureMembership, ahead of its body otherwise;ownedMembershipandownedRelationshipagree on that order;ownedMember,member,ownedFeature,featureandownedElementof an end all answer theReferenceUsageit owns;flow f4 :> f3) inherits them, and still counts two related features for the related-elements check;FlowEnd,isEndtrue; the chain Feature an end references is owned by the end'sReferenceSubsetting(ownedRelatedElement,owningRelationship);<flow>_pend0,_pend0_om,_pend0_prs,_pend0_pff,_pend0_pff_om,_pend0_pff_rd0;messageowns none; a flow stating one end or none owns none, as the conversion mints none.Known limitations, not fixed here (each reproduces on
developtoo):flow of T from a to bowns noPayloadFeatureon the native walk, where the pilot owns an unnamed one before the ends;flow of p : T) after the two ends where the pilot owns it before them.Specification basis
SysML v2 (2026-09 pilot pin), textual notation:
FlowEndMember,FlowFeatureMember(SysML.xtext) — a flow'sFlowEnds are owned features throughEndFeatureMembership, each owning aReferenceUsagethroughFlowFeatureMemberthat redefines the flow feature; KerMLConnector::connectorEnd= the end features. No compliance row moves.How it was verified
develop:internal/semantic/semantics/flow_end_memberships_test.go(ordinary, chained, lone-name,flow of X,flow of p : X, action-body flows;messageexclusion;FlowEnd/isEnd; effective names; no default multiplicity; chain Feature ownership),internal/doc/queryexec/flow_end_ids_test.go(every id against the conversion's), the pairing inapi_json_symbol_structure_test.go;evaluator_structure_1_test.gonow expects the two owned ends.-checkreproduces):Flow::flowEndcloses in every root; matched rows grow in all five roots (examples 32065 → 32524, tests/testdata 1550 → 1562, training 8021 → 8315, pilot-corpora 46894 → 47995, spec-examples 8078 → 8256); the rows that move are pre-existing families on the new carriers (unresolved cross-file chains and typings in the corpora, default-multiplicity membership pairing, id/isConstant).-checkreproduces): no pilot column moves.Connector::relatedFeature/sourceFeature/targetFeatureandRelationship::relatedElement/source/targetlose not-derived rows (−38 examples, −67 pilot-examples, −23 training);Flow::flowEndderives everywhere. Not-derived rows that grow are pre-existing census families reached by the new carriers, each confirmed on a fixture where semantics answers:Membership::memberElementId/ownedMemberElementId(unrepresented implied member),Feature::isVariable/Usage::mayTimeVaryon the innerReferenceUsage(the same structural owning-type gap as a transition's link parameters),Type::endFeature(inheritedisEndunavailable),Element::shortNameof a typed flow's end (implied redefinition not materialized),Feature::typethrough a subsetting whose target is itself untyped (out x;).tests/export,TestExamplesSweep/TestCorpusRoundTrip(no movement),make docs-counts,gofmt,go vet,make lint,make changelog-check,tests/hygiene,check-doc-idsclean.make test-shortresult follows in a comment.Merged develop
3c4502ea8cmerges develop (2cf813394b: #2279 and the CI/cli changes after it) by--no-ffonce more; the one textual conflict (structure differential) was merged cell by cell by the baseline driver and every baseline reproduces as merged (rebaseline-movement.py: no generated record moved against the merged tree); full gate green.ed66822559merges develop (acb1944b7b: #2275, #2296, #2317, #2318, #2319 landed) by--no-ffafter GitHub reported a new conflict the moment the previous push landed; the one textual conflict (structure differential) was merged cell by cell by the baseline driver.c43a4299bcfollows develop'srelationshipSuffix(a reference subsetting is its own kind,RelReferences, and thereferenceFormargument is gone) in the two calls this PR added for a flow end's redefinition (_rd0).93403f5313re-records the structure differential — the only baseline this merge moves (-checkreproduces for the census, Turtle goldens, api-json differential, corpus ratchets and parser goldens;rebaseline-movement.py: 24 records, all moved by both sides): develop's reference-subsetting kind and this PR's flow ends (which reference-subset the feature before the last one they name) together close the fiveReferenceSubsetting::referencingFeaturesymbol-missing rows,Feature::ownedReferenceSubsettingdifferent 119 → 114 (spec-examples 20 → 15),examples/spec-examplesmatched 8532 → 8534. The engine wasm budget develop raised in #2319 (11,200,000) holds the merged tree.482d0aeb8amerges develop (e0e172022f: #2282, #2313, #2315, #2316 landed) by--no-ffafter the merge queue dropped this PR again for a census conflict;2af1558f3dre-records the derived census (JDK 21, pilot exported;-checkreproduces) — the only baseline the merge moved, the structure differential, Turtle goldens, api-json differential, corpus ratchets and parser goldens reproducing as merged. Of its 874 moved records, 838 are moved by both sides (develop's newpilot.nondeterministiccolumn and its own rows; this PR's flow-end counts):Connector::connectorEnd kerml-examples 90 68 4 18 → 90 70 2 18is this PR's — the two KerML flows stating both ends (Simple Tests/Behaviors.kermlflow a.y to b.x1;,Behavior Examples/TakePicture.kermlsuccession flow exposure … from step1.xrsl to step2.xsf;) deriveconnectorEndwhere they were empty. The 36kerml-examples Usage::*rowsscripts/rebaseline-movement.pyreports unexplained are not a change in what the merged tree derives: they exist on this PR alone (the four Usage carriers its flow ends and theReferenceUsages they own are in that root), develop has no row to carry, and the fresh run writes them in develop's eleven-column format (pilot.nondeterministicappended, 0) — every count on them equals this PR's, and stripping the appended column leaves no difference.04156ff8d1merges develop again after #2261 landed (census and structure differential re-recorded by tool, zero interaction rows, no other conflict);a6c8a75b46merged develop (#2259, #2260, #2270 landed) by--no-ffafter the merge queue dropped this PR for a baseline conflict.annotations.gocomposeswithFlowEndFeatureover develop'swithConstraintResult; the derived census and the structure differential are re-recorded by tool, and every moved value is the sum of what each side moved alone (zero interaction rows; the api-json differential reproduces unchanged).Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)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