Repository navigation
fix: silent-property-drop cluster — loop @curve, alter annotations, Java action descriptions - #1522
Merged
Merged
Conversation
A `@curve` on a statement inside a `loop` or `while` body passed check and exec and was not stored; `describe` printed the body without it, while the same annotation after the loop was kept. The body is built by its own flowBuilder, which recorded the curve, and the loop hoisted that builder's flows to the parent without the curves that belong on them. applyFlowCurves runs once, on the builder that owns the flows, so the body's curves were never applied. The error-handler builder had the same merge (#991); it is now one helper, adoptCurves, which the loop, while and error-handler merges all call. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HjYj5GTj2in3ckFYaDBAuN
…#1597) `@annotation('Why this commit is here.')` in an `alter microflow … insert` fragment passed check and exec ("Altered microflow") and no note was written; the same line in `create or modify microflow` is refused as MDL079. The annotation rules — MDL059, MDL060, MDL079, MDL092 — ran over create bodies only. A fragment is built by the same flowBuilder, which drops an annotation the visitor could not read, so all four reached the builder unchecked in an alter. check now runs them over every insert and replace fragment, and execAlterFlow refuses the exec-enforced subset as create does, for `-c` and the REPL, which skip the check preflight. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HjYj5GTj2in3ckFYaDBAuN
…ame (mendixlabs#1588) `create java action` had no way to set a parameter's description or the return value's name. `describe` printed both as `--` comments (`Input: String not null -- The text to convert.`, `-- return NAME: 'UpperText'`), which read like syntax: written in a script they passed check and exec and were dropped, leaving the description empty and the return name `ReturnValueName`. Both now use the spelling the language already has for the same thing elsewhere: - a `/** … */` doc comment before a parameter is its description, as on an entity attribute; - `returns T as $Name` names the return value, as on a microflow. Java and JavaScript actions share these grammar rules, so both visitors read them through one helper and both describers print them through one emitter; describe output now re-executes as "Unchanged". On `create or modify` an omitted description or name still keeps what is stored. A multi-line description, of which the `--` form printed only the first line, now round-trips whole; one holding `*/`, which a doc comment cannot carry, is still shown as a comment so the output parses. Refs #1496 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HjYj5GTj2in3ckFYaDBAuN
govulncheck flagged GO-2026-6809 (distrust compromised intermediate certificates in crypto/x509), present in crypto/x509@go1.27.2 and fixed in go1.27.3. mxcli reaches the vulnerable code through marketplace.Client.Download (io.Copy over TLS). This is a new advisory against the standard library: build-and-test is red on main for the same reason. Bump the toolchain in go.mod and the go-version in every workflow, so CI installs the fixed standard library. Locally, govulncheck ./... reports GO-2026-6809 on go1.27.2 (exit 3) and "No vulnerabilities found" on go1.27.3. make build, make test and make vet pass on go1.27.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeAyg3qx2my26Q8cvGyW5z (cherry picked from commit 21be71b)
Owner
Author
|
Fix ported: I cherry-picked the toolchain-bump commit from #1520 (21be71b, "ci(deps): bump Go toolchain 1.27.2 → 1.27.3 for GO-2026-6809") as e9bfd00, and nothing else from that PR. Once #1520 merges, this commit is a no-op against Verified locally:
Generated by Claude Code |
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.
Closes #1496, closes #1507. Triage cluster
silent-property-drop(#1357). Mirrors of mendixlabs#1588 and mendixlabs#1597.The other two issues in the cluster are already fixed on
main, so this PR leaves them alone:1307-actionbutton-tooltip.mdl. The reporter's script now stores the tooltip,describeprints it, andalter … set (Tooltip: …)works. Re-run on a fresh 11.12.5 app.localized, An existing DateTime attribute cannot be switched to localized by create or modify entity or alter entity mendixlabs/mxcli#1521): fixed by a540ed2 (fix(executor): say when an unstated DateTime keeps its storednot localized(mendixlabs/mxcli#1521) #1428). Keeping the stored flag is deliberate, now printed as a note and documented inalter-entity.md.Each commit fixes one thing.
1.
@curveinside aloop/whilebody was dropped — mendixlabs#1597 case ASymptom.
@curve(from: (39, 0), to: (0, 61))on a statement inside a loop body passedcheckandexec, butdescribeprinted the body without it. The same annotation after the loop was kept.Cause. A loop body is built by its own
flowBuilder, which records the curve.addLoopStatementandaddWhileStatementhand that builder's flows, notes and errors back to the main builder, but not its curves. Curves are applied once, by the builder that ends up owning the flows, so the body's curves were never applied. #991 fixed exactly this for error-handler bodies, but only at that one place.Fix. A new helper,
adoptCurves, now called by the loop, while and error-handler merges alike.2. Alter fragments skipped the annotation checks — mendixlabs#1597 case B
Symptom.
@annotation('Why this commit is here.')inalter microflow … insertpassedcheckandexec("Altered microflow"), and no note was written.create or modifyrefuses the same line as MDL079.Cause. The annotation rules ran on
createbodies only.ValidateProgramhad noAlterFlowStmtcase andexecAlterFlowvalidated nothing, while the fragment goes through the same builder, which drops what the visitor could not read. All four rules had the hole: I checked@postion(10, 20),@curve(from: (a, b))and@anchor(from: sideways)in a fragment too, and each passed silently.Fix.
ValidateAlterFlowruns MDL059, MDL060, MDL079 and MDL092 over every insert and replace fragment.execAlterFlowrefuses the subsetexecalready enforces forcreate.3. Java action parameter descriptions and return value name — mendixlabs#1588
Symptom.
create java actionhad no way to set a parameter's description or the return value's name.describeprinted both as--comments (Input: String not null -- The text to convert.,-- return NAME: 'UpperText'). In a script those passedcheckandexecand were dropped, leaving the description empty and the return nameReturnValueName.Fix. Both now use the spelling the language already has for the same thing, which were also the first two spellings the reporter tried:
/** … */before a parameter is its description, as on an entity attribute.returns T as $Namenames the return value, as on a microflow.Details:
buildJavaActionParams/buildJavaActionReturn) and both describers print through one emitter. Otherwise a field read by only one of them would be a new silent drop in the other.create or modify, an omitted description or name still keeps what is stored (carriedDocumentation).--form cut to its first line, now round-trips whole.*/can't go in a doc comment, so it is still printed as a comment. The output parses, and a rewrite keeps the stored description.Evidence
Tests written first, run before each fix. Each failed with the reported symptom:
In-test controls.
TestValidateProgram_AlterFlowFragmentValidNotesStayCleanpassed before and after:@annotation 'x'and@annotation(text: 'x')are not refused.Fresh Mendix 11.12.5 app, pre-fix binary vs fixed binary:
1597-curve-inside-loop-body.mdldescribeshows no@curveinside either bodymx check: 0 errors1597-alter-annotation-positional.fail.mdlCheck passed!execof the file refuses-c "alter … @postion(10, 20) …"Altered microflow[MDL059] unknown annotation1597-alter-annotation-forms.mdl1588-java-action-param-description-return-name.mdl/**bson dump:Description: "The text to convert.",ActionDefaultReturnName: "UpperText";describe→execreports Unchanged;mx check: 0 errorsmake build,make test,make lint,make check-mdl,make check-findings,make check-skill-mdlandmake check-skill-indexpass locally. The branch merges cleanly with the currentmain.Not covered
MDL079 is not among the rules
execenforces, forcreateor foralter. Soexecwithout the check pre-check (-c, the REPL,--no-check) still writes past an unreadable@annotation. Runningexecon a file is covered, because it runscheckfirst. Fixing it changescreatetoo, so it's left for a follow-up.Bookkeeping
Three finding files under
.claude/skills/fix-issue/findings/(mdl-executor×2,mdl-grammar×1), and four bug-test scripts undermdl-examples/bug-tests/.Generated by Claude Code