Skip to content

fix(export,semantics): a state body's then x; and a decision's branch own the Membership naming the member before them and their transitionLinkSource parameter ahead of their guard, as the pilot exports a TargetTransitionUsage - #2245

Merged
HuiJun merged 12 commits into
developfrom
fix/transition-head-memberships-positional
Nov 15, 2026

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

What and why

No tracking issue.

The pilot exports a state body's then x; written after a state and a decision's if g then x; / else x; branch as a TargetTransitionUsage that owns, ahead of its guard and succession, the Membership naming the member before it (its source) and its transitionLinkSource link parameter (an in ReferenceUsage through a ParameterMembership, isVariable/mayTimeVary true) — as a transition first a then b already does on both legs. Neither leg owned them for these forms.

Specification basis

SysML v2 textual notation, TargetTransitionUsage (SysML.xtext): a transition written without first leaves the member before it, and TransitionUsage::transitionLinkSource is its first parameter. No spec-compliance row moves.

How it was verified

Checklist

  • make test and make lint pass locally (make test-short, the timeout packages alone; lint)
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

Link 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

Devin Review

devin-ai-integration Bot and others added 7 commits November 14, 2026 14:19
…ip naming the state before it and its link parameter on the native walk, ahead of its succession, as the pilot exports a TargetTransitionUsage

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
… Membership naming their positional source and an in link parameter ahead of their guard in the RDF conversion, as the pilot exports a TargetTransitionUsage; the query leg reads their ids

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ership naming that state in the RDF conversion; a round-trip test covers the state-body, guarded and decision-branch heads

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…erential for the positional transitions' head members; changelog

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…rived census for the positional transition heads

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Three small requests, none of them blocking:

#2228 (pilot pin to 2026-09.1) re-records the same census files and the api-json differential and is planned to land first, followed by #2242 if both stay open. After that this branch will need one merge of develop, and we'll run derived-census -check -require-exporter under JDK 21 on the new head, so a re-record may be needed at that point.

…the naming table, so the element ids record a positional source Membership without a conversion

The RDF writer derived what a `then x;`, a guarded `transition if g then x;` after a state or a
decision's branch sequences from while writing each body's members, so NewElementIDs — which
writes nothing — recorded no `_psourcemember` id for a guarded transition's positional source,
though the conversion wrote the Membership. The naming table's walk over each body's kept members
now records Preceding and Introduced for the writer and the ids alike.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 finding. Devin automatically fixed it.

Fixed by Devin (1)
  • Missing IDs for positional source memberships — Real: NewElementIDs never populated the writer's e.preceding, so a guarded transition after a state recorded no psourcemember id though the conversion wrote the Membership. The derivation (Preceding/Introduced) moved to the naming table's walk over each body's kept members, which the writer and the ids both read; a new test compares NewElementIDs with the written graph over all four positional forms and fails on the reviewed head.

View findings in Devin Review · Follow Devin's work

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Answering the three requests above:

Gate on 8093039: make test-short 135 packages ok; cmd/sysml, internal/exec/smt, tests/codegen, tests/export and tests/wasm hit the usual 10-minute package timeout and pass alone with -timeout 30m.

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

#2228 merged; develop is now 99e4dcd. Running git merge-tree --write-tree of this head (8093039) against develop gives rc 1, with content conflicts in four generated baselines:

  • docs/project/api-json-differential.md
  • docs/project/api-json-differential/index.json
  • internal/semantic/metamodel/derived_census_baseline.json
  • internal/semantic/metamodel/derived_census_records.tsv

When you next update this branch, do one --no-ff merge of develop. Take develop's side of those files, then re-record them by tool under JDK 21, attributing every moved cell to this change. derived-census -check -require-exporter, pilot-apijson-diff -check and the full gate should then pass. #2240 is the last batch entry still in the merge queue; it changes no baseline file.

…d-memberships-positional

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>

# Conflicts:
#	docs/project/api-json-differential.md
#	docs/project/api-json-differential/index.json
#	internal/semantic/metamodel/derived_census_baseline.json
#	internal/semantic/metamodel/derived_census_records.tsv
…ial on develop at the 2026-09.1 pilot pin

After merging develop (the pilot pin at 2026-09.1 and the census recorded under JDK 21), the
positional transition heads change re-records to the same shape: every matched-element and
property-family count holds and only unkeyableElements.ours grows (19397 → 19791); the census
moves only the elements and implied columns. The record paragraph states the new counts.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@NicolasRouquette
NicolasRouquette added this pull request to the merge queue Nov 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 14, 2026
devin-ai-integration Bot and others added 2 commits November 14, 2026 21:53
…d-memberships-positional

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>

