Skip to content

fix(execution): serialize machine access so streaming and manual commands can't interleave #186

Closed

Description

@CameronBrooks11

Near-term stabilization — independent of the Machine-I/O epic.

Scope

A lock (or single command queue) around serial I/O so the background stream worker and a manual send can't read/write the same port concurrently; stop running blocking send_command inline in the interactive subprocess main loop (interactive.py); define manual-during-stream behavior (queue between commands, or reject with a clear status).

Why

Today _stream_worker and the main loop both call streamer.send_command on one serial port with no lock -> interleaved bytes corrupt the protocol; and inline sends block the whole subprocess.

Acceptance

  • Issuing a manual command during a stream cannot corrupt the protocol; behavior is documented and tested via the fake transport.

Activity

  1. added
    bug
    python
    on Jun 26, 2026
  2. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    Plan-review verdict (2026-06-25): SIMPLIFY hard. Shrink to the ~3-line reject manual send while streaming, WITH the #196 emergency-stop carve-out (stop must bypass the reject). Do not build a lock/queue — #199 redoes it server-side and #194 deletes interactive.py.

  3. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    Closing — superseded by the refactor (board triage). The serialize-access concern becomes the server-side lock in #199 plus the emergency-stop carve-out in #196 (per the plan review: don't build the lock/queue here — #199 redoes it and #194 deletes interactive.py). Reopen only to patch the current 0.7.4 build before the refactor lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpython

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions