Skip to content

test(host): dialect matrix — one Profile drives host and device double#18

Merged
CameronBrooks11 merged 1 commit into
mainfrom
test/dialect-matrix
Jun 26, 2026
Merged

test(host): dialect matrix — one Profile drives host and device double#18
CameronBrooks11 merged 1 commit into
mainfrom
test/dialect-matrix

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Implements #13 — the second consumer of the Profile seam, which is what
justifies it (the Profile dataclass + host-side consumer already landed in #12).

What

  • A Profile-driven device double (_dialect_device) and a parametrized
    dialect matrix (advanced_ok × emits_wait_when_idle × cap variants = 8
    cases) that exercises connect + a short stream for each dialect.
  • Proves: bare-ok and ADVANCED_OK boards work with the same host code; the
    host resolves the same dialect it is driven with (advanced_ok inferred from
    the M115 ok, caps negotiated, wait-when-idle declared); an idle wait
    heartbeat is consumed mid-stream without desyncing ok-per-command pacing.
  • The double emits _constants literals, binding it to the same generated
    contract the host parses — the seam read from both sides.

Test-only: Profile and the host consumer already exist (#12), so this adds no
production code.

Minimal-first note

Per-version literal fields on Profile (mentioned in the issue's proposed
approach) are deferred to #14 (multi-version): nothing consumes the
per-version distinction yet, and the double binds to _constants directly, so
mock and host already move together when codegen changes a literal. Adding the
fields now would be unused indirection.

Review

Adversarial review → APPROVE, no required changes. Confirmed the matrix is
non-trivial (the advanced_ok inference and wait absorption assertions are
load-bearing), the ADVANCED_OK ok P.. B.. form with N omitted for a bare
command is realistic per Marlin's ok_to_send, and the literal-field deferral is
the correct call (the limitation lands exactly where #14 owns it). One follow-up
filed: a behavioral AUTOREPORT-telemetry-interleave variant (tracked separately).

just check && just test green (107 tests, 3.11–3.13). Closes #13.

Add a Profile-driven device double and a parametrized matrix (advanced_ok ×
emits_wait_when_idle × cap variants, 8 cases) that exercises connect + a short
stream for each dialect. Proves bare-`ok` and ADVANCED_OK boards work with the
same host code, that the host resolves the same dialect it is driven with, and
that an idle `wait` heartbeat is consumed without desyncing ok-per-command
pacing. The double emits `_constants` literals, binding it to the same generated
contract the host parses — the Profile seam read from both sides.

Profile already landed in #12 and the host consumes it; this is the second
consumer that justifies the seam. Per-version literal fields on Profile are
deferred to #14 (multi-version) — nothing consumes the distinction yet, and the
double binds to `_constants` directly, so mock and host already move together.

Closes #13.
@CameronBrooks11
CameronBrooks11 merged commit 0a21672 into main Jun 26, 2026
5 checks passed
@CameronBrooks11
CameronBrooks11 deleted the test/dialect-matrix branch June 26, 2026 21:33
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.

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

1 participant