Skip to content

fix: report dropped elements in projections and validate overlays against a model - #11

Merged
Mearman merged 3 commits into
mainfrom
fix/projection-loss-and-overlay
Oct 10, 2026
Merged

Mearman merged 3 commits into
mainfrom
fix/projection-loss-and-overlay

Conversation

@Mearman

@Mearman Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member

Two defects found reviewing the merged schema and projection packages.

Projections dropped elements without saying so. toFlowchart and toSwimlane left out state elements and history pseudo-states, and toStateMachine left out fork, join and history pseudo-states while still emitting transitions that pointed at them. A new unrepresented-elements loss reports each element with what it was, the notation that cannot draw it and the transitions left out because of it. A sequence scenario step touching an element with no actor was also skipped silently; it is now a skipped-steps loss. Decisions folded into guards stay a design choice, not a loss. The state machine no longer emits a transition whose target is not one of its states.

parseOverlay accepted an overlay naming an element the model does not declare. validateOverlay(model, overlay) returns an overlay-unknown-element issue per unknown id; parseOverlay stays model-independent.

toFlowchart and toSwimlane silently left out state elements and history pseudo-states, and
toStateMachine left out fork, join and history pseudo-states while still emitting transitions that
pointed at them. A sequence scenario step touching an element with no actor vanished without trace.

Add the unrepresented-elements loss kind, carrying each element with what it was, the notation
that cannot draw it and the transitions left out because of it, and the skipped-steps loss kind
for scenario steps that draw no message. The state machine no longer emits a transition whose
target is not one of its states. Decisions folded into guards remain by design and are not a loss.
parseOverlay is model-independent, so an overlay naming an element the model never declared loaded
without complaint and silently described nothing.

Add validateOverlay(model, overlay), which returns an overlay-unknown-element issue naming each
such identifier, in the package's existing Issue shape. parseOverlay is unchanged.
@Mearman
Mearman marked this pull request as ready for review October 10, 2026 09:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-10T09:36:51.023165Z adf5478 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Mearman
Mearman merged commit 966e2aa into main Oct 10, 2026
14 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant