Report accepted queued commands and clear finished execution indices - #48
Merged
Merged
Conversation
This was referenced Sep 8, 2026
# Conflicts: # parol6/server/segment_player.py
CancelAll travels the planner's command FIFO behind plans already queued, and the worker only clears its blend buffer on it, so commands still in the planner's inbox when Stop arrived were emitted afterwards and played: a stop left an empty queue and an idle executing index for the moment the restart review looked, then the arm moved. Plans now carry the generation they were submitted under; a cancel starts a new one and the proxy drops every segment from an older generation on the way back. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ervised-restart # Conflicts: # tests/integration/test_stop_semantics.py
The queue's contents are maintained in three places -- the planner's pending list, the blend consumption that swallows indices, and the executing-index exclusion -- and none of them were exercised: the only test change swapped a namespace for a state object with the pending list left empty. Dropping either mechanism left the suite green. This drives the client against the simulated controller: a paused queue lists what is owed, a resumed one drains to empty, a blend chain takes its consumed indices with it, the executing command is not listed as owed work as well, and a Stop clears the queue and the pause it was holding. Both mechanisms were checked by breaking them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ervised-restart # Conflicts: # parol6/commands/query_commands.py
# Conflicts: # tests/unit/test_command_completion_wire.py
Jepson2k
marked this pull request as ready for review
September 18, 2026 03:20
A planner-side failure carries the generation of the command it answers, so it is not discarded as pre-stop work after a Stop. An ERROR frame keeps the failed command's index until the next activation or cancel. The queue readback drops a chain the moment its head starts, consumed blend members included, so QUEUE lists only commands not yet started. The polling and dry-run row helpers live in conftest. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N8zt66KjkzgZLtQuSfJd9r
# Conflicts: # parol6/server/controller.py # tests/unit/test_query_commands_actions.py
Main already carries this branch's planner-generation fix as a cherry-pick (05f5f95), and the two branches added tests at the same point; the merge keeps this branch's layout, so the tree is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GMMP6KSdDFv5ZaJXC7ALii
Both profiles were only ever asked for rest-to-rest motion, so interpolatepy was supplying two closed-form curves through a general API, sampled one Python call at a time. Sampling them here vectorises that and drops the dependency, whose 3.3.0 removed the module the trapezoid import named and ships no Windows or Python 3.14 wheels. Positions match the previous output to 6e-9 rad across randomised cases, which is a thousandth of a motor step. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GMMP6KSdDFv5ZaJXC7ALii
Completion and status waits pace themselves on the status stream, and on 3.11 asyncio.wait_for can swallow an outer cancellation when its child wakes in the same turn. The status event wakes at the broadcast rate, so an expired caller deadline was consumed there and the query loop spun on with no deadline left to fire: a 0.3s wait hung until the suite timeout killed it. asyncio.timeout re-raises instead, which is why _request was already written against it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GMMP6KSdDFv5ZaJXC7ALii
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Queue readback includes accepted commands still waiting for planning or paused execution, and clears completed or cancelled indices. Supervised restart can therefore check whether the controller still has pending work. Completion waits inherit the parent branch’s exact command results and controller-session checks; unrelated concurrent tool completion cannot satisfy paused arm work.
Validation: real fake-serial regressions reproduced false completion of paused or cancelled arm work, late-response confusion, and missed controller restarts. Restart detection also watches independent status broadcasts when the command socket stops receiving after a peer reset. The latest change passes 16 controller/tool/lifecycle/error checks and 13 Commander pause, nested-skill, blended-stepping, recording, restart, and project-import workflows. Formatting and type checks pass. Query and acknowledgement receives preserve caller cancellation when a controller reply arrives concurrently, avoiding the Python 3.11 wait_for cancellation race observed in CI. The integration workflow cancels a query on arrival of a real controller reply and confirms subsequent queries still work. The latest CI run passes all twelve combinations of Linux, macOS, Windows and Python 3.11–3.14, plus lint. Each primary suite contains 314 cases (306 passed and eight separately executed examples skipped on Linux/macOS; 305 passed and the additional SIGKILL-only test skipped on Windows). All eight examples also pass in their separate job step on every combination.
Stacked on held-object geometry. Companion PRs: Commander, PAR6. waldoctl #36 was closed without merging; this PR needs no waldoctl change and builds against waldoctl v0.14.0.