Skip to content

Epic: MVP — reliably drive a Marlin controller #5

Closed

Description

@CameronBrooks11

Goal: a host library that reliably drives a Marlin controller (connect → reliable send → stream → out-of-band e-stop → query), replacing fiberpath's broken streamer.

Design (locked): synchronous request→ok; pure core, pyserial optional; literals generated from a pinned Marlin source via codegen (CI drift-gated); serve streaming + interactive equally; pin latest stable but design for multi-version. Full plan: working/mvp-plan.md; codegen: working/codegen.md.

Milestones

Corresponds to the fiberpath Marlin-I/O epic (fiberpath/fiberpath#187) and issues #179–#182, #188, #196.

Dialect & behavioral-mock track (post-MVP hardening)

From the working/dialect-and-mock-investigation.md design (one Profile seam:
version produces it, M115 negotiation fills it, host + mock consume it).

Activity

  1. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    Codegen scope decided (multi-agent assessment). Full opportunity-space review (working/codegen-assessment.md) → widen exactly one notch now, defer the rest:

    • Tier 1 — done (a80c7bc): generate FATAL_MARKERS from language.h (kill/halt, thermal runaway, heating failed, MAX/MINTEMP, stopped, !! KILL). Parser now classifies any line with a fatal marker as HALT — safety-critical so the host stops streaming into a dead/thermally-tripped controller. Feeds the M3 safety path. (The pinned pull also caught a real version delta vs bugfix-2.1.x — validating why codegen reads pinned vendor/.)
    • Tier 2 — deferred until a consumer exists: M115 Cap: names (when feature-gating logic lands), //action: verbs (when pause/resume/prompt dispatch lands), G-code inventory (help table only), PROTOCOL_VERSION/keepalive defaults (when version-gating lands). All ~10-line adds, so no carrying cost to deferring.
    • Tier 3 — skip: M114/M105 field schemas (macro-expanded, board-dependent — hand-write a tolerant regex) and buffer/baud constants (config-template defaults, misleading).

    Next: the MarlinHost (#2 / M3) payload.

  2. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    Hardware-free MVP core complete. Progress:

    66 tests, all hardware-free, CI-gated. The library's logic core can drive a controller end-to-end against FakeTransport; only the real serial wire + validation remain.

  3. CameronBrooks11 commented on Jun 26, 2026

    @CameronBrooks11
    MemberAuthor

    Code-complete for hardware bring-up. Merged overnight via PRs:

    Full MVP now: parser · codegen (pinned, drift-gated, fatal markers) · framing · transport (Fake/Serial/Tracing) · MarlinHost (send/stream/capabilities/e-stop) · console. 81 tests, all hardware-free, CI-gated.

    Only remaining: #4 hardware validation — tune SerialTransport.reset() DTR timing, capture real traces (via --log) → replay as corpus tests, confirm the modeled contract. Needs the physical winder.

  4. CameronBrooks11 commented on Jun 28, 2026

    @CameronBrooks11
    MemberAuthor

    MVP achieved and shipped — marlin-host 0.2.1 on PyPI, hardware-validated on a real RAMPS 1.4 / Marlin bugfix-2.1.x board. M0-M4 + Mh + codegen done: connect/M115 negotiation, reliable framed send, streaming + pause/resume, out-of-band M112 e-stop + recovery, plus on_action / list_ports / position and a thread-safe io-lock. fiberpath now consumes it (fiberpath/fiberpath 0.9.0). Remaining as standalone issues: #4 (12V hardware validation) and the deferred dialect items #14/#15/#19. Closing the MVP epic.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions