Frun1na opened a new pull request, #4709:
URL: https://github.com/apache/rocketmq-dashboard/pull/4709

   ### Which Issue(s) This PR Fixes
   
   ### Brief Description
   
   `docs/api-spec.md` described the audit `result` vocabulary incorrectly in 
two places:
   
   - §13.1 (`AuditRecord`) listed `FAILURE`, which the server never persists.
   - The enum appendix listed lowercase `success` / `failure`.
   
   The audit vocabulary is `SUCCESS` / `FAILED` 
(`OperationAuditConstants.Result`), and cluster configuration updates 
additionally record `PARTIAL` through 
`ClusterConfigUpdateResultVO.Status.name()` in `ClusterService`. Since the 
field description already states that the value is a persisted result code, the 
document is aligned with the implementation rather than the other way around.
   
   ### How Did You Test This Change?
   
   Documentation only; no runtime code changed, so the backend and frontend 
suites were not re-run. Every persisted audit value was cross-checked against 
the code:
   
   ```
   $ git grep -n 'FAILURE' -- 'server/src/main/java'
   LoginRateLimiter.java        (FAILURE_WINDOW / MAX_FAILED_ATTEMPTS — 
unrelated)
   ToolError.java               (UNEXPECTED_EXECUTION_FAILURE — unrelated)
   NotificationOutboxService.java:520 ("FAILURE" — delivery status, not audit)
   # no audit write ever persists "FAILURE"
   
   $ git grep -n 'Result.SUCCESS\|Result.FAILED' -- 'server/src/main/java'
   ProxyAddressService.java / MetadataService.java  → audit writes use SUCCESS 
/ FAILED
   
   $ git grep -rn 'PARTIAL' -- 'server/src/main/java/.../ops/audit'
   MybatisPlusAuditRepository.java:128  
.partial(resultCounts.getOrDefault("PARTIAL", 0L))
   ```
   
   `ClusterConfigUpdateResultVO.Status` is `SUCCESS` / `FAILED` / `PARTIAL`, 
and `ClusterService` records `status.name()`, so `PARTIAL` is a persisted audit 
value and belongs in both lists.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`docs:`)
   - [ ] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [ ] New UI text has both Chinese and English entries under `web/src/i18n/`
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks)
   - [ ] New source files carry the ASF license header
   - [x] Documentation touched where behaviour changed (README / `docs/` / 
in-app help)
   


-- 
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]

Reply via email to