Skip to content

QUAL004 flags microflows started from the navigation (home microflow, menu item) as "not called from anywhere" #1579

Open

Description

@kris-bom

Summary

QUAL004 (orphaned_elements.star) reports a microflow that is only started from the navigation, as the home microflow of a profile or from a menu item ("call microflow"), as "not called from anywhere". The suggestion "Remove if unused" would delete a live entry point.

Repro

  1. Create microflow MyModule.NAV_Home and set it as the home microflow of the Responsive profile (home microflow MyModule.NAV_Home).
  2. Create microflow MyModule.NAV_Orders and call it from a menu item (menu item 'Orders' call microflow MyModule.NAV_Orders).
  3. Nothing else references either microflow. mxcli catalog refresh --full, then mxcli lint.

Expected

No QUAL004 for either microflow: the catalog records the references (refs has home_page and menu_item rows for them).

Actual

QUAL004 for both: "is not called from anywhere. Remove if unused".

Cause and fix

PAGE_ENTRY_KINDS already contains home_page and menu_item, but MICROFLOW_ENTRY_KINDS does not:

MICROFLOW_ENTRY_KINDS = ["call", "schedule", "publish", "datasource", "action", "calculate", "settings", "event"]

Adding the two kinds fixes it:

MICROFLOW_ENTRY_KINDS = ["call", "schedule", "publish", "datasource", "action", "calculate", "settings", "event", "home_page", "menu_item"]

Checked with a local copy of the rule that has the two kinds added: the navigation microflows are silent, while a microflow with no caller at all (also one named NAV_*) still fires, as does an unused page.

Tested with: Mendix 11.12.4, mxcli v0.27.0, macOS; rule unchanged on current main.

