Skip to content

feat: minimal Profile dataclass + dialect matrix test via the resend responder #13

Closed

Description

@CameronBrooks11

Problem

The host must tolerate the dialect axes the investigation identified (bare ok vs
ok N P B ADVANCED_OK; AUTOREPORT temp/pos present or not; wait-when-idle), but
there's no parameterized test that drives both the host and a device double
from one shared descriptor. Today each variant is a hand-written canned fixture.

Proposed approach

Introduce a minimal frozen Profile dataclass — firmware, caps, advanced_ok,
emits_wait_when_idle, and literal fields defaulting to _constants (the
version-pinned generated contract, so mock and host move together if codegen
changes a literal). This is Profile's first genuine consumer; building the
unifying dataclass before a real second consumer existed would be premature
unification, which is why it lands here, not earlier.

Drive both sides from one Profile: parameterize host tests over advanced_ok ×
cap variants × emits_wait_when_idle, fed through the stateful resend responder
(from #11) extended to honor the profile's advanced_ok + literals.

Acceptance criteria

  • A pytest matrix exercises connect + a short stream for each Profile variant.
  • A bare-ok profile and an ok N P B (ADVANCED_OK) profile both pass with the
    same host code.
  • An emits_wait_when_idle profile's wait heartbeat does not desync connect or
    streaming.
  • just check && just test green.

Evidence

Design doc dialect-axes table (#1/#3/#10/#11); marlin_host/protocol.py:78-95,
marlin_host/host.py:153-166,308-311.
Design: working/dialect-and-mock-investigation.md (Next). Depends on #11, #12.

Part of #5.

Activity

  1. added
    enhancement
    on Jun 26, 2026
  2. added a commit that references this issue on Jun 26, 2026
    0a21672
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions