Skip to content

Validate repair event initiator types 馃 - #3249

Merged
lwrage merged 2 commits into
masterfrom
2807_validate_repair_event_initiators
Sep 18, 2026
Merged

lwrage merged 2 commits into
masterfrom
2807_validate_repair_event_initiators

Conversation

@lwrage

@lwrage lwrage commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #2807.

Repair-event when clauses currently accept invalid initiators, while recover events report each invalid initiator twice. Both Xtext checks were registered for RecoverEvent. Register the repair check for RepairEvent and share the existing initiator type validation, retaining ports, internal events, and mode transitions as accepted types.

The first commit adds Issue2807Test and external AADL fixtures; the second fixes the validator. The regression verifies rejection of mode and subcomponent references, exactly one diagnostic per invalid initiator, and acceptance of valid initiators and absent when clauses. Before the fix, two tests failed for the reported behavior and the valid-model test passed.

Validation

Focused regression: 3 tests passed. Full EMV2 bundle: 296 tests passed. Both used:

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=Issue2807Test -DfailIfNoTests=false clean verify

For the full EMV2 bundle run, omitted -Dtest and -DfailIfNoTests.

Clean root reactor: all 143 projects succeeded; Surefire reports contain 1,671 tests with no failures, errors, or skips.

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

git diff --check passed and the worktree is clean.

Dependencies and risk

No dependencies on unmerged PRs; targets master. The change is limited to event-initiator validation. Existing models with invalid repair-event initiators will now receive the intended errors.

Exercise repair and recover event initiators through external AADL models. Require one diagnostic for each invalid mode or subcomponent reference, and accept ports, internal events, mode transitions, and absent when clauses.

Before the fix, repair events report no initiator errors and recover events report each error twice. The valid model passes validation without unrelated issues.
Register the repair-event check for RepairEvent instead of RecoverEvent and share trigger type validation between both event kinds. This rejects invalid repair initiators and eliminates duplicate recover diagnostics while preserving the accepted initiator types.

Fixes #2807. The three focused regression tests and all 296 EMV2 tests pass.
@lwrage
lwrage merged commit 233c08e into master Sep 18, 2026
1 check passed
@lwrage
lwrage deleted the 2807_validate_repair_event_initiators branch September 18, 2026 16:28
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.

Repair event initiators not type checked

2 participants