Skip to content

fix(agentrun): read sandbox status from data payload#2218

Open
guslegend0510 wants to merge 3 commits into
agentscope-ai:mainfrom
guslegend0510:fix/2215-agentrun-ready-status
Open

fix(agentrun): read sandbox status from data payload#2218
guslegend0510 wants to merge 3 commits into
agentscope-ai:mainfrom
guslegend0510:fix/2215-agentrun-ready-status

Conversation

@guslegend0510

Copy link
Copy Markdown
Contributor

Summary

  • Read AgentRun sandbox readiness from data.status before falling back to legacy top-level status / state fields.
  • Add regression tests for data.status priority and top-level state fallback.

Fixes #2215

Tests

  • mvn -pl :agentscope-extensions-sandbox-agentrun -am -Dtest=AgentRunDataPlaneHttpTest test

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...nsions/sandbox/agentrun/AgentRunDataPlaneHttp.java 80.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.statusstatusstate) 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 AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.statusstatusstate) 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 AgentScopeJavaBot added bug Something isn't working area/harness agentscope-harness (test/runtime support) labels Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/harness agentscope-harness (test/runtime support) bug Something isn't working

Projects

None yet

2 participants