Skip to content

Ensemble production topology routing pass for ObjectScript/IRIS #1061

Description

@isc-tdyar

Following up on PR #467 (ObjectScript language support) — @DeusData asked in review to split the Ensemble routing pass into a separate PR. This issue tracks that work.

What it does

pass_ensemble_routing is a pipeline pass that statically extracts InterSystems Ensemble/IRIS Interoperability production topology from ObjectScript .cls files at index time — no live IRIS instance required.

Pass A — EnsembleItem nodes: reads each EnsembleProduction class's ProductionDefinition XData block (XML), parses <Item Name="..." ClassName="..."> entries, and creates EnsembleItem nodes in the graph for each production component (business services, processes, operations).

Pass B — ROUTES_TO edges: for each EnsembleItem, reads the source .cls file and extracts routing rules that reference other components by class name, emitting ROUTES_TO edges. Uses segment-anchored matching (qn_ends_with_segment) to avoid false positives.

WorkMgr dispatch: detects .Queue("##class(X).method", ...) calls and emits CALLS edges to the target method — the same pattern as task queues in Celery/Airflow.

Why it's useful beyond IRIS

The pattern — statically extracting a runtime workflow topology from configuration XML embedded in source classes — is the same shape as:

  • Celery task routing (@app.task, task.apply_async(queue=...))
  • Airflow DAG dependencies
  • Spring Integration channel adapters

The EnsembleItem label and ROUTES_TO edge are the IRIS-specific names, but the pass structure is general enough to serve as a template for other workflow frameworks.

Changes from the version reviewed in #467

Per review feedback:

  • Pass is now gated: early-exits if the project contains no ObjectScript files (no unconditional O(all-method-files) scan for non-IRIS projects)
  • Truncation logging added: cbm_log_warn fires when MAX_ITEMS or MAX_SETTINGS caps are hit so silent truncation is visible

Ready to file PR on your signal

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanguage-requestRequest for new language supportparsing/qualityGraph extraction bugs, false positives, missing edgespriority/backlogValuable contribution, lower scheduling urgency; review when maintainer capacity opens.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions