fix(check): void action calls declare no variable; unknown call parameters not hidden (#953 items 1, 7) - #958
Merged
Merged
Conversation
…race (#951) SaveToFile now writes to a temp file in the cache's directory (VACUUM INTO, manual-copy fallback into the same temp file) and renames it over the cache. buildCatalog and refresh catalog communities no longer remove the cache first. Opening a cache at the current schema version no longer writes to it: a write on a file renamed underneath an open connection fails with SQLITE_READONLY_DBMOVED. File-backed connections get a busy_timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Starlark rule reading a struct field this mxcli does not expose is now reported at info level as "rule <ID> needs a newer mxcli (<detail>)"; other rule failures stay errors. Every rule failure is marked RuleFailure, kept out of BuildReport's score, summary and categories, and listed in its own "Rules That Could Not Run" section (ruleFailures in JSON). A configured rule severity no longer applies to the rule's own failure, and a rule file failing to load on an undefined name hints at a newer mxcli. Part of #952. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sync rules and CLAUDE.md (#952) - init and every sync write .ai-context/mxcli-tooling.json; any -p command warns once on stderr when the binary is provably older (releases by number, nightlies by tag date, mixed by build date, dev builds never). - init --sync-skills (alias --sync) refuses from an older binary instead of downgrading, and now also refreshes the bundled lint rules (by file name; user rules untouched) and the CLAUDE.md/AGENTS.md section between new mxcli:begin/end markers, keeping project notes outside them. - The bootstrap script compares the PATH binary and ./mxcli with the stamp before using them, downloads MXCLI_TAG instead of linking an older binary, and downloads through a temp file so a symlinked ./mxcli is never written through. Binaries <= v0.24.0 cannot read the stamp; the script is their guard. - init and new create mdlsource/ with a README. Closes #952. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docker check ran mx update-widgets on the user's project with only the MPRv2 storage snapshotted, so an MPRv1 .mpr was rewritten permanently, and mx check itself rewrote theme-cache/ and created deployment/sass/ on both formats, with or without --no-update-widgets. Both mx steps now run on a temporary copy (build output, caches and VCS folders skipped), mx output is rewritten to the project's own paths, and the output says that widgets were normalised on a copy and what that hides (#568, #646). docker build keeps its snapshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto itself (#951) Check copies the project's directory, so a missing .mpr (or a path in /tmp) would copy an unrelated directory: fail early instead, and give the existing fake-mx tests a project file of their own. With TMPDIR inside the project the walk met its own copy and recursed until the path was too long; skip it. Trim the custom-widgets skill back under the 700-line limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…MDL063 covers nanoflows Two calls to a void action carrying the same output name (Studio Pro names a JavaScript action's after the action, $RefreshEntity) are accepted by mxbuild 11.13.0, but check reported MDL063 (microflows) or 'already declared in this scope' (nanoflows), and describe called the model invalid. Measured: a void call's output name is inert - a later declare of the name builds clean, a use is CE0109. The return type is resolved from the script or, with -p, the project; an unresolvable action still counts. describe keeps printing the stored `$X =`: Studio Pro stores the name with UseReturnVariable=true, and the bare form would write an empty name. MDL063 now runs for nanoflows too (flow-wide, as measured in mxbuild): a duplicate output across if/else branches passed check and was CE0111. The check-time body validator no longer reports duplicate names for flows - it scoped them per branch and counted void calls; rules keep it. Part of #953 (item 1). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… errors check --references accepted a Java action argument naming no parameter (CE1613 in mxbuild) whenever the script also had a semantic error: the reference tier was skipped, and a flow's body errors were returned instead of its reference errors. Both are now reported. call microflow / call nanoflow arguments are checked against the callee's parameters too (CE1613, measured on 11.13.0), and an action or flow known to take no parameters reports any named argument. Part of #953 (item 7). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…into c23-955 # Conflicts: # CHANGELOG.md
…to c23-958 # Conflicts: # CHANGELOG.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
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.
Part of #953: items 1 and 7. Group "e" handles items 2-6.
Item 1: output names on void action calls
Measured on mxbuild 11.13.0 (JTSBootLogboek copy,
mxcli exec --no-check, thenmxcli docker check):$ReturnValueName = …(microflow)$RefreshEntity = …(nanoflow)$V1 = …, thendeclare $V1 String(microflow and nanoflow)$V3 = …, thenlog … $V3$W = …, then a non-void JS call$W = …So the output name on a void call doesn't declare anything: it can't collide with a later variable, and you can't use it either.
What Studio Pro stores (FeedbackModule, Marketplace-authored,
bson dump): void JS calls appear asOutputVariableName "Variable"/UseReturnVariable false,"Variable"/trueand"ReturnValueName"/true. Exec writes the bare formcall javascript action X(…)as""/false. Dropping$X =from describe would therefore change Studio-authored models on a round trip. Describe keeps printing the stored name. Only the declaration count changes.Changes:
voidCodeActionsresolves a call's return type from the script (create java/javascript action … returns Void), or with-pfrom the project, which is opened lazily. If neither knows the action, the call still counts as a declaration. Guessing void there would hide a real CE0111.ReturnTypefor Void, while the JS reader returnsVoidType. A mock that only had the typed form passed while the real project failed. Both forms are now covered.jt.mdlis now reported. The message names the document kind.validateFlowBody) no longer reports duplicate names for microflows and nanoflows. It scoped them per branch and counted void calls, so it was wrong in both directions. MDL063 now owns that check. Rules keep the old check, since MDL063 doesn't run on them.-- WARNING: duplicate output variable … model is invalidno longer fires for void calls.Item 7:
check --referencesand unknown parameter namesThe Java/JS parameter-name check already existed. The repro (
r1.mdl) hit it only because of two masking points:cmd_checkreturned before the reference tier whenever a semantic rule reported an error. In the repro, MDL063 was a true positive, sinceValidateEmailreturns Boolean.validateWithContextreturned a flow's body errors instead of its reference errors.Both lists are now reported. The catalog-backed tier still waits for a clean script.
There was also a real gap:
call microflow/call nanoflowarguments were never checked against the callee's parameters. Measured CE1613The selected parameter 'M.F.Bogus' no longer existsfor both, including a callee with no parameters. They are now checked against script-created and stored flows. An action or flow known to take no parameters now reports any named argument; previously an empty list meant "unknown".Note: CE1613 hides every other error in the same
mx checkrun, so each fault was measured separately.Test plan
mdl/executor/validate_void_code_calls_test.go(void/non-void controls, nanoflow flow-wide, String contains not a producer, stored return types incl. nil-for-void, body validator handing duplicates to MDL063 with rule control, describe warning)validate_flow_call_params_test.go(flow-call params with controls, body error not hiding reference errors)cmd/mxcli/check_void_calls_test.go: end to end on a PedApp copy. Stored void JS action pair passes; Boolean control fails with MDL063; the r1 shape reports both MDL063 andhas no parameter "email".bugfix_test.goduplicate tests andcmd_microflows_duplicate_output_test.gonow assert MDL063 (the single owner). Removed two tests that asserted per-branch scoping for the body validator; mxbuild contradicts that scoping (CE0111 across branches).go test ./mdl/executor/ ./mdl/linter/... ./cmd/mxcli/,make build,make lint,make check-conformance,make check-findings,make check-skill-mdl,make sync-skillsNF_Ev_RefreshTwice(two void JS) andMF_Ev_VoidTwice(two void Java plus adeclareof the same name):mxcli check -p→Check passed!(it was MDL063 twice)mxcli execapplied both flowsmx check→ the 4 baseline errors only, 0 addeddescribe microflow MF_VoidTwiceno longer prints the "model is invalid" warningb1n.mdlpasses,jt.mdlreports MDL063 (mxbuild CE0111),r1.mdlreports MDL063 plus the CE1613 parameter error,bp2.mdlreports the flow-call paramsFollow-ups (not done here)
checkdoes not flag it yet.ValidateMicroflow/ValidateNanoflowwithout a project resolver, so it still flags void calls to stored actions.🤖 Generated with Claude Code