Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0daa25b
feat(check): MDL097 flags returns T as $R when a path ends the flow w…
claude Nov 17, 2026
3992cd7
ci: Bump actions/upload-artifact from 4 to 7
dependabot[bot] Nov 17, 2026
3f3994c
Merge remote-tracking branch 'origin/main' into fix/missing-return-path
claude Nov 17, 2026
655b70b
feat(check): MDL098 flags an expression that reads a variable nothing…
claude Nov 17, 2026
4682fd0
Merge pull request #2344 from ako/fix/missing-return-path
ako Nov 17, 2026
ff6c3aa
Merge remote-tracking branch 'origin/main' into fix/undefined-variabl…
claude Nov 17, 2026
fb01feb
Merge pull request #2346 from ako/fix/undefined-variable-check
ako Nov 17, 2026
ce9a1e5
Merge pull request #2345 from ako/dependabot/github_actions/actions/u…
ako Nov 17, 2026
8ffb81a
test(bench): check hot-apply's two commands against a floor, not anot…
claude Nov 17, 2026
cc9a3db
findings: agentbench hot-apply timing check compared single samples
claude Nov 17, 2026
859f158
docs(changelog): add the entries for #2338 and #2339
claude Nov 17, 2026
ec45c7b
Merge pull request #2348 from ako/claude/mxcli-nightly-build-failure-…
ako Nov 17, 2026
3eadb56
Merge pull request #2347 from ako/docs/changelog-2338-2339
ako Nov 17, 2026
0390650
fix(check): Visible: roles on a tab page is stored, so do not refuse it
claude Nov 17, 2026
a6cdc5e
feat(check): MDL-GRANT04 flags Visible: roles naming a role of anothe…
claude Nov 17, 2026
860d8ff
Merge pull request #2349 from ako/fix/tabpage-visible-roles
ako Nov 17, 2026
9668285
Merge remote-tracking branch 'origin/main' into fix/visible-roles-cro…
claude Nov 17, 2026
e906487
Carry test results into the traceability report (#2340)
claude Nov 17, 2026
ef42c71
Say a Mendix 9 runtime has no OQL action instead of blaming flags (#2…
claude Nov 17, 2026
dc7aaf8
Document JDBC drivers and DuckDB extensions in a Java action (#2314)
claude Nov 17, 2026
affffd0
Merge remote-tracking branch 'origin/main' into claude/issue-triage-p…
claude Nov 17, 2026
3f528ff
Merge pull request #2351 from ako/claude/issue-triage-prioritization-…
ako Nov 17, 2026
bfeeb1f
Merge remote-tracking branch 'origin/main' into fix/visible-roles-cro…
claude Nov 17, 2026
c1fd96d
Merge pull request #2350 from ako/fix/visible-roles-cross-module
ako Nov 17, 2026
6741e64
feat(scripts): diag-coverage — which of Mendix's check diagnostics mx…
claude Nov 17, 2026
d1c8876
test(diagcoverage): isolate the home directory with testutil.SetHome
claude Nov 17, 2026
4ddeb38
Merge pull request #2363 from ako/feat/diag-coverage-tool
ako Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "cmd/mxcli", "date": "2026-11-17", "refs": ["ako/mxcli#2341", "mendixlabs/mxcli#1879"], "ce": [], "symptom": "`mxcli oql` against a Mendix 9.24.11 runtime: 'OQL error: Action not found. -- the running app does not expose the OQL preview endpoint, which needs the live-preview dev flags at boot … upgrade mxcli …'. The 9.24 runtime answers preview_execute_oql with {\"result\":-5,\"message\":\"Action not found.\"} whatever the flags; 10.24 answers it.", "file": "cmd/mxcli/docker/oql.go ExecuteOQL / runtimeVersion / majorVersion. Test: cmd/mxcli/docker/oql_old_runtime_2341_test.go", "cause": "'Action not found' on both OQL routes was read as one cause only — the live-preview flags off — but a runtime before Mendix 10 has no such action at all.", "insight": "**An absent admin action has two causes, and the runtime can say which: ask it its version (M2EE `about`) before advising.** Only when both routes are missing is the version read; below 10 the error says OQL over the admin API needs Mendix 10+ and names the runtime's version, and points at the database; 10+ keeps the dev-flags hint (the control). Not run against a live 9.x runtime: the test replays the reporter's measured responses through a fake admin server. The issue's second ask, OQL-to-SQL over the app database for 9.x, is a feature and is not built."}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "cmd/mxcli", "date": "2026-11-17", "refs": ["ako/mxcli#2340", "mendixlabs/mxcli#1877"], "ce": [], "symptom": "`mxcli report traceability --format json --junit junit.xml` produced output byte-identical to the run without --junit; each requirement's `tests` stayed a list of names, while `report tests --junit` on the same file showed 10 passed / 1 failed.", "file": "cmd/mxcli/projectreport/traceability.go TraceRequirement.TestResults / TraceTestResult / testsCell / testsClass. Test: cmd/mxcli/projectreport/traceability_junit_2340_test.go", "cause": "The traceability command did read the JUnit file into the evidence (CollectTests carries each TestInfo.Status), but CollectTraceability reduced each requirement's reaching tests to their names, so the results never reached the report.", "insight": "**A flag that is accepted, documented and plumbed can still be dropped at the last projection.** The evidence path was correct end to end up to `tr.Tests = append(tr.Tests, t.Name)`. The fix keeps `tests` (names) for existing readers and adds `testResults` [{name, status}] — 'not run' where no result was read — and the rendered table shows 'name (failed)' with the cell marked bad, so 'built, test failing' no longer reads as 'built and proven'."}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-17", "refs": ["ako/mxcli#1258"], "ce": ["CE0109", "CE0108", "CE0067"], "symptom": "`create microflow M.F ($B: Boolean) returns Boolean as $R begin if $B then return true; end if; end;` passed `mxcli check` and `exec`, then MxBuild reported CE0109 \"Undefined variable 'R'\" at the End event. Same in a nanoflow.", "file": "mdl/executor/validate_return_variable_defined.go checkReturnVariableDefined (MDL097), called from validate_microflow.go validate() after the MDL003 block and from validate_nanoflow.go. Test: mdl/executor/validate_return_variable_defined_test.go", "cause": "MDL003 (missing return on a non-void flow) exempts `returns T as $R`, on the reasoning that the End event returns $R whether or not the body writes a RETURN. That is true only while $R has a value where the flow ends; an undefined $R is CE0109 and one defined only inside a branch or loop is CE0108.", "insight": "**An exemption written from one measured case is a rule with an unstated precondition; re-measure the boundary before widening or narrowing it.** The 11.13.0 measurement behind the AS-clause exemption had $R assigned, so it held; the parity fixture left $R undefined. Measured on 11.16.1, one `mx check -j`, 15 flows microflow and nanoflow: undefined + a path off the end = CE0109; defined only in a nested body = CE0108; declared at the top level = clean whether or not the body falls off the end (even declared AFTER an if that returns); undefined but every path returns = clean; no AS clause = CE0067 (MDL003, unchanged). So the rule is about where $R is defined, not about return statements. Guarded by both bodyReturns and lastStmtIsReturn so a named join or raise error stays quiet. Sweep of every .mdl in the repo (1658 flows, 684 with an AS clause): 2 hits, both correct: the f07 fixture and bug-tests/captrack-19-return-in-loop-as-clause.fail.mdl, whose own header independently records the same CE0109 for an unassigned $Done. A third hit came from the skill-example gate, not the sweep: docs-site/src/tutorial/skills.md:83 showed `returns Boolean as $result` with an empty body, which fails the build; fixed there. Control: stubbing the check fails the five positive cases and the @excluded test."}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-17", "refs": ["ako/mxcli#1258", "mendixlabs/mxcli#1460", "mendixlabs/mxcli#1465"], "ce": ["CE0149"], "symptom": "`tabpage tp (Caption: 'a', Visible: roles (Wd.Viewer))` was refused by `check` under mdl 1 (MDL-WIDGET44 \"`VisibleRoles` cannot be stored on a tab page\") and warned about headerless (MDL-V1-TABPAGEPROP \"not written\"), though the roles are written, describe prints them back and MxBuild 11.16.1 accepts an own-module role on a tab page.", "file": "mdl/executor/validate_tabpage_props.go tabPageStoredProps (added visibleroles). Test: mdl/executor/tabpage_visible_roles_test.go", "cause": "tabPageStoredProps is a hand-kept allowlist of the keys buildTabPageV3 writes. #1460 made the builder write VisibleRoles through childVisibility, and #1465 added the refusal for every known widget property the list did not name; the two never met, so the new key was refused as dropped.", "insight": "**A refusal built from an allowlist of what a builder writes goes stale the day the builder learns a new key, and it fails closed: it blocks a feature that works.** The test that settles it is two-sided: build the AST through the real builder and assert the stored field (TestTabPage_VisibleRolesIsWritten passed before the fix, which is what proved the refusal was the wrong half), then assert check does not refuse (failed before, with the reported message). Found while measuring a different gap: Visible: roles naming another module's role is CE0149 on a container, dynamic text, layout-grid row, navigation-list item, snippet container and tab page alike (own-module role clean everywhere), but the tab page case could not even be reached under mdl 1 because of this refusal. The cross-module check is a separate change. The message also named VisibleRoles when it sat beside a real offender (CaptionParams); that goes with the fix since the key is no longer listed. Badge keys were checked and are not affected: they are not page-widget properties, so tabPageDroppedProps never reaches them."}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-17", "refs": ["ako/mxcli#1258"], "ce": ["CE0109"], "symptom": "`return $Nope + 1;` with `$Nope` defined nowhere passed `mxcli check -p` and `exec`, then MxBuild reported CE0109 \"Undefined variable 'Nope'\" at the End event.", "file": "mdl/executor/validate_undefined_variable.go (MDL098: initDefinedVariables, checkUndefinedVariables, implicitVariables), hooked into checkExprFunctions in validate_microflow.go and initialised in validate() and validateNanoflowWith; mdl/exprcheck/variable_refs.go VariableReferences. Tests: validate_undefined_variable_test.go, variable_refs_test.go", "cause": "Nothing compared the `$name`s an expression reads with the names the flow defines. MDL-LISTOP01 did it for a filter/find predicate only, and MDL063 collects definitions for duplicates, so both halves existed and were never joined for ordinary expression slots.", "insight": "**The risky half of an undefined-variable rule is the implicit names, and the answer is a measurement, not a list from memory.** One `mx check -j` over 55 flows (11 candidate names x plain flow, loop body, error handler, filter predicate, after a loop) on MxBuild 11.16.1: $currentUser, $currentSession, $latestError, $latestHttpResponse and $latestSoapFault are accepted in EVERY position (even $latestError in a flow with no handler); $currentIndex and the loop iterator only inside the loop; $currentObject only inside a filter predicate; $latestJavaException and a made-up $IteratorItem are CE0109 like $Nope; the iterator after its loop is CE0108. The rule treats $currentIndex and $currentObject as defined everywhere, stricter than MxBuild on purpose: a missed report costs less than a false one, because exec refuses what check reports. Producers come from FlowDefinedVariables (params plus every statement's declare/create/retrieve/OutputVariable at any depth); a read of the AST for fields that look like producers found none missed (ExternalObjectStmt.Variable is consumed). Names compare case-insensitively since whether Mendix distinguishes $count from $Count is unmeasured. Sweep of every .mdl in the repo (1658 flows): 3 hits, all correct: the f05 fixture and two negative tests (bug-tests/ledger-17 and ledger-21 .fail.mdl) that `set $Bad = …` without declaring it and then `return $Bad`. Control: stubbing the check fails all 11 positive cases and the @excluded control."}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area": "mdl/executor", "date": "2026-11-17", "refs": ["ako/mxcli#1258", "mendixlabs/mxcli#1460"], "ce": ["CE0149"], "symptom": "`create page Wd.P (…) { container c (Visible: roles (Administration.Administrator)) {…} }` passed `mxcli check --references` and `exec`; `mx check` then reported CE0149 \"Visibility needs to be updated, reselect roles in properties\". A role of the page's own module, viewable or not, was clean.", "file": "mdl/executor/validate_visible_roles_module.go ValidateVisibleRolesModule (MDL-GRANT04), called from validate_program.go next to ValidateGrantRoles. Tests: validate_visible_roles_module_test.go; fixtures mdl-examples/bug-tests/visible-roles-cross-module(.fail).mdl", "cause": "validate_grant_refs.go (widgetVisibleRoles) only checks that each role EXISTS; nothing compared the role's module with the document's. MDL-GRANT01 already did that for document grants (CE0148) and was never extended to a widget's role list, the same mistake one property over.", "insight": "**When a rule exists for one place a Mendix reference list is stored (document grants: CE0148), ask for every other place that stores the same kind of list before calling it done: the same-module restriction is a property of how Mendix stores module roles, not of GRANT.** Measured on MxBuild 11.16.1, one `mx check -j` over 17 documents: container, dynamic text, layout-grid row, navigation-list item, snippet container, layout container, tab page and a widget inserted by alter page are each CE0149 for a foreign role (Administration.Administrator or a role of a user-created module) and clean for an own-module one; an own+foreign list is CE0149; viewing access is irrelevant. The report's first guess was page access; the measurement said module only. Tab pages were unreachable until the separate MDL-WIDGET44 false refusal of `Visible: roles` on a tab page was fixed. Case-insensitive module compare (unmeasured whether Mendix distinguishes) and unqualified roles skipped, so a miss rather than a false report. Sweep of every .mdl in the repo: 0 hits, but only 8 scripts mention `roles (` and one uses Visible: roles (an own-module role), so the sweep is weak evidence here; the measurement is the evidence. Control: stubbing the rule fails all 11 positive cases, the one-violation test and the ValidateProgram wiring test; the positive-control script builds with 0 errors on MxBuild."}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"area":"other","date":"2026-11-17","symptom":"mendixlabs/mxcli push CI (Build, Test & Lint #2233 on main, b7dc2f8) failed in build-and-test's Test step, while the identical tree passed twice on ako/mxcli; the fork's nightly #116 had failed the day before in unit tests with `TestRun_RuntimeSessionRunsArmsInTurnAndAlwaysStops: hot-apply took 72 ms against 108 ms for a one-command step, want the two commands summed`","cause":"A third wall-clock assertion in scripts/agentbench's own tests, not covered by the earlier fix (2026-11-15-agentbench-tests-flake-etxtbsy-and-timing): it compared one sample of the two-command hot-apply step with one sample of the one-command test-attach step (runtimeReps 1, ~30 ms a fake command), so one stall in test-attach's run failed it","file":"`scripts/agentbench/bench_test.go` (`TestRun_RuntimeSessionRunsArmsInTurnAndAlwaysStops`; fakeMxcliScript's slowOn takes `a|b` alternatives)","insight":"A timing assertion that compares two measured samples is a race between them; one that checks a measured time against a floor built from known injected delays cannot be failed by a stall, because noise only adds time. So the candidate's two hot-apply commands each sleep 300 ms more and the step must be at least 600 ms (one command alone reads ~330). When fixing one flaky timing test, grep the package for every other comparison of measured times (Wall, Median, ratio) — the first fix left this one behind. Control: runStep keeping only the last command's wall time fails it at 335 ms. Stall model in the fake (30% chance per command of up to 300 ms, via go test -overlay): old check 3 of 12 failed with the nightly's message, new 0 of 12. The upstream failure's log needs sign-in, so its test is inferred: the fork's 60 CI runs over the same 36 hours had no other failure","refs":["mendixlabs/mxcli Build, Test & Lint run 44036694201","ako/mxcli nightly run 43836035285"],"test":"scripts/agentbench/bench_test.go"}
17 changes: 11 additions & 6 deletions .claude/skills/mendix/create-page/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ description: "CREATE PAGE syntax reference — parameters, variables, layouts, a
| 47-222 | Syntax |
| 223-293 | Basic Examples |
| 294-318 | Modifying Existing Pages |
| 319-435 | Conditional Visibility and Editability |
| 436-605 | Known Limitations |
| 606-614 | Tips |
| 615-641 | Related Commands |
| 642-666 | PLUGGABLEWIDGET Escape Hatch |
| 667-670 | See Also |
| 319-440 | Conditional Visibility and Editability |
| 441-610 | Known Limitations |
| 611-619 | Tips |
| 620-646 | Related Commands |
| 647-671 | PLUGGABLEWIDGET Escape Hatch |
| 672-675 | See Also |

<!-- /skill-index -->
# CREATE PAGE - MDL Syntax Guide
Expand Down Expand Up @@ -389,6 +389,11 @@ create page MyModule.Request_Review (title: 'Review', layout: Atlas_Core.Atlas_D
};
```

The roles must be roles of the page's, snippet's or layout's OWN module: a role of
another module (`Administration.Administrator` on a page in `MyModule`) builds with
CE0149 "reselect roles", and `check` refuses it (MDL-GRANT04). Whether the page may
be viewed by the role does not matter, only the role's module.

`visible: roles (Mod.Role) and <condition>` is the same two settings in one line
(both apply). `roles (…)` anywhere else in an expression is refused (MDL-WIDGET54):
Mendix expressions have no roles function.
Expand Down
48 changes: 37 additions & 11 deletions .claude/skills/mendix/java-dependencies/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ description: "Add, update, remove and audit a module's Maven/JAR dependencies in

| lines | section |
|---|---|
| 34-44 | When to Use This Skill |
| 45-56 | Listing Dependencies |
| 57-65 | Describing a Dependency |
| 66-103 | Adding a Dependency |
| 104-116 | Updating a Dependency |
| 117-131 | Managing Transitive Exclusions |
| 132-139 | Removing a Dependency |
| 140-155 | Jackson Version Gotcha |
| 156-166 | After Adding a Dependency |
| 167-177 | Coordinate Format |
| 178-181 | Related Skills |
| 35-45 | When to Use This Skill |
| 46-57 | Listing Dependencies |
| 58-66 | Describing a Dependency |
| 67-104 | Adding a Dependency |
| 105-117 | Updating a Dependency |
| 118-132 | Managing Transitive Exclusions |
| 133-140 | Removing a Dependency |
| 141-156 | Jackson Version Gotcha |
| 157-181 | A JDBC Driver or Native Library in the Runtime |
| 182-192 | After Adding a Dependency |
| 193-203 | Coordinate Format |
| 204-207 | Related Skills |

<!-- /skill-index -->
# Managing Maven / JAR Dependencies
Expand Down Expand Up @@ -153,6 +154,31 @@ Pin to the version the Mendix runtime bundles to avoid classloader conflicts:
ls ~/.mxcli/mxbuild/<runtime-version>/runtime/bundles/ | grep jackson
```

## A JDBC Driver or Native Library in the Runtime

A library that registers itself with the JVM can be on the class path and still
not be found from a Java action. Reported building a SPARQL action on DuckDB
(`org.duckdb:duckdb_jdbc` 2.0.0.1) in Mendix 11.16 (ako/mxcli#2314; not
measured here):

1. **`DriverManager` does not see a userlib driver.** `DriverManager.getConnection("jdbc:duckdb:")`
fails with `No suitable driver found`: the jar sits in the app's own class
loader, which `DriverManager` does not search. Instantiate the driver class
instead — `new org.duckdb.DuckDBDriver().connect("jdbc:duckdb:", new java.util.Properties())` —
the same for any JDBC driver a dependency brings.
2. **DuckDB verifies an extension file against its core signing key.** A core
extension installs from a bundled file (`INSTALL '<path>'`); a community one
(`rdf`) is refused ("doesn't have a valid signature"), loading it by path is
refused too, and the failed `INSTALL` closes the statement. What works: run
`INSTALL rdf FROM community` once on a machine with network access, bundle the
installed `rdf.duckdb_extension` with its `.info` file, copy both into
`<extension_directory>/v<duckdb version>/<platform>/` (e.g. `v2.0.0/linux_amd64/`)
at runtime, then `LOAD rdf` by name.
3. **Only a real build compiles Java.** `mxcli check` and `mxcli docker check`
(`mx check`) do not, so a mistake in the body shows in `mxcli test --local` or
`run --local` (`mxbuild --target=deploy`). `import com.mendix.core.Core;` is
added for you when the code uses `Core`; any other class needs its import line.

## After Adding a Dependency

MDL writes the `Projects$JarDependency` entry into the `.mpr` file. Gradle
Expand Down
22 changes: 22 additions & 0 deletions .claude/skills/mendix/write-microflows/reference/pitfalls.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,28 @@ A regex that ends in a lone backslash (`'\'`) builds and fails every time it run
(`secondsBetween`, `minutesBetween`, …) return the absolute difference, whichever date
comes first — compare the dates for the direction.

### 21. `returns T as $R` Needs `$R` Defined Where the Flow Ends

The `as $R` clause makes the end event return `$R`, so the body need not spell out a
`return` — but only while `$R` has a value on the path that reaches the end. Declare it at
the top level of the flow, or end every path with a `return`. Measured on MxBuild 11.16.1,
microflow and nanoflow alike:

- `$R` never defined and a path falls off the end — CE0109 "Undefined variable 'R'" (MDL097).
- `$R` defined only inside an `if` branch or loop — CE0108, out of scope at the end event (MDL097).
- `$R` declared at the top level — clean, even when the body falls off the end.

```mdl
mdl 1;
create microflow Mod.IsEven ($N: Integer) returns Boolean as $Even
begin
declare $Even Boolean = false; -- top level: always has a value at the end
if $N mod 2 = 0 then
set $Even = true;
end if;
end;
```

## Implicit Variable Creation (CE0111 Duplicate Variable)

These statements **implicitly create a new variable** with the name on the left side:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ jobs:

- name: Upload the trend
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: agent-benchmark-trend
path: |
Expand Down
Loading
Loading