Skip to content

feat(lint): expose service_ref and action_ref on the Starlark activity - #1131

Draft
jvegmond-tech wants to merge 1 commit into
mendixlabs:mainfrom
jvegmond-tech:feat/lint-activity-refs
Draft

jvegmond-tech wants to merge 1 commit into
mendixlabs:mainfrom
jvegmond-tech:feat/lint-activity-refs

Conversation

@jvegmond-tech

@jvegmond-tech jvegmond-tech commented Sep 17, 2026

Copy link
Copy Markdown

The catalog already stores ServiceRef and ActionRef for every activity (mdl/catalog/tables.go, builder_microflows.go), but ActivitiesFor did not select them and activityToStarlark did not expose them, so a custom rule could find a RestCallAction yet learn nothing about what it calls.

This blocks rules of the form 'every outbound integration must be configured correctly' - the caller can identify the activity type but not the service or operation behind it.

Verified in the mxcli dev container: - make build — passes - go test ./mdl/linter/... — passes (mdl/linter and mdl/linter/rules)

The catalog already stores ServiceRef and ActionRef for every activity
(mdl/catalog/tables.go, builder_microflows.go), but ActivitiesFor did not
select them and activityToStarlark did not expose them, so a custom rule
could find a RestCallAction yet learn nothing about what it calls.

This blocks rules of the form 'every outbound integration must be
configured correctly' - the caller can identify the activity type but not
the service or operation behind it.
@github-actions

Copy link
Copy Markdown

AI Code Review

Critical Issues

  • None

Moderate Issues

  • None

Minor Issues

  • The PR exposes service_ref and action_ref fields in the Starlark activity context but does not include any test updates to verify the new fields are correctly populated and accessible in Starlark rules. While the change is small and additive, adding a test (e.g., in mdl-examples/bug-tests/ or mdl-examples/doctype-tests/ for linter rules) would strengthen confidence.

What Looks Good

  • The change is minimal, focused, and follows existing patterns in the codebase.
  • SQL query updates correctly select the new columns with proper null handling.
  • Starlark representation and documentation are updated consistently.
  • No syntax changes, so full-stack consistency and MDL design checks are not applicable.
  • The change addresses the stated problem: enabling lint rules to access service/action details for activities like RestCallAction.

Recommendation
Approve the PR. The change is safe, well-scoped, and solves the blocking issue for lint rules. While adding a test would be ideal, it is not strictly required per the checklist for this type of internal helper change (not a new package, executor command, or MDL syntax change). The existing test suite should continue to pass as the change is additive and non-breaking.


Automated review via OpenRouter (Nemotron Super 120B) — workflow source

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.

2 participants