Skip to content

DESCRIBE emits over-qualified grant member names that fail to re-parse (roundtrip break) #633

@ako

Description

@ako

Summary

DESCRIBE on an entity emits member-level access grants with fully-qualified member names (Module.Entity.Member), but the MDL parser only accepts the bare member name (or read *). The emitted MDL therefore fails to re-parse, breaking the documented "DESCRIBE roundtrip" guarantee (CLAUDE.md: "DESCRIBE roundtrip — if the feature creates artifacts, describe should output re-executable MDL").

Reproduction

create module RT;
create persistent entity RT.E ( Name: string(50) );
grant RT.User on RT.E (read (RT.E.Name), write (RT.E.Name));   -- as emitted by DESCRIBE
$ mxcli check repro.mdl
  - line 3:31 mismatched input '.' expecting {',', ')'}
  - line 3:33 extraneous input '.' ...
  - line 3:38 extraneous input ')' ...

The accepted forms (bare member / wildcard) both pass:

grant RT.User on RT.E (read (Name), write (Name));   -- ✓ Syntax OK
grant RT.User on RT.E (read *);                       -- ✓ Syntax OK

Real-world trigger

describe entity OntologyViewer.GraphTraversalHelper (and most entities with member-level grants) emits:

grant OntologyViewer.User on OntologyViewer.GraphTraversalHelper
  (read (OntologyViewer.GraphTraversalHelper.DataJSON), write (OntologyViewer.GraphTraversalHelper.DataJSON));

describe module ... with all then fails to re-execute for every such entity.

Expected

Either (a) DESCRIBE should emit bare member names inside read(...)/write(...), or (b) the grammar should also accept fully-qualified member names. (a) is the lower-risk fix and matches the existing accepted syntax.

Environment

mxcli built from current main; reproduced via mxcli check (syntax only, no project needed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions