Skip to content

check: missing call arguments, XPath literal types, aggregate expressions (CE0115, CE0161, CE0117) - #2700

Merged
ako merged 3 commits into
mainfrom
fix/check-gap-calls-expressions
Dec 1, 2026
Merged

ako merged 3 commits into
mainfrom
fix/check-gap-calls-expressions

Conversation

@ako

@ako ako commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Part of #1258. This is batch B of the gaps from the second check-gap parity sweep (#2698): f34, f37 and f48. Each passed check -p and exec, and MxBuild 11.16.1 rejected the project. Each fix completes an existing check that stopped one step short.

f34: a call that leaves out a parameter (CE0115)

  • The flow-call check reported an argument that names no parameter (CE1613), but never a parameter with no argument. It also skipped a call with no arguments at all.
  • missingFlowCallArgs now reports a microflow or nanoflow call that leaves out any parameter. Measured: one left out, all left out, and a nanoflow call are each CE0115.
  • If the call also has an argument that names no parameter, only that one is reported. It's usually the missing argument misspelled, and two existing tests pin that.

f37: a retrieve constraint comparing an attribute with a literal of another type (CE0161)

  • The literal-versus-attribute table (literalTypeProblem, measured on 11.14.0) existed only for access rules. It is now shared as xpathLiteralTypeProblem and applied to database retrieves.
  • Measured on 11.16.1 for a retrieve, each matching the table:
    • CE0161: [Qty = 'abc'], [Qty = '5'], [Qty > 'abc'], [Name = 5], [Price = 'abc'], [B = 1], [C = 'Green'] (no such value).
    • Clean: [B = 'true'], [D = '2020-01-01'], [C = 'Red'].
  • scriptContext now carries the script's enumeration values (enumerationValues), for the enumeration case.

f48: an aggregate's expression form over something that is not a number (CE0117)

  • The CE0016 check judged only sum $L by Attr. aggregateExpressionType now judges sum/average/minimum/maximum $L of <expr>.
  • Measured as CE0117: of $currentObject/Name (String), maximum … of $currentObject/D (DateTime), of 'abc', and a bare attribute name, of Qty, even for an Integer attribute.
  • Measured clean: of $currentObject/Qty and of $currentObject/Price * 2.

Evidence

  • 23 cases measured on 11.16.1, one project per case. check -p agrees with mx on all of them.
  • check_gap_calls_expressions_test.go: 14 reported cases and 10 controls. Stubbing each fix fails exactly its own cases (3, 7 and 4).
  • No doctype or bug-test example triggers the new reports under check -p.
  • mdl-examples/bug-tests/check-gap-calls-expressions.mdl holds the accepted forms and is clean under mx check. These checks need a project, so there's no .fail.mdl.
  • Finding recorded, CHANGELOG updated, check-gap README marks f34/f37/f48. make ci-local passes.

Generated by Claude Code

…ions (CE0115, CE0161, CE0117)

Check-gap sweep 2, f34/f37/f48: each passed check -p and exec, and MxBuild
11.16.1 rejected the project. Each closes the step a sibling check stopped
short of:

- A flow call that leaves out a parameter (CE0115), beside the check for an
  argument that names no parameter.
- A retrieve constraint comparing an attribute with a literal of another type
  (CE0161), using the access rule's literal table, now shared as
  xpathLiteralTypeProblem.
- The expression form of an aggregate over a non-number, or a bare attribute
  name (CE0117), beside the CE0016 check for the by-attribute form.

All 23 measured cases agree with mx.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
An argument naming no parameter is usually the missing one misspelled, so the
missing-argument report (CE0115) is left to the unknown-argument one (CE1613)
when both would fire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011oK82tETa46YQmMS58pQjL
@ako
ako marked this pull request as ready for review November 30, 2026 21:41
…xpressions

# Conflicts:
#	CHANGELOG.md
#	mdl-examples/check-gap/README.md
@ako
ako merged commit 0a3e09f into main Dec 1, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants