test(host): dialect matrix — one Profile drives host and device double#18
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #13 — the second consumer of the
Profileseam, which is whatjustifies it (the
Profiledataclass + host-side consumer already landed in #12).What
_dialect_device) and a parametrizeddialect matrix (
advanced_ok×emits_wait_when_idle× cap variants = 8cases) that exercises connect + a short stream for each dialect.
okand ADVANCED_OK boards work with the same host code; thehost resolves the same dialect it is driven with (
advanced_okinferred fromthe M115
ok, caps negotiated, wait-when-idle declared); an idlewaitheartbeat is consumed mid-stream without desyncing ok-per-command pacing.
_constantsliterals, binding it to the same generatedcontract the host parses — the seam read from both sides.
Test-only:
Profileand the host consumer already exist (#12), so this adds noproduction code.
Minimal-first note
Per-version literal fields on
Profile(mentioned in the issue's proposedapproach) are deferred to #14 (multi-version): nothing consumes the
per-version distinction yet, and the double binds to
_constantsdirectly, somock 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_okinference andwaitabsorption assertions areload-bearing), the ADVANCED_OK
ok P.. B..form withNomitted for a barecommand is realistic per Marlin's
ok_to_send, and the literal-field deferral isthe 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 testgreen (107 tests, 3.11–3.13). Closes #13.