Skip to content

Sync ako/mxcli: codec writes Integers as int64 like Studio Pro (#675), template brace and regex checks (#1515), SEC011 widget names - #1719

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

ako merged 4 commits into
mendixlabs:mainfrom
ako:main

Conversation

@ako

@ako ako commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Syncs ako/mxcli:main into upstream: 4 commits from fork PRs ako#1884, ako#1885 and ako#1892.

Fixes #675. Refs #1515.

The codec writes Integer properties as int64, as Studio Pro does (#675)

The problem: every Integer property the codec wrote came out as BSON int32, where Studio Pro stores int64. That covered:

  • canvas and popup dimensions;
  • flow connection indices;
  • TabIndex;
  • layout-grid weights;
  • DecimalPrecision;
  • glyph codes;
  • mapping MinOccurs;
  • workflow thresholds.

On one page, CREATE (int32) and ALTER's page-level SET (int64) disagreed. mx check passes either way. But a title-only edit of a Studio Pro page narrowed all 154 of its integers to int32, so every real edit came with a whole-document width diff.

The fix: Primitive.BSONValue widens int32 to int64. The Go-facing type stays int32, and reads already accepted every width.

Measured, not assumed:

  • A census of 15,354 Studio Pro-authored units, from Mendix 10.6.4 to 11.13.0, holds 208,038 integer values. Every one is int64, and none is int32.
  • So the change needs no exception list.

check: expressions the build or runtime reject (part of #1515)

  • Template brace grammar, MDL-TEMPLATE02. log info node 'Mod' 'Item {number} not found'; and a REST Body: template '{}' passed check, then failed mx check with CE0712. Four of mxcli's own docs taught a failing JSON body.
    • The grammar was measured with mx check -j on 60 inputs in up to 12 slots, on 10.24, 11.13 and 11.15. The results were identical across versions, covering CE0712, CE0713, CE0714, CE0716, CE0717 and CE0720.
    • The new mdl/texttemplate package implements that grammar. It reports mxbuild's own code and wording, and check and the flow builders share it.
    • It replaces the placeholder regexps in MDL-WF21 and MDL-WIDGET04. Those never saw a malformed brace, and they wrongly counted the escaped {{1}}.
    • It now covers the microflow templates too: log, show message, validation feedback, send email, REST URL and body, and Java action text templates.
  • New warning MDL-REGEX01: a replaceAll, replaceFirst or isMatch pattern ending in a lone backslash. It builds with 0 errors, then fails on every call with PatternSyntaxException.
    • This was measured against the runtime's own StringFunctions from the 10.24, 11.13 and 11.15 jars.
    • Only the pattern is a regex. The replacement is literal text on both the server and the client, so there is no warning on it.
  • Already refused on main: item 1 of check passes expressions the build rejects or that misbehave at runtime (function arguments, Decimal toString, raw backslash literals) #1515, formatDecimal's argument kind.
  • Documented, not checked: item 2, toString(Decimal) into a bounded String attribute, because nothing enforces attribute lengths at check time.

Lint

  • SEC011 names the widget its XPath row records. It used to guess "the only data widget over the entity on the page", so a page with two grids over one entity was reported only as "A data source on page …"

ako and others added 4 commits November 2, 2026 11:47
x/net v0.60.0 is flagged for CVE-2026-97045 (GO-2026-6866) and
CVE-2026-78661 (GO-2026-6860), both in x/net/html, which mxcli does not
link. Scanners still flag them from the release binary's module list.
x/net v0.62.0 also requires x/crypto v0.58.0, x/sys v0.49.0,
x/text v0.43.0, x/sync v0.24.0 and x/term v0.47.0.

govulncheck ./... (Go 1.27.3) after the bump: nothing called; one
module-level entry, GO-2026-5932 (x/crypto/openpgp, no fix), not imported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
integration-passed used `if: always()`, which runs even when the workflow
is cancelled. Since #1891 a new push cancels the PR's superseded run, but
that run could not end until this job got a runner, and the concurrency
group held the replacement run pending meanwhile: ~5 min on PR #1885
(run 41406249166).

`!cancelled()` keeps the gate non-vacuous (it still runs and fails when a
suite failed or was skipped) and skips it only on cancellation.

Refs #1886

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82simPxcdrRu9PUSPcQ
ci: skip the integration gate when its run is cancelled
chore(deps): bump golang.org/x/net to v0.62.0 for CVE-2026-97045
@ako
ako merged commit 26aa130 into mendixlabs:main Nov 2, 2026
13 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.

modelsdk codec writes Integer fields (canvas/popup dimensions) as BSON int32, not int64

2 participants