Skip to content

fix(symbols,semantics,export): a bare entry;, do; or exit; performs the anonymous empty ActionUsage its StateSubactionMembership owns — the symbol structure, the semantic model, the query leg and the RDF writer state it, both readers take it back, as the pilot exports it - #2143

Merged
HuiJun merged 6 commits into
developfrom
fix/state-subaction-member
Nov 11, 2026

Conversation

@devin-ai-integration

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

Copy link
Copy Markdown
Contributor

What and why

A state subaction written as the bare keyword — entry;, do;, exit; — is, in SysML.xtext, a StateSubactionMembership owning an anonymous empty ActionUsage (EmptyActionUsage), and the pilot exports it so. On our side the membership stood alone with no member: the semantic model had no element for the entry end of an entry; then idle; succession (so that succession's source/relatedElement could not be answered), the query leg's ownedRelationship listed the membership alone, and the RDF writer wrote the membership as the positioned element.

The anonymous action is now the member at the written position:

  • internal/semantic/symbols: a bare EntryMember/DoMember/ExitMember builds an anonymous SymbolActionUsage (buildStateSubaction); Symbol.Keyword() answers entry/do/exit for the wrapper.
  • internal/semantic/semantics: the wrapper's membership classifies as StateSubactionMembership (stateSubactionKind reads the keyword); a then idle; written after entry; sources from the action.
  • internal/ir/view: the tree labels the row by its keyword.
  • internal/translate/export writer: the action is the subject at the written position (typed ActionUsage, isComposite true), its membership minted beside it (<action>_om) stating kind; the identity table (writtenOwningMembership) mints that membership too.
  • Readers key on one predicate for the bare case — the action declares no name and owns no relationship — so a pilot graph's anonymous subaction carrying an implied relationship, or a named do action stop : A;, keeps the membership-positioned shape it had. The toolkit normalizer positions the bare action among the state's members and leaves its membership unaddressed (rdf_in_toolkit.go); the decoder reads a StateSubactionMembership as an element of the tree, at its one action's position, taking the action's recorded text (rdf_in.go, verbatim.go); the api-json mapping addresses the action through the state (mapping_shape.go, mappingBareSubaction).

Follow-up, not here: the api-json differential's element matcher pairs no anonymous action of ours with the pilot's, so the 46 corpus subactions' member properties sit present-different / ours-only rather than present-equal (recorded in docs/project/api-json-differential.md).

Specification basis

SysML v2 1.1 §8.3.16.1 (StateSubactionMembership: a state's entry/do/exit action), SysML.xtext EmptyActionUsage for the bare form. No compliance row moves.

How it was verified

  • New internal/semantic/semantics/state_subaction_member_test.go (anonymous ActionUsage under each StateSubactionMembership; the entry succession's sourceFeature is that action) — fails on develop.
  • New tests/export/state_subaction_empty_action_test.go (writer shape; Turtle and api-json round trips reproduce entry;, do;, exit;) — fails on develop.
  • Existing TestToolkitEntrySuccessionIsPositional (pilot-shaped api-json), TestStateBodyPerformKeepsQualifier, TestUnnamedSuccessionEndComesBackFromTheGraph, TestAPIJSONConvertRoutesMatchTurtleOnDevelopPassingFixtures, TestExamplesCorpusInvariants (mapping shape), TestElementIDsByIdentityAreTheWrittenIDs all green.
  • Re-recorded through the tools: structure differential (growth only — matched 30252 → 30308, Element::ownedRelationship different 1508 → 1480), derived census (training 8036 → 8038 elements), api-json differential (present-equal 2045864 → 2045952, ours-missing 308343 → 307883, present-different 143898 → 144270, pilot-missing 81606 → 81560; paragraph added), golden Turtle digests, state-form view goldens. Snapshot, make docs-counts, both corpus round trips (TestCorpusRoundTrip, TestCorpusAPIJSONRoundTrip) reproduce.
  • go build ./..., go vet ./..., gofmt -l . empty, make lint, changelog check, hygiene; go test -count=1 ./... with every corpus require variable set: 135 packages ok.

Checklist

  • make test and make lint pass locally
  • 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

…orms the anonymous empty ActionUsage its StateSubactionMembership owns — the symbol structure, the semantic model, the query leg and the RDF writer state it, both readers take it back, as the pilot exports it

A state subaction written as the bare keyword (SysML.xtext EmptyActionUsage) was a membership with no
member on our side: the semantic model had no element for the `entry` end of an `entry; then idle;`
succession, the query leg's ownedRelationship listed the membership alone, and the RDF writer wrote the
membership as the positioned element. The anonymous action is now the member at the written position
(the symbol builder builds it, the tree view labels it by its keyword), its membership minted beside it
and stating `kind`; a succession written after `entry;` sources from the action.

Both readers key on one predicate for the bare case — the action declares no name and owns no
relationship — so a pilot graph's anonymous subaction with an implied relationship, or a named
`do action stop : A;`, keeps the membership-positioned shape it had: the toolkit normalizer positions
the bare action among the state's members and leaves its membership unaddressed, the decoder reads the
membership as an element of the tree at its action's position taking the action's recorded text, the
api-json mapping addresses the action through the state, and the identity table mints the membership
the writer writes.

Structure differential re-recorded (growth only: matched 30252 → 30308, Element::ownedRelationship
different 1508 → 1480); derived census re-recorded (training 8036 → 8038 elements); api-json
differential re-recorded (present-equal +88, ours-missing −460, present-different +372 — the matcher
pairs no anonymous action of ours with the pilot's, a follow-up; pilot-missing −46); golden Turtle
digests and the state-form view goldens re-recorded; docs-counts, snapshot and both corpus round trips
reproduce.

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 Bot and others added 2 commits November 11, 2026 18:04
…moved after modeDerivedUUID, whose four-line comment it had split from its function

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…s action (`<action>_om`), not any anonymous action owning nothing — `entry action { }` keeps its positioned membership and both readers write the braced form back; one predicate for the toolkit normalizer and the api-json mapping, test fails without

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

…n-member

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
#	docs/project/api-json-differential/manual-examples/cookbook.sysml.json
#	internal/semantic/metamodel/derived_census_baseline.json
#	tests/export/testdata/convert/irregular_layout.golden.ttl.sha256
#	tests/export/testdata/convert/then_after_members.golden.ttl.sha256
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

develop moved to d60fa14 (#2124, #2135, #2136, #2125 merged) and this head (692c491) now conflicts on six generated files: docs/project/api-json-differential.md, docs/project/api-json-differential/index.json, docs/project/api-json-differential/manual-examples/cookbook.sysml.json, internal/semantic/metamodel/derived_census_baseline.json, tests/export/testdata/convert/irregular_layout.golden.ttl.sha256, tests/export/testdata/convert/then_after_members.golden.ttl.sha256. Please merge origin/develop with --no-ff (no rebase/force-push), regenerate the conflicting baselines with the repository tooling, run the local gate and push once; CI is admitted automatically on the new head.

…tial and two golden digests on the develop merge — the bare-subaction growth over #2135's connector-end rows, as the tools record them

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

Copy link
Copy Markdown
Contributor Author

CI on 7535faf fails deterministically (not the Actions outage): go test -count=1 -run TestConnectorRelationshipEndsAreItsRelatedFeatures ./internal/semantic/semantics/

connector_relationship_ends_test.go:63: entry succession relatedElement = " idle" answered; want unanswered, its entry end has no element
connector_relationship_ends_test.go:63: entry succession source = "" answered; want unanswered, its entry end has no element
connector_relationship_ends_test.go:63: entry succession target = "idle" answered; want unanswered, its entry end has no element

That test arrived with #2135 (develop 2de8ae3, which this branch merged) and encodes the pre-#2143 rule: a bare entry; end stands for no element, so Relationship::relatedElement/source/target of the entry succession are unanswered. This PR makes the bare entry; perform an anonymous empty ActionUsage, so the succession's source is now that action and the three properties answer. No files overlap, so the merge was clean, but the two changes conflict semantically.

Please decide the expectation this PR intends (per the pilot's export of state ts { entry; then idle; state idle; }: does the entry succession's source resolve to the anonymous entry action, and how is the unnamed element reported?), update the test accordingly, run the local gate including ./internal/semantic/semantics/..., and push once (no rebase, no force-push, no CI rerun; the watcher releases it). Do not weaken the test to skip the entry case.

…that `entry;` performs an action — the connector-ends test expects the anonymous entry action and idle, as the two changes merged state

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