Skip to content

DESCRIBE of a real import/export mapping does not round-trip — 112 of 327 rebuild a different mapping, and the output parses #260

Closed

Description

@ako

describe {import,export} mapping was run over all 327 mapping documents in the
eight demo apps (mx-test-projects/*.mpk) and each result fed back to
mxcli check:

outcome count
parses and is faithful 83 (25%)
parses but rebuilds a different mapping 112
does not parse 132

The 112 are the dangerous ones: describe → edit → exec reports success and
quietly changes the model. The 132 include 17 mappings that use nothing outside
MDL's expressive range
— those are pure describe/grammar defects, listed below.

1. An object element cannot address a nested member path

describe import mapping KrogerAPI.IM_ProductList (CitrusGrove) emits:

create KrogerAPI.Pagination_ProductRoot/KrogerAPI.Pagination = meta/pagination { … }
line 6:71 mismatched input '/' expecting {',', '}'}

importMappingChild's object form takes a single identifierOrKeyword after =,
not a jsonMemberPath (mdl/grammar/domains/MDLDomainModel.g4:471). #927 gave
value elements multi-segment paths; object elements never got them, and Studio
Pro produces them routinely — an object mapped several levels down with nothing
mapped in between.

2. An array/wrapper element prints as an empty value binding, and its subtree is dropped

printExportMappingElement (mdl/executor/cmd_export_mappings.go:134) branches on
elem.Kind == "Object". An element parsed with Kind == "Array" or "Wrapper"
falls through to the value branch. describe export mapping AgentCommons.EM_Agent:

    Versions = ,
    Variables = ,
    TestCases = ,

Empty right-hand side — and every child dropped: all of Version, Tool, MCP,
KnowledgeBase, TestCase. It happens not to parse, which is the only reason this
has not silently destroyed a mapping. The import printer has the same branch.

3. Three describe-only spellings the grammar has never accepted

For entity-less / association-less elements describe emits create . = x and
create ./Module.Entity = x (import), . as x and ./Module.Entity as x
(export). All four are parse errors — verified directly:

line 3:4  extraneous input '.' expecting the start of a statement
line 10:11 no viable alternative at input 'create.'

Either the grammar gains them or describe stops emitting them.

4. JSON member names that are not MDL identifiers

jsonMemberPath is identifierOrKeyword (SLASH identifierOrKeyword)* — no quoted
form, and / is the path separator. So these cannot be written or described:

  • https%3A//sws.siemens.com/sam/claims/tenantId (TcConnector.IM_DecodedJWT)
  • sws.samauth.ten, research%3Aread
  • $type — 43 occurrences (OneHarness/CapitalConnector)

5 documents. describe emits them raw and the output fails at the %.

The silent-loss list

What the 112 drop, by cause: array root 79, message-definition source 70,
converter microflow 19, find+ignore 12, nested root 9, create+error 6,
XML attribute 3, XML schema source 3, allowOverride 2, custom handling 1,
mapping parameter 1. Each has its own issue; this one is for the four defects
above plus the round-trip guarantee.

Why CI did not catch it

make check-mdl runs mxcli check with no project, so it validates syntax and
nothing else. Every defect here needs a project or a decoded document to see. The
test that would catch all of them: for every mapping in a fixture project,
describe → re-execute into a copy → compare the decoded documents. The demo
.mpks are far too large for CI (2.5 GB), but a curated fixture carrying one
mapping per shape is small.

Measured on 70a12365. Full analysis:
docs/11-proposals/PROPOSAL_mapping_coverage.md §1, §5, §8.

Activity

  1. added a commit that references this issue on Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions