Skip to content

docs(wiki): digest mdl/visitor — two new pages and the first re-sync - #360

Merged
ako merged 1 commit into
docs/bug-patterns-grammarfrom
docs/bug-patterns-visitor
Sep 1, 2026
Merged

docs(wiki): digest mdl/visitor — two new pages and the first re-sync#360
ako merged 1 commit into
docs/bug-patterns-grammarfrom
docs/bug-patterns-visitor

Conversation

@ako

@ako ako commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Stacked on #359. The whole chain — #356#357#358#359 → this — is still open against a main that has moved on; they want landing in order.

27 of the 28 mdl/visitor findings (96%). Two new pages, and one re-sync — the first any wiki page has had since the initial synthesis on 2026-05-24, which was the point of building the trigger.

page findings
expression-translation-drift 13 new
misleading-diagnostics 6 new
visitor-wiring-gaps re-synced

expression-translation-drift

Deliberately kept distinct from platform-semantics-gaps. There, the MDL is illegal Mendix. Here the MDL is correct, the emitted Mendix expression is well-formed, and it says something else.

The worst instance is the quietest: an additive chain rebuilt with its operators reordered, so a microflow computed a different number than its source saidmxcli check, mx check and the build all green, and the corruption in the stored document rather than in the description. Nothing downstream can catch it, because the output is a valid expression; strings on the .mxunit is what showed the swap.

Three ways meaning is lost — a literal changes type, an operator changes (/ is division in most languages and member navigation in Mendix), a function resolves to the wrong overload (contains/find exist as both string functions and list operations). Plus the ANTLR trap behind the standard fix: GetText() excludes hidden tokens and a source-interval slice includes them, so preserving raw source inherits every comment in that span — which is how a -- comment ended up inside a Mendix expression.

misleading-diagnostics

Graded above "the message could be clearer", because a missing hint costs a minute and a wrong one costs however long the reader spends acting on it. In the reported cases they blamed their quoting, renamed an attribute that was fine, or concluded a construct was unsupported.

A hint's precision matters more than its coverage: the "unescaped apostrophe" hint matched any short lowercase word, so it fired on every genuine parse error at on, in, as, to, by. And key the hint off the source line, not the parser message — a misplaced index clause errors on the index name, so the message never contains the word index and no message-matching hint can fire.

The re-sync

visitor-wiring-gaps described one size of gap. The findings show three:

  • a field — the original case, a doc comment or an OR REPLACE flag lost;
  • a structureELSIF arms dropped, because Mendix has no native elsif and each arm must be lowered into a nested if;
  • a whole statement — one that parses, exits 0, prints nothing and dispatches to nothing. It presents as an empty result ("this page has no content") rather than as a missing feature, which is exactly what lets it survive.

Also added: the neighbouring failure where a field is wired to the wrong thing — a delete-behaviour keyword storing a different behaviour, a dollar-quoted SQL body overwritten by a parameter default. Those report success and change the model's meaning, where an unwired field merely loses it.

sources: narrowed from the findings directory to the specific shard, last-synced refreshed, wiki-links normalised.

The digest, complete for the five largest areas

area findings covered
mdl/executor 248 83%
cmd/mxcli 95 92%
mdl/backend 83 99%
mdl/grammar 53 92%
mdl/visitor 28 96%

25 pattern pages, up from 3. Every sources: path and every [[wiki-link]] across all of them verified to resolve.

🤖 Generated with Claude Code

27 of the 28 mdl/visitor findings (96%). Two pages are new and one is a
re-sync — the first any page has had since the initial synthesis on
2026-05-24.

- expression-translation-drift (13). Deliberately distinct from
  platform-semantics-gaps: there the MDL is illegal Mendix, here the MDL
  is correct, the emitted Mendix expression is well-formed, and it says
  something else. The worst instance is the quietest — an additive chain
  rebuilt with its operators reordered, so a microflow computed a
  different number than its source said with mxcli check, mx check and
  the build all green, and the corruption in the stored document rather
  than in DESCRIBE.

  Three ways meaning is lost (a literal changes type, an operator
  changes, a function resolves to the wrong overload), plus the ANTLR
  trap behind the standard fix: GetText() excludes hidden tokens and a
  source-interval slice includes them, so preserving raw source inherits
  every comment in that span.

- misleading-diagnostics (6). Graded above "the message could be
  clearer" because a wrong hint costs however long the reader spends
  acting on it: they blamed their quoting, renamed an attribute that was
  fine, or concluded a construct was unsupported. A hint's precision
  matters more than its coverage — the "unescaped apostrophe" hint
  matched any short lowercase word and so fired on every genuine error
  at `on`, `in`, `as`, `to`, `by`.

- visitor-wiring-gaps — RE-SYNCED. It described one size of gap (a
  field); the findings show three. A field, a structure (ELSIF arms,
  which Mendix has no native form for and which must be lowered into
  nested ifs), and a whole statement that parses, exits 0 and dispatches
  to nothing — the last presenting as an empty result rather than a
  missing feature, which is what lets it survive. Added the neighbouring
  failure where a field is wired to the WRONG thing, which reports
  success and changes meaning rather than losing it.

Every sources: path and every [[wiki-link]] across all 25 pages verified
to resolve.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ako
ako merged commit 40f5699 into docs/bug-patterns-grammar Sep 1, 2026
7 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.

1 participant