Skip to content

fix(ai): preserve alert rule instance scope - #7341

Open
X-LightYear wants to merge 1 commit into
apache:rocketmq-studiofrom
X-LightYear:contrib/pair3-alert-rule-instance-scope
Open

X-LightYear wants to merge 1 commit into
apache:rocketmq-studiofrom
X-LightYear:contrib/pair3-alert-rule-instance-scope

Conversation

@X-LightYear

Copy link
Copy Markdown
Contributor

Summary

  • preserve the optional instanceId when projecting alert rules for rmq.alert.rule.list
  • declare the additive field in the MCP output schema
  • add deterministic serialization and schema regression coverage

Root cause

AlertRuleListItem.from(AlertRuleVO) dropped AlertRuleVO.instanceId. The tool lists rules across the whole Studio deployment, so the serialized result could not identify the Instance to which a rule was bound.

Fix

Copy the optional instance binding into the MCP projection and document it in the catalog. Global rules continue to omit the field through the existing non-null serialization policy.

Testing

  • pre-fix serialization regression failed because instanceId was absent
  • AlertRuleListToolHandlerTest: passed
  • ToolOutputSchemaContractTest: passed
  • Checkstyle: 0 violations
  • git diff --check: passed

Fixes #7340

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.

1 participant