Skip to content

Check Behavior Annex dispatch timeouts for every source 馃 - #3277

Merged
lwrage merged 2 commits into
3266_reject_duplicate_completion_timeoutsfrom
3267_check_dispatch_timeout_sources
Sep 20, 2026
Merged

lwrage merged 2 commits into
3266_reject_duplicate_completion_timeoutsfrom
3267_check_dispatch_timeout_sources

Conversation

@lwrage

@lwrage lwrage commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • check dispatch-relative timeout uniqueness for every source produced by a multi-source transition
  • replace the misleading duplicate diagnostic with a state-specific D.4(L1) message
  • preserve legal multi-source declarations and once-per-declaration Timed/Period validation

Fixes #3267

Cause and correction

The strict translator expands a multi-source declaration into one transition per source, but the driver deduplicates the shared dispatch condition by its declarative origin. Only the first expanded source therefore reached D_4_L1_Check.

The checker now records dispatch-relative timeout ownership for each expanded complete source before shared-condition deduplication. A second timeout reports the affected state, while protocol and Period checks continue to run once per written condition. Because CompletionRelativeTimeout extends DispatchRelativeTimeout, the driver tests the completion-relative case first so the #3266 rule remains independent.

Regression coverage

Issue3267Test validates three external model fixtures:

  • two separate dispatch-relative timeouts from one state report exactly one duplicate diagnostic naming that state
  • overlapping multi-source declarations report exactly one diagnostic naming their shared state
  • distinct complete states may each have one timeout without diagnostics

The fixtures include diagnostics, resolved-model, source-position, and unparse characterization goldens.

Validation

  • focused Issue3267Test: 3 tests, 0 failures, 0 errors
  • Issue3154Test: 7 tests, 0 failures, 0 errors
  • CoveringSemanticTest: 11 tests, 0 failures, 0 errors
  • complete org.osate.ba.tests bundle: 231 tests, 0 failures, 0 errors
  • clean root reactor with -Dtycho.localArtifacts=ignore: 143 modules, build success

Dependency and residual risk

This PR is stacked on #3276 and must merge after it. It reuses #3276's per-expanded-source uniqueness boundary, then adds the dispatch-relative branch. Grammar, metamodel, generated sources, and serialization logic are unchanged.

Model separate and overlapping multi-source dispatch-relative timeout declarations, and require a state-specific duplicate diagnostic. Include a clean distinct-source control to preserve the legal multi-source form.
Track dispatch-relative timeout ownership for each expanded complete source state and report duplicates with the affected state name. Preserve once-per-declaration protocol checks and keep completion-relative timeouts on their more specific rule path.
@lwrage
lwrage added this pull request to stack #3278 September 20, 2026 20:09
@lwrage
lwrage merged commit 6f244ac into master Sep 20, 2026
1 check passed
@lwrage
lwrage deleted the 3267_check_dispatch_timeout_sources branch September 21, 2026 17:13
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.

Check timeout uniqueness for every Behavior Annex transition source 馃

2 participants