unbridled-41 commented on PR #4746:
URL:
https://github.com/apache/rocketmq-dashboard/pull/4746#issuecomment-5759409515
### Evidence for this PR
**Head / diff (verified against the pushed branch)**
- head `0e5d55c599a34307633493c7b1bb64ec8d839574`, base `rocketmq-studio`
(tip `cd448e17`), 1 commit, `mergeStateStatus: CLEAN`.
- `git show --stat 0e5d55c5` → `web/src/api/message.ts +14/-2`,
`web/src/api/message.test.ts +36/-0`.
**Red → green (the regression test has teeth)**
Run from `web/` on the branch:
```
$ npx vitest run src/api/message.test.ts --maxWorkers=2
✕ maps backend trace node statuses on the key lookup too
AssertionError: expected [ Array(3) ] to deeply equal [ 'error', 'finish',
'wait' ]
- Expected + Received
[ - "error" + "failed", "finish", - "wait" + "something-else" ]
Tests 1 failed | 7 passed (8)
```
With the fix restored:
```
$ npx vitest run src/api/message.test.ts --maxWorkers=2
✓ src/api/message.test.ts (8 tests)
Test Files 1 passed (1) Tests 8 passed (8)
$ npx vitest run src/pages/instance/__tests__/MessagePage.test.tsx \
src/pages/instance/__tests__/MessagePageAsyncState.test.tsx \
src/api/message.test.ts src/utils/messageTraceDiagnostics.test.ts
--maxWorkers=2
Test Files 4 passed (4) Tests 45 passed (45)
$ npx tsc -b # clean, exit 0
$ npx eslint src/api/message.ts src/api/message.test.ts # clean, exit 0
```
**Duplicate check (re-run against the current indexes)**
- Open PRs (205 titles) and open issues (214 titles): searching `trace`,
`trace-by-key`, `getMessageTraceByKey`, `node`, `step status`, `failed` returns
only #4483/#3297 (bound the trace request cache), #3305 (`NO_MESSAGE` grading
of empty lookups) and the historical #2520/#2576 pair. No open item covers the
by-key node status.
- History: `git log -S mapTraceNodeStatus -- web/src/api/message.ts` →
`8c0079be` (#2576), which mapped the message-id path only; `git log -S
trace-by-key -- web/src/api/message.ts` → `96ad1b06` (#2520), which added the
key path earlier.
**Scoring**
PRIORITY = 76 (impact 30 + blast radius 12 + reproducibility 20 +
maintenance value 14); FIX_CONFIDENCE = 95. The wrong status is user-visible
(step styling plus the `FAILED_TRACE_NODE` diagnostic), deterministic (no
timing dependency), and the fix mirrors the sibling wrapper exactly.
--
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]