Fix the 10.24 nightly: version-gate DecimalScale, and guard the doctype corpus against mis-gating - #187
Merged
Merged
Conversation
The nightly failed on the Mendix 10.24 matrix entry, on both engines, in TestMxCheck_DoctypeScripts: Execution error: this project does not store the model setting DecimalScale 14-project-settings-examples.mdl set it unconditionally. Measured against a blank project of each version: 10.24 stores 11 model settings, 11.6.6 stores 12, and DecimalScale is the only difference. Executing the other five settings from that statement one at a time on 10.24, each is accepted -- so DecimalScale alone is at fault, and because the refusal covers the WHOLE statement it took five portable settings down with it. mxcli's refusal is correct and is not changed here: Studio Pro will not open a model carrying a property its version does not define, and mxbuild does not catch it. The example was simply not version-gated, despite its own comment three lines above explaining that which settings a project stores depends on its version. Also adds TestDoctypeScriptsParseAfterVersionFiltering, which filters every doctype script for each version in the nightly matrix and asserts the result still parses. It needs no mxbuild, so a mis-gated script fails in seconds on push instead of hours later in one nightly job. Writing that guard found the trap that makes this easy to get wrong, and the first attempt at this fix walked straight into it: a `/** */` block is a DOCUMENTATION comment bound to the statement after it. Gating the statement while leaving its doc comment outside the section orphans the comment, and the script dies with "no viable alternative at input '/**...'" -- reported at the NEXT statement, tens of lines further down, so it reads like an unrelated syntax error in code nobody touched. The comment now sits inside the gated section; `--` line comments are free-standing and safe either side. Verified: the full doctype suite (59 scripts, both engines) passes on 10.24, where it failed before; the changed script passes on 10.24, 11.6.6 and 11.13.0; the control -- the pre-fix file -- still reproduces the reported error on 10.24; and the new guard, with the doc comment moved back outside the gate, fails on exactly the 10.24 entry and passes once restored. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013uQvFDd5R4eNqqita59jM8
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.
Fixes the Mendix 10.24 nightly, which failed on that matrix entry on both engines while passing on every 11.x:
What was wrong — and what wasn't
14-project-settings-examples.mdlsetDecimalScaleunconditionally. Measured against blank projects of each version:DecimalScaleIt is the only difference between the two. I executed the other five settings from that statement one at a time against a real 10.24 project — every one is accepted, so
DecimalScalealone is at fault.mxcli's refusal is correct and is unchanged here. Studio Pro will not open a model carrying a property its version does not define, and mxbuild does not catch it. The bug is the ungated example — which is mildly embarrassing, because its own comment three lines above says "Which of these a project stores depends on its Mendix version… An alter naming one this project does not store is refused rather than introducing it."
Splitting it out is required, not cosmetic: the refusal covers the whole statement, so one unsupported setting was taking five portable ones down with it.
The trap, which is now the more valuable half of this PR
My first attempt gated the statement but left its
/** */comment above the directive. That made things worse — the script stopped parsing entirely, and the error was reported at the next statement, 16 lines further down:which reads like an unrelated syntax error in code nobody touched. Cause: a
/** */block is a documentation comment bound to the statement that follows it. Gate the statement, leave the comment outside the section, and the comment is orphaned:--line comments are free-standing and safe either side of the directive. The doc comment now sits inside the gated section, and the file says why.New guard
TestDoctypeScriptsParseAfterVersionFilteringfilters all 56 doctype scripts for each of the four versions innightly.ymland asserts the result still parses. It needs no mxbuild, so a mis-gated script fails in seconds on push instead of hours later in a single nightly job — which is how this one was found.It caught the
.test.mdlspec files on its first run (microflow test specs with@test/@expect, a different format that does not parse as MDL even unfiltered); they are excluded, matching whatTestMxCheck_DoctypeScriptsalready does.Verification
does not store the model setting DecimalScaleon 10.24.gofmt -lclean.Caveat on the gate
11.0+is chosen becauseDecimalScaleis absent on 10.24 and present on 11.6.6 — I could not pin the exact 11.x minor it arrived in (the mxbuild 11.0 download produced nothing). That is conservative and correct for every version in the matrix; it would only matter if an 11.0–11.5 entry were added later.Not in this PR
TestWatcherDebounceis still flaky. It also failed in my local full-repo run — "expected 1 debounced message, got 2" — and reproduces only under full-repo load (passes 20/20 alone, 24/24 at package level, 10/10 under CPU saturation). The debounce logic is fine; the test asserts an exact count over an unbounded burst and sleeps 700 ms for a 500 ms window. It already carries a comment saying it was hardened once by tightening the burst, and it still flakes, so the wall-clock dependence needs removing rather than the constant retuning. Left out deliberately to keep this PR to one concern.cmd/mxcli/changelog.md, which is gitignored and generated from rootCHANGELOG.md. This PR's entry went into the correct file; the backfill is separate.Generated by Claude Code