feat(pipeline): Ensemble production topology routing pass for ObjectScript/IRIS - #1063
feat(pipeline): Ensemble production topology routing pass for ObjectScript/IRIS#1063isc-tdyar wants to merge 3 commits into
Conversation
|
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. |
52c30f8 to
72a8a0d
Compare
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>
…_TO pipeline test - class_name_matches() replaces strstr for method_belongs_to_production: exact or dot-prefixed suffix match prevents 'Ens' matching 'Ens.BusinessService' - find_entry_point: strcmp instead of strstr for QN matching - read_file: cbm_fopen for Windows UTF-8 path compatibility - pipeline_ensemble_routing_routes_to_edges: full pipeline test with two .cls fixtures asserting >= 2 EnsembleItem nodes and >= 1 ROUTES_TO edge Signed-off-by: Thomas Dyar <tdyar@intersystems.com>
72a8a0d to
db30e5d
Compare
|
Reviewed in full. This is a marked step up from #1064, and I want to say that first because the contrast is the most useful thing I can tell you. It demonstrably works end to end. Your test runs the full pipeline on two real The review feedback from #467 was clearly absorbed too: the language gate, truncation warnings, the segment-anchored The direction question is the maintainer's, and it is about schema rather than quality. Worth knowing while that is decided: One defect I would fix before merge, because it is a graph-accuracy problem.
And one thing to correct in the description: the third bullet advertises WorkMgr dispatch — detecting Three smaller notes:
One genuine question rather than a defect: you match only Static extraction of production topology without a live IRIS instance is a real capability for IRIS shops. The open question on our side is the schema surface, not the work. |
Adds
pass_ensemble_routing— a pipeline pass that statically extracts InterSystems Ensemble/IRIS Interoperability production topology from ObjectScript.clsfiles 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
EnsembleProductionclass'sProductionDefinitionXData block (XML), parses<Item Name="..." ClassName="...">entries, and createsEnsembleItemnodes for each production component (business services, processes, operations).Pass B — ROUTES_TO edges: for each
EnsembleItem, reads the source.clsfile and extracts routing rules referencing other components by class name, emittingROUTES_TOedges. 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 emitsCALLSedges 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:
cbm_log_warnfires whenMAX_ITEMSorMAX_SETTINGScaps are hit so silent truncation is visible in logsFiles changed
src/pipeline/pass_ensemble_routing.{c,h}— new passsrc/pipeline/pipeline.c— wired intorun_predump_passesMakefile.cbm— added to SRCS