Skip to content

gate self-test fails on Mendix 11.14.0: StorageMprNameDiscrepancyException + dirty baseline from Atlas widgets #127

Description

@MendixMau

Summary

bin/doctor.sh's gate self-test fails on Mendix 11.14.0 in two ways, both rooted in the scratch-copy approach.

Failure 1 — StorageMprNameDiscrepancyException (fixed in 7597f23)

Symptom: gate cannot read mxbuild's error file (baseline run)

mxbuild 11.14.0 added a check that refuses to open an .mpr whose filename differs from the name stored in mprcontents. The self-test was copying to scratch/model.mpr unconditionally, so mxbuild always exited 1 with an empty errors file. Python then tried to parse empty JSON and returned "?".

Fix already committed: 7597f23 — copy with $(basename "$MPR") so the scratch filename matches what mprcontents expects.

Failure 2 — Dirty baseline: 1076+ errors from Atlas marketplace widgets (unfixed)

Symptom: baseline copy already reports 1076 error(s) — dirty model

After the filename fix, mxbuild can open the file but a --target=deploy build reports ~1238 errors (dropping to ~1076 after copying the project-root widgets/ directory). All errors are of the form:

Could not find widget 'Data grid 2' in the 'widgets' directory.
Could not find widget 'Text filter' in the 'widgets' directory.
...

These come from the Atlas_Web_Content module's page templates. The scratch copy has the .mpr + mprcontents + widgets/ but the deploy build also needs javasource/, modules/, and likely other project resources to produce a clean baseline. Copying all of these to /tmp is impractical.

Root cause

The gate self-test runs --target=deploy, which validates the full project including marketplace module resources. A minimal scratch copy (.mpr + mprcontents) is never deploy-clean for a project with Atlas or other marketplace content.

Proposed fixes (pick one)

Option A — Switch to --target=check (if mxbuild supports it for error detection): a model-consistency check doesn't need the widget/resource layer and would give a clean baseline on a minimal scratch copy.

Option B — Run the self-test on a sibling copy in the original directory rather than /tmp. Copy .mpr as <project_root>/__doctor_selftest_<random>.mpr, run mxbuild against it (same resource context), then delete. Avoids the resource-path problem at the cost of touching the project directory briefly.

Option C — Use --target=deploy but copy the full project (expensive: tens of MB for a typical Atlas project).

Environment

  • Mendix Studio Pro / mxbuild: 11.14.0
  • OS: Windows 11 Enterprise, MINGW64_NT-10.0-26200-ARM64
  • mxcli: v0.23.0 (2026-09-21)
  • Real gate (exec.sh → verify-model.sh): passes with 0 errors on the same model

Workaround

Run bin/doctor.sh --quick "$PWD" to skip the self-test, then verify the real gate manually:

./bin/verify-model.sh

This gives "✓ mxbuild: 0 errors — model is clean" and writes the verification stamp that the pre-commit hook requires.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions