Skip to content

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 - #2278

Merged
NicolasRouquette merged 11 commits into
fix/declared-end-feature-membership-nativefrom
fix/positional-then-succession-ends-native
Nov 17, 2026

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown
Contributor

What and why

A then x; succession whose source is reached by position and carries no multiplicity — entry; then idle; in a state body, an unnamed action followed by then a2; — owned no end features on the native walk: SuccessionMintsEnds minted the two ends only for a named source or a positional one with a multiplicity, and the RDF writer followed the same rule, so Type::endFeature, Connector::relatedFeature and SuccessionAsUsage::ownedRelationship answered one way for first a then b; and another for then b;. Both legs now mint the two ends for every then succession however its source is reached, and the state-machine compliance row for a state body's succession ends moves ⚠️ → ✅ (its parenthetical also dropped the clauses about a transition's succession and a state body's then x; source, closed earlier).

Specification basis

  • SysML.xtext (pinned): TargetSuccession returns SysML::SuccessionAsUsage : ownedRelationship += MultiplicitySourceEndMember 'then' ownedRelationship += ConnectorEndMember — a positional then succession owns a source end and a target end, each an EndFeatureMembership (MultiplicitySourceEndMember and ConnectorEndMember both return one); the source end's multiplicity is optional, so a bare then x; owns the same two ends as then [1] x;.
  • SysML v2.1 §8.2.2.17 (successions as usages), KerML 1.1 §8.3.4.4 (Connector::connectorEnd are its endFeatures): the ends are the succession's owned end features whether the source is named or positional.
  • The pinned pilot exports two EndFeatureMemberships for every TargetSuccession (probed on state def S { entry; then idle; state idle; }); it corroborates the grammar, it is not the basis.
  • Moves docs/project/spec-compliance/02-detailed-semantic-compliance-map/15-state-machine.md "A state body's successions own their two end features…" ⚠️ → ✅; the combined document is not committed.

How it was verified

  • semantics/state_then_transition_test.go and then_succession_member_test.go now expect EndFeatureMembership:ReferenceUsage ×2 for entry; then idle; and for the positional and chained forms (fail on develop).
  • Turtle goldens endpoint_scopes, imported_references, irregular_layout, state_machine re-recorded: the diff is the two end usages (_pend0/_pend1), their memberships and the target end's reference subsetting on each positional succession, nothing else.
  • Structure differential re-recorded: the positional ends pair with the pilot's; the rows that move are pre-existing families reached through the newly paired carriers (e.g. StructuredControlTest.sysml, ServerSequenceRealization-3.sysml), checked one by one on fixtures where both legs agree.
  • Derived census (JDK 21) re-recorded; no pilot column moves. The not-derived rows that grow (Feature::isVariable, Usage::mayTimeVary, Membership::memberElementId, OwningMembership::ownedMemberElementId, Type::endFeature, Feature::type, Usage::definition) are the census's existing family for succession-end ReferenceUsages: a probe file with then [1] a2; and first a then b; forms grows the same rows by the same shape on develop, so the positional ends only add carriers to a gap that predates them — tracked as a follow-up, not changed here.
  • api-json differential re-recorded: no row moves; unkeyableElements.ours grows by 520 across 43 files — the minted end ReferenceUsages, EndFeatureMemberships and ReferenceSubsettings of positional successions, which are unkeyable on both sides already (an unnamed member is keyed from its owner), so they are counted and left out of matching as the pilot's own ends are; recorded in docs/project/api-json-differential.md. -check reproduces.
  • gofmt -l ., go vet ./..., go build ./..., go test ./internal/semantic/semantics ./internal/translate/export, go test ./tests/export, go test ./tests/corpus -run 'TestExamplesSweep|TestCorpusRoundTrip', make lint, make changelog-check, tests/hygiene, scripts/check-doc-ids.py, make docs-counts, derived-census -check, pilot-apijson-diff -check all green.

Merged develop

