Skip to content

test: run this commit's modsim and modpoll against each other (SIM-08) - #142

Merged
gavinying merged 1 commit into
v2from
sim-08-conformance
Nov 14, 2026
Merged

gavinying merged 1 commit into
v2from
sim-08-conformance

Conversation

@gavinying

Copy link
Copy Markdown
Collaborator

Summary

SIM-08 after TOOL-01: the tools are tested against each other at the same commit, not against old commits or releases.

  • Conformance model in modpoll-wot (tests/fixtures/conformance.tm.json): uint32 in all four byte and word orders, a word-swapped float32, a negatively scaled int16, an odd-length UTF-8 string, a bit extraction, float16 and a legacy-packed coil value, with simulation data and fingerprint vectors. modsim.tm.json stays the 37-point fixture modpoll compares with 1.x.
  • integration/ (new workflow integration): modsim serves the conformance model and modpoll reads it over Modbus TCP and over RTU on modsim --serial pty. Every value reads back; the registers on the wire match an encoding worked out in the test from the byte and word order rules; full-read reports validate against the model and record the transport; an address modsim does not serve is reported as exception 02; modpoll's examples/modsim.tm.json must stay identical to the shared fixture.
  • modsim's snapshot replay and catalog interop use this commit's modpoll, built and installed apart from modsim, instead of the 2.0.0a5 and 2.0.0a2 releases. The replay now expects the exact decimal modpoll exports (230.1); releases up to 2.0.0a5 exported 230.10000000000002, which modpoll-wot's scaled_raw property tests still accept.
  • modpoll's modsim-equivalence job keeps its pinned 1.x baseline and simulator on purpose: it compares 2.x with 1.x.

Verification

  • integration: 7 passed. modpoll-wot 128 passed, modpoll 263 passed / 51 skipped, modsim 156 passed / 5 skipped.
  • Catalog interop and snapshot replay run locally with the workspace's modpoll wheel; make check for modpoll and modsim; actionlint.

🤖 Generated with Claude Code

modpoll-wot gains a conformance model with every byte and word order and each
Form extension, its simulation data and fingerprint vectors. integration/
serves it with modsim and reads it with modpoll over Modbus TCP and RTU on a
virtual serial port: every value reads back, the registers on the wire match
an independent encoding, full-read reports validate against the model, an
unserved address is reported as exception 02, and modpoll's example copy of
the shared fixture cannot drift. modsim's snapshot replay and catalog interop
now use this commit's modpoll instead of the 2.0.0a5 and 2.0.0a2 releases;
the replay expects the exact decimal modpoll exports since then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gavinying
gavinying merged commit e16dbe6 into v2 Nov 14, 2026
21 checks passed
@gavinying
gavinying deleted the sim-08-conformance branch November 14, 2026 03:12
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.

1 participant