Skip to content

v0.2.0 — the interpreter half goes stable

Choose a tag to compare

@sfmskywalker sfmskywalker released this 20 Aug 22:17
· 39 commits to main since this release
b9f1411

Bpmn.Semantics and Bpmn.Runtime.InMemory reach nuget.org for the first time. All four packages now ship together from one base version, so matching versions across the set is always correct.

Why now

The interpreter half was held back through all of 0.1.x. Not because it was unfinished — because a host port has no evidence behind it until somebody other than its author implements it, and publishing an unvalidated port turns every fix to it into a breaking change against a public surface.

A second host has now implemented it, and produced better evidence than "it compiled": it found two real defects in the port, both fixed here with coverage.

Fixed

  • #13 — a cancelled transaction abandoned live work without issuing CancelWorkSubtree, then restarted a compensation handler on the same (BindingRef, IterationId) slot the host was still holding. Two live units for one slot, which BuildLiveWorkHandles collapses last-wins, so a later teardown could cancel the wrong execution. The host could not defend: its ledger has exactly two inputs and both are interpreter commands.
  • #15 — the same shape on the own-scope escalation activation, found by looking where #13 pointed. Work abandoned by an interrupting activation is now torn down rather than held by the host for the rest of the scope's life.

Both were structural rather than one-line: teardowns discovered inside the token propagation loop could not travel on the evaluation result, because the loop keeps only each step's state. They now ride the evaluation context and drain under the same never-on-a-fault rule.

Transaction cancellation and compensation went from no test coverage at all to a dedicated suite.

Breaking changes

The payload format is frozen at 1.0.0, and state persisted by 0.1.x no longer deserializes. 53 property names were normalized to camelCase before the format was frozen, and every serialized property now declares its wire name explicitly. The cost of normalizing was bounded while the library was pre-1.0 with no published schema behind it, and unbounded once consumers generate types from a 1.0 contract. Nothing had shipped against a published schema, so there is nothing to migrate. The schema is published as a build artifact in Bpmn.Model under schema/, and BpmnPayloadFormat.Version is deliberately separate from the package version.

A cancel end event now requires the SubtreeCancellation host capability, and a definition containing one is refused at graph-build time without it. It issues CancelWorkSubtree as of #13, so it has to declare it — capabilities are a claim, not a default.

A cancelled transaction's other live work now receives a real teardown instead of being left running. Hosts observe this: work that previously ran on after the transaction was abandoned is now cancelled.

Also

BpmnHostSnapshot's at-most-one-live-unit-per-slot rule is now stated as holding once a command batch has been applied in full, in order — not continuously. An interrupting path may emit the replacement StartWork ahead of the CancelWorkSubtree it supersedes, so apply commands in the order returned and key your ledger by handle, not by slot.

Install

dotnet add package Bpmn.Semantics --version 0.2.0
dotnet add package Bpmn.Runtime.InMemory --version 0.2.0

Deterministic builds with SourceLink and .snupkg symbols. No dependencies beyond the base class library and each other.