81402f1af2 merges develop (with #2259, the RDF conversion's positional then source) by --no-ff. The four Turtle golden digests both sides moved (endpoint_scopes, imported_references, irregular_layout, state_machine) are re-recorded by tool (go test ./tests/export -update); the derived census, the structure differential and the api-json differential reproduce unchanged under the merged code, so no baseline line moves that one side did not move alone.

Stack

This PR sits above #2268 (fix/declared-end-feature-membership-native), which sits above #2266 (fix/flow-end-native-memberships), per the semantics-stack arrangement. 7c08ffc807 is git merge --no-ff of #2268's head 26d8db8ca4 (#2266's 93403f5313 and develop acb1944b7b through it); 16302627eb re-records the baselines that merge moved — the structure differential and four Turtle golden digests (endpoint_scopes, imported_references, irregular_layout, state_machine), all by tool; 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. 0fb47d00de is git merge --no-ff of #2268's current head 6b694f8ad0 (#2266's 362df35f82 with develop's #2279, #2322, #2307); two textual conflicts — the structure differential, merged cell by cell by the baseline driver, and this file's and #2279's re-record notes in docs/project/api-json-differential.md, both kept — and every recorder (census, api-json differential, structure differential, Turtle goldens, corpus ratchets, parser goldens) reproduces the merged tree unchanged, so no re-record commit follows it. No rebase, no force-push. Full gate green on 0fb47d00de.

Checklist

  • make test and make lint pass locally (make test-short result in a gate comment)
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/positional-then-succession-ends.fixed.md
  • baselines regenerated and make docs-counts run if a gate count moved
  • No internal work-item labels 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 2 commits November 15, 2026 16:13
…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

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>
…urce end comes from

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

… the owned ends; relatedFeature derivation stays on its own approximate row

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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Gate results on this head (0c77f02; the last two commits are comment/docs-only, the code is that of the opened head):

  • gofmt -l . empty; go vet ./..., go build ./... clean; make lint, make changelog-check, go test ./tests/hygiene/, python3 scripts/check-doc-ids.py, make docs-counts, python3 scripts/spec_compliance.py check (56 sources well-formed) green.
  • go test -count=1 ./internal/semantic/semantics ./internal/translate/export, go test -count=1 -timeout 30m ./tests/export, go test -count=1 -timeout 40m ./tests/corpus -run 'TestExamplesSweep|TestCorpusRoundTrip' green.
  • go run -C tools ./cmd/derived-census -check -require-exporter (JDK 21) and go run -C tools ./cmd/pilot-apijson-diff -check reproduce the committed baselines.
  • make test-short: 138 packages ok; cmd/sysml and tests/codegen hit the aggregate 10-minute package timeout under the shared load and pass alone (go test -count=1 -timeout 40m ./cmd/sysml ./tests/codegen: ok in 327 s and 369 s).

…tional succession owns no ends

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
devin-ai-integration Bot and others added 2 commits November 15, 2026 21:52
Brings in #2259 (positional then source in the RDF conversion); the four Turtle golden digests both sides moved are re-recorded by tool (go test ./tests/export -update); census, structure and api-json differentials reproduce.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Brings in #2260 and #2270 as landed; 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.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@NicolasRouquette
NicolasRouquette added this pull request to the merge queue Nov 16, 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 16, 2026
@HuiJun HuiJun added the ci:rebaseline Merge develop into this pull request and re-record its generated baselines label Nov 16, 2026
Generated paths in conflict took develop's side; re-recorded by the ci:rebaseline workflow.
- `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)
@github-actions github-actions Bot removed the ci:rebaseline Merge develop into this pull request and re-record its generated baselines label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

ci:rebaseline merged origin/develop and re-recorded the baselines as a0d5901 (run). Movement to adjudicate:

  • 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)

@HuiJun HuiJun added the ci:rebaseline Merge develop into this pull request and re-record its generated baselines label Nov 16, 2026
@github-actions github-actions Bot removed the ci:rebaseline Merge develop into this pull request and re-record its generated baselines label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

ci:rebaseline stopped without pushing (run, failure). Movement seen so far:

(no movement summary was produced; see the run log)

devin-ai-integration Bot and others added 3 commits November 16, 2026 19:33
…sitional-then-succession-ends-native

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…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>
…sitional-then-succession-ends-native

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@devin-ai-integration
devin-ai-integration Bot changed the base branch from develop to fix/declared-end-feature-membership-native November 17, 2026 00:02
@NicolasRouquette
NicolasRouquette merged commit c0d7366 into fix/declared-end-feature-membership-native Nov 17, 2026
30 of 31 checks passed
@NicolasRouquette
NicolasRouquette deleted the fix/positional-then-succession-ends-native branch November 17, 2026 00:19
devin-ai-integration Bot added a commit that referenced this pull request Nov 17, 2026
…merging fix/positional-then-succession-ends-native

B13-013, B13-014 and B13-015 (endCount B13::NodeEnds, 0 -> 2) go fail -> pass on the opensysml-go-props and opensysml-py-props arms: the two unnamed `then` successions of NodeEnds reach their source by position (`first a1; then accept Sig; then action a3;`) and own their two end features since #2278. The opensysml-go and opensysml-py arms still fail them, not listing an unnamed SuccessionAsUsage, which this change does not touch. Recorded with `go run -C tools ./cmd/hideo-suite -update`; `-check` reproduces.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
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