Skip to content

Sync ako/mxcli: rebuilds keep docs and translations; MOVE ENTITY id and atomicity fixes; GRANT overlap warning; merge-plan drops listed - #1878

Merged
ako merged 36 commits into
mendixlabs:mainfrom
ako:main
Nov 17, 2026
Merged

ako merged 36 commits into
mendixlabs:mainfrom
ako:main

Conversation

@ako

@ako ako commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Syncs ako/mxcli:main into upstream: 9 commits since #1876 — rebuilds that keep documentation and translations, safer MOVE ENTITY, a GRANT warning, a clearer git merge --plan, and the software map by feature. 2 upstream issues fixed.

Rebuilds and edits keep what was stored

  • A drop + create pairs a rebuilt flow's objects across Studio Pro's order. Studio Pro stores a flow's objects in drawing order and mxcli writes the parameters and start event first, so the transplant left them unpaired and a drop + create lost the parameters' documentation. Leftover entries now pair by a key unique on both sides, and the alignment prefers elements at the same place, so two show messages no longer cross. Translations are carried by the paired text $ID where the pairing is confirmed. Fixes Drop + create still clears parameter docs and translations #1872
  • An in-place edit of a show message keeps its other translations: the edit saves the unit as a patch, which didn't carry translations, so the message kept only the language MDL writes. Fixes Editing a show message in place drops its other translations #1870

MOVE ENTITY

  • A retyped association keeps its own id. Moving one entity of a chain turns an association into a cross-association that stays in the source module with its own $ID; the transplant aligned it by position with the cross-association already there and gave it that $ID and GUID, so mx check reported CE9208 and the next move was refused for duplicate ids. An element carrying a stored $ID under the same name is now that element and is not re-paired.
  • A refused target writes nothing. MoveEntity wrote the source domain model before building the target, so a refused target left the entity in neither module under exec --continue-on-error. Both units are now encoded and checked before either is written, and a target write that fails anyway restores the source.

Security

MDL-GRANT03 warns when a grant's where narrows nothing. A grant with a WHERE writes a rule of its own beside the role's existing rules, and access rules add up, so a constrained grant next to an unconstrained rule left the role reading every row with no message. check (with or without a project) and exec now warn and name the revoke that narrows it; the reverse overlap warns too.

git merge --plan

A plan takes each conflicted unit whole from one side, so taking theirs on a domain model also dropped an entity only ours had added. The conflict review now lists, per unit, the non-conflicting changes each choice drops (read from the two mx diff files), and --plan prints the same for the side it takes before committing.

Brain and reports

  • Milestones live on the slices they group (milestone: in the slice file's frontmatter), instead of a separate docs/brain/plan/traceability.json that nothing kept in step. New mxcli brain milestone "<name>" --slice <s> --requirement <id>; --import <file> moves an old traceability.json into the plan, which is still read meanwhile with a warning. brain plan shows a MILESTONE column.
  • report map shows the app by feature: with a brain plan, each slice is a feature, and what belongs to it comes from its requirements' anchors.
  • report traceability's hint on a brain with no plan names commands that exist (brain staged, brain promote <id>…), and a test checks them against the command tree

claude and others added 30 commits November 16, 2026 18:56
A specification's milestones were the one traceability input kept outside
the plan, in docs/brain/plan/traceability.json, a second file about the
same slices that nothing kept in step with them. A milestone is now part of
its slice: `milestone: "<name>"` in the slice file's frontmatter (which the
store already carries across every rewrite), and a "Milestone: `<name>`"
line on a requirement placed apart from its slice.

- `mxcli brain milestone "<name>" --slice <s> --requirement <id>` sets them,
  `--clear` removes them, no name lists them, and `--import <file>` writes
  an old traceability.json into the plan and removes it.
- `brain plan` shows a MILESTONE column, `--json` a milestone per slice.
- `report traceability` groups by the plan's milestones. A --milestones
  file, or the old traceability.json when the plan names none, is still
  read, with a warning that says how to move it.

