Skip to content

check -p --references does not resolve seven kinds of reference: list, and "not validated" notes #1472

Closed
ako/mxcli
#1363

Description

@AlvinnYeo

Summary

We ran negative controls during a large page rebuild: deliberately wrong names, one per construct. Each of the references below passed mxcli check -p App.mpr --references on v0.25.0. The mistake surfaced only at exec or in mxbuild, or the statement wrote something else. Each item is small on its own, but together they mean that a green check proves only syntax for these constructs, and the user is not told that.

Field context: we restated 34 Studio Pro-authored pages and snippets whole from MDL, because they used widgets mxcli cannot write in place. Every round trip through the mxbuild gate took 5 to 10 minutes on this app. A check that resolved these references would have saved most of the failed rounds.

Same family, already fixed for other constructs: #1213 (retrieve XPath), #1048 (change attribute), #943 (workflow call-microflow target), #1333 / #1354 (grant and module-role targets, fixed in v0.26.0).

Environment

Checklist

Each line passed check -p --references with the wrong name shown. The snippets are reduced from our negative controls and pass mxcli check (grammar only). Assume MyModule.Portal, MyModule.Accounts (with Data grid 2 dgDatabase over MyModule.Account), MyModule.Account, MyModule.Region and MyModule.RoleA exist.

  • 1. alter page targets, and the flows named in the inserted widgets. A widget name that does not exist and a data-source microflow that does not exist both passed.
    alter page MyModule.Portal {
      insert after noSuchWidget {
        dataview dvX (DataSource: microflow MyModule.NoSuchFlow) { dynamictext t1 (Content: 'x') }
      };
    };
    
  • 2. Anything inside a replace … with { … } body. A fake attribute and a fake flow both passed.
    alter page MyModule.Accounts {
      replace dgDatabase column(Code) with {
        column (Attribute: NoSuchAttr, Caption: 'Code') {
          actionbutton btnX (Caption: 'Go', Action: call microflow MyModule.NoSuchFlow2)
        }
      };
    };
    
  • 3. Data grid 2 column and filter attribute names.
    create page MyModule.Accounts2 (Title: 'Accounts', Layout: Atlas_Core.Atlas_Default) {
      datagrid dg2 (DataSource: database from MyModule.Account) {
        column (Attribute: NoSuchAttr, Caption: 'X') { numberfilter nf1 }
      }
    };
    
  • 4. Paths inside access-rule XPath (possibly covered by v0.26.0; not re-tested).
    grant read * on entity MyModule.Account to MyModule.RoleA where [MyModule.NoSuchAssoc/MyModule.Region/Name = 'North'];
    
  • 5. The target flow of an entity event handler.
    create or modify persistent entity MyModule.Order (Number: String(20))
      on before commit call MyModule.NoSuchHandler raise error;
    
  • 6. Enumeration keys inside expressions.
    create enumeration MyModule.Country (NL 'Netherlands', DE 'Germany');
    create microflow MyModule.ACT_IsKnownCountry ($Country: Enum MyModule.Country) returns Boolean
    begin
      return $Country = MyModule.Country.NoSuchKey;
    end;
    
  • 7. Entity names inside view-entity OQL.
    create view entity MyModule.OrderTotals (Total: Integer) as
      select count(o.ID) as Total from MyModule.NoSuchEntity as o;
    

Expected

check -p --references resolves each of these against the model the same way exec and mxbuild do, and reports the unknown name. Where a construct is not resolved yet, check prints a short "not validated: " line, so the user knows that the build is the only proof.

Actual

Check passed! for every item above. The mistakes appeared later, at exec or in mxbuild, or the statement was written with the wrong reference. We did not keep the exact error for each item; we can re-run any of them on request.

Workaround used

For in-place page edits and the constructs above, we treated check as a syntax check only. The proof was the mxbuild gate after exec plus a describe read-back.

Suggested fix

Resolve the seven constructs in check -p, starting with 1 and 2. That is where a typo costs a full build round, because in-place page edits are where check currently proves the least. Until each one is resolved, print a "not validated" note for it.

Activity

  1. github-actions commented on Oct 13, 2026

    @github-actions

    Issue Triage

    Summary:
    The mxcli check -p --references command does not validate several kinds of references (widget names, data‑source microflows, attributes inside replace blocks, Data Grid 2 columns/filters, access‑rule XPath paths, entity event‑handler targets, enumeration keys, and view‑entity OQL entities), reporting success even when the names are wrong.

    Checklist of required bug‑report information

    Required info Present? Notes
    mxcli version ✅ v0.25.0 (2026-10-05)
    Mendix version ✅ Mendix 11.14.0 Beta
    Scenario (what was being done) ✅ Ran mxcli check -p App.mpr --references with deliberately wrong names
    Expected output ✅ Should resolve references and report unknown names (or show “not validated”)
    Experienced output ✅ Check passed! for all items; errors only appeared later at exec/mxbuild
    AI bug report (mxcli diag --bundle or session log) ❌ Not attached because the project is a customer app

    Missing information
    To help us reproduce and investigate the issue, could you please provide either the output of mxcli diag --bundle (if possible) or at least the relevant session log from the check runs? If sharing the full bundle isn’t feasible due to confidentiality, a trimmed log that includes the command invocation and the “Check passed!” messages would be very helpful.

    Thank you for taking the time to report this! Once we have the log, we’ll be able to look into adding proper reference validation (or “not validated” notes) for the constructs you listed.


    Automated triage via OpenRouter — workflow source

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