Skip to content

fix(query,export): the succession a transition owns reads the elementId the conversion writes for it on the query leg — <transition id>_succession, its owning membership <transition id>_succession_om — where it read the transition's own id, two elements under one identity - #2216

Merged
HuiJun merged 3 commits into
developfrom
fix/transition-succession-reflective-ids
Nov 13, 2026

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown
Contributor

What and why

The succession a transition owns for its then clause (synthesized since #2133) read the transition's own elementId on the query leg — two elements under one identity — and <transition id>_om for its OwningMembership, where the RDF writer mints <transition id>_succession and <transition id>_succession_om (transitionSuccession, synthesized_ids.go). The query leg had no route for an ExpressionTransitionSuccession part: queryexec.ElementIDOf fell to the transition's own declaration.

  • internal/translate/export/element_ids.go: recordTransitionSuccession files the succession under the transition's node at the slot succession (beside the then succession's ends), with the ids the conversion writes — for a transition, a state body's then x; written as a transition (encodeTargetTransition) and a guarded target (encodeGuardedTarget).
  • internal/doc/queryexec/elementids.go: expressionPartSlot reads that part for an ExpressionTransitionSuccession.

No triple changes: the writer already stated these ids.

Specification basis

SysML v2.1 §8.3.18.9 TransitionUsage (succession: the SuccessionAsUsage the transition owns). No compliance row moves; this aligns the query leg's identity of an element with the conversion's.

How it was verified

  • TestTransitionSuccessionReadsTheConversionIDs (internal/doc/queryexec) fails on develop (Observatory__S__go for the succession's elementId; Observatory__S__go_om among the owned relationships) and passes here (Observatory__S__go_succession, Observatory__S__go_succession_om).
  • Probe on examples/observatory.sysml: every SuccessionAsUsage the state machine's transitions own answers …_idle_to_slewing_succession etc. on the query leg.
  • internal/doc/queryexec, internal/translate/export, internal/semantic/semantics pass; go run -C tools ./cmd/pilot-apijson-diff -check, go run -C tools ./cmd/derived-census -check, TestExamplesSweep and TestStructureDifferential with the three corpora required, make docs-counts reproduce; go test -C tools ./referee/apijson, tests/hygiene, make lint, go vet ./..., gofmt -l ., make changelog-check, scripts/check-doc-ids.py clean.

Checklist

  • make test and make lint pass locally (focused packages and gates above; make test-short result in a comment)
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (none covers the query leg's ids of synthesized parts)
  • Changelog entry added as changes/unreleased/transition-succession-reflective-ids.fixed.md
  • baselines regenerated and make docs-counts run if a gate count moved (none 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

…Id the conversion writes for it on the query leg — `<transition id>_succession`, its owning membership `<transition id>_succession_om` — where it read the transition's own id, two elements under one identity

The query leg had no route for an ExpressionTransitionSuccession part: ElementIDOf fell to the
transition's own declaration and answered its id, and `<id>_om` for the succession's OwningMembership,
where the RDF writer mints `<id>_succession` and `<id>_succession_om` (transitionSuccession). The
conversion now files the succession under the transition's node at the slot "succession" beside the
`then` succession's ends, and the query leg reads that part; a `transition`, a state body's `then x;`
written as a transition and a guarded target follow the same rule.

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

… recordSuccessionEnds' — two lines each

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)
  • Four-line comment exceeds repository limit — Real: the new two-line comment followed recordSuccessionEnds' two-line comment with no blank line, so the gate read one four-line block (lines 203-206). A blank line now separates them; the comment gate prints nothing.

View findings in Devin Review · Follow Devin's work

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Local gate on 2ffc9d3 (e98ffb8 only adds a blank line between two comments):

  • make test-short: 137 packages ok. tests/identity failed only because the pilot library XMI was not provisioned in this worktree while OPENSYSML_REQUIRE_PILOT_LIBRARY_XMI=1 is set; once it was provisioned, go test -count=1 ./tests/identity passed. cmd/sysml and tests/codegen hit the default 10-minute package timeout under load, and passed when rerun alone with -timeout 40m (248.9s, 299.4s).
  • go run -C tools ./cmd/pilot-apijson-diff -check, the derived census -check, TestExamplesSweep/TestStructureDifferential with the three corpora required, and make docs-counts reproduce. No triples change.
  • go test -C tools ./referee/apijson, tests/hygiene, make lint, go vet ./..., gofmt -l ., make changelog-check, scripts/check-doc-ids.py, and the two-line comment check are all clean.

…ion succession recorder sits above both, where the earlier blank line had left the comment orphaned

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@HuiJun
HuiJun added this pull request to the merge queue Nov 13, 2026
Merged via the queue into develop with commit 7cc4968 Nov 13, 2026
30 checks passed
@HuiJun
HuiJun deleted the fix/transition-succession-reflective-ids branch November 13, 2026 23:15
devin-ai-integration Bot added a commit that referenced this pull request Nov 14, 2026
… 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>
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