Skip to content

feat(pipeline): Ensemble production topology routing pass for ObjectScript/IRIS#1063

Open
isc-tdyar wants to merge 1 commit into
DeusData:mainfrom
isc-tdyar:feat/ensemble-routing
Open

feat(pipeline): Ensemble production topology routing pass for ObjectScript/IRIS#1063
isc-tdyar wants to merge 1 commit into
DeusData:mainfrom
isc-tdyar:feat/ensemble-routing

Conversation

@isc-tdyar

Copy link
Copy Markdown
Contributor

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

Closes #1061. Follows up on #467 (ObjectScript language support) — split out at reviewer request.

What it does

Pass A — EnsembleItem nodes: reads each EnsembleProduction class's ProductionDefinition XData block (XML), parses <Item Name="..." ClassName="..."> entries, and creates EnsembleItem nodes 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 referencing other components by class name, emitting ROUTES_TO edges. Uses segment-anchored matching (qn_ends_with_segment) to avoid false positives from partial class name matches.

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

Changes from the version reviewed in #467

Per review feedback:

  • Language gate: early-exits immediately if the project contains no ObjectScript files — zero overhead for non-IRIS projects
  • Truncation logging: cbm_log_warn fires when MAX_ITEMS or MAX_SETTINGS caps are hit so silent truncation is visible in logs

Files changed

  • src/pipeline/pass_ensemble_routing.{c,h} — new pass
  • src/pipeline/pipeline.c — wired into run_predump_passes
  • Makefile.cbm — added to SRCS

Adds pass_ensemble_routing.c, a pre-dump pipeline pass that reads
Ensemble production definitions (XData ProductionDefinition blocks)
and emits ROUTES_TO edges between production items.

The pass:
  - Early-exits when no ObjectScript source files (.cls/.mac/.int)
    are present in the graph buffer, making it zero-cost on non-IRIS
    projects.
  - Parses <Item> / <Setting> XML from each XData ProductionDefinition
    found in the graph buffer.
  - Emits EnsembleItem nodes and ROUTES_TO edges with confidence scores
    (0.95 for literal target names, 0.85 for property-resolved names).
  - Logs a cbm_log_warn when MAX_ITEMS (256) or MAX_SETTINGS (8) caps
    truncate the parsed production.

Signed-off-by: Thomas Dyar <tdyar@intersystems.com>
@isc-tdyar isc-tdyar requested a review from DeusData as a code owner July 12, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensemble production topology routing pass for ObjectScript/IRIS

1 participant