Repository navigation
check -p --references does not resolve seven kinds of reference: list, and "not validated" notes #1472
Description
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
- mxcli v0.25.0 (2026-10-05), macOS arm64
- Mendix 11.14.0 Beta project, MPR v2, Classic (Dojo) web client, security level Production
- Not re-run on v0.26.0 or the 2026-10-13 nightly. v0.26.0 resolves more references in
check -p(grants check -p passescreate module rolein a module that does not exist; exec then fails after earlier statements were written #1354, flow and page signatures, some retrieve XPath shapes). Item 4 may be covered by that; the others are not mentioned in the notes. mxcli diag --bundleis not attached because the project is a customer app.
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 pagetargets, 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
github-actions commentedon Oct 13, 2026
Issue Triage
Summary:
The
mxcli check -p --referencescommand 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
mxcli check -p App.mpr --referenceswith deliberately wrong namesCheck passed!for all items; errors only appeared later atexec/mxbuildMissing 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 thecheckruns? 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
docs(skills): move check's resolved-reference list into a reference f…
Merge pull request #1363 from ako/fix/1472-check-reference-kinds
fix(check): resolve ALTER PAGE targets and inserted-widget references (…
fix(check): resolve DataGrid 2 column attributes against the grid's e…
fix(check): resolve the members an access rule's WHERE names (#1472)
fix(check): judge an access rule's XPath members case-insensitively (#…
fix(check): resolve an entity event handler's microflow (#1472)
fix(check): resolve enumeration keys named in expressions (#1472)
fix(check): resolve the entities a view entity's OQL reads from (#1472)
docs(check): record what check -p now resolves, and what it still doe…
Merge pull request #1472 from ako/fix/1442-user-role-description