# Conflicts:
#	docs/project/api-json-differential/examples/action-executor-demo.sysml.json
#	docs/project/api-json-differential/examples/runtime-showcase/mission-sequence.sysml.json
#	docs/project/api-json-differential/examples/runtime-showcase/spacecraft-comms.sysml.json
#	docs/project/api-json-differential/examples/self-model/behavior.sysml.json
#	docs/project/api-json-differential/examples/self-model/identity.sysml.json
#	docs/project/api-json-differential/examples/self-model/surfaces.sysml.json
#	docs/project/api-json-differential/examples/views-demo.sysml.json
#	docs/project/api-json-differential/index.json
#	docs/project/api-json-differential/pilot-examples/Arrowhead Framework Example/AHFNorwayTopics.sysml.json
#	docs/project/api-json-differential/pilot-examples/Interaction Sequencing Examples/ServerSequenceOutsideRealization-3.sysml.json
#	docs/project/api-json-differential/pilot-examples/Interaction Sequencing Examples/ServerSequenceRealization-3.sysml.json
#	docs/project/api-json-differential/pilot-examples/Simple Tests/ActionTest.sysml.json
#	docs/project/api-json-differential/pilot-examples/Simple Tests/DecisionTest.sysml.json
#	docs/project/api-json-differential/pilot-examples/Simple Tests/StateTest.sysml.json
#	docs/project/api-json-differential/pilot-validation/05-State-based Behavior/5-State-based Behavior-2.sysml.json
#	docs/project/api-json-differential/pilot-validation/06-Individual and Snapshots/6-Individual and Snapshots.sysml.json
#	docs/project/api-json-differential/pilot-validation/10-Analysis and Trades/10c-Fuel Economy Analysis.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.17.10/2.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.17.5/3.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.18.3/5.sysml.json
#	docs/project/api-json-differential/spec-examples/sysml/7.18.3/6.sysml.json
#	docs/project/api-json-differential/training/16. Conditional Succession/Conditional Succession Example-2.sysml.json
#	docs/project/api-json-differential/training/17. Control/Decision Example.sysml.json
#	docs/project/api-json-differential/training/23. State Definitions/State Definition Example-2.sysml.json
#	docs/project/api-json-differential/training/24. States/State Actions.sysml.json
#	docs/project/api-json-differential/training/24. States/State Decomposition-1.sysml.json
#	docs/project/api-json-differential/training/24. States/State Decomposition-2.sysml.json
#	docs/project/api-json-differential/training/25. Transitions/Change and Time Triggers.sysml.json
#	docs/project/api-json-differential/training/25. Transitions/Local Clock Example.sysml.json
#	docs/project/api-json-differential/training/25. Transitions/Transition Actions.sysml.json
#	docs/project/api-json-differential/training/31. Constraints/Time Constraints.sysml.json
#	internal/semantic/metamodel/derived_census_baseline.json
#	internal/semantic/metamodel/derived_census_records.tsv
#	internal/semantic/semantics/state_then_transition_test.go
#	internal/semantic/semantics/transition_memberships_test.go
#	internal/translate/export/testdata/structure_differential_expected.txt
#	tests/export/testdata/convert/decision_branches.golden.ttl.sha256
#	tests/export/testdata/convert/then_after_members.golden.ttl.sha256
…s precede the transitionLink

After merging develop at #2242 (a transition owns its transitionLink last), a state body's
`then x;` and a decision's branch own their source Membership and link parameter ahead of the
succession and the transitionLink after it, on both legs — the pilot's order. The goldens,
structure differential, derived census and api-json differential re-record to develop plus this
change's own movement, with six census rows more: the state-body link parameters become
Type::ownedFeature, Type::ownedFeatureMembership and Usage::nestedReference carriers (2 in
pilot-examples, 4 in pilot-validation) deriving the empty value the pilot has, now that the
transition parts cover the SuccessionEdge form. The api-json record states the new counts
(unkeyableElements.ours 19987 → 20381).

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@HuiJun
HuiJun added this pull request to the merge queue Nov 14, 2026
Merged via the queue into develop with commit dd08d75 Nov 15, 2026
30 checks passed
@HuiJun
HuiJun deleted the fix/transition-head-memberships-positional branch November 15, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants