fix(agentrun): read sandbox status from data payload#2218
fix(agentrun): read sandbox status from data payload#2218guslegend0510 wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
AgentScopeJavaBot
left a comment
There was a problem hiding this comment.
🤖 AI Review
This PR fixes how AgentRunDataPlaneHttp determines sandbox readiness during polling. The textStatus helper now reads data.status from the JSON response payload first, falling back to legacy top-level status / state fields. The change is minimal (+7 prod lines), well-scoped, and accompanied by regression tests covering all three lookup paths. The three-level fallback chain (data.status → status → state) is implemented cleanly, and Jackson's JsonNode.get(String) on non-Object nodes returns null safely. Test coverage is thorough with the extracted newHttp() helper improving readability.
AgentScopeJavaBot
left a comment
There was a problem hiding this comment.
🤖 AI Review
This PR fixes how AgentRunDataPlaneHttp determines sandbox readiness during polling. The textStatus helper now reads data.status from the JSON response payload first, falling back to legacy top-level status / state fields. The change is minimal (+7 prod lines), well-scoped, and accompanied by regression tests covering all three lookup paths. The three-level fallback chain (data.status → status → state) is implemented cleanly, and Jackson's JsonNode.get(String) on non-Object nodes returns null safely. Test coverage is thorough with the extracted newHttp() helper improving readability.
Summary
data.statusbefore falling back to legacy top-levelstatus/statefields.data.statuspriority and top-levelstatefallback.Fixes #2215
Tests
mvn -pl :agentscope-extensions-sandbox-agentrun -am -Dtest=AgentRunDataPlaneHttpTest test