Sync: stub-then-real flows keep the real flow (error-handler returns splice, MDL-STUB01) - #1258
Merged
Merged
Conversation
…exiting The check command's body becomes runCheckFile, which returns the exit code where it called os.Exit. Behaviour is unchanged for the one file check takes; it lets a caller check several files and combine their codes (#905). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r stub-then-real flows (#905) check and fmt --upgrade take several files, run in the order given. A flow two create-or-modify statements of the set declare - a stub, then the real flow - is reported as MDL-STUB01 (a warning) naming both statements, and fmt --upgrade decides the language header for the files sharing such a flow together: all take it or none does. Decided file by file, the stub's file was declined the header while the real flow's file took it, and run in order the mdl 0 stub rebuilt the real flow every run while the mdl 1 real statement was refused, with mx check clean. One file alone is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…an already-headed file is reported, not declined (#905) canTakeHeader read any written header as 'already under it', so a stub pinned `mdl 0;` let its real file take `mdl 1;` and the pair split again. A file already carrying the header cannot be declined it (fmt never removes one); fmt now says the pair stays split instead of 'no language header added'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed '{1}' template (#905)
A log, show message or validation feedback whose message is an expression
(`'failed for ' + $User/Name`) is stored as the template '{1}' with the
expression as its parameter, and describe prints that form. declaredMatches
compared the two spellings as different statements, so wherever the built
comparison does not decide (a spliced or Studio Pro-drawn flow) the
statement diff replaced the activity on every run: absorbed by the write
elision on the main path, refused under mdl 1 when the message sits in a
stored activity's error handler ("cannot replace … it has an error
handler"). That was the second run of CapTrack's ACT_Export_Excel once the
splice could grow it.
matchValue normalises the three statements to the builder's stored form.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eturn when spliced (#905) Under mdl 1, `create or modify` refused to grow a stored flow by an activity whose custom error handler ends in `return` ("an error handler in the fragment ends at an end event of its own … a return inside an error handler is not spliced yet"), as an insert or a replace, on every run; mdl 0 rebuilt the flow. On CapTrack this left a stub-then-real pair with the placeholder stored. The handler is built by a child flowBuilder whose returnEndIDs never reached the parent, so cutFragment took the handler's return end event for one the builder added. addErrorHandlerFlow now carries them up: the return is a new end event of the flow, placed where the builder drew it relative to the fragment, like a guard clause's (#888), and checkRoom/checkBranches refuse where it would be drawn over or across stored content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(flow-modify): splice a new activity whose error handler ends in its own return (#905 part 1, G2)
check/fmt: read several files as one script set; report and pair stub-then-real flows (#905 part 2)
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor Issues
What Looks Good
RecommendationApprove the PR. The changes are correct, well-tested, and fully address the described issue while maintaining backward compatibility and following project conventions. The minor issues noted do not block merging and can be addressed in follow-up work if desired. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
ako
added a commit
to ako/mxcli
that referenced
this pull request
Oct 1, 2026
Sync mendixlabs/mxcli (mendixlabs#1258 merge commit)
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.
Fast-forward sync of ako/mxcli main (016f784 → 2b73b82, 8 commits). This fixes the last beta blocker found by acceptance rehearsal 3 (ako#905): on a real project, an upgraded stub-then-real script set kept the placeholder flow on every run, while
mx checkreported 0 errors.Splicing (ako#909)
mdl 1,create or modifycan splice in a new activity whose custom error handler ends in its ownreturn. The handler's return becomes a new end event, placed in free room; a case with genuinely no room is refused and nothing is written. Before, the error-handler builder never passed its returns to the main flow, so the splice refused them as unsupported.'x ' + $y) now matches its stored'{1}'template, so an identical second run is Unchanged rather than refused.Stub-then-real detection (ako#908)
mxcli checkaccepts several files and reads them as one script set. A flow declared twice in the set gets an MDL-STUB01 warning naming both statements, with the advice to drop the stub: a recursive flow is created in one statement.fmt --upgradeover several files decides themdl 1;header for both files of such a pair together, so a mixed pair can no longer rebuild the real flow from its stub on every run. A pinnedmdl 0;stub holds its partner back.Verified on a CapTrack copy: after
fmt --upgrade -pand two runs,ACT_Export_Excelis the real export flow, the second run writes nothing, andmx checkmatches the baseline.