Repository navigation
fix: create or modify does not move a node the script places (#1508 case 6) — re-land of #1546 - #1569
Merged
Merged
Conversation
`create or modify` pairing a new `if` and a restated one against the same
stored decision weighed "the same if but for its condition" exactly like
"the same if with a change in a branch", and lcsStatements breaks a tie
toward the earlier pair. So in
if $Out then …; end if; -- new, no @position
@position(-299, 200)
if $Flag then …; end if; -- restated, branch edited
the new `if $Out` took over the stored decision (its condition set in
place) and the restated `if $Flag` was inserted as a new node at its stated
position, on top of it: two decisions at (-299, 200), both merges at
(186, 200).
The weights are doubled and a changed condition now weighs 1, below every
other partial match, so the restated if pairs with its stored decision and
the new one is an insert. Every other ratio is unchanged.
Part of #1508 case 6 (mendixlabs#1598).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A `create or modify` that inserts statements without @position into a flow whose later statements state theirs made room by moving everything past the gap along. The stored flow then said something other than the script: in #1508 case 6 `if $Flag` went -299 -> 40, its merge 186 -> 525 and the return 530 -> 869, while the calls replaced in its branch — placed at their own stated positions, never shifted — stayed at (-124, 100) and (60, 100), left of their decision. Re-running the script was refused (the @merge no longer matched), and shifting "consistently" cannot fix that: the next run must move the nodes back. Under mdl 1 every point the script states a node at — @position, @merge, @start, a note's position:, a parameter's @position; loop bodies skipped, their coordinates are relative — is pinned on the mutator (MicroflowMutator.Pin), and a make-room shift (an insert, or a replace longer than what it replaces) that would move a pinned node is refused, naming the room it needs and the node in the way, with the two ways out: state @position on the new statements, or leave the positions after them unstated so they can move along. Pinning is by point, so a node a placed fragment puts at its stated position is pinned too. mdl 0 is unchanged (ADR-0011): there the refusal would fall back to the whole-flow rebuild, losing the merges, curves and $IDs the shift keeps — TestFlowModify_InsertIsSpliced, ADR-0012's headerless describe+insert acceptance test, caught exactly that. Fixes #1508 case 6 (mendixlabs#1598). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
versions.md enumerates what `create or modify` refuses under mdl 1 where mdl 0 rebuilds; add the insert that needs room past a node the script places. The review command gains the pattern that #1508 case 6 hit: a new splice refusal changes mdl 0 into a rebuild unless it is gated on the language version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shift moved every top-level node past the cut, and a parameter is a top-level object of the stored object collection: one if/else inserted into NF_Do moved `$Flag` from its derived (200, 53) to (539, 53), a longer replace then to (699, 53), and from then on describe printed a parameter @position no script stated. mxcli's derived parameter row is absolute and right of the start event, so almost every insert's cut falls left of it. A parameter is not on the line the room is made on. Studio Pro authors draw it above the start event — 63 of 71 in PedApp and JTSBootLogboek sit at the start's x, none within 60px of the flow line — and an insert in Studio Pro moves nothing. shifted() now leaves parameters out, and with it pinnedPast, so a stated parameter position no longer blocks a splice it is not in the way of. Fixes #1547. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ters fix: a splice making room leaves the flow's parameters where they are (#1547)
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.
Re-lands ako/mxcli#1546 on
main.#1546 was stacked on
fix/flow-graph-geometry(#1528). #1528 merged intomainon 2026-10-21; #1546 was then merged on 2026-10-22 into its base, the already-mergedfix/flow-graph-geometry, so its three commits never reachedmain:01c3a846efix: a restated if outweighs a new one whose condition differsa4ed9b61afix: create or modify does not move a node the script places (mdl 1)c4f43e80ddocs: list the stated-position refusal among mdl 1's splice refusalsThis PR is the same branch (
fix/1508-splice-shift-stated-positions, headc4f43e80d) againstmain. No new changes; the description, evidence and control runs are on #1546. Fixes case 6 of #1508 (mendixlabs#1598).After this merges, retarget #1548 (stacked on this branch) to
main.🤖 Generated with Claude Code