Skip to content

Sync ako/mxcli: test --attach on 11.14.0 explains its refusal; brain list - #1747

Merged
ako merged 13 commits into
mendixlabs:mainfrom
ako:main
Nov 4, 2026
Merged

ako merged 13 commits into
mendixlabs:mainfrom
ako:main

Conversation

@ako

@ako ako commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Syncs ako/mxcli:main into upstream: 2 commits since #1741.

mxcli test --attach on Mendix 11.14.0

mxcli test --attach on 11.14.0 exited 1 with "this change needs a runtime restart (an entity or association changed)" although it only added a test microflow.

Measured over mxbuild's /build API: on 11.14.0 every later build in a serve process fails, even for an unchanged model (Cannot find module .../web/rollup.config.mjs), so the attach falls back to a fresh serve process, whose cold build asks for a restart whatever changed. 11.15.0 builds incrementally and answers correctly. Before the #1723 fix the same attach failed on the build itself, so it never worked on 11.14.0.

A fresh process's answer is now marked as a cold restart, and the attach's refusal says that, pointing to --local (restarting the dev loop would leave the next attach in the same place). The integration test expects that refusal on 11.14.x, still checks the pages answer 200, and fails when an 11.14 mxbuild builds incrementally again.

brain

  • brain list [--slice <s>] [--kind decision|requirement] [--open] lists the committed store as data: with --json, the same entry objects staged --json returns plus their shard, under entries, with count and malformed. Before, the promoted side had only brief --json, rendered markdown.
  • kind is always explicit, in list and in staged --json. An unreadable block is reported under malformed, never dropped; an unknown kind, or --slice with --kind decision, is refused rather than matching nothing

claude and others added 13 commits November 4, 2026 16:00
`staged --json` returned entry objects, but the promoted side had only
`brief --json`, which returns each shard's rendered markdown: right for
a prompt, wrong for a UI, which then has to parse a format mxcli owns.

- `brain list [--slice <s>] [--kind decision|requirement] [--open]`
  lists committed entries in store order. With --json each is the
  object `staged --json` returns plus its shard, under "entries", with
  "count" and "malformed". --open=false keeps only settled entries.
- Blocks whose metadata line cannot be read are reported under
  "malformed" for the shards the filter covers, never dropped.
- `kind` is always explicit, in `list` and now in `staged --json` too:
  a consumer must not have to know that an empty kind means a decision
  (and without it, --kind decision would match nothing).
- --slice with --kind decision, and an unknown kind, are refused rather
  than matching nothing. No model is needed; no store lists nothing.

Fixes #1952

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82sxYNXAhaYkijzRwae
… entity changed"

The nightly went red on the 11.14.0 leg only, in
TestTestAttach_KeepsTheHostingAppsPageBundles (added by #1917):
`mxcli test --attach` exited 1 with "this change needs a runtime restart
(an entity or association changed)" although it only added a test microflow.

Measured over mxbuild's /build API with no watch loop: on 11.14.0 every
later build in a serve process fails, even for an unchanged model
(Cannot find module .../web/rollup.config.mjs), and the failed response has
no restartRequired key at all. 11.15.0 builds them (false for an unchanged
model and for a microflow, true for an entity), which is the 11.12.5 shape
#1917 already recovers. So on 11.14.0 the attach falls back to a fresh serve
process, whose cold build asks for a restart whatever changed, and the
attach read that as a structural change. Before #1917 the same attach failed
on the build itself, so it never worked on 11.14.0.

serveRecovery now marks a fresh process's answer BuildResult.ColdRestart
(rebuildFresh, and the build after a failed restart) and clears it where it
takes the incremental build's answer instead. The attach's refusal names
the cold answer for what it is and points to --local, since restarting the
dev loop leaves the next attach in the same place. The integration test
expects that refusal on 11.14.x (and still checks the pages answer 200),
and fails when an 11.14 mxbuild builds incrementally again.

Controls: the old test fails on 11.14.0 with the nightly's exact message;
the new test passes on 11.15.0; stubbing the ColdRestart mark fails the
unit tests that pin it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GeAhBjRBm5vN2ik3ddvVWW
…in (#1928)

With a live and an excluded microflow of one name, check --references
validated a call against the excluded twin's parameters and refused a
correct call. The validators index stored documents by name in maps, so
the twin listed last won. Each index now iterates live first and keeps
the first entry: flow signatures, microflow return types, page parameter
names and entities, the workflow call parameter map, and the OData
microflow index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tQYYsMeM1r2ihkNch
A run that failed on a reference error ended with "0 issues: 0 errors",
because the reference tier printed its errors and warnings itself and the
summary counts what the other tiers pass to report. They now join the
total.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tQYYsMeM1r2ihkNch
…rops (#1940)

A show page passing a parameter that an earlier alter page ... add
parameters in the same script declared was refused by check --references
and by exec's pre-flight, because the argument check read the page as
stored. The pre-pass now records each alter page's add/drop parameter
operations and applies them over the stored or script-declared list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tQYYsMeM1r2ihkNch
…numeration (#1821)

check --references resolved the target document of alter entity and
alter page only; drop, rename and move of a document that does not
exist, and alter enumeration / alter microflow / alter nanoflow on one,
passed check and were refused by exec. Every form now resolves its
target against the same listings, reporting the near names the module
has. A name an earlier statement provides is not refused: drop if
exists, a create, rename or move earlier in the script, a renamed
module, and modules an execute script, generated connector, business
event service or external-entities import fills without naming.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tQYYsMeM1r2ihkNch
brain: list the committed store as data
…555)

An input widget's Attribute, or a ContentParams / CaptionParams binding,
naming an attribute the data container's entity does not have passed
check --references; exec wrote it and mxbuild refused it with CE1613
(3 of 3 on a fresh 11.12.6 app, control page clean). The scope walk
now reports it, listing the entity's attributes. Unresolved contexts,
altered entities, expressions, $var paths and audit members are not
judged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tQYYsMeM1r2ihkNch
…5joqyu

fix(test): --attach on Mendix 11.14.0 says why it is refused, not "an entity changed"
The nightly's 11.12.2 leg failed in setup, not in what it tests:
TestCreateMicroflow_NotesRefusedOnFullConstructor (mdl/backend/mcp) with
"copy fixture: open .mxcli/cache/unit-contents.db-journal: no such file or
directory". The same commit passed on every other leg.

Since the unit-contents store (#1804) a reader writes
.mxcli/cache/unit-contents.db next to the project it opens, and tests that
open testdata/expr-checker, testdata/pedapp or the v1-project fixture in
place write it into the checked-in fixture, its SQLite journal coming and
going with each write. go test runs packages in parallel, so another
package's whole-directory copy listed the journal and then could not open
it. Nothing under a fixture's .mxcli is tracked.

testutil.CopyFixture is os.CopyFS over a view that hides every .mxcli, so a
copy holds what the fixture commits, as a fresh checkout does. Every
whole-fixture os.CopyFS in tests (25) uses it, and so do cmd/mxcli's copyTree
and copyFixtureTree. Copies of mprcontents alone are unchanged.

Control: an fs.FS whose listing names a journal that Open reports missing
makes plain os.CopyFS fail with the nightly's error; CopyFixture copies it,
and fails the same way with its filter stubbed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GeAhBjRBm5vN2ik3ddvVWW
…5joqyu

test: fixture copies leave out the .mxcli caches tests write in place
@ako
ako merged commit f3c4d53 into mendixlabs:main Nov 4, 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.

2 participants