fix: address PR #28 review follow-ups - #48
Merged
Merged
Conversation
Load mermaid v11 from CDN and render ```mermaid code blocks client-side. No build dependency needed — works with existing CI workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix gallery .mxcli/widgets/gallery.def.json: FILTERSPLACEHOLDER → FILTER to match embedded def and DESCRIBE output - Fix gallery .mxcli/widgets/gallery.def.json: add missing "default": "Single" for itemSelection to match embedded def - Fix cmd_widget.go: log LoadUserDefinitions errors instead of swallowing - Fix lsp_completion.go: log LoadUserDefinitions errors instead of swallowing - Translate Chinese headers in design doc to English - Fix FILTERSPLACEHOLDER → FILTER in design doc examples Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ako
added a commit
that referenced
this pull request
Jul 27, 2026
ako
pushed a commit
that referenced
this pull request
Jul 29, 2026
Ledger finding #48 reported "association navigation must be the whole RHS or it fails CE0117". Verification against mx check (11.12.1, ~15 isolation cases) disproved that rule — `'x' + $obj/Assoc/Attr`, `toString(..) + $obj/Assoc/Attr`, and a bare `set $x = $obj/Assoc/Attr` all build clean. The real trigger is narrower: a RENDER function (formatDateTime/formatDecimal/…) that takes, or co-occurs with, an association-navigated value: formatDateTime($obj/Mod.Assoc/Date, 'd MMM') -> CE0117 formatDateTime($obj/Date, 'd MMM') + $obj/Mod.Assoc/Name -> CE0117 while `formatDateTime($obj/Date, …)` (plain member access) is fine. MDL050 flags a set/declare/return value that contains BOTH a `format*`-family call AND an AttributePathExpr with a module-qualified (association) segment. The curated function set (formatDateTime/DateTimeUTC/Decimal/Float/Boolean) means no false positives — toString/length + assoc-nav build clean and are not flagged; an untested render fn is a conservative miss. Fix: materialize the associated value into a variable first. `make check-mdl` shows no existing example regressed. Test: TestValidateMicroflow_FormatWithAssociation. Repro: ledger-48-format-with-association.fail.mdl. Symptom table records the corrected rule + the lesson (reproduce the passing neighbours, not just the failing case). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
ako
pushed a commit
that referenced
this pull request
Jul 29, 2026
…edger #48 root cause) `$T/Mod.Assoc/Attr` in a microflow expression (Change Variable, if-condition, return) passed mxcli check but mx check rejected it with CE0117. Mendix expression syntax needs the target-entity step in the path (`$T/Mod.Assoc/Mod.Entity/Attr`), which the builder inserts via resolveAssociationPaths — but two bugs skipped that insertion: 1. shouldPreserveExpressionSource treated a `.` preceded by a digit as a decimal literal, so a module/entity name ending in a digit (`L48.`, `Account2.` — very common) froze the whole expression's source and bypassed association resolution, writing `$T/L48.Assoc/Attr` with no entity step. 2. A legitimately source-frozen expression (a real decimal literal or preserved whitespace) also bypassed resolution, so an association nav co-occurring with a decimal (`$T/Mod.Assoc/Bal + 2.0`) broke even for non-digit modules. Fixes: 1. A `.` is a decimal point only when its adjacent digit run is a standalone number — not when the preceding token contains a letter or underscore (a qualified-name segment). New dotIsQualifiedNameSeparator distinguishes `L48.Transaction` (name) from `2.0` (decimal). 2. For a source-preserved expression, rewrite association paths inside the raw source: for each AttributePathExpr, compare its rendered form before and after resolution and ReplaceAll in the source when they differ. This keeps decimal/whitespace fidelity while inserting the entity step. Verified with mx check on Mendix 11.12.1: 0 errors for plain attribute-over-association navigation, an if-then-else enum comparison over an association, and an association nav mixed with a decimal literal — all previously CE0117. Example: mdl-examples/bug-tests/ledger-48-assoc-nav-digit-module.mdl. Test: TestShouldPreserveExpressionSource_Decimals extended with digit-ending qualified-name cases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
ako
pushed a commit
that referenced
this pull request
Jul 29, 2026
MDL050 flagged expressions combining a format function with an association navigation (e.g. formatDateTime($obj/Mod.Assoc/Date, …)) as CE0117. Once the real #48 root cause was fixed — association navigation dropped its target-entity step — re-verification against mx check on 11.12.1 showed the rule's premise was wrong on both of its cases: - formatDateTime($obj/Assoc/Date, …) now builds CLEAN (it only failed because the entity step was missing, which affected ALL association navigation, not just inside format calls). MDL050 was rejecting valid code. - formatDecimal($x, 2) fails CE0117 even on a PLAIN local decimal with no association — a formatDecimal-signature bug, unrelated to associations. So the "format-function + association" correlation was an artifact of two independent bugs, neither about format functions. Removed the check, its call sites, its test, and its bug-test. The remaining real issue — formatDecimal($x, precision) failing CE0117 regardless of associations — is a separate open finding (likely a wrong function signature/arity) to investigate and fix in the executor or the function-name checker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
ako
pushed a commit
that referenced
this pull request
Jul 30, 2026
…ll gaps (FINDINGS #42/#36/#23/#48/#47) - #42 DESCRIBE WORKFLOW dropped the `with (...)` param mappings: the modelsdk read path built a CallMicroflowTask with only Microflow+Outcomes and never populated ParameterMappings, so describe→drop→exec silently lost the mapping (which nothing then reports). Added microflowParamMappingsFromGen and wired it into both the CallMicroflowTask and CallMicroflowActivity read cases; the legacy sdk/mpr parser already read them. Round-trip test added; verified `describe workflow` now emits `call microflow M.ACT_Do with (Item = '$workflowContext')`. - #36 SEC005 lint suggested `ALTER PROJECT SECURITY STRICT MODE ON`, a statement the parser doesn't implement. Strict mode is Studio Pro-only — the suggestion now says so instead of naming an unrunnable command. - #23 documented `create or modify association` (the idempotent form) in the domain-model skill: plain `create association` is not idempotent and its failure aborts the rest of the script. - #48 documented `set task outcome $Task '<Outcome>'` (there is no `complete task`) and the other workflow task statements in write-workflows. - #47 documented that System-module enumerations are read from the runtime, not the .mpr, so mxcli can't resolve them — constrain on an attribute instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.mxcli/widgets/gallery.def.jsonto match embedded definition:FILTERSPLACEHOLDER→FILTER, add missing"default": "Single"for itemSelectionLoadUserDefinitionserrors incmd_widget.goandlsp_completion.goinstead of silently swallowingTest plan
make build— compiles cleanmake test— all tests pass🤖 Generated with Claude Code