Skip to content

test(host): cover AUTOREPORT telemetry-interleave as wire behavior, not just a cap flag #19

Closed

Description

@CameronBrooks11

Problem (minor coverage gap, from #13 review)

The design's dialect-axes table (working/dialect-and-mock-investigation.md) lists
AUTOREPORT temp/pos as a load-bearing axis: with AUTO_REPORT_TEMPERATURES /
AUTO_REPORT_POSITION, the controller pushes unsolicited T:... / position
lines on a timer, interleaved with command traffic. The dialect matrix
(tests/test_host.py::test_dialect_matrix_connect_and_stream) parametrizes
AUTOREPORT_TEMP only as a negotiated cap flag (asserted via profile.has) —
never as wire behavior.

Mechanically an unsolicited T: mid-stream is absorbed by the same catch-all in
_await_terminal (marlin_host/host.py) as the already-tested wait heartbeat,
so this is low-risk — but it is an axis the design calls load-bearing that is only
covered as a flag, not behaviorally.

Proposed approach

Extend the Profile-driven device double (_dialect_device) to optionally push an
unsolicited T:... line ahead of (or between) command acks when
caps["AUTOREPORT_TEMP"] is set, and add a matrix variant asserting a short stream
still completes in sync (parser classifies the line as TEMPERATURE, host ignores
it). Keep it minimal — same shape as the existing wait case.

Acceptance criteria

  • A matrix case streams with interleaved unsolicited T: lines and stays in sync
    (all acks, correct commands_sent).
  • No host changes required (telemetry already absorbed); test-only.

Part of #5. Low priority (the underlying path is already exercised by the wait case).

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