Description
The HELP output documents set key = value; under "Other" commands. The full execution path exists:
ast.SetStmt (ast_query.go:434-440)
execSet() handler (cmd_misc.go:41-48) stores key=value in ctx.Settings
register_stubs.go:390-392 registers the handler
repl.go:338 recognizes set prefix as complete statement
repl.go:800 provides tab completion for SET
However, no grammar production creates ast.SetStmt. The grammar's setStatement only handles microflow-level SET $Variable = expression. The utilityStatement rule has no SET alternative.
Steps to Reproduce
mxcli -c "SET format = json"
# Parse error: mismatched input 'SET'
Expected
SET format = json should store the setting and print confirmation as documented.
Root Cause
Grammar gap — utilityStatement in MDLParser.g4 needs a session-level SET rule (distinct from microflow setStatement).
Affected Files
mdl/grammar/MDLParser.g4 — needs session-level SET rule in utilityStatement
mdl/visitor/visitor_query.go — needs visitor to construct ast.SetStmt
Description
The HELP output documents
set key = value;under "Other" commands. The full execution path exists:ast.SetStmt(ast_query.go:434-440)execSet()handler (cmd_misc.go:41-48) stores key=value inctx.Settingsregister_stubs.go:390-392registers the handlerrepl.go:338recognizessetprefix as complete statementrepl.go:800provides tab completion for SETHowever, no grammar production creates
ast.SetStmt. The grammar'ssetStatementonly handles microflow-levelSET $Variable = expression. TheutilityStatementrule has no SET alternative.Steps to Reproduce
Expected
SET format = jsonshould store the setting and print confirmation as documented.Root Cause
Grammar gap —
utilityStatementinMDLParser.g4needs a session-level SET rule (distinct from microflowsetStatement).Affected Files
mdl/grammar/MDLParser.g4— needs session-level SET rule inutilityStatementmdl/visitor/visitor_query.go— needs visitor to constructast.SetStmt