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 1 commit 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
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. |
|
Maintainer's answer on the schema question, and it's a yes to the capability with a change to how it's expressed: please model the topology in the schema vocabulary we already have, rather than adding The reasoning is the one you'd expect — node labels and edge types are permanent, agent-visible surface, and a vendor-specific pair sets a precedent we'd owe every other platform. But that's not actually the strongest argument here. The strongest argument is that the model you need already exists, and adopting it fixes the problem flagged in my last review instead of leaving it open. The existing vocabulary
An Ensemble production maps onto that almost exactly:
Note the second row also fixes the defect below for free: What you get immediately by doing it this way This is the part I'd have led with if I'd seen it earlier. Last time I told you
So this isn't "rename your labels to please the schema police." Going through If the mapping turns out to lose something real — a property with nowhere to live, or a relationship Still needs fixing regardless of the above The multi-target defect from my last review is a graph-accuracy bug and blocks merge either way: And the PR description still advertises WorkMgr dispatch ( Your Thanks for your patience on the direction call. The static-extraction-without-a-live-instance capability is genuinely worth having; I'd just like it speaking the vocabulary the rest of the graph already speaks. |
db30e5d to
5321936
Compare
|
Rebased and reworked per your review:
|
5321936 to
9a1b386
Compare
Parses XData ProductionDefinition blocks to extract production topology
and emits Route/ASYNC_CALLS/HANDLES graph edges for Ensemble
interoperability routing.
Key design points:
- Emit Route nodes (qn: __route__ensemble__<prod>.<item>) with props
{broker, class, enabled, production} — visible in get_architecture
and search_graph at the same priority as HTTP routes
- Emit ASYNC_CALLS edges from source method/item to target Route node
via SendRequestSync literal scan and TargetConfigName(s) settings
- Emit HANDLES edges from each item's entry-point method to its Route
node, completing the code-to-topology link
- Fix scan_source_for_send_targets: scope search to calling method body
using brace-depth tracking to eliminate cross-method contamination
- Handle TargetConfigNames (plural, comma-separated) by emitting one
ASYNC_CALLS edge per token
- Segment-anchored class_name_matches() prevents prefix collisions
("Ens" not matching "Ens.BusinessService")
- Language-gate: skip entirely when no ObjectScript nodes present
Tests: pipeline_ensemble_routing_edges (Route nodes + ASYNC_CALLS +
HANDLES); pipeline_ensemble_routing_method_scoping (two methods, two
targets, no cross-contamination).
Fixes DeusData#467
Signed-off-by: Thomas Dyar <tdyar@intersystems.com>
9a1b386 to
ee12615
Compare
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