Skip to content

Report accepted queued commands and clear finished execution indices - #48

Merged
Jepson2k merged 22 commits into
mainfrom
feat/supervised-restart
Sep 19, 2026
Merged

Jepson2k merged 22 commits into
mainfrom
feat/supervised-restart

Conversation

@Jepson2k

@Jepson2k Jepson2k commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

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.

Jepson2k and others added 16 commits September 8, 2026 03:59
# 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
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
@Jepson2k
Jepson2k changed the base branch from feat/held-object-geometry to main September 19, 2026 02:59
Jepson2k and others added 3 commits September 18, 2026 23:00
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
@Jepson2k
Jepson2k merged commit 58f280d into main Sep 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants