zmuxuny opened a new issue, #6360: URL: https://github.com/apache/rocketmq-dashboard/issues/6360
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `master` branch, or I have stated the exact version I am running below. ### Studio Version rocketmq-studio@779b8c0e7aed2396d3cc72743dcd544ea48e9ae6. Reproduced from the unchanged source in frontend tests. ### Runtime Environment Linux cloud workspace, Node.js 24.19.0, Vitest 4.1.10, React 18, Ant Design 5 and jsdom. No live deployment, broker or database was used. ### Connected RocketMQ Cluster Not required for the deterministic frontend reproduction. Only synthetic records and mocked service responses were used. ### Build Toolchain _No response_ ### Describe the Bug The audit risk model uses the display fallback global as the grouping identity for a record with no cluster. An actual instance/cluster named global has exactly the same key. One failed operation in each scope is reported as two repeated failures against one object, attributed to whichever scope appeared first. This creates a false troubleshooting hotspot and hides the actual scope split. ### Steps to Reproduce 1. Return two audit rows for TOPIC/orders with FAILED results. 2. Give the first row clusterId: null and the second clusterId: "global". Each scope has only one failed operation. 3. Open Audit Risk Insights and inspect Repeated anomalous resources. ### What Did You Expect to See? No repeated-target finding for these two distinct resources. Real repeated failures within the same nullable cluster/resource/target identity should still aggregate normally. Display placeholders must not become grouping identifiers. ### What Did You See Instead? buildAuditRiskInsights produces one hotspot with key global|TOPIC|orders, clusterId "-", failed 2 and total 2, and emits REPEATED_TARGET_FAILURES. The independent baseline regression fails at the exact hotTargets assertion; 11 pre-existing cases in the matched files pass. ### Additional Context Source: https://github.com/apache/rocketmq-dashboard/blob/779b8c0e7aed2396d3cc72743dcd544ea48e9ae6/web/src/pages/ops/auditRiskInsightModel.ts#L186-L192 Searched open and historical audit/global, audit/collision, audit/hot, and audit/unscoped issues and PRs. #4191 deliberately distinguishes unscoped resources in the audit timeline; this report is about the separate risk aggregation helper, not the timeline or consumer failure diagnostics. Red reproduction: npm test -- --maxWorkers=1 src/pages/ops/__tests__/auditRiskInsights.test.ts (1 expected failure, 11 passed; production unchanged). Test uses the actual exported model with typed AuditRecord values. Planned regression controls cover same-scope aggregation, reversed row order and literal placeholder names. No full-suite pass is claimed. AI assistance was used for investigation and tests. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
