Skip to content

Add opt-in serial reconnect support - #4

Merged
CAOShurong merged 1 commit into
mainfrom
codex/serial-reconnect
Aug 11, 2026
Merged

CAOShurong merged 1 commit into
mainfrom
codex/serial-reconnect

Conversation

@CAOShurong

Copy link
Copy Markdown
Owner

Why

Board uploads, resets, and brief USB disconnects routinely invalidate a serial handle. TermScope previously converted the first read error into a fatal exit. Arduino's own upload flow closes and reopens its monitor; maintained alternatives confirm reconnect is expected, but either do not plot (tio, SimpleCom) or require a separate GUI (serial-monitor-rust).

What changed

  • add opt-in --reconnect [SEC], preserving fail-fast behavior by default
  • retry only the originally selected OS path and show reconnecting in the header
  • never retry missing pyserial or invalid settings
  • interrupt retry waits on stop and discard cross-session partial lines
  • document identity/path, local-data, dependency, and physical-fixture boundaries
  • release version 0.3.0

Verification

  • red test observed first: constructor rejected reconnect and CLI rejected the flag
  • 174 unit/integration tests pass
  • Ruff lint/format, compileall, README regeneration check, build, and twine check pass
  • clean wheel install: version/help, demo success, missing replay failure, fail-fast missing COM, and bounded reconnect failure all observed with expected exit codes
  • clean sdist install and demo success observed
  • Windows host had no present serial fixture; real USB unplug/reset behavior remains explicitly unverified pending independent Windows/macOS/Linux hardware reports

@CAOShurong
CAOShurong merged commit 43ae0be into main Aug 11, 2026
12 checks passed
@CAOShurong
CAOShurong deleted the codex/serial-reconnect branch August 11, 2026 08:04
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.

1 participant