Skip to content

Sync ako/mxcli: exec rolls back after a timeout or panic; marketplace Java dependencies; SEC013; run and catalog fixes - #1784

Merged
ako merged 18 commits into
mendixlabs:mainfrom
ako:main
Nov 9, 2026
Merged

ako merged 18 commits into
mendixlabs:mainfrom
ako:main

Conversation

@ako

@ako ako commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Syncs ako/mxcli:main into upstream: 8 commits since #1781 — exec no longer leaves a project half-written after a timeout, plus marketplace, lint, run and catalog fixes.

exec: a timed-out or panicking statement is rolled back

  • The rollback runs. A statement that outlasted the per-statement limit kept running after Execute returned the timeout. exec then closed the project to roll back, the abandoned statement read through the now-nil reader, and the panic in its goroutine ended the process before the rollback — leaving every earlier statement written. Close now waits (bounded) for a statement the guard gave up on, and a panic in a statement is that statement's error, so the script rolls back as for any other failure.
  • The timeout itself is much rarer. Looking a unit up by name read and decoded every unit of its type on each call, and a flow build resolves each call microflow target that way, so one large flow in a large project cost callees × microflows unit reads. The first scan now records where each qualified name is; a later lookup reads that one unit and re-checks its name, $Type and module, so a unit changed outside mxcli is never served stale.

Fixes #1780

Marketplace: managed Java dependencies on install

A module such as MCP Client 4.4.0 declares Maven dependencies that Studio Pro downloads into vendorlib/ on import; a headless install copied only the declarations, so mx check passed and the build failed compiling Java actions. install and update now run the sync, and print the retry command when it fails. Two sync defects fixed on the way: a version range ([2.21.2,3)) was looked up as a file name, so a successful sync reported it missing and run --local re-synced on every boot; and one transient "Failed to find some hosts" ended the sync (now retried once).

lint

  • SEC013: the security level ignores the project's rules. A blank app ships at security level Off (no entity access, page or microflow grant, no demo user); Prototype applies no entity access. SEC010–SEC012 only run at Production, so every gate passed while all rows were readable. SEC013 counts what the project's own modules define that the level ignores. The manage-security skill now says up front that a blank app ships Off.
  • ARCH001 exempts System.Workflow*. A task page must take a System.WorkflowUserTask parameter (CE7410/CE7412), and complete task / open user task only work inside one (CE1843), so the advice to use a view entity or microflow had no way out.

run --test-endpoint

  • No second build right after boot. The boot build creates themesource/MxTest/, which the watcher then saw as edited theme source: ~30 s of 404s on dist/pages and a forced client reload right as run --detach returned. A themesource folder a build creates is that build's output. Measured on a blank 11.12.6 app: main rebuilt every boot, this stays on the first build.
  • The generated RegisterTestEndpoint.java is git-ignored (/javasource/mxtest/ and .mxcli/), so a git add -A while the endpoint is hosted no longer commits it; init's template carries the entries too.

Catalog: refs edges for entities named as a type

A result variable's type, a created list, an entity-type Java/JavaScript argument, a snippet parameter and the entity an association step arrives at had no refs edge, so show references, impact and the unused-entity check missed the reader and an incremental build didn't rebuild it; a missing enumeration value made no edge either. These now emit type, parameter, member, xpath and value edges, and annotation captions, translations and module-role names are no longer read as references. Ref coverage is 100% on two real apps (65 and 42 uncovered before). Catalog schema 37

claude and others added 18 commits November 9, 2026 06:22
A task page must take a System.WorkflowUserTask parameter (CE7410/CE7412)
and `complete task` / `open user task` only work inside a
System.WorkflowUserTask data container (CE1843), so ARCH001's advice to
use a view entity or microflow had no way out. System.Workflow* is
exempt; cross-module references to app modules are reported as before.

Fixes #2034

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
A blank app ships at security level Off, where the runtime applies no
entity access, page or microflow grant and creates no demo user; at
Prototype it applies no entity access, so XPath constraints have no
effect. Every gate passed while a customer read every row, because
SEC010-SEC012 only run at Production. SEC013 counts what the project's
own modules define that the level ignores. The manage-security skill
says up front that a blank app ships Off.

