Skip to content

fix: preserve incoming anchors for inheritance splits#454

Merged
ako merged 1 commit intomendixlabs:mainfrom
hjotha:submit/preserve-split-incoming-anchor
Apr 30, 2026
Merged

fix: preserve incoming anchors for inheritance splits#454
ako merged 1 commit intomendixlabs:mainfrom
hjotha:submit/preserve-split-incoming-anchor

Conversation

@hjotha
Copy link
Copy Markdown
Contributor

@hjotha hjotha commented Apr 30, 2026

Closes #453.

Summary

  • keep default incoming-anchor suppression for regular exclusive splits
  • preserve incoming to: left anchors for inheritance splits because they can affect split-type branch geometry and scoping
  • add a synthetic regression test for inheritance split incoming-anchor emission

Validation

  • go test ./mdl/executor -run 'TestEmitSplitAnchor|TestDescribe_FalseBranchFromTop_IfWithoutElseIsDefault'
  • make build
  • make test

Symptom: combining split-type describe support with default-anchor suppression can relayout inheritance splits with negative X positions and produce invalid branch scoping after exec.

Root cause: the describer treated an incoming `to: left` anchor on split-type nodes as suppressible default metadata, but the builder still needs that anchor to preserve the original split geometry.

Fix: continue suppressing default incoming anchors for regular exclusive splits, but preserve the incoming anchor for inheritance splits even when the side is `left`.

Tests: added a synthetic inheritance-split anchor regression and ran make test.
@ako ako added this to the v0.8.0 milestone Apr 30, 2026
@ako ako merged commit 5d2962f into mendixlabs:main Apr 30, 2026
1 of 2 checks passed
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.

Default-anchor suppression can relayout inheritance split branches

3 participants