Summary
The catalog refs table (cross-reference index that powers show callers|callees|references|impact|context of … after refresh catalog full) is a curated best-effort index, not a complete reference graph. It is built by a hand-maintained switch in mdl/catalog/builder_references.go — the same fragile pattern that silently dropped action types in catalog.activities (fixed in 6574e9c). Verified on mx-test-projects/MxGraphStudioDemo.
Gap 1 — microflow action refs: only 5 of ~15 reference-bearing action types
buildReferences extracts refs from MicroflowCallAction, CreateObjectAction, RetrieveAction (only DatabaseRetrieveSource), ShowPageAction, JavaActionCallAction. Every other reference-bearing action produces no ref. Present in MxGraphStudioDemo with zero refs emitted:
Action (in activities) |
count |
should reference |
| ChangeObjectAction |
17 |
entity / member |
| DeleteObjectAction |
3 |
entity |
| NanoflowCallAction |
3 |
nanoflow |
| RestCallAction / RestOperationCallAction |
1 + 1 |
consumed REST service |
| CastAction |
1 |
entity |
Also unhandled in general: AggregateListAction, CallExternalAction, CommitAction, and RetrieveAction via AssociationRetrieveSource.
Gap 2 — associations: 52 in project, 0 associate refs
Explicit TODO at builder_references.go:168 (// Association references require resolving ChildID … Skipping for now). The associate RefKind constant exists but is never written.
Gap 3 — page layout / widget / datasource / action refs: all 0
refs has 0 rows for layout, datasource, action even though the pages table proves layouts exist (LayoutRef populated, e.g. ActiveSessions → Atlas_Core.Atlas_Default) and there are 36 action widgets. Root cause: extractWidgetRefs / extractDataSourceRefs / layout-ref emission are all gated behind if pg.LayoutCall != nil (builder_references.go:182–195), and LayoutCall is unpopulated on the cached pages, so the whole widget subtree is skipped. Only page parameter refs (from pg.Parameters) survive.
Effect
show callers/callees/references/impact silently under-report — e.g. "who calls this nanoflow", "what uses this REST service", "which pages use this layout", "what references this association" all miss results.
Fix plan (incremental, with tests + bug-test MDL where applicable)
- Microflow action refs — add the missing reference-bearing action types (change/delete/nanoflow-call/rest/cast/aggregate/commit/cast, association-retrieve source).
- Association refs — resolve association target entity (ChildID → entity QN) and emit
associate refs.
- Page widget refs — fix the
LayoutCall-gating so layout/datasource/widget/action refs emit regardless of whether the page is parsed via a layout call.
References
mdl/catalog/builder_references.go
- Sibling fix for the same anti-pattern: 6574e9c (
catalog.activities)
Summary
The catalog
refstable (cross-reference index that powersshow callers|callees|references|impact|context of …afterrefresh catalog full) is a curated best-effort index, not a complete reference graph. It is built by a hand-maintained switch inmdl/catalog/builder_references.go— the same fragile pattern that silently dropped action types incatalog.activities(fixed in 6574e9c). Verified onmx-test-projects/MxGraphStudioDemo.Gap 1 — microflow action refs: only 5 of ~15 reference-bearing action types
buildReferencesextracts refs fromMicroflowCallAction,CreateObjectAction,RetrieveAction(onlyDatabaseRetrieveSource),ShowPageAction,JavaActionCallAction. Every other reference-bearing action produces no ref. Present in MxGraphStudioDemo with zero refs emitted:activities)Also unhandled in general:
AggregateListAction,CallExternalAction,CommitAction, andRetrieveActionviaAssociationRetrieveSource.Gap 2 — associations: 52 in project, 0
associaterefsExplicit TODO at
builder_references.go:168(// Association references require resolving ChildID … Skipping for now). TheassociateRefKind constant exists but is never written.Gap 3 — page layout / widget / datasource / action refs: all 0
refshas 0 rows forlayout,datasource,actioneven though thepagestable proves layouts exist (LayoutRefpopulated, e.g.ActiveSessions → Atlas_Core.Atlas_Default) and there are 36 action widgets. Root cause:extractWidgetRefs/extractDataSourceRefs/ layout-ref emission are all gated behindif pg.LayoutCall != nil(builder_references.go:182–195), andLayoutCallis unpopulated on the cached pages, so the whole widget subtree is skipped. Only pageparameterrefs (frompg.Parameters) survive.Effect
show callers/callees/references/impactsilently under-report — e.g. "who calls this nanoflow", "what uses this REST service", "which pages use this layout", "what references this association" all miss results.Fix plan (incremental, with tests + bug-test MDL where applicable)
associaterefs.LayoutCall-gating so layout/datasource/widget/action refs emit regardless of whether the page is parsed via a layout call.References
mdl/catalog/builder_references.gocatalog.activities)