Jens-G opened a new pull request, #3563:
URL: https://github.com/apache/thrift/pull/3563

   ## Summary
   
   Wires `IncrementRecursionDepth` / `DecrementRecursionDepth` into 
`ReadStructBeginAsync` / `ReadStructEndAsync` / `WriteStructBeginAsync` / 
`WriteStructEndAsync` for all three netstd protocol implementations (Binary, 
Compact, JSON).
   
   The infrastructure (`IncrementRecursionDepth`, `DecrementRecursionDepth`, 
`RecursionLimit`, `TProtocolException.DEPTH_LIMIT`) has existed in `TProtocol` 
for some time but was never connected to the struct read/write entry points.
   
   Default limit: 64 levels (from `TConfiguration.DEFAULT_RECURSION_DEPTH`).
   
   No codegen changes needed — the generated `ReadAsync`/`WriteAsync` methods 
already call `ReadStructBeginAsync`/`WriteStructBeginAsync` on the protocol.
   
   ## Test plan
   
   - Added `TProtocolRecursionDepthTests` to 
`lib/netstd/Tests/Thrift.Tests/Protocols/`
   - 6 tests covering write and read paths for Binary, Compact, and JSON 
protocols
   - All 6 tests pass locally (`dotnet test --filter 
TProtocolRecursionDepthTests`)
   - Each test confirms `TProtocolException(DEPTH_LIMIT)` is thrown on the 
(limit+1)-th nested call
   
   🤖 Generated with [Claude Code](https://claude.ai/claude-code)


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