CryoThrust opened a new pull request, #13295:
URL: https://github.com/apache/seatunnel/pull/13295

   Yes, this is a contribution to Apache SeaTunnel.
   
   ## Problem and change
   
   The Mem0 sink acknowledges a successful HTTP response when 
`event_id.asText()` is nonblank. Consequently, `{"event_id":123}` and boolean 
IDs are accepted, although the hosted V3 contract requires a string event 
identifier. A valid object followed by invalid trailing content is also 
accepted. When JSON parsing does fail, the propagated parser exception can 
include the provider response in its message or source location.
   
   Validate the entire success response as JSON and require a nonblank string 
`event_id`. Report malformed JSON without retaining the parser exception or 
response body. Invalid acceptance payloads fail the write without entering the 
HTTP-status retry loop. The hosted V3 ADD-only profile and accepted 
at-least-once delivery guarantee are unchanged.
   
   Follow-up to #12233 and the response-validation boundary agreed in #12102. 
The API reference documents the response identifier: 
https://docs.mem0.ai/api-reference/memory/add-memories . No common HTTP client, 
engine, SPI, state format, or existing configuration changes.
   
   ## Verification
   
   Before the production change, 17 writer cases run with 6 failures: 
numeric/boolean IDs are acknowledged, two malformed-response cases expose a 
synthetic private marker, and trailing content is ignored. The remaining cases 
pass.
   
   The final suite additionally covers a null response body and a loopback HTTP 
server. The wire test verifies the POST path and required headers, rejects a 
numeric ID without retry despite `retry = 2`, and accepts the next explicit 
write with a valid string ID.
   
   On JDK 11, all 13 modules in the scoped dependency reactor pass `verify`: 
693 unit tests, zero failures/errors/skips, including all 19 Mem0 writer cases. 
The default Failsafe integration phase is skipped by the project configuration; 
the loopback HTTP check runs in the writer's unit suite. Scoped Spotless and 
the skip-tests `verify` also pass.
   
   ```sh
   ./mvnw -pl seatunnel-connectors-v2/connector-http/connector-mem0 
spotless:check
   ./mvnw -pl seatunnel-connectors-v2/connector-http/connector-mem0 -am verify
   ./mvnw -pl seatunnel-connectors-v2/connector-http/connector-mem0 -am 
-DskipTests verify
   git diff --check
   ```
   
   The EN/ZH documentation describes the acceptance and diagnostic behavior. No 
live Mem0 account or distributed Zeta/Flink/Spark job is exercised; the HTTP 
test uses the real connector HTTP client against a local server.
   


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