Fixes #2027

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
A module such as MCP Client 4.4.0 declares Maven dependencies that Studio
Pro downloads into vendorlib/ on import. A headless install copied only
the declarations, so mx check passed and the build failed compiling Java
actions. install and update now run the sync and print the retry command
when it fails.

Two sync defects showed up on the way, both measured on MCP Client:
a version range ([2.21.2,3)) was looked up as a file name, so a
successful sync reported it still missing and run --local re-synced on
every boot; and one transient "Failed to find some hosts" ended the
sync. A range now matches a vendored version inside it, and that
failure is retried once.

Fixes #2028

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
The boot build creates themesource/<module>/ for a module that has
none. With --test-endpoint that is MxTest, and its scaffold files are
watched theme source newer than the boot's baseline, so build #2
started with nothing edited: ~30 s of 404s on dist/pages and a forced
client reload right as run --detach returned. A themesource/ folder a
build creates is now that build's output up to its end; edits to
existing theme files and later edits to the new folder still rebuild.

Measured on a blank 11.12.6 app with --db-type hsqldb: a binary from
main rebuilt (build #2) every boot, this one stays on build #1.

Fixes #2033

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…rioritization-24rqgv

# Conflicts:
#	CHANGELOG.md
…24rqgv

Fix ARCH001 on task pages, security level gaps, unsynced jar deps, and the post-boot rebuild
While run --test-endpoint hosts the endpoint, RegisterTestEndpoint.java
sits under javasource/mxtest/, and a `git add -A` in that window
committed it. run --test-endpoint now ignores /javasource/mxtest/ and
.mxcli/ before installing the endpoint, creating .gitignore from init's
template when the project has none; init's template, and the entries
init adds to an existing .gitignore, carry it too.

Refs #2033

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…ugh an association (#1829)

A result variable's type, a created list, an entity-type Java/JavaScript
argument, a snippet parameter and the entity an association step arrives
at named an entity with no refs edge, so show references, impact and the
unused-entity check missed the reader and an incremental build did not
rebuild it. A value missing from an existing enumeration made no edge
either, so the reader stayed stale when the value was added.

The member-refs walk now knows each string's owning and enclosing $Type
and emits type, parameter, member and xpath edges to the entity, and a
value edge to the enumeration. Annotation captions, text translations and
module-role names are no longer read as references. Ref coverage is 100%
on FactoryManagement (was 65 uncovered) and EVORA - ICX (was 42). Catalog
schema 37.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…24rqgv

run: git-ignore the test endpoint's generated Java source
fix(catalog): refs edges for entities named as a type or reached through an association (#1829)
A statement that outlasted the per-statement limit kept running after
Execute returned the timeout. exec then closed the project to roll
back; Disconnect set the reader to nil, the abandoned statement read
through it, and the panic in its goroutine ended the process before the
rollback and before the timeout was printed, leaving every earlier
statement written.

Close now waits (bounded) for a statement the guard gave up on, and a
panic in a statement, on either path, is that statement's error, so the
script is rolled back as for any other failure.

Fixes #2043

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…rioritization-24rqgv

# Conflicts:
#	CHANGELOG.md
…24rqgv

exec: a timed-out or panicking statement no longer skips the rollback
GetRawUnitByName read and decoded every unit of the type on each call,
and a flow build resolves each `call microflow` target through it, so
one large flow in a large project cost callees x microflows unit reads:
minutes, past the per-statement limit (#2043).

The scan now records where each qualified name is. A later lookup reads
that one unit and checks its name, $Type and module again before
returning it, so a unit renamed, retyped, moved or removed outside mxcli
is not served from the index; a miss or a stale entry scans as before.
InvalidateCache clears it with every write.

Refs #2043

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…24rqgv

mpr: look a unit up by name without reading every unit of its type
@ako
ako merged commit bba6b24 into mendixlabs:main Nov 9, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exec panics (nil pointer in GetRawUnitByName) while recreating a dropped microflow, and leaves the project half-written

2 participants