Milestones are ordered by first appearance in slice-name order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qTgUsRMETmzvjS27w
On a brain with no plan, `report traceability` told the user to run
`mxcli brain promote --all`, which promote does not have. It now says
`brain staged` and `brain promote <id>...`, and a test checks every brain
command and flag the hint names against the command tree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qTgUsRMETmzvjS27w
A feature map maintained beside the plan would restate what the plan's
requirement anchors already say, with nothing to check it against the
model. Instead `report map` derives one: with a project brain that has a
plan, each slice is a feature, and what belongs to it comes from its
requirements' anchors, the same statuses and footprints `report
traceability` computes.

A feature reaches:
- flows: the anchored flows and footprints (marked as core), the flows
  behind buttons of anchored pages, and their call closure;
- pages anchored or opened by those flows, entities anchored or written
  by them;
- entry points: reached flows started from outside the feature (a
  button on the feature's own page is how it works, not a way in);
- roles: the user roles that may open one of its pages;
- the other features it shares documents with.

Reach stops at the pages a feature opens: following their buttons too
would walk the navigation and give every feature the whole app.

"Reached by no feature" lists the app's pages, entry points and
persistent entities no requirement leads to.

The HTML page gets a Features tab (cards per feature, then per feature
its requirements, a graph of its pages, flows and data, and its entry
points); markdown and JSON carry the same data. Without a plan the map
is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qTgUsRMETmzvjS27w
feat: milestones live in the plan; the software map shows the app by feature (spike)
`create or modify` of a microflow whose show message text changed edits
the activity in place and saves the unit as a patch, which canon does not
carry translations onto, so the message kept only the language MDL writes.
The stored languages the statement does not write are now carried onto the
edited activity with canon.CarryTranslations.

Closes #2327

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
Studio Pro stores a flow's objects in drawing order and mxcli writes the
parameters and start event first, so TransplantIDs left them unpaired and
a drop + create lost the parameter's documentation. Leftover entries now
pair by a key unique on both sides, and the alignment prefers elements at
the same place, so two show messages no longer cross. Translations are also
carried by the paired text $ID where the pairing is confirmed, and the
by-path carry is refused when the owning objects moved.

Closes #2329

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
A grant with a WHERE writes a rule of its own beside the role's existing
rules, and access rules add up, so a constrained grant next to an
unconstrained rule left the role reading every row with no message. check
(with and without a project) and exec now warn MDL-GRANT03 and name the
revoke that narrows it; the reverse overlap warns too.

Closes #2320

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…ics catalog proposal

The 22 s figure was one measurement; #1258 measured 7.6 s (docker check)
and 1.2 s (Mendix CLI 2 mendix check) on a small project. Record that, and add a
spike to measure mendix check's per-code agreement with mx check.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
Moving Src.A2 converts Src.A3_A2 into a cross-association that stays in
Src with its own $ID. Reconcile's transplant aligned it by position with
the cross-association already there (Src.A2_A1) and gave it that $ID, and
with it the GUID, so mx check reported CE9208 and the next move was refused
for duplicate ids. An element carrying a stored $ID under the same name is
now that element and is not re-paired, nor is anything under it.

Closes #2322

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
MoveEntity wrote the source domain model before building the target, so a
refused target left the entity in neither module under
exec --continue-on-error. Both units are now encoded and checked against
the write path's content refusals before either is written, and a target
write that fails anyway restores the source.

Closes #2323

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
A plan takes each conflicted unit whole from one side, so taking theirs on
a domain model also dropped an entity only ours had added. The conflict
review now lists per unit the changes each choice drops that did not
conflict, read from the two mx diff files, and --plan prints the same for
the side it takes before committing.

Closes #2325

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
… oracle

Adds mdl-examples/check-gap (8 broken-script fixtures + run-parity.sh comparing
mxcli check -p, mx check and Mendix CLI 2 mendix check) and records the spike
numbers in the diagnostics catalog proposal. Refs #1258.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
TestConformanceGate requires a header on every .mdl under mdl-examples. The
harness now strips the duplicate header when it concatenates base and fixture.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
…24rqgv

Urgent triage batch: flow rewrite carries, grant overlap warning, move entity atomicity and id pairing, git merge drop report
…2319)

The combined form parsed as one expression, so `roles (…)` was stored as
expression text with ModuleRoles empty: an invalid expression and the role
restriction lost, with check and exec passing. The leading `roles (…) and`
is now split into the module roles and the condition, as Studio Pro stores
them; a `roles (…)` elsewhere in an expression is refused (MDL-WIDGET54) at
check and exec.

Closes #2319

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
funcTable listed replace(String, String, String), so MDL044 stayed silent and
the generated syntax docs advertised it; MxBuild rejects it (CE0117) and Mendix
CLI 2 reports CE7811 "Unknown function 'replace'". The string replacers are
replaceAll and replaceFirst. Drop the row.

nearestFunc also iterated the map, so the did-you-mean for replace flipped
between replaceAll and replaceFirst from run to run; it now walks sorted names.

Refs mendixlabs/mxcli#2308, #1258.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
Inserting a menu item spliced it in unconditionally, so re-running a script
added it again and reported Altered. An item the target list already holds
as the statement builds it (ids ignored, stored captions kept to the
statement's languages) is now skipped, so the re-run is Unchanged; an item
of the same caption built differently is refused, naming replace.

Closes #2312

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
The splice drew the connector into an inserted run and the one out of it
with its own control vectors, so the next run of the same script read them
as redrawn and refused the flow (MDL-V1-REBUILD). The insert now carries the
curves the script states (the statement before the run, and the run's last)
and draws them, straight where none is stated, so the re-run is Unchanged.
The deliberate-rebuild advice now says to run drop + create once and keep
the resulting create or modify.

Closes #2311

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…clared type

declare $X Integer = 'abc', set $X = 'abc' and a return of the wrong type in a
flow with a return type passed check and exec, then failed the build with
CE0117 (CE0844 in Mendix CLI 2). The slot table declared all three with a
ResolveBy that nothing resolved, and checkSlotKind skips those.

The adapter now hands the declared primitive type to the checker as
Context.Target and checkTargetKind applies the predicate already used for call
arguments. Measured on MxBuild 11.16.1 first: 216 microflows (3 positions x 6
types x 12 value shapes), one mx check; all three positions are identical and
equal callArgAccepted. empty into a Boolean (also CE0117) stays silent, as for
a call argument. A computed Decimal into Integer/Long by DECLARE/SET is left to
MDL041.

A sweep of every .mdl in the repo (1649 flows) finds no false positive.

Refs #1258.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
The builder's widget property reads are checked against what each widget
kind accepts, by literal key. The exec refusal now reads its three
expression properties by literal, and a tab page or layout-grid row, which
has a visibility and nothing else, checks only its Visible.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
docs(proposal): mxcli verify — staged gate with baseline comparison
…24rqgv

Batch A: roles in widget visibility, re-runnable menu insert, re-runnable create-or-modify insert
fix(exprcheck): replace() is not a Mendix expression function
feat(check): type-check DECLARE, SET and RETURN values against the declared type
docs(proposal): hedge "no cheaper mx check" claim in diagnostics catalog proposal
A Java action body calling Core.getConfiguration() without its own import
line was written without the import, passed check, exec and docker check
(mx check does not compile Java), and failed the build. The generator now
adds `import com.mendix.core.Core;` when the user or extra code uses Core
and the import list has no Core of its own.

Closes #2310

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
claude and others added 6 commits November 17, 2026 05:07
run restart refused a run with a literal secret using a generic
--db-password hint, so a run started with --constant X=@env:VAR
references (which are recorded and replayed) and one literal value read as
if the references failed. The refusal now lists each flag stored redacted
and says reference values are replayed.

Closes #2313

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
Parallel exec runs on one project wrote over each other: measured with 8
parallel scripts, every process exited 0 and up to 6 of 16 entities were
lost. A script or -c that writes now holds the project's write lock
(.mxcli/write.lock, O_EXCL with a heartbeat, taken over from a dead or
silent holder) for its whole run; a second writer waits up to 60s, then
exits 75 naming the holder. Read-only runs take no lock.

Closes #2326

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
mx update-widgets and rename-design-properties refuse a project of another
version, but fix resolved mx with the version as a preference, so on macOS
an mx on PATH or another Studio Pro ran and failed with "Project is in
different Mendix version". fix now takes an exact-version mx (downloading
it on Linux), and otherwise names the version and the --mx route.

Refs #2321

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011oK82qrr1WnXxq1eRn7qRJ
…24rqgv

Batch B: Java Core import, restart secret refusal, project write lock, fix widgets exact mx
@ako
ako merged commit b7dc2f8 into mendixlabs:main Nov 17, 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.

Drop + create still clears parameter docs and translations Editing a show message in place drops its other translations

2 participants