You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Return readable JSON when the editor rejects a state-edit request #327
Consolidated into #313. Closed only as a superseded review thread, following Joel Z. Leibo’s category guidance. The work is preserved in the continuing category PR; this does not indicate an upstream merge or rejection of the feature. Continuing issue: #313; continuing PR: #314.
Observed failure
On current main9e4173f, the standard visual editor can reset a connection when rejecting a POST to /cmd/set_component_state, preventing the caller from reading its JSON error. The existing HttpEndpointsTest.test_set_component_state_requires_paused reproduced ConnectionResetError: [Errno54] during response.read();17tests passed and1failed on macOS/Python3.12.
The handler returns for running or missing simulations before consuming the framed request body. Closing a socket with unread request bytes can reset it.
Requested fix
Read the existing Content-Length body before checking edit availability; keep guard messages/statuses and validate/modify state only when allowed. Cover both rejected requests and later successful recovery, without changing unrelated runtime or player APIs.
No simulation or model calls are needed to reproduce this HTTP transport defect.
Activity