Skip to content

draft: stage remaining microflow roundtrip audit fixes#346

Draft
hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha:submit/audit-all-fixes-staging
Draft

draft: stage remaining microflow roundtrip audit fixes#346
hjotha wants to merge 2 commits intomendixlabs:mainfrom
hjotha:submit/audit-all-fixes-staging

Conversation

@hjotha
Copy link
Copy Markdown
Contributor

@hjotha hjotha commented Apr 27, 2026

Part of #332.

This is a draft staging PR for the remaining local microflow roundtrip validity work that has not yet been split into focused upstream PRs. It is not intended to be merged as-is.

Why this exists:

  • keep the remaining local all-fixes branch visible upstream while focused PR extraction continues;
  • provide a concrete branch for CI and maintainer discussion of the remaining control-flow, handler, split, type-inference, and validity fixes;
  • avoid losing track of local work that is currently ahead of the already-open focused PR set.

Current status:

  • build, unit tests, and Go lint pass locally on the staging branch;
  • the current long-running audit uses an equivalent all-fixes binary as the best available local baseline;
  • follow-up work should continue extracting focused PRs where possible.

Focused issues tracking the remaining staged work:

Validation run locally:

  • make build
  • make test
  • make lint-go

Notes:

@hjotha hjotha force-pushed the submit/audit-all-fixes-staging branch from b9e9852 to 8468e58 Compare April 27, 2026 07:59
Symptom: the focused upstream PR set does not yet include every local roundtrip-validity fix found during long-running audits of large legacy Mendix projects.

Root cause: several remaining fixes are intertwined across microflow control-flow reconstruction, handler routing, split/case preservation, validation, and writer/parser compatibility. They need further extraction before they are suitable for review as individual upstream PRs.

Fix: stage the remaining all-fixes tree as one draft branch so the outstanding local work is visible upstream while smaller PRs continue to be split out from it. This draft is not intended to merge as-is.

Tests: make build, make test, and make lint-go pass on the staged tree.
Symptom: enum split roundtrips could reorder an explicit `(empty)` case after named cases, and an empty-body grouped case could move behind a terminal branch.

Root cause: the staged enum split builder selected split-flow anchors from branch geometry. `(empty)` branches used bottom-origin geometry, and empty-body branch tails were emitted after body branches, so the describer could not recover the original authoring order.

Fix: carry the authoring branch index onto empty-body tails, encode the first split flow of order-sensitive branches using the existing split-case order anchors, and sort enum split flows by that encoded order before grouping cases during describe.

Tests: added synthetic enum split regressions for `(empty)` before named cases and grouped empty-body cases before terminal cases; ran make build, make test, make lint-go, and a targeted two-microflow audit with clean mxcli and Mendix mx check results.
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.

Microflow roundtrip stabilization for large-project audit findings

2 participants