Repository navigation
Conversation
…ild generates them `create javascript action ... (Url: String, ReadOnly: Boolean)` wrote `export async function JS_Open(Url, ReadOnly)`. mxbuild and Studio Pro regenerate the signature and the JSDoc from the model with the first character of each parameter name lower-cased and keep the body, so after a build the signature read `JS_Open(url, readOnly)` and a body using `Url` threw ReferenceError at run time. check, mx check and the build were all clean. Rewriting a Studio Pro-authored action through MDL did the same in reverse: `Geocode(address, ...)` became `Geocode(Address, ...)` over a body that still read `address`. JavaScriptParameterName lower-cases the first rune only, which is what mxbuild 11.12.5 does (URL -> uRL, MyID -> myID, Some_Name -> some_Name, XMLData -> xMLData, _Lead unchanged). GenerateJavaScriptSource uses it for the signature and the @PARAM tags. The model parameter keeps its declared name, so describe prints it as declared and describe -> exec is stable, and bodies are not rewritten. Tests: the measured table, the generated signature, a rewrite over a Studio Pro-style file, and goldens of what mxbuild left for two actions. A check warning for bodies that use the declared case is a separate change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AI Code ReviewCritical IssuesNone found. Moderate IssuesNone found. Minor IssuesNone found. What Looks Good
RecommendationApprove - The PR correctly fixes the reported issue with appropriate tests, documentation, and follows contribution guidelines. The change is minimal, targeted, and addresses the root cause without introducing side effects. All verification steps pass as evidenced in the PR description. Automated review via OpenRouter (Nemotron Super 120B) — workflow source |
ako
added a commit
to ako/mxcli
that referenced
this pull request
Oct 19, 2026
Integrate wave 1 of the upstream PRs (mendixlabs/mxcli mendixlabs#1574 mendixlabs#1575 mendixlabs#1572 mendixlabs#1570 mendixlabs#1563 mendixlabs#1561 mendixlabs#1568 mendixlabs#1566 #1368), with review follow-ups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QiMsnXa9crge2qnSk9S7Zn
This branch has not been deployed
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 #1560.
What it fixes
mxcli wrote a JavaScript action's
.jssignature and JSDoc@paramnames exactly as declared, for exampleJS_Open(Url, ReadOnly). mxbuild and Studio Pro regenerate the signature with the first character lower-cased,JS_Open(url, readOnly), and keep the body. A body written against whatexecproduced therefore threw aReferenceErrorat runtime, while check, exec and the build all stayed green.The same mismatch broke Studio Pro-authored actions edited through mxcli:
Geocode(address, …)becameGeocode(Address, …)under a body that usesaddress.How
sdk/javaactions/jssource.gogainsJavaScriptParameterName, which lower-cases the first rune and leaves the rest untouched. It is used for the signature and the@paramtags.jssource.gois the only place a JS signature is generated, and nothing parses a signature back.describe javascript action, and the user body are unchanged.create-javascript-action.mdhas a new "Parameter names in the body" section;javascript-actionsskill (with the regenerated skill index) and the syntax entry are updated;findings/sdk/, and the regression scriptmdl-examples/bug-tests/1560-js-action-parameter-case.mdl.Evidence
The rule, measured with mxbuild 11.12.5:
URLuRLMyIDmyIDSome_Namesome_NameAaXMLDataxMLData_Lead_LeadObj2Nameobj2NameEideidIt is encoded as a test table, and the golden files under
sdk/javaactions/testdata/mxbuild/hold what mxbuild left for two mxcli-created actions.Control run:
TestJavaScriptParameterName_MatchesMxbuild,…_ParameterNamesAreLowerFirst,…_SignatureMatchesMxbuild,TestWriteJavaScriptSourceFile_ParametersAreLowerFirstand…_RewriteKeepsStudioProSignature. They all pass with the fix.TestCreateJavaScriptAction_ModelKeepsDeclaredParameterCasepasses both ways on purpose: it pins the model names.Real run (Mendix 11.12.5 scratch app):
JS_Open(Url, ReadOnly), and mxbuild then rewrites every name.JS_Open(url, readOnly);@paramnames are unchanged, forJS_Openand for an 8-name action;ReferenceError: uRL is not defined, and as this branch writes it, it returns its value.NanoflowCommons.Geocode, describe → edit → exec:Geocode(Address, GeocodingProvider, ProviderApiKey);Geocode(address, geocodingProvider, providerApiKey);Round trip:
go test -tags integration ./mdl/roundtrip -run 'TestPedAppRoundTrip$/^javascript_action'passes 67 of 67.Windows: the only failures in the touched packages are the pre-existing TempDir-lock ones, identical on
main.Linux (
golang:1.26.6-bookworm, ANTLR 4.13.2):make grammar build test check-mdl check-findings check-conformance check-migration-reference lint-goall pass.Follow-ups (not in this PR)
mxbuild also refuses two things that
checkandexecdon't catch:ID,NeworDefault;Urlandurl).A
checkwarning for a body that uses a parameter in its declared case would also help. I can open these separately.🤖 Generated with Claude Code