Skip to content

[DX] GAP-15: Auto-generated .mermaid files have no explanation and are mistaken for debug artifacts #1506

@AlexBizon

Description

@AlexBizon

Summary

uipath init generates one .mermaid file per function containing a static call graph. These files are ~550 lines each, not explained anywhere, and can be mistaken for error output or debug artifacts. There is no indication they are intentional generated metadata.

Root Cause

uipath init uses Python's ast module (graph_builder.py) to build a static call graph for each function and writes it as a .mermaid file. The intended purpose is debugging/visualization within the UiPath platform.

There is no:

  • Comment or header in the generated files explaining what they are
  • Documentation mentioning that these files are generated
  • Indication that they are auto-regenerated on every uipath init and should not be manually edited

What the Files Look Like

# check_vendor_risk.mermaid (551 lines)
flowchart TB
  vendor.py:52(check_vendor_risk)
  vendor.py:110(_resolve_instance_url)
  vendor.py:52 --> vendor.py:110
  ...

Note: the generated Mermaid syntax is also invalid — . and : in node IDs are special characters in Mermaid's flowchart syntax, causing these diagrams to fail in all standard Mermaid viewers (see GAP-17).

Suggested Fix

  1. Add an auto-generated header comment to each .mermaid file:
    # AUTO-GENERATED by uipath init — do not edit manually
    # This file contains a static call graph for use by UiPath platform tooling.
    # Re-generated on every 'uipath init' run.
    
  2. Add *.mermaid to the .gitignore generated by uipath init (or document that these files should be gitignored).
  3. Mention the files in the uipath init output: Generated call graph: check_vendor_risk.mermaid
  4. If these files are not consumed by any UiPath tooling, consider not generating them at all.

Impact

  • Severity: Low (confusion/noise)
  • Developers who encounter these files for the first time have no idea what they are or whether they should be committed to git

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions