Repository navigation
Fix #982: locale-independent JSON numbers in Vega skill; oql/log read run --local admin port - #983
Merged
Merged
Conversation
formatDecimal(x, '0.00') follows the user's language, so a Dutch user got 12,50 and invalid JSON. Use toString(round(x, 2)), or formatDecimal with a hyphenated locale; explain the silently-ignored underscore tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…json (#982) The run --local hint 'mxcli oql -p …' failed on a non-default --admin-port (cannot connect … localhost:8090), and mxcli log did the same. Both now take the port and password from a live .mxcli/run-local.json for any flag not given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ilt JSON (#982) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 #982
Item 1 — Vega charts skill recommended locale-dependent
formatDecimalfor JSON.claude/skills/packs/mendix-vega-charts/SKILL.md(example + explanation) andspecs/README.mdnow usetoString(round(x, 2))(locale-independent, no exponent, measured on 11.13 per the issue), withformatDecimal(x, '0.00', 'en-US')as the alternative, and explain why: a Dutch user gets12,50→ "Data is not valid JSON";'nl_NL'/'en_US'underscore tags are silently ignored. A repo-wide grep found no other skill/pack/doc building JSON withformatDecimal(the remaining hits are display strings). Pack source edited;cmd/mxcli/skillpacksis the uncommitted embed copy (make sync-skill-packs).mxcli check—formatDecimalwith fewer than 3 args inside a+concatenation whose string literals contain{or":. Runs at the shared per-expression hook (checkExprFunctions), so microflows and nanoflows both get it. Documented indocs-site/src/appendixes/error-messages.md.Item 2 —
run --localquery hint ignored its own admin portdevLoopAdminOptions(cmd/mxcli/devloop_admin.go): with-p, a live.mxcli/run-local.jsonsupplies the admin port and password for any flag not given (an explicit host means "not this loop"), over loopback HTTP. Precedence: flags > live loop > env >.docker/.env> defaults. A handshake whose pid is gone is ignored.mxcli oqlandmxcli log(list/set and its connection hint, which now prints the resolved port) both use it.run --localadditionally printsLog levels: mxcli log list -p …. The existingQuery data: mxcli oql -p …hint is now correct without a port flag.Test plan
cmd/mxcli/devloop_admin_test.go: an httptest admin API on a random port + fake run-local.json →ExecuteOQLthrough the resolved options returns the row (the reported symptom end to end); controls: no handshake leaves defaults, stale pid ignored, explicit flags win;logAdminOptionspicks up the port from-pand--admin-portoverrides it; hint names the resolved port.mdl/executor/validate_json_locale_number_test.go: through the visitor, three positive shapes; controlstoString(round), explicit locale, display string, bare call → 0 hits.devLoopAdminOptionsreturning its input unchanged →TestOQL_UsesRunLocalAdminPortfails withcannot connect to Mendix admin API at localhost:8090(the reported message), and the log/flags tests fail. Removing thecheckLocaleNumberInJSONhook → all three positive JSONNUM cases fail (0 hits, want 1)../bin/mxcli checkon a script with both spellings → exactly one MDL-JSONNUM01 info on theformatDecimalline, exit 0.make build,go test ./mdl/executor/ ./cmd/mxcli/docker/,go test ./cmd/mxcli/,make check-conformance,make check-findings,make check-mdl,make check-skill-mdl,make lint— all pass.make sync-skills sync-skill-packsrun.run --local --admin-portboot (no runtime run in this round); the handshake path is the same oneconstant set --applyalready uses.🤖 Generated with Claude Code