Skip to content

fix(catalog): reference the mappings a flow applies and a mapping's JSON structure (#1861) - #2019

Merged
ako merged 4 commits into
mainfrom
fix/1861-mapping-refs
Nov 9, 2026
Merged

ako merged 4 commits into
mainfrom
fix/1861-mapping-refs

Conversation

@ako

@ako ako commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Closes #1861.

Problem

#1861 reported three gaps in CATALOG.REFS. The first is already covered elsewhere:

So refs, show callers and orphan checks reported mappings and JSON structures that are in use as unreferenced. ActionRef was also empty for these actions.

Change

  • New ref kinds:

    Kind From → to Counted by show callers
    mapping_call flow → IMPORT_MAPPING / EXPORT_MAPPING yes
    structure mapping → JSON_STRUCTURE no (it's the use of a type)
  • Multiple mappings per action: a REST or web service call can name a request (export) mapping and a response (import) mapping. microflowMappingRefs therefore returns a list, next to the single-target microflowActionRef.

  • ActionRef: an import or export activity's ActionRef is its mapping. For a REST call with mappings it's the response mapping, or the request mapping if there's no response one.

  • RefTargetObjectTypes: gains IMPORT_MAPPING, EXPORT_MAPPING and JSON_STRUCTURE.

  • Schema version 35, plus updates to the lint-rule skill, the catalog docs, a finding record and the CHANGELOG.

  • Conflict with fix(catalog): record a snippet call as a snippet_call edge to the SNIPPET (#2017) #2018: both PRs bump the schema; this one is now 36, after fix(catalog): record a snippet call as a snippet_call edge to the SNIPPET (#2017) #2018 took 35.

Evidence

  • Tests: TestMappingRefs_Issue1861 and TestMappingActionRef_Issue1861 failed first with the reported symptom: no rows and an empty ActionRef.
    • Disabling the emission makes both fail again.
    • Controls: an XML-schema mapping gets no structure edge, and a REST call with a string result gets no mapping edge.
  • FactoryManagement (11.16), main vs. this branch:
    • New references:

      From To Rows
      Flows import mappings 71
      Flows export mappings 50
      Import mappings JSON structures 44
      Export mappings JSON structures 23
    • No new reference points at a document that doesn't exist.

    • Documents with no reference to them at all:

      Document type main this branch
      Import mappings (55) 54 1
      Export mappings (44) 42 2
      JSON structures (66) 65 2
    • ActionRef is filled for 53 import, 47 export and 18 REST-call activities.

    • Lint output is identical: 1834 findings with the bundled Starlark rules.

  • make ci-local passes except check-skill-pack-js, which needs node, and node isn't installed in this container. The targets after it pass when run on their own.

Not covered

  • XML schemas and message definitions: they aren't catalogued as documents, so a mapping built on one gets no edge.
  • Data transformers used by TransformJsonAction get no edge.

🤖 Generated with Claude Code

ako and others added 2 commits November 8, 2026 09:34
…SON structure (#1861)

A flow that applies an import or export mapping (import/export action,
REST or web service call) and a mapping built on a JSON structure made
no refs row, so refs, show callers and orphan checks reported mappings
and structures in use as unreferenced. On FactoryManagement (11.16) 54
of 55 import mappings, 42 of 44 export mappings and 65 of 66 JSON
structures had no inbound edge.

refs gains mapping_call (flow -> IMPORT_MAPPING / EXPORT_MAPPING, a
caller kind) and structure (mapping -> JSON_STRUCTURE) edges, and an
import/export activity's ActionRef names its mapping. Schema 35.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ako
ako merged commit 6fbef0e into main Nov 9, 2026
8 checks passed
@ako
ako deleted the fix/1861-mapping-refs branch November 9, 2026 06:14
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.

[up#1703] CATALOG.REFS has no edges to import/export mappings or from mappings to JSON structures, and none from layouts

1 participant