Skip to content

Reject noerror constraints on EMV2 events 🤖 - #3251

Merged
lwrage merged 2 commits into
masterfrom
2817_validate_noerror_event_constraints
Sep 18, 2026
Merged

lwrage merged 2 commits into
masterfrom
2817_validate_noerror_event_constraints

Conversation

@lwrage

@lwrage lwrage commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #2817

EMV2 transition conditions accepted {noerror} on typed error events because ErrorModelValidator.checkConditionElementType exempts noerror from type-set containment checks. Reject noerror on every ErrorBehaviorEvent before the existing type checks, with the diagnostic “The noerror constraint is not permitted on an event.” The grammar and metamodel are unchanged.

Issue2817Test covers typed and untyped error events, recovery and repair events, a nested conjunction, and an event in a reusable behavior machine. It checks the diagnostic on each offending condition and the total issue count. A valid model preserves ordinary event constraints and noerror on incoming and subcomponent outgoing propagations. Before the fix, the valid model passed and both negative tests failed because the typed event diagnostic was absent.

Validation:

  • Focused regression: 3 tests passed.
  • Complete EMV2 test bundle: 296 tests passed, with no failures, errors, or skips.
  • Clean root reactor: 143 projects succeeded; 1671 tests across 15 bundles, with 0 failures, 0 errors, and 0 skips.
  • git diff --check passed. The regression commit precedes the production fix commit.

Commands run from the repository root:

mvn -o -T5 -s releng/osate.releng/settings.xml -Plocal \
  -pl :org.osate.xtext.aadl2.errormodel,:org.osate.aadl2.errormodel.tests,:org.osate.xtext.aadl2.errormodel.feature \
  -Dtycho.localArtifacts=default -Dpr.build=true -Dsign=false \
  -Dspotbugs=false -Dcodecoverage=false -Djavadoc=false \
  -Dtest=Issue2817Test -DfailIfNoTests=false verify

# Complete EMV2 suite: same options, without -Dtest, using clean verify.

mvn -o -T5 -s releng/osate.releng/settings.xml -Plocal \
  -Dtycho.localArtifacts=ignore -Dpr.build=true -Dsign=false \
  -Dspotbugs=false -Dcodecoverage=false -Djavadoc=false \
  -DfailIfNoTests=false clean install

Targets master with no dependency on unmerged PRs. Risk is limited to the intended validation change: models using noerror on events now report errors; valid propagation conditions retain their existing behavior.

Cover noerror constraints on component error, recovery, and repair events and on an event in a reusable behavior machine. Assert the specific diagnostic on each condition and reject unrelated diagnostics.

Preserve valid event type constraints and noerror conditions on incoming and subcomponent outgoing propagations. Before the fix, the valid model passes and both negative tests fail because typed events lack the required diagnostic.
Check for noerror on every ErrorBehaviorEvent before the existing type-set checks. This reports a specific error for typed and untyped error events, recovery events, and repair events while preserving noerror on propagations.

Keep the grammar and metamodel unchanged, as requested by issue #2817. The three focused regression tests pass.
@lwrage
lwrage merged commit 5742891 into master Sep 18, 2026
1 check passed
@lwrage
lwrage deleted the 2817_validate_noerror_event_constraints branch September 18, 2026 18:05
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.

Missing validation for noerror on events

2 participants