unbridled-41 commented on PR #4754:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/4754#issuecomment-5759572651

   ### Evidence for this PR
   
   **Head / diff (verified against the pushed branch)**
   
   - head `ffe3d84d594f13162630ab52a77f809135001886`, base `rocketmq-studio` 
(tip `cd448e17`), 1 commit, `mergeStateStatus: CLEAN`.
   - `git show --stat ffe3d84d` → `AiConversationService.java +14/-3`, 
`AiConversationServiceTest.java +18/-0`.
   
   **Red → green**
   
   ```
   $ cd server && mvn -B -ntp -o test -Dtest=AiConversationServiceTest
   [ERROR] ...retentionShouldRemoveTheWorkspaceOfEveryPurgedConversationTest 
<<< FAILURE!
   Wanted but not invoked:
   [ERROR] Tests run: 19, Failures: 1, Errors: 0, Skipped: 0        # BUILD 
FAILURE
   
   $ mvn -B -ntp -o test -Dtest=AiConversationServiceTest
   [INFO] Tests run: 19, Failures: 0, Errors: 0, Skipped: 0         # BUILD 
SUCCESS
   
   $ mvn -B -ntp -o test -Dtest='org.apache.rocketmq.studio.ops.ai.**'
   [INFO] Tests run: 904, Failures: 0, Errors: 0, Skipped: 0        # BUILD 
SUCCESS
   ```
   
   **Teeth (both directions)**
   
   The new test verifies order, not just presence: `InOrder` requires 
`conversationRepository.deleteByIds(...)` **before** `workspace.delete(1)`, 
`(2)`, `(3)`. It fails if the workspace is never removed (the red run above) 
and would also fail if the workspace were removed before the rows. 
`AiConversationServiceTest.deleteShouldCascadeChildrenFirstAndRemoveTheWorkspaceTest`
 keeps the interactive path's ordering pinned and still passes.
   
   **Only one production caller**
   
   `grep -rn "deleteCascade" server/src/main/java/` → the declaration plus one 
call in `deleteExpiredConversations`. The interactive `delete(Long, String)` 
keeps its own cascade, so no request-serving path changes behaviour.
   
   **Why the default workspace directory does not make this harmless**
   
   `application.yml:119` defaults `workspace-dir` to `/tmp/rocketmq-studio-ai`, 
and `RmqctlWorkspace` notes that a container restart wipes `/tmp` — so on a 
default deployment the leftovers are cleared by a restart. But the property 
exists precisely so deployments can point it at a persistent volume, the sweep 
runs unattended every 24h (`AiConversationProperties.java:46`), and the 
transcript is the most sensitive artefact this feature writes. The retention 
promise ("90 days, then gone") should not depend on where the directory lives.
   
   **Duplicate check (re-run against the current indexes)**
   
   - Open PRs (205 titles) / open issues (214 titles), keywords `workspace`, 
`retention`, `purge`, `transcript`, `orphan`, `cleanup`, `disk` → #4647/#4648 
(alert snapshot retention) are the only retention items; the AI items (#4685, 
#4693, #4696, #4707, #4715, #4631, #4665, #4738, #4740) are run/stream or 
CLI-session lifecycle.
   - `git log -S "deleteCascade" -- 
server/src/main/java/.../AiConversationService.java` → the cascade has been 
database-only since it was introduced; no commit adds the workspace here.
   
   **Scoring**
   
   PRIORITY = 68 (impact 22 + blast radius 12 + reproducibility 18 + 
maintenance value 16); FIX_CONFIDENCE = 92.
   


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