Repository navigation
Releases
v0.2.1 — trustworthy verdicts on OCPP 1.6, the v0.2 milestone closed
Trustworthy verdicts on OCPP 1.6 — the v0.2 milestone, closed.
Read this first
An observation-window extension was added and removed inside this release.
It was built on the reading that flaky scenarios were losing a late CSMS frame;
it was guarded, mutation-tested, shipped, and then measured on a live sweep,
where every scenario it extended hit its cap and failed anyway with the same
check counts as before. So the headline of this release is not a timing fix. It
is the ability to find out why a sweep was red — and the first finding that
ability produced.
The install guard no longer red-lights the branch that triggers it
tests/documented-install-ref.sh used to demand, at the moment it went red, an
action nobody can take from an unmerged branch: cutting a tag. It now accepts a
documented ref in either of two shapes — a released tag whose tck/driver.ts
matches the tree, or v<manifest version> ahead of every existing tag, the
clone having at least one so a tagless CI checkout cannot satisfy it. Changing
the driver contract is now a thing a pull request can finish. (#50)
It also caught a gap it was previously blind to: a documentation page and the
manifest disagreeing about the next release.
A flake now leaves evidence
Two defects meant no red sweep in this project's history could be diagnosed
afterwards, and both are fixed:
- the isolated retry overwrote the wire log of the attempt it was
adjudicating — the sweep keepsresults/<template-id>.log, a re-run writes
<template-id>.retry.log(#52); - CI never captured the CSMS's own log —
docker compose logsnow runs when
any scenario row goes red, not merely when the job fails, which is the case
that matters: an adjudicated flake leaves the job green (#52, #54).
tools/flake-report.ts aggregates archived results/ artifacts into a
per-scenario flake record. Over 119 artifacts it turned "some scenarios seem
flaky" into a table.
The first finding
One SteVe scenario flaked in 16 of 21 archived sweeps. With both logs in hand,
the first red run after the fix gave the cause: concurrent
StatusNotification(connectorId=0) from several charge points deadlock on
insert into evse (MariaDB error 1213), and SteVe returns the deadlock to the
charge point as a CALLERROR instead of retrying it. Three stations arriving
718 µs apart, two losing the race.
Reported upstream as steve-community/steve#2107 and recorded in the new
drivers/steve/README.md gap table. The suite needed no change: the isolated
retry already adjudicates it correctly, and declaring it would have been wrong.
Documentation that was saying the wrong thing
tck/expected.ts and CONTRIBUTING.md told driver authors that a scenario
which sometimes passes has a timing bug and the fix is the scenario. This
release is the counter-example: the fix was upstream, and re-tuning the timing
is exactly what was tried and measured to change nothing. The rule stands —
never declare a flake — with its diagnosis corrected.
Compatibility
tck/driver.ts is byte-identical to v0.2.0, so the driver contract has not
moved and the exports map is unchanged. Upgrading is safe for anyone who has
written a driver against v0.2.0.
bun add github:juherr/open-ocpp-tck#v0.2.1v0.2.0 — a second CSMS, declared expected failures, and the answers a CSMS owes
⚠️ 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
assertAllAnsweredreports 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
allsweep.
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_021comparesChangeConfiguration's members, not their order.TC_019_1accepts aGetConfigurationwith its optionalkeymember
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
- If your driver reads
module.scopeormodule.capabilitiesdirectly,
switch todriverScope(module, env)/driverCapabilities(module, env).
Declaring a plain table is unchanged. - 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.0Full diff: v0.1.0...v0.2.0
v0.1.0 — the OCPP 1.6 TCK, extracted as a standalone package
First standalone release. Extracted from a private mono-repo where this harness
was built to certify two CSMSs and grew a CSMS-neutral core in the process —
squashed rather than filtered, because that history also contains a driver for a
third party's private CSMS.
What is here
tck/— the runner, the OCPP-J assertion engine, the simulator launcher,
47 scenario specs, and the driver contract.drivers/steve/
— the reference driver. SteVe is the CSMS these scenarios were originally
written against, and
CONTRIBUTING.md
is how to write your own.patches/and
VENDOR.md
— the exact diff of every vendored file against upstream, with per-file
provenance: upstream digest, local digest, patch.
The point of the package
CSMS_DRIVER is a module specifier — a path or a package name — so a driver for
a CSMS this repository has never heard of is a file somebody writes elsewhere
and one environment variable. No file under tck/ names a CSMS, and
tests/generic-core.sh fails the build if one starts to. The extraction is
itself the proof: the driver that motivated the generalisation lives in a
different repository and depends on this one as a package.
Vendoring and licence
Roughly half of tck/ is vendored from
shiv3/ocpp-cp-simulator
(Apache-2.0) at 604054ad. The rest is new, and Apache-2.0 too rather than
something more permissive, because it is meant to go back upstream: VENDOR.md
marks each such file local-upstreamable.
The claim is checked rather than asserted: the vendor-integrity guard
reverse-applies each patch and verifies it reconstructs the pinned upstream
digest, so Apache-2.0 §4(b) is satisfied by a verified artifact.
Project hygiene
Three more guards run on every build: generic-core (no CSMS named under
tck/, and the core imports no driver), spec-invariants (a change to what a
scenario measures shows up as a diff in the pull request), and types-current
(the committed declarations match the sources). types/ is generated and
committed on purpose — consumed as a pinned git dependency, this package cannot
rely on prepack running.
Install
bun add github:juherr/open-ocpp-tck#v0.1.0The driver contract changed in
v0.2.0
(scope/capabilities,expectedFailures). If you are writing a driver,
read that release before pinning here.