Skip to content

v0.2.0 — a second CSMS, declared expected failures, and the answers a CSMS owes

Choose a tag to compare

@juherr juherr released this 17 Aug 07:39
· 365 commits to main since this release
2ecae60

⚠️ Breaking changes — the driver contract

CsmsDriverModule.scope and .capabilities are unions. A CSMS with
incompatible release lines has a scope table that depends on which server the
driver is pointed at, and a static field left nowhere for that to come from.
Declaring a plain table still compiles; reading one off a module now needs
driverScope(module, env) / driverCapabilities(module, env). (#9)

A declared expected failure excuses an answer, never a crash. A driver
declaring expectedFailures no longer has an ERROR excused on those
scenarios. Nothing changes for a driver that declares none, and nothing changes
for a declared scenario that fails the way it says it does.

A second CSMS

drivers/citrineos/
joins SteVe as a bundled driver, covering both release lines — scope-checked
separately as citrineos and citrineos-v1. It reads and seeds through the
GraphQL data API; the SteVe driver moved to SteVe's WebAPI rather than its
database. CI drives both stacks from a single matrix job, and both conformance
sweeps are blocking.

Expected failures are declared, not discovered

A driver can now state, per scenario, the finding it is expected to produce — so
a CSMS with a known gap yields a classified row instead of a red sweep, and the
run says so when a declared failure stops failing. (The rule is a pure
function over verdict × retry × declaration, which makes it a 16-row table
asserted offline, rather than a behaviour you would need an adversarial CSMS to
observe.)

What the CSMS owes is now measured

  • assertAllAnswered reports how the CSMS answered every charge-point
    request, instead of leaving an unanswered CALL invisible.
  • The 47 scenarios were audited against the OCA CSMS test cases — see
    OCA-COVERAGE.md,
    and
    OCA-OBLIGATIONS.txt
    for the table the build holds them to.
  • An obligation that no scenario exercises is now reported as unexercised —
    orange, neither a pass nor a failure — instead of passing silently.
  • The authorize group folded into the all sweep.

Driver operability

ocpp-tck driver selftest (read-only, seconds, needs a running CSMS), and
provision | verify | teardown verbs for the reference environment. A sweep
refuses to start when another one is already driving the same charge point, and
both bundled CSMS stacks are repeatable on a single docker daemon.

Correctness — assertion engine and specs

  • A truncated tail is forgiven whole, not just its last frame.
  • An interrupted or unrestored run is no longer reported as a verdict.
  • TC_021 compares ChangeConfiguration's members, not their order.
  • TC_019_1 accepts a GetConfiguration with its optional key member
    omitted — the scenario had been measuring a spelling that both bundled
    drivers happened to share.

Project hygiene

Both documented install commands were broken at once, and had been for a
hundred-odd commits; a guard now holds every tracked page to citing one install
ref that resolves to the contract it documents. Alongside it: scripted re-pinning
of vendored patches so a patch and its digest cannot drift, mutation-testing so a
new guard is seen failing for its own reason before it ships, and the usual
hardening — SteVe's database password out of docker's argv, its port bound to
loopback, Actions pinned by commit SHA.

Upgrading from v0.1.0

  1. If your driver reads module.scope or module.capabilities directly,
    switch to driverScope(module, env) / driverCapabilities(module, env).
    Declaring a plain table is unchanged.
  2. If it declares expectedFailures, re-check any row that was passing on an
    ERROR — that is no longer excused.

Writing a driver from scratch:
CONTRIBUTING.md.

Install

bun add github:juherr/open-ocpp-tck#v0.2.0

Full diff: v0.1.0...v0.2.0