hanzhe-one commented on PR #7865:
URL: https://github.com/apache/shenyu/pull/7865#issuecomment-6282091252

   Thanks for the review. All four points are addressed in `7e35e1d88`.
   
   **Blocking: namespace test on the old API** — fixed. 
`WebsocketDataChangedListenerNamespaceTest#capture()` now stubs 
`sendConfiguration`, keeps the captured `WebsocketData<?>` and serializes it 
with `GsonUtils` before parsing, so every existing assertion is unchanged. The 
class passes locally (13/13), and `pr_build` is running again.
   
   **Structured path only covered `MYSELF`** — you were right that this limited 
the benefit, and the fix was not just wording. `sendConfiguration` now accepts 
both snapshot event types (`MYSELF` for plugin/selector/rule, `REFRESH` for 
app-auth, meta-data, discovery and API-key) — see `isInitialSyncSnapshot`. I 
deliberately did not key it on `sync != null` alone: a `REFRESH` published for 
*another* connection while an attempt is active must not be sequenced into that 
attempt. The gate therefore still requires `sync.session == session` and 
`sync.structured`, and `testRefreshOnAnotherSessionKeepsLegacyEnvelope` covers 
exactly that case. The measurement section now states which groups are covered.
   
   **Two volatile fields** — replaced with a single immutable 
`EnvelopeDecision(masterKey, structured)` record read once per forward.
   
   **400 on a payload problem logged as a format rejection** — the message now 
says the master answered the structured envelope with status *N* and that a 
legacy retry follows, and `post()` returns the status so the successful-attempt 
log distinguishes the two. Both attempts' statuses are therefore visible, which 
is what makes the content-error case diagnosable; gating on a capability marker 
would need a new response field from the master, which is a protocol change 
beyond this task.
   
   **Repeated `new ObjectMapper()`** — replaced with a single imported 
`ObjectMapper` in both test classes.
   


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