Skip to content

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

Open
isc-tdyar wants to merge 2 commits 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 2 commits 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

@isc-tdyar isc-tdyar requested a review from DeusData as a code owner July 12, 2026 19:58
@DeusData DeusData added enhancement New feature or request parsing/quality Graph extraction bugs, false positives, missing edges language-request Request for new language support priority/backlog Valuable contribution, lower scheduling urgency; review when maintainer capacity opens. labels Jul 14, 2026
@DeusData DeusData added this to the 0.9.2-rc milestone Jul 14, 2026
@DeusData

Copy link
Copy Markdown
Owner

Thanks for splitting the Ensemble topology pass from the base ObjectScript support. This is a 0.9.2-rc language enhancement. Review will focus on bounded parsing of embedded production XML, deterministic EnsembleItem identity, conservative ROUTES_TO matching, malformed-input handling, and representative IRIS fixtures without requiring a live server.

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>
Signed-off-by: Thomas Dyar <tdyar@intersystems.com>
@isc-tdyar isc-tdyar force-pushed the feat/ensemble-routing branch from 21dfe61 to 4064855 Compare July 15, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request language-request Request for new language support parsing/quality Graph extraction bugs, false positives, missing edges priority/backlog Valuable contribution, lower scheduling urgency; review when maintainer capacity opens.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensemble production topology routing pass for ObjectScript/IRIS

2 participants