Activity

  1. github-actions commented on Oct 19, 2026

    @github-actions

    Issue Triage

    Summary:
    The issue reports that QUAL004 incorrectly flags microflows that are only invoked as a home microflow or from a menu item as “not called from anywhere.”

    Checklist (bug report)

    Required info Present? Details
    mxcli version ✅ mxcli v0.27.0
    Mendix version ✅ Mendix 11.12.4
    Scenario (what the user was trying to do) ✅ Creating navigation microflows, running mxcli catalog refresh --full then mxcli lint
    Expected output ✅ No QUAL004 for the navigation microflows
    Experienced output ✅ QUAL004 triggered with “is not called from anywhere. Remove if unused”
    AI bug report (mxcli diag --bundle or session log) ❌ Not included

    Missing information:
    Please provide the output of mxcli diag --bundle (or at least the relevant session log) so we can examine the internal state that led to the false positive. Once we have that, we’ll be able to confirm the fix and move forward. Thank you!


    Automated triage via OpenRouter — workflow source

  2. kris-bom commented on Oct 19, 2026

    @kris-bom
    Author

    Diagnostic bundle as requested. Reproduced with a clean HOME on the repository's own testdata/testapp project with mxcli v0.27.0, with .claude/lint-rules/orphaned_elements.star from the v0.27.0 tag placed next to the .mpr (the rule is identical on current main).

    repro.mdl and commands
    mdl 1;
    create module Shop;
    create module role Shop.User;
    alter user role Administrator add module roles (Shop.User);
    alter user role User add module roles (Shop.User);
    
    -- started only from the navigation
    create microflow Shop.NAV_Home ()
    begin
      log info node 'Shop' 'home';
    end;
    
    create microflow Shop.NAV_Orders ()
    begin
      log info node 'Shop' 'orders';
    end;
    
    -- control: no caller at all
    create microflow Shop.Unused ()
    begin
      log info node 'Shop' 'unused';
    end;
    
    grant execute on microflow Shop.NAV_Home to Shop.User;
    grant execute on microflow Shop.NAV_Orders to Shop.User;
    grant execute on microflow Shop.Unused to Shop.User;
    
    create or modify navigation Responsive
      home microflow Shop.NAV_Home
    {
      menu item 'Orders' ( OnClick: call microflow Shop.NAV_Orders, Icon: Atlas_Core.Atlas.home )
    };
    
    -- commands, run from the copy's root with an empty HOME
    -- $ mxcli check repro.mdl -p TestApp/TestApp.mpr
    -- $ mxcli exec repro.mdl -p TestApp/TestApp.mpr
    -- $ mxcli -p TestApp/TestApp.mpr -c "refresh catalog full force"
    -- $ mxcli -p TestApp/TestApp.mpr -c "select SourceName, RefKind, TargetName from catalog.refs where TargetName like 'Shop.%'"
    -- $ mxcli lint -p TestApp/TestApp.mpr
    relevant output
    Found 2 result(s)
    | SourceName            | RefKind   | TargetName      |
    |-----------------------|-----------|-----------------|
    | Navigation.Responsive | home_page | Shop.NAV_Home   |
    | Navigation.Responsive | menu_item | Shop.NAV_Orders |
    
      ℹ Microflow 'NAV_Home' is not called from anywhere. [QUAL004]
          at Shop.Shop.NAV_Home
          → Remove if unused, or rename with ACT_/SCH_ prefix if it's an entry point.
      ℹ Microflow 'NAV_Orders' is not called from anywhere. [QUAL004]
          at Shop.Shop.NAV_Orders
          → Remove if unused, or rename with ACT_/SCH_ prefix if it's an entry point.
      ℹ Microflow 'Unused' is not called from anywhere. [QUAL004]
          at Shop.Shop.Unused
          → Remove if unused, or rename with ACT_/SCH_ prefix if it's an entry point.
    
    mxcli diag --bundle (system-info.txt + session log)
    Version: v0.27.0
    Go: go1.27.2 darwin/arm64
    Time: 2026-10-19T07:32:32+02:00
    
    {"time":"2026-10-19T07:32:28.525787+02:00","level":"INFO","msg":"session_start","version":"v0.27.0","go":"go1.27.2","os":"darwin","arch":"arm64","mode":"mxcli check","args":["mxcli","check","repro.mdl","-p","TestApp/TestApp.mpr"],"pid":52489,"parent_pid":""}
    {"time":"2026-10-19T07:32:29.252191+02:00","level":"INFO","msg":"connect","mpr_path":"TestApp/TestApp.mpr","mendix_version":"11.14.0","mpr_format":2}
    {"time":"2026-10-19T07:32:29.252225+02:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'TestApp/TestApp.mpr'","duration_ms":0}
    {"time":"2026-10-19T07:32:29.601637+02:00","level":"INFO","msg":"session_end","commands_executed":1,"errors_count":0,"duration_s":1,"pid":52489}
    {"time":"2026-10-19T07:32:29.62532+02:00","level":"INFO","msg":"session_start","version":"v0.27.0","go":"go1.27.2","os":"darwin","arch":"arm64","mode":"mxcli exec","args":["mxcli","exec","repro.mdl","-p","TestApp/TestApp.mpr"],"pid":52676,"parent_pid":""}
    {"time":"2026-10-19T07:32:29.632211+02:00","level":"INFO","msg":"connect","mpr_path":"TestApp/TestApp.mpr","mendix_version":"11.14.0","mpr_format":2}
    {"time":"2026-10-19T07:32:29.632243+02:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'TestApp/TestApp.mpr'","duration_ms":0}
    {"time":"2026-10-19T07:32:29.854766+02:00","level":"INFO","msg":"execute","stmt_type":"CreateModuleStmt","stmt_summary":"create module Shop","duration_ms":5}
    {"time":"2026-10-19T07:32:29.884522+02:00","level":"INFO","msg":"execute","stmt_type":"CreateModuleRoleStmt","stmt_summary":"create module role Shop.User","duration_ms":29}
    {"time":"2026-10-19T07:32:29.908364+02:00","level":"INFO","msg":"execute","stmt_type":"AlterUserRoleStmt","stmt_summary":"AlterUserRoleStmt","duration_ms":23}
    {"time":"2026-10-19T07:32:29.932398+02:00","level":"INFO","msg":"execute","stmt_type":"AlterUserRoleStmt","stmt_summary":"AlterUserRoleStmt","duration_ms":24}
    {"time":"2026-10-19T07:32:29.971413+02:00","level":"INFO","msg":"execute","stmt_type":"CreateMicroflowStmt","stmt_summary":"create microflow Shop.NAV_Home","duration_ms":38}
    {"time":"2026-10-19T07:32:30.008558+02:00","level":"INFO","msg":"execute","stmt_type":"CreateMicroflowStmt","stmt_summary":"create microflow Shop.NAV_Orders","duration_ms":37}
    {"time":"2026-10-19T07:32:30.048403+02:00","level":"INFO","msg":"execute","stmt_type":"CreateMicroflowStmt","stmt_summary":"create microflow Shop.Unused","duration_ms":39}
    {"time":"2026-10-19T07:32:30.091559+02:00","level":"INFO","msg":"execute","stmt_type":"GrantMicroflowAccessStmt","stmt_summary":"grant execute on microflow Shop.NAV_Home","duration_ms":43}
    {"time":"2026-10-19T07:32:30.130359+02:00","level":"INFO","msg":"execute","stmt_type":"GrantMicroflowAccessStmt","stmt_summary":"grant execute on microflow Shop.NAV_Orders","duration_ms":38}
    {"time":"2026-10-19T07:32:30.169763+02:00","level":"INFO","msg":"execute","stmt_type":"GrantMicroflowAccessStmt","stmt_summary":"grant execute on microflow Shop.Unused","duration_ms":39}
    {"time":"2026-10-19T07:32:30.195574+02:00","level":"INFO","msg":"execute","stmt_type":"AlterNavigationStmt","stmt_summary":"create navigation Responsive","duration_ms":25}
    {"time":"2026-10-19T07:32:30.195866+02:00","level":"INFO","msg":"session_end","commands_executed":12,"errors_count":0,"duration_s":0,"pid":52676}
    {"time":"2026-10-19T07:32:30.223405+02:00","level":"INFO","msg":"session_start","version":"v0.27.0","go":"go1.27.2","os":"darwin","arch":"arm64","mode":"batch","args":["mxcli","-p","TestApp/TestApp.mpr","-c","refresh catalog full force"],"pid":52750,"parent_pid":""}
    {"time":"2026-10-19T07:32:30.229967+02:00","level":"INFO","msg":"connect","mpr_path":"TestApp/TestApp.mpr","mendix_version":"11.14.0","mpr_format":2}
    {"time":"2026-10-19T07:32:30.230004+02:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'TestApp/TestApp.mpr'","duration_ms":0}
    {"time":"2026-10-19T07:32:32.177788+02:00","level":"INFO","msg":"execute","stmt_type":"RefreshCatalogStmt","stmt_summary":"refresh catalog","duration_ms":1945}
    {"time":"2026-10-19T07:32:32.177854+02:00","level":"INFO","msg":"session_end","commands_executed":2,"errors_count":0,"duration_s":1,"pid":52750}
    {"time":"2026-10-19T07:32:32.204435+02:00","level":"INFO","msg":"session_start","version":"v0.27.0","go":"go1.27.2","os":"darwin","arch":"arm64","mode":"batch","args":["mxcli","-p","TestApp/TestApp.mpr","-c","select SourceName, RefKind, TargetName from catalog.refs where TargetName like 'Shop.%'"],"pid":53000,"parent_pid":""}
    {"time":"2026-10-19T07:32:32.210847+02:00","level":"INFO","msg":"connect","mpr_path":"TestApp/TestApp.mpr","mendix_version":"11.14.0","mpr_format":2}
    {"time":"2026-10-19T07:32:32.210879+02:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'TestApp/TestApp.mpr'","duration_ms":0}
    {"time":"2026-10-19T07:32:32.236803+02:00","level":"INFO","msg":"execute","stmt_type":"SelectStmt","stmt_summary":"select ...","duration_ms":3}
    {"time":"2026-10-19T07:32:32.236877+02:00","level":"INFO","msg":"session_end","commands_executed":2,"errors_count":0,"duration_s":0,"pid":53000}
    {"time":"2026-10-19T07:32:32.26325+02:00","level":"INFO","msg":"session_start","version":"v0.27.0","go":"go1.27.2","os":"darwin","arch":"arm64","mode":"mxcli lint","args":["mxcli","lint","-p","TestApp/TestApp.mpr"],"pid":53009,"parent_pid":""}
    {"time":"2026-10-19T07:32:32.269602+02:00","level":"INFO","msg":"connect","mpr_path":"TestApp/TestApp.mpr","mendix_version":"11.14.0","mpr_format":2}
    {"time":"2026-10-19T07:32:32.269623+02:00","level":"INFO","msg":"execute","stmt_type":"ConnectStmt","stmt_summary":"connect local 'TestApp/TestApp.mpr'","duration_ms":0}
    {"time":"2026-10-19T07:32:32.274184+02:00","level":"INFO","msg":"execute","stmt_type":"RefreshCatalogStmt","stmt_summary":"refresh catalog","duration_ms":2}
    {"time":"2026-10-19T07:32:32.5796+02:00","level":"INFO","msg":"session_end","commands_executed":2,"errors_count":0,"duration_s":0,"pid":53009}
    

    Result: the catalog has the two navigation references (home_page for Shop.NAV_Home, menu_item for Shop.NAV_Orders), yet QUAL004 reports both as "not called from anywhere", the same as the control Shop.Unused that has no caller at all. With "home_page", "menu_item" added to MICROFLOW_ENTRY_KINDS in that local copy of the rule, the two navigation microflows are silent and Shop.Unused still fires (QUAL004 count on the project goes from 36 to 34). Side note: the location line reads Shop.Shop.NAV_Home, the module name appears twice.

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