Skip to content

Epic: reliable, conformance-tested Marlin machine-I/O #187

Closed

Description

@CameronBrooks11

Problem

The machine-I/O layer (fiberpath/execution/marlin.py + the GUI's interactive subprocess + the Tauri marlin.rs bridge) is an optimistic wrapper, not a protocol implementation:

  • No formal contract — Marlin responses are matched by ~5 hardcoded string checks in _await_ok; no line-number / checksum / resend reliability; no spec doc.
  • No hardware-free tests — nothing is testable without a physical machine, so fixes are guesses and regressions are invisible until someone plugs in a board.
  • Fragile runtime — silent infinite hangs (echo:busy resets the timeout forever), no send timeout, unsynchronized serial access (stream worker + manual sends share one port), connection readiness guessed by waiting for silence, and ports not released on stop.
  • Drifting IPC — the Rust MarlinResponse enum, the Python send_response emitter, and the TS types are three hand-maintained copies.
  • No human console — the interactive session protocol is GUI-only JSON; the CLI exposes only one-shot stream.

This is the hardware-facing analog of the .wind open-format work (#141): rebuild machine-I/O as a first-class, spec'd, conformance-tested component.

Plan (phased)

Phase 1 — Observability & access

Phase 2 — Hardware-free testability

Phase 3 — Formal protocol contract

Phase 4 — Streaming

Phase 5 — Contract unification

Related near-term stabilization (independent — NOT blocking this rebuild)

These fix the acute live failures and can land immediately (hardware on hand):

Notes

Transport decision (resolved — see #195)

This epic is the Marlin host-protocol layer (parser, reliability, lifecycle, corpus, console). How it's exposed to the GUI is decided in #195: a REST job resource (polled), not a stdio event protocol. The protocol work here (#178–#183) is transport-independent and unchanged; #190 consumes it.


Plan-review refinements (2026-06-25)

Activity

  1. added
    epic
    roadmap
    on Jun 26, 2026
  2. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    The Marlin host-I/O work is being built in the dedicated fiberpath/marlin-host repo (lib name locked marlin-host, Apache-2.0), per the extraction plan (#188). Progress so far: scaffold + response taxonomy/parser, a pinned-source codegen pipeline (CI drift-gated), and line framing. Tracking epic: fiberpath/marlin-host#5 (milestones map to #179–#182/#196 here). fiberpath will depend on marlin-host rather than fiberpath/execution/marlin.py.

  3. CameronBrooks11 commented on Jun 28, 2026

    @CameronBrooks11
    MemberAuthor

    Status: the protocol layer is now realized in the standalone marlin-host library — #178 (console/tracing), #179 (replay + conformance corpus), #180 (taxonomy/parser), #181 (line numbering/checksum/resend), #182 (DTR/reset lifecycle) are all implemented there, plus M115 capability negotiation and out-of-band M112. marlin-host==0.1.0 is on PyPI and hardware-validated. Remaining work is the consumer cutover (fiberpath onto marlin-host + machine control on the API sidecar), tracked in epic #259.

  4. CameronBrooks11 commented on Jun 28, 2026

    @CameronBrooks11
    MemberAuthor

    Delivered via the standalone marlin-host library. The protocol layer — #178 (console/tracing), #179 (replay + conformance corpus), #180 (taxonomy/parser), #181 (line numbering/checksum/resend), #182 (DTR/reset lifecycle) — is implemented and published (marlin-host 0.2.1, hardware-validated). #184 was folded into #195; the acute stopgaps #185/#186 landed; #183 is superseded by marlin-host #15. The consumer cutover shipped via #195 (0.9.0). Closing.

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

    epicroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions