fix: preserve multiple retrieve XPath predicates#500
Conversation
Symptom: a retrieve authored with multiple XPath predicates could round-trip as one combined predicate. When an earlier predicate contained `or`, serializing `[A or B][C][D]` as `[A or B and C and D]` changed XPath precedence. Root cause: the microflow visitor parsed multiple `xpathConstraint` nodes into a chained `and` expression and discarded the original predicate boundaries. The builder then wrapped the expression as a single XPathConstraint. Fix: preserve the bracketed predicate source on the retrieve `where` expression and let the builder write already-bracketed XPath source without adding another pair of brackets. Tests: add visitor coverage for preserving multiple predicate boundaries, builder coverage for writing bracketed predicates unchanged, and a synthetic bug-test fixture for the retrieve form.
Review: fix: preserve multiple retrieve XPath predicatesVerdict: Approve with minor note What the PR doesFixes issue #499: Three-part fix:
No blockersMinor: bracket-presence check is a heuristic
Positive notes
|
Closes #499.
Summary
whereclauses with multiple XPath predicatesValidation
./bin/mxcli check mdl-examples/bug-tests/retrieve-multiple-xpath-predicates.mdlmake buildmake lint-gomake test