Repository navigation
fix(harness): scope gateway turn leases to each subscription - #3550
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@guslegend0510 Thanks for the review. The overlapping #3593 was closed in favor of this PR on November 10. The fix is still needed on main: the lease reference is shared outside The five checks on |
juruoO-o
left a comment
There was a problem hiding this comment.
Reviewed subscription-scoped turn lease ownership and completion/error/cancellation cleanup, including synchronous supplier failures.
No blocking findings in the reviewed diff. This was a static review of source and tests; local Java/Maven tests were not run.
Backport the verified fix to the 2.0.x implementation and retain its existing public contracts where the upstream kernel differs. (cherry picked from commit 3438964) Backport-review-patch: 392524ae509d6899c3f0bc31a1abe72fba081137 Constraint: No AgentScope Service or SDK migration Confidence: high Not-tested: Whole-repository verification pending after lane integration
Cancelling a queued subscription to a reused Gateway publisher could close the lease of a different, still-active turn. Keep each acquired lease and its cleanup inside that subscription's
deferboundary for bothrunandrunStream; defer the agent supplier too so synchronous failures still release the lease.Fixes #3549. Independent of #3533: no changes to
LocalSessionTurnGate.Verification: both public Gateway cancellation controls fail on current main and #3533, then pass with this change. Ten focused cases cover queued cancellation and completion/error/supplier-failure/active-cancellation paths for Mono and Flux.
mvn -T1 -pl agentscope-harness,agentscope-extensions/agentscope-extensions-controlplane -am clean verifypasses: 4,401 tests, zero failures/errors, 27 skips across seven modules, including formatting. This is scoped local verification with a fake agent and real local gate, not the full repository or a live deployment.