Skip to content

Round-trip harness: untracked describe → exec losses on the Studio Pro fixture (microflows, entities, pages, snippets, menus, roles, JS actions) #721

Description

@ako

Found by the round-trip harness (#703) on the committed Studio Pro fixture testdata/pedapp (PedApp, Mendix 11.13). Plan item 0.4 in PROPOSAL_mdl_beta_syntax_freeze.md §8.1.

The harness runs describe → exec (unchanged) → compares every unit. Only 42 of 223 documents keep the GetPut law ("executing describe output writes nothing"). #704 and #705 cover part of what it finds. This issue lists the untracked classes, so each allowlist entry in mdl/roundtrip/pedapp_roundtrip_test.go names an issue. Split into per-class issues or PRs as they are picked up; each fix strikes its entries from the allowlist (the test fails until it does).

Reproduce: go test -tags integration -run TestPedAppRoundTrip -v ./mdl/roundtrip/. Each failure prints the changed BSON paths.

A. Microflows and nanoflows: the whole-document rebuild is lossy (16 microflows, 13 nanoflows)

Every Studio Pro microflow and nanoflow with a flow changes when its own describe output is re-run:

  • curve control vectors are reset (-30;0 -> 0;0);
  • merges and flows are dropped (VAL_Feedback 32 → 27 flows);
  • case values change type (EnumerationCase ↔ NoCase/InheritanceCase);
  • error-handler flags and connection indexes change;
  • annotation flows become sequence flows.

This is the architecture problem in ADR-0012 decision 3 (UpdateMicroflow rebuild + positional ID re-pairing). It is fixed by diff-then-patch create or modify (plan 4.2g), not per statement. Nanoflow ExportLevel and annotation links are #705 item 2.

B. Entities: stored properties dropped on rebuild (7 entities)

  • AccessRules[*]/MemberAccesses[*]/Association and .../Attribute (empty pointers Studio Pro writes) are removed.
  • MaybeGeneralization/HasChangedByAttr, HasChangedDateAttr, HasCreatedDateAttr, HasOwnerAttr (false) are removed.

C. Pages: widget properties changed or dropped (16 pages)

Beyond the translations in #705 item 1:

  • layout-grid column weights change (12 -> -1, -2 -> -1, 4 -> -1), and row VerticalAlignment resets;
  • SourceVariable on inputs is dropped;
  • DisabledDuringExecution false -> true (also A page rewrite overwrites a stored DisabledDuringExecution = false with true #549);
  • the pluggable Image widget's stored Type is replaced by mxcli's template, a different property schema;
  • tab-container properties (DefaultPagePointer, ActivePage*, Badge) are dropped;
  • design properties are dropped (Appearance/DesignProperties 3 -> 1);
  • a legacy Forms$DataGrid is described as datagrid, which create builds as the pluggable Datagrid.

D. Snippets: content dropped (4 snippets)

Beyond Type (#705 item 4):

  • Atlas_Core.FeedbackWidget loses all its widgets (Widgets: removed);
  • Atlas_Core.LanguageSelectorWidget changes its data source sort and caption expression.

E. Menus: sub-items dropped (2 menus)

Atlas_Core.Phone_Menu, Atlas_Core.Tablet_Menu: nested Items are removed, and DisabledDuringExecution and AlternativeText are dropped.

F. describe emits plain create for user roles and JavaScript actions (2 user roles, 43 JavaScript actions)

Re-running fails with "already exists". #705 item 5 covers associations, Java actions and module roles; user roles and JavaScript actions are not listed there. Note the JavaScript action body is "omitted by DESCRIBE", so a create or modify would also have to carry the stored source rather than write the placeholder.

G. describe output that does not parse (40 building blocks, 24 JavaScript actions)

  • Building blocks: describe says they are read-only, then prints a bare { … } widget body, which is a parse error. It should print only comments, or a statement that parses.
  • JavaScript actions with a type parameter print create javascript action M.X<TypeParameter> …, which does not parse.
  • JavaScript action parameters print the trailing comma after the -- comment, so it is commented out (DataWidgets.Set_Filter).

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions