Skip to content

feat: own-stack image of go-sunspec, layout of the other harnesses (v0.2.0) - #4

Merged
boeboe merged 2 commits into
mainfrom
feat/own-go-sunspec
Nov 6, 2026
Merged

boeboe merged 2 commits into
mainfrom
feat/own-go-sunspec

Conversation

@boeboe

@boeboe boeboe commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Rolls out ADR-0012 (own-stack images) to sunspec-interop, following engineering/docs/own-stack-rollout.md with modbus-interop as the reference.

What changes

  • own/go-sunspec/ (Dockerfile, Makefile, README, Go adapter + tests) and .github/workflows/own-go-sunspec.yml (copied from modbus-interop's): manual only, builds ghcr.io/otfabric/sunspec-interop-otfabric from the latest go-sunspec release, tests it against the references and self-tests of the latest harness tag on amd64 and arm64, publishes :<go-sunspec version> and :latest from main only. Not in the release or manifest.json.
  • Layout aligned with the other harnesses: scripts/lib.sh (image_of honours ADAPTER_IMAGE_<adapter>), scripts/smoke.sh <adapter>, scripts/interop.sh <adapters…>, tests/cases.tsv, REQUIREMENTS.md (R1 names own/ as the one exception), compose.yaml. scripts/selftest.py stays the engine behind the two scripts; the cross-stack test now runs every client against every server. A client operation an image does not declare is unsupported, never a pass.
  • Contract 1.1 (additive): upstream.independentEngine in the capability document; pysunspec2 declares true, otfabric false; results.json takes independent from it. An undeclared client operation is a usage error.
  • R1 grep in ci.yml also names go-modbus and modbusctl (go-sunspec runs on go-modbus). The 11 plain "modbus" mentions under adapters/, scripts/, tests/, Makefile stay allowed.
  • versions.yaml: interop_version 0.2.0, contract_version 1.1, own_implementations.otfabric, base_images.*.used_by. RELEASE.md v0.2.0 notes in this PR, so that no release PR follows.

The otfabric adapter

  • Device: fixture → go-sunspec Server via go-modbus. The fixture holds raw values and go-sunspec takes engineering values, so a scaled point gets raw × 10^sf as an exact decimal (sf resolved as go-sunspec's encoder does). FC4 → exception 1 as the contract says (go-sunspec answers 2).
  • Client: scan only (Discover with base addresses 40000, 0, 50000 + ReadModels). write is not declared: go-sunspec's client does not write (its LIMITATIONS.md), so client write is a usage error and the write cases are unsupported with otfabric as the client. As a device it takes pysunspec2's writes.
  • print-registers equals pysunspec2's for all three fixtures except pad points (go-sunspec 0x8000, pysunspec2 0), recorded in docs/COMPATIBILITY.md; no case compares them.

Validation (local, macOS arm64)

  • make ci: green (smoke pysunspec2 8/8, interop 6/6, documents valid).
  • make -f own/go-sunspec/Makefile image smoke interop VERSION=dev (references built from this branch): smoke 8/8; interop 20 pass, 4 unsupported (otfabric client writes), 0 fail; documents valid.
  • Same against the published v0.1.0 reference: 20 pass, 4 unsupported.

After merge: tag v0.2.0 → Release, then run Own stack (go-sunspec) from main.

🤖 Generated with Claude Code

boeboe and others added 2 commits November 6, 2026 01:26
…0.2.0)

- own/go-sunspec/ and the manual "Own stack (go-sunspec)" workflow build
  ghcr.io/otfabric/sunspec-interop-otfabric from the latest go-sunspec
  release (ADR-0012): not a reference, not in a release or manifest.json.
- scripts/lib.sh (image_of honours ADAPTER_IMAGE_<adapter>), smoke.sh
  <adapter> and interop.sh <adapters>; every client against every server
  on tests/cases.tsv; an undeclared client operation is unsupported;
  results.json takes independent from the image.
- Contract 1.1: upstream.independentEngine; pysunspec2 declares true.
- R1 grep also names go-modbus and modbusctl; REQUIREMENTS.md, compose.yaml,
  versions.yaml own_implementations, docs, v0.2.0 notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es nothing

go-sunspec's suite (TestPeerReadsGoServer/otfabric/edge) found TotWhInj of
model 701, an acc64 with sf 0, one off after a float64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boeboe
boeboe merged commit 2c6e4d0 into main Nov 6, 2026
7 checks passed
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