docs(examples): a jumps-and-merges flow for the layout examples - #1157
Merged
Merged
Conversation
02c's five flows predate named `merge` / `join`, so nothing in the file exercises a backward jump, an error handler rejoining the main flow, or crossed branches — the shapes a nested IF cannot spell, and the ones with no coverage when the layout algorithm changes. Pattern 6 (CX_SYNC_FactoryTelemetry) covers all of them in one flow: 37 elements, 4 merges, 11 joins — a retry whose handler jumps BACKWARD to a merge above the call, three error handlers joining forward, an inner and an outer split whose FALSE arms land on the same merge, a fall-through handler, and a funnel where three paths end. Measured on a Mendix 11.14.0 app: #1155 lays it out at 2995x540 against 4790x350 on current main — same 37 elements, flow identical apart from geometry. It is also a repro for two gaps left in #923, both of which reproduce on the pre-#1155 build: a one-inbound merge that `exec` writes and the next `exec` deletes, and a flow that goes from describing faithfully (0 warnings) to "must not be re-executed" (2 warnings) after a single describe -> exec. Evidence in #923. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds Pattern 6 —
CxLayout.CX_SYNC_FactoryTelemetrytomdl-examples/doctype-tests/02c-complex-layout-examples.mdl. One flow, 37 elements, 4 merges, 11 joins. No code changes.The file's five existing flows predate named
merge/join, so nothing in it exercises the graphs a nestedifcannot spell — which is exactly the part of the layout algorithm with no example coverage when that algorithm changes.Pattern 6 covers all of them in one realistic flow:
join attempt, wheremerge attemptsits above the call — the retry edge runs right-to-leftjoin degraded; the main flow reaches that same merge when the response is emptyreviewreturn/join, merging back on its ownfinishTesting
mxcli check … --referencesagainst a Mendix 11.14.0 MPR v2 app: passes.make check-mdl: passes,02cincluded.execthen re-exec:CreatedthenUnchanged— idempotent.main, same 37 elements, flow identical apart from geometry.Two things
mxcli checkcaught in the first draft, both kept as-is in the final flow: an activity always creates its own output variable (declaring$RawResponsefirst is CE0111), andpublishis a reserved word, so the merge label isemit.For the reviewer
This example is also a repro for two gaps left in #923, written up with evidence in #923 (comment). Both reproduce on the pre-#1155 build, so they are pre-existing and unrelated to the layout work:
execwrites and the nextexecdeletes —describesays so itself ("re-executing this MDL DELETES it"), and the warning is gone after the round trip. Reduced to a 25-line repro in that comment.describe→exec, the second being "This description is NOT equivalent to the microflow and must not be re-executed over it". Top-level merge sections get pulled inside the branch that joins them and one merge is dropped.So: do not maintain this flow through
describe→exec. It is the one flow in the file where that round trip is lossy, which is a property of the graph shape, not of this PR.No issue was filed first (
CONTRIBUTING.mdstep 1) — this came out of testing #1155 by hand. Happy to open one retrospectively if you'd prefer the trail.🤖 Generated with Claude Code