You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Catalog queries return wrong data when -p is spelled differently #1845
The catalog cache is tied to the exact text passed to -p. When the same .mpr is passed with another spelling (relative vs absolute, / vs \), SHOW CATALOG STATUS reports ✗ Invalid (MPR path changed), but catalog queries still run and silently return wrong results: CATALOG.ACTIVITIES is empty and CATALOG.GRAPH_DEAD_ASSETS lists far more microflows than it should. Nothing in the output warns that the results are wrong.
A tool that mixes spellings, for example a refresh with a relative path from the project folder and queries with an absolute path from elsewhere, gets plausible-looking but wrong metrics.
Reproduction
In a project folder (436 microflows, 2,120 activities):
mxcli -p App.mpr -c "REFRESH CATALOG FULL SOURCE"
Query with the same spelling, and then with three other spellings of the same file:
-p
SHOW CATALOG STATUS
SELECT COUNT(*) FROM CATALOG.ACTIVITIES
GRAPH_DEAD_ASSETS, microflows
App.mpr (as refreshed)
✓ Valid
2120
353
./App.mpr
✗ Invalid (MPR path changed)
0
—
C:/…/base/App.mpr
✗ Invalid (MPR path changed)
0
419
C:\…\base\App.mpr
✗ Invalid (MPR path changed)
0
—
mxcli -p C:/…/base/App.mpr -c "REFRESH CATALOG FULL SOURCE" prints Cache invalid: MPR path changed and incremental: 0 units rebuilt, 1138 carried over, and stores the absolute spelling (catalog_meta.mpr_path). From then on the absolute spelling is valid, and App.mpr, ./App.mpr and the \ form are all invalid and return 0 activities.
lint and report with a different spelling don't change the cache; their output follows the same rule.
Expected
The cache is matched on the normalised path of the .mpr: absolute, clean, and case-insensitive on Windows, with / and \ treated the same. Any spelling of the same file then hits the same cache.
And when the cache really is invalid for a query, the query either rebuilds what it needs or fails with a clear message. It should never return partial data as if it were complete.
Activity