BobSong-dev opened a new issue, #7954:
URL: https://github.com/apache/shenyu/issues/7954

   ## Background
   P1-10 in the mentor-approved OSPP plan; parent #7949. Remote session 
lifetime is different from request cleanup. Agent Gateway ingress remains 
stateless.
   
   ## Existing capabilities and reuse
   At master `87c22dde7`, RequestScopedMcpClient retains an optional upstream 
MCP-Session-Id, cancels tracked requests and performs session deletion on 
close, but non-2xx responses (including 404) follow the generic upstream-error 
path. Reuse request isolation and the legacy 
pending-request/duplicate-ID/disconnect fixes (#7638); those are not new work 
in this issue.
   
   ## Implementation scope
   - Detect protocol-defined remote session expiry/404; invalidate only the 
affected binding and safely reinitialize for subsequent eligible work, with 
bounded/coalesced recovery and catalog generation checks.
   - Never replay an already-issued tools/call during recovery. Return an 
explicit outcome for that invocation and avoid claiming the remote side effect 
did not occur.
   - Define idle reclamation, close deadlines and failure isolation so one 
failed cleanup cannot block other targets or leak all generations.
   - For supported deployments using the legacy MCP Server, first inventory 
existing session-level caps and TTL/idle behavior; fill only verified gaps and 
document maximum sessions and multi-replica routing constraints.
   
   ## Non-goals
   Stateful Agent Gateway ingress, exactly-once remote execution, automatic 
tool retries, rebuilding fixed pending-request isolation, or gateway-wide 
runtime draining (#7929).
   
   ## Acceptance criteria
   - [ ] Expired sessions cannot serve new work; concurrent expiry yields 
bounded reinitialization without resurrecting removed targets/credentials.
   - [ ] A dispatched tools/call is observed at most once by the test upstream 
even when it returns session-expiry or disconnects.
   - [ ] Idle and close-failure cases release local resources within bounds and 
preserve unrelated servers.
   - [ ] Stateless upstreams remain supported without invented session IDs.
   - [ ] Legacy session-level findings and supported multi-replica routing are 
documented; any required cap/TTL gaps have executable coverage.
   
   ## Tests
   Real MCP HTTP fixture with 404/expiry, concurrent calls, reconnect, late 
responses, hanging/failed DELETE and idle expiry; assert side-effect counts and 
resource cleanup. Extend legacy-server lifecycle tests only for missing 
session-level behavior; retain request-ID isolation regressions.
   
   ## Dependencies
   P0-01, P1-07 and P1-08. Coordinate with P1-09 credential revocation. #7929 
may reuse close hooks later but is not implemented here.


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