Skip to content

mxcli diff reports false deletions (java-action calls, download, grant, geometry) on an UNMODIFIED describe dump — and leaks Go struct pointers into retrieve constraints #997

Description

@MohamedGamalEzzatAli

mxcli version: v0.20.0 (release 2026-08-28) · Mendix 11.12.1 bench project

mxcli diff against the unmodified output of mxcli describe claims the script would delete activities that the executor demonstrably round-trips byte-identically. The diff's script-side model appears to drop what it cannot represent — and its constraint rendering leaks a Go struct pointer (%v formatting).

Repro

Any microflow containing java-action calls, a download file, and a grant execute (mine: 23 activities, 4 java-action calls incl. CommunityCommons.Base64EncodeFile):

mxcli describe microflow MyModule.ACT_GenerateDocument -p App.mpr --format mdl > dump.mdl
mxcli diff dump.mdl -p App.mpr

Observed

Summary: 0 new, 1 modified, 0 unchanged — with the "modification" being (sanitized excerpt, structure verbatim):

--- Microflow.MyModule.ACT_GenerateDocument (current)
+++ Microflow.MyModule.ACT_GenerateDocument (script)
-  @start(-2045, 200)
-  @position(-1905, 200)
-  @curve(from: (30, 0), to: (-30, 0))
   ...every geometry annotation shown as deleted...
-    where index=0
-    limit 1;
+      where &{0x236139b542d0 index=0}
+      limit 1;
-  $returnedbase640 = call java action CommunityCommons.Base64EncodeFile(file = $Image0);
-  $returnedbase64_1 = call java action CommunityCommons.Base64EncodeFile(file = $Image1);
-  $GeneratedDocument = call java action MyModule.GenerateDocument(WorldDocument = $WorldDocument, WorldTemplate = $NewTemplate);
-  $generatedpdf = call java action MyModule.ConvertToPdf(DocxDocument = $GeneratedDocument, pdfFileName = 'Generated-pdf.pdf');
-  download file $generatedpdf;
-
-grant execute on microflow MyModule.ACT_GenerateDocument to MyModule.User;

Three distinct symptoms:

  1. False deletions — every call java action, the download file, the trailing grant execute, and all @position/@curve/@start lines render as - with no + counterpart.
  2. Pointer leak — retrieve constraints re-render as where &{0x236139b542d0 index=0} instead of where index=0 (looks like %v on the constraint struct).
  3. Misleading summary0 new, 1 modified reads as a minor tweak while the body implies the flow would be gutted.

Control — the executor is fine

mxcli exec dump.mdl -p App.mpr        # "Replaced microflow: MyModule.ACT_GenerateDocument"
mxcli describe microflow MyModule.ACT_GenerateDocument -p App.mpr --format mdl > post.mdl
diff dump.mdl post.mdl                # (OS diff) → BYTE-IDENTICAL

So exec parses and re-emits every construct that diff claims would vanish — java actions, download, grant, geometry included. The round-trip is lossless; only diff's script-side parse/render is broken.

Impact

diff is the natural pre-apply safety gate for exactly this workflow (describe → tweak → diff → exec). False deletion reports either block perfectly safe applies or teach users to ignore the gate. We carried a "describe→exec round-trip is lossy" belief for a month on this evidence before the exec control disproved it.

Expected

diff shares the executor's script parser/renderer (or diffs at the parsed-model level), and constraint rendering uses the constraint's MDL string form rather than struct